aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-02-26 11:52:14 +0100
committerGuido Günther <agx@sigxcpu.org>2012-02-26 12:08:41 +0100
commit4636181d3dc00de1bb052555f2ad58e6a66fa5da (patch)
tree067771c22f773eb4efc99cd4243b5aae6c53ed21
parent970fbaa1222ad90215cdf19e5d48ff3602e75e3c (diff)
GitRepsitory.merge: update apidoc and switch to GitArgs
Git-Dch: Ignore
-rw-r--r--gbp/git/repository.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index ce76193..74dfff3 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -303,11 +303,15 @@ class GitRepository(object):
"""
Merge changes from the named commit into the current branch
- @param commit: the commit to merge from (usually a branch name)
+ @param commit: the commit to merge from (usually a branch name or tag)
@type commit: C{str}
+ @param verbose: whether to print a summary after the merge
+ @type verbose: C{bool}
"""
- args = [ "--summary" ] if verbose else [ "--no-summary" ]
- self._git_command("merge", args + [ commit ])
+ args = GitArgs()
+ args.add_cond(verbose, '--summary', '--no-summary')
+ args.add(commit)
+ self._git_command("merge", args.args)
def is_fast_forward(self, from_branch, to_branch):
"""