diff options
author | Yaroslav Halchenko <yoh@debian.org> | 2011-04-06 13:21:51 -0400 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-04-06 19:58:38 +0200 |
commit | 8f14b0ace5934c27261f388820f5c3c587c97fba (patch) | |
tree | c9e5d12130db3ad29c6317089fdd2639424d5b7b | |
parent | d8142c7273d4ffa59e119b4aa6acab663dad442c (diff) |
gbp: restrict splitting output of ls-tree to 3, since filenames might contain spaces
Signed-off-by: Guido Günther <agx@sigxcpu.org>
-rw-r--r-- | gbp/git.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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]) |