summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Wang <junbill.wang@samsung.com>2016-12-20 16:05:32 +0800
committerJun Wang <junbill.wang@samsung.com>2016-12-20 16:05:32 +0800
commit479372eeea2cc7d22b6ed8983e7b347bf85ce0c1 (patch)
tree2bbd495b647678fd28e948b94d84bdc9323e0901
parent5b2279ccfe89e28afdad1de6a90f27f34436824d (diff)
downloadgit-buildpackage-479372eeea2cc7d22b6ed8983e7b347bf85ce0c1.tar.gz
git-buildpackage-479372eeea2cc7d22b6ed8983e7b347bf85ce0c1.tar.bz2
git-buildpackage-479372eeea2cc7d22b6ed8983e7b347bf85ce0c1.zip
Adapt git-merge option when git version greater then 2.9
Change-Id: Icd9cb9edc8517095984c0a0f497173e2f068aa20
-rw-r--r--gbp/git/repository.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index d7eb271e..6d971c22 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -539,6 +539,13 @@ class GitRepository(object):
else:
log.debug("Your git suite doesn't support --edit/--no-edit "
"option for git-merge ")
+
+ if (self._cmd_has_feature('merge', 'allow-unrelated-histories')):
+ args.add_cond(True, '--allow-unrelated-histories')
+ else:
+ log.debug("Your git suite doesn't support --allow-unrelated-histories "
+ "option for git-merge ")
+
args.add(commit)
self._git_command("merge", args.args)