GitRepository.merge: add edit option
authorGuido Günther <agx@sigxcpu.org>
Sun, 26 Feb 2012 10:59:05 +0000 (11:59 +0100)
committerGuido Günther <agx@sigxcpu.org>
Sun, 26 Feb 2012 11:08:56 +0000 (12:08 +0100)
defaulting to False

Closes: #659239

gbp/git/repository.py

index 74dfff3..3daf2da 100644 (file)
@@ -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)