ensure merge directory is empty before starting merge
Don't want some past failed merge to lead to bad results, potentially.
This commit is contained in:
parent
e227e8f683
commit
78acbfeb6a
1 changed files with 2 additions and 0 deletions
|
@ -122,6 +122,8 @@ addDirect file cache = do
|
||||||
-}
|
-}
|
||||||
mergeDirect :: FilePath -> Git.Ref -> Git.Repo -> IO Bool
|
mergeDirect :: FilePath -> Git.Ref -> Git.Repo -> IO Bool
|
||||||
mergeDirect d branch g = do
|
mergeDirect d branch g = do
|
||||||
|
whenM (doesDirectoryExist d) $
|
||||||
|
removeDirectoryRecursive d
|
||||||
createDirectoryIfMissing True d
|
createDirectoryIfMissing True d
|
||||||
let g' = g { location = Local { gitdir = Git.localGitDir g, worktree = Just d } }
|
let g' = g { location = Local { gitdir = Git.localGitDir g, worktree = Just d } }
|
||||||
Git.Merge.mergeNonInteractive branch g'
|
Git.Merge.mergeNonInteractive branch g'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue