diff options
author | Joey Hess <joey@kitenet.net> | 2012-09-24 19:58:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-09-24 19:58:34 -0400 |
commit | 829f6c646288c3bfb37446b04fddf8cccadbbf49 (patch) | |
tree | 5d768666accd51c12e2b38c9026df86c3d8ea18b /Command | |
parent | ea4807b3bfaf2e66506abd5c5c91ef9fdedda8a5 (diff) |
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.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Move.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Command/Move.hs b/Command/Move.hs index 36242f45c..41daab4b2 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 |