summaryrefslogtreecommitdiff
path: root/gbp/git
diff options
context:
space:
mode:
authorLingchaox Xin <lingchaox.xin@intel.com>2013-08-07 15:16:21 +0800
committerGuido Günther <agx@sigxcpu.org>2013-09-10 09:17:23 +0200
commitd28c7cc11055105262a3eff80f3c3a6885dda594 (patch)
treefd4ed3ac16bc804cccf3c485719a9e0d285f914a /gbp/git
parent68baa9a3934a22339f164499a75cf771489c9781 (diff)
downloadgit-buildpackage-d28c7cc11055105262a3eff80f3c3a6885dda594.tar.gz
git-buildpackage-d28c7cc11055105262a3eff80f3c3a6885dda594.tar.bz2
git-buildpackage-d28c7cc11055105262a3eff80f3c3a6885dda594.zip
GitRepository.push: Add 'tags' option
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 6389d285..9a67abf1 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1077,7 +1077,8 @@ class GitRepository(object):
args += [ repo ] if repo else []
self._git_command("pull", args)
- def push(self, repo=None, src=None, dst=None, ff_only=True, force=False):
+ def push(self, repo=None, src=None, dst=None, ff_only=True, force=False,
+ tags=False):
"""
Push changes to the remote repo
@@ -1092,10 +1093,13 @@ class GitRepository(object):
@param force: force push, can cause the remote repository to lose
commits; use it with care
@type force: C{bool}
+ @param tags: push all refs under refs/tags, in addition to other refs
+ @type tags: C{bool}
"""
args = GitArgs()
args.add_cond(repo, repo)
args.add_true(force, "-f")
+ args.add_true(tags, "--tags")
# Allow for src == '' to delete dst on the remote
if src != None: