aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-02-26 11:59:05 +0100
committerGuido Günther <agx@sigxcpu.org>2012-02-26 12:08:56 +0100
commitf3aa87fa0361acf902e8c95eefab6dd6b66526fa (patch)
treeabd7328673fa5664dc74ec7edddaf1433a517d25
parent4636181d3dc00de1bb052555f2ad58e6a66fa5da (diff)
GitRepository.merge: add edit option
defaulting to False Closes: #659239
-rw-r--r--gbp/git/repository.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 74dfff3e..3daf2da8 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -299,7 +299,7 @@ class GitRepository(object):
remote += merge.replace("refs/heads","", 1)
return remote
- def merge(self, commit, verbose=False):
+ def merge(self, commit, verbose=False, edit=False):
"""
Merge changes from the named commit into the current branch
@@ -307,9 +307,12 @@ class GitRepository(object):
@type commit: C{str}
@param verbose: whether to print a summary after the merge
@type verbose: C{bool}
+ @param edit: wheter to invoke an editor to edit the merge message
+ @type edit: C{bool}
"""
args = GitArgs()
args.add_cond(verbose, '--summary', '--no-summary')
+ args.add_cond(edit, '--edit', '--no-edit')
args.add(commit)
self._git_command("merge", args.args)