avoid update-index race
This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
parent
82c5dd8a01
commit
54d49eeac8
7 changed files with 91 additions and 46 deletions
|
@ -164,7 +164,7 @@ addDirect file cache = do
|
|||
mergeDirect :: Maybe Git.Ref -> Maybe Git.Ref -> Git.Branch -> Annex Bool -> [Git.Merge.MergeConfig] -> Git.Branch.CommitMode -> Annex Bool
|
||||
mergeDirect startbranch oldref branch resolvemerge mergeconfig commitmode = exclusively $ do
|
||||
reali <- liftIO . absPath =<< fromRepo indexFile
|
||||
tmpi <- liftIO . absPath =<< fromRepo indexFileLock
|
||||
tmpi <- liftIO . absPath =<< fromRepo (indexFileLock . indexFile)
|
||||
liftIO $ whenM (doesFileExist reali) $
|
||||
copyFile reali tmpi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue