aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp
diff options
context:
space:
mode:
authorYaroslav Halchenko <yoh@debian.org>2011-04-06 13:21:51 -0400
committerGuido Günther <agx@sigxcpu.org>2011-04-06 19:58:38 +0200
commit8f14b0ace5934c27261f388820f5c3c587c97fba (patch)
treec9e5d12130db3ad29c6317089fdd2639424d5b7b /gbp
parentd8142c7273d4ffa59e119b4aa6acab663dad442c (diff)
gbp: restrict splitting output of ls-tree to 3, since filenames might contain spaces
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Diffstat (limited to 'gbp')
-rw-r--r--gbp/git.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gbp/git.py b/gbp/git.py
index c7d04cb3..e3de82e6 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -533,7 +533,8 @@ class GitRepository(object):
out, ret = self.__git_getoutput('ls-tree', args, cwd=path)
for line in out:
- mode, objtype, commit, name = line.split()
+ # Restrict to 3 splits, since filenames might contain spaces
+ mode, objtype, commit, name = line.split(None, 3)
# A submodules is shown as "commit" object in ls-tree:
if objtype == "commit":
nextpath = os.path.sep.join([path, name])