From 800c95dc4181e1cc5c8a2917db0d8f6e2d40031c Mon Sep 17 00:00:00 2001 From: Jarek Kowalski Date: Sat, 6 Oct 2018 09:36:27 -0700 Subject: [PATCH] cli: 'snap list' switched to ellided snapshot list by default (can be changed with '-a') --- cli/command_snapshot_list.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/command_snapshot_list.go b/cli/command_snapshot_list.go index 02f424f46..bef53660c 100644 --- a/cli/command_snapshot_list.go +++ b/cli/command_snapshot_list.go @@ -27,7 +27,7 @@ var ( snapshotListShowRetentionReasons = snapshotListCommand.Flag("retention", "Include retention reasons.").Default("true").Bool() snapshotListShowModTime = snapshotListCommand.Flag("mtime", "Include file mod time").Bool() shapshotListShowOwner = snapshotListCommand.Flag("owner", "Include owner").Bool() - snapshotListSkipIdentical = snapshotListCommand.Flag("skip-identical", "Skip identical snapshots").Bool() + snapshotListAll = snapshotListCommand.Flag("all", "Do not skip identical snapshots").Short('a').Bool() maxResultsPerPath = snapshotListCommand.Flag("max-results", "Maximum number of results.").Default("1000").Int() ) @@ -131,7 +131,7 @@ func outputManifestFromSingleSource(ctx context.Context, rep *repo.Repository, m outputElided := func() { if elidedCount > 0 { fmt.Printf( - " + %v identical snapshots until %v\n\n", + " + %v identical snapshots until %v\n", elidedCount, formatTimestamp(maxElidedTime), ) @@ -199,7 +199,7 @@ func outputManifestFromSingleSource(ctx context.Context, rep *repo.Repository, m } oid := ent.(object.HasObjectID).ObjectID() - if *snapshotListSkipIdentical && oid == previousOID { + if !*snapshotListAll && oid == previousOID { elidedCount++ maxElidedTime = m.StartTime continue