aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-03-26 07:47:06 +0100
committerGuido Günther <agx@sigxcpu.org>2011-04-06 20:24:07 +0200
commit82e5f4d5e0c87d587bc13323ee49e70c3d03cbcd (patch)
tree3f39276082520e9a3bce26368b4ebd7c774bd599 /gbp
parentebc19c71c72c814565c35edf0099091b0527a6a1 (diff)
git-buildpackage: Call gbp.update_submodules
before exporting a tarball or creating a separate build tree. We invoke git-submodule with --no-fetch to not break offline operation.
Diffstat (limited to 'gbp')
-rw-r--r--gbp/git.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/git.py b/gbp/git.py
index e3de82e6..40dc7f74 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -503,7 +503,7 @@ class GitRepository(object):
GitCommand("submodule", [ "add", repo_path ])()
- def update_submodules(self, init=True, recursive=True):
+ def update_submodules(self, init=True, recursive=True, fetch=False):
"""Update all submodules"""
if not self.has_submodules():
return
@@ -512,6 +512,9 @@ class GitRepository(object):
args.append("--recursive")
if init:
args.append("--init")
+ if not fetch:
+ args.append("--no-fetch")
+
GitCommand("submodule", args)()