diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-05 13:41:48 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-05 13:41:48 -0400 |
commit | 618c9513f5599fe89be1624e6379818f05f9925b (patch) | |
tree | 58f8000f1bab1b14c012d6092a31844f3d466b65 /Assistant/Threads/Committer.hs | |
parent | 7c9513f161dd6b3671747c6f54c7a259bafb155c (diff) |
assistant: Fix location log when adding new file in direct mode.
Diffstat (limited to 'Assistant/Threads/Committer.hs')
-rw-r--r-- | Assistant/Threads/Committer.hs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs index c11c6667e..3d0148b02 100644 --- a/Assistant/Threads/Committer.hs +++ b/Assistant/Threads/Committer.hs @@ -18,6 +18,7 @@ import Assistant.DaemonStatus import Assistant.Threads.Watcher import Assistant.TransferQueue import Logs.Transfer +import Logs.Location import qualified Annex.Queue import qualified Git.Command import qualified Git.HashObject @@ -204,15 +205,17 @@ handleAdds delayadd cs = returnWhen (null incomplete) $ do liftAnnex showEndFail return Nothing done change file (Just key) = do - link <- liftAnnex $ ifM isDirect - ( calcGitLink file key - , Command.Add.link file key True - ) - liftAnnex $ whenM (pure DirWatcher.eventsCoalesce <||> isDirect) $ do - sha <- inRepo $ - Git.HashObject.hashObject BlobObject link - stageSymlink file sha - showEndOk + liftAnnex $ do + logStatus key InfoPresent + link <- ifM isDirect + ( calcGitLink file key + , Command.Add.link file key True + ) + whenM (pure DirWatcher.eventsCoalesce <||> isDirect) $ do + sha <- inRepo $ + Git.HashObject.hashObject BlobObject link + stageSymlink file sha + showEndOk queueTransfers Next key (Just file) Upload return $ Just change |