diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-08-20 14:58:34 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-08-20 14:58:34 -0400 |
| commit | fbe5a561d0636108fc025c1bcd28a522bcc6f381 (patch) | |
| tree | a17f5c69836dd293bb916284ece8f962061a5ef4 /src/Propellor/DotDir.hs | |
| parent | 845d9de7ab790a1691237c8f3b7a6bf8787b3489 (diff) | |
improve Sean's fix, making the wrapper still work with older git versions
Diffstat (limited to 'src/Propellor/DotDir.hs')
| -rw-r--r-- | src/Propellor/DotDir.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Propellor/DotDir.hs b/src/Propellor/DotDir.hs index cd079bca..21a9cdb7 100644 --- a/src/Propellor/DotDir.hs +++ b/src/Propellor/DotDir.hs @@ -401,7 +401,17 @@ setupUpstreamMaster newref = do changeWorkingDirectory tmprepo git ["fetch", distrepo, "--quiet"] git ["reset", "--hard", oldref, "--quiet"] - git ["merge", newref, "-s", "recursive", "-Xtheirs", "--quiet", "--allow-unrelated-histories", "-m", "merging upstream version"] + v <- gitVersion + let mergeparams = + [ "merge", newref + , "-s", "recursive" + , "-Xtheirs" + , "--quiet" + , "-m", "merging upstream version" + ] ++ if v >= [2,9] + then [ "--allow-unrelated-histories" ] + else [] + git mergeparams void $ fetchUpstreamBranch tmprepo cleantmprepo |
