diff options
Diffstat (limited to 'src/Propellor')
| -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 |
