summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Qiang <qiang.z.zhang@intel.com>2013-02-26 11:11:20 -0500
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-03-08 14:04:00 +0200
commitd5dd63be6d861b863a67e5e290826d10f4437f99 (patch)
tree7e50f5969367728bc381b8a30d5298f82878cd8b
parent0c4ae6e3a28fa6c01c171e906fb9e966ab6690a3 (diff)
downloadgit-buildpackage-d5dd63be6d861b863a67e5e290826d10f4437f99.tar.gz
git-buildpackage-d5dd63be6d861b863a67e5e290826d10f4437f99.tar.bz2
git-buildpackage-d5dd63be6d861b863a67e5e290826d10f4437f99.zip
GitRepository: check --no-signature option of git-format-patch before use it
Signed-off-by: Zhang Qiang <qiang.z.zhang@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--gbp/git/repository.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 9a158d88..7c570f4b 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1468,7 +1468,11 @@ class GitRepository(object):
"""
options = GitArgs('-N', '-k',
'-o', output_dir)
- options.add_cond(not signature, '--no-signature')
+ if (self._cmd_has_feature('format-patch', '--no-signature')):
+ options.add_cond(not signature, '--no-signature')
+ else:
+ log.debug("Your git suite doesn't support --signature/"
+ "--no-signature option for git-format-patch ")
options.add('%s...%s' % (start, end))
options.add_cond(thread, '--thread=%s' % thread, '--no-thread')
@@ -1496,7 +1500,11 @@ class GitRepository(object):
@rtype: C{str}
"""
args = GitArgs('-k', '--stdout', '-a', '--ignore-submodules')
- args.add_cond(not signature, '--no-signature')
+ if (self._cmd_has_feature('format-patch', '--no-signature')):
+ args.add_cond(not signature, '--no-signature')
+ else:
+ log.debug("Your git suite doesn't support --signature/"
+ "--no-signature option for git-format-patch ")
args.add('%s^!' % commit)
if paths:
args.add('--', paths)