diff options
author | Lingchaox Xin <lingchaox.xin@intel.com> | 2013-07-10 11:17:46 +0800 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2013-09-04 22:34:01 +0200 |
commit | 1320de2ae2434a89979f1c753fdef67ddcfb4aea (patch) | |
tree | c29be5810f1690b732520b4682d2cd49c8831db4 /gbp | |
parent | eca5a3365c5461519fd23ab2e85e5de9195da007 (diff) |
GitRepository.fetch: Add 'refspec' option
Signed-off-by: Lingchaox Xin <lingchaox.xin@intel.com>
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/git/repository.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 9c55dfd..ea5deb0 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1013,7 +1013,7 @@ class GitRepository(object): args = GitArgs('rm', name) self._git_command("remote", args.args) - def fetch(self, repo=None, tags=False, depth=0): + def fetch(self, repo=None, tags=False, depth=0, refspec=None): """ Download objects and refs from another repository. @@ -1023,11 +1023,14 @@ class GitRepository(object): @type tags: C{bool} @param depth: deepen the history of (shallow) repository to depth I{depth} @type depth: C{int} + @param refspec: refspec to use instead of the default from git config + @type refspec: C{str} """ args = GitArgs('--quiet') args.add_true(tags, '--tags') args.add_cond(depth, '--depth=%s' % depth) args.add_cond(repo, repo) + args.add_cond(refspec, refspec) self._git_command("fetch", args.args) |