From 40df26757a61d4f057bcbf38cd5fe949d1c9be95 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Sep 2012 19:58:34 -0400 Subject: [PATCH] copy: avoid updating location log when no copy is performed git annex copy --to remote often does not need to copy a file, but it was still updating the location log in this case. --- Command/Move.hs | 9 +++++---- debian/changelog | 6 ++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Command/Move.hs b/Command/Move.hs index 36242f45c1..41daab4b26 100644 --- a/Command/Move.hs +++ b/Command/Move.hs @@ -92,15 +92,16 @@ toPerform dest move key file = moveLock move key $ do ok <- upload (Remote.uuid dest) key (Just file) noRetry $ Remote.storeKey dest key (Just file) if ok - then finish + then finish True else do when fastcheck $ warning "This could have failed because --fast is enabled." stop - Right True -> finish + Right True -> finish False where - finish = do - Remote.logStatus dest key InfoPresent + finish remotechanged = do + when remotechanged $ + Remote.logStatus dest key InfoPresent if move then do whenM (inAnnex key) $ removeAnnex key diff --git a/debian/changelog b/debian/changelog index 57369ff064..c102a3f7bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +git-annex (3.20120925) UNRELEASED; urgency=low + + * copy: Avoid updating the location log when no copy is performed. + + -- Joey Hess Mon, 24 Sep 2012 19:58:07 -0400 + git-annex (3.20120924) unstable; urgency=low * assistant: New command, a daemon which does everything watch does,