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.
This commit is contained in:
parent
72b14ec998
commit
40df26757a
2 changed files with 11 additions and 4 deletions
|
@ -92,15 +92,16 @@ toPerform dest move key file = moveLock move key $ do
|
||||||
ok <- upload (Remote.uuid dest) key (Just file) noRetry $
|
ok <- upload (Remote.uuid dest) key (Just file) noRetry $
|
||||||
Remote.storeKey dest key (Just file)
|
Remote.storeKey dest key (Just file)
|
||||||
if ok
|
if ok
|
||||||
then finish
|
then finish True
|
||||||
else do
|
else do
|
||||||
when fastcheck $
|
when fastcheck $
|
||||||
warning "This could have failed because --fast is enabled."
|
warning "This could have failed because --fast is enabled."
|
||||||
stop
|
stop
|
||||||
Right True -> finish
|
Right True -> finish False
|
||||||
where
|
where
|
||||||
finish = do
|
finish remotechanged = do
|
||||||
Remote.logStatus dest key InfoPresent
|
when remotechanged $
|
||||||
|
Remote.logStatus dest key InfoPresent
|
||||||
if move
|
if move
|
||||||
then do
|
then do
|
||||||
whenM (inAnnex key) $ removeAnnex key
|
whenM (inAnnex key) $ removeAnnex key
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
git-annex (3.20120925) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* copy: Avoid updating the location log when no copy is performed.
|
||||||
|
|
||||||
|
-- Joey Hess <joeyh@debian.org> Mon, 24 Sep 2012 19:58:07 -0400
|
||||||
|
|
||||||
git-annex (3.20120924) unstable; urgency=low
|
git-annex (3.20120924) unstable; urgency=low
|
||||||
|
|
||||||
* assistant: New command, a daemon which does everything watch does,
|
* assistant: New command, a daemon which does everything watch does,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue