From 817d8654a49bad84c9571ace14a674960ecc1084 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Thu, 15 Oct 2015 11:49:41 +0100 Subject: [PATCH] Verify if asked even in dry-run, results should match just not delete --- commands/command_prune.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/command_prune.go b/commands/command_prune.go index b80f5638..9a3b0e69 100644 --- a/commands/command_prune.go +++ b/commands/command_prune.go @@ -117,7 +117,7 @@ func prune(verifyRemote, dryRun, verbose bool) { var verifiedObjects lfs.StringSet var totalSize int64 var verboseOutput bytes.Buffer - if verifyRemote && !dryRun { + if verifyRemote { lfs.Config.CurrentRemote = lfs.Config.FetchPruneConfig().PruneRemoteName // build queue now, no estimates or progress output verifyQueue = lfs.NewDownloadCheckQueue(0, 0, true) @@ -131,12 +131,12 @@ func prune(verifyRemote, dryRun, verbose bool) { // Save up verbose output for the end, spinner still going verboseOutput.WriteString(fmt.Sprintf(" * %v (%v)\n", pointer.Oid, humanizeBytes(pointer.Size))) } - if verifyRemote && !dryRun { + if verifyRemote { verifyQueue.Add(lfs.NewDownloadCheckable(&lfs.WrappedPointer{Pointer: pointer})) } } } - if verifyRemote && !dryRun { + if verifyRemote { // this channel is filled with oids for which Check() succeeded & Transfer() was called verifyc := verifyQueue.Watch() var verifywait sync.WaitGroup