diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-10-24 14:51:04 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-10-26 09:45:02 +0200 |
commit | 5b8a7aba07f1ae09ff3c80360e1c18b8756d0e58 (patch) | |
tree | 4ee90af8bc8fab9ddf39b800ff6b8325a73da08b /gbp/git.py | |
parent | d6999f791909f22c9846e24b45a7032540894691 (diff) |
GitRepository: add pull()
Diffstat (limited to 'gbp/git.py')
-rw-r--r-- | gbp/git.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -821,6 +821,20 @@ class GitRepository(object): self._git_command("fetch", [ args ]) + def pull(self, repo=None, ff_only=False): + """ + Fetch and merge from another repository + + @param repo: repository to fetch from + @type repo: string + @param ff_only: only merge if this results in a fast forward merge + @type ff_only: bool + """ + args = [] + args += [ '--ff-only' ] if ff_only else [] + args += [ repo ] if repo else [] + self._git_command("pull", args) + def has_submodules(self): """Does the repo have any submodules?""" if os.path.exists('.gitmodules'): |