diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-01-11 21:51:17 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-01-12 20:00:34 +0100 |
commit | dc40dc73c5d03d3ee0948ebd618e055d545c7faa (patch) | |
tree | edb205dd62e6abb820ce0636172405eed1331237 /gbp/git/repository.py | |
parent | cd410237326ccaf8250908ace65db01f47355170 (diff) |
GitRepository: Allow to explicitly fetch tags
Diffstat (limited to 'gbp/git/repository.py')
-rw-r--r-- | gbp/git/repository.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index fe405884..42612327 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -687,17 +687,18 @@ class GitRepository(object): args += [ name, url ] self._git_command("remote", args) - def fetch(self, repo=None): + def fetch(self, repo=None, tags=False): """ Download objects and refs from another repository. @param repo: repository to fetch from @type repo: C{str} """ - args = [ '--quiet' ] - args += [repo] if repo else [] + args = GitArgs('--quiet') + args.add_true(tags, '--tags') + args.add_cond(repo, repo) - self._git_command("fetch", args) + self._git_command("fetch", args.args) def pull(self, repo=None, ff_only=False): """ |