aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-12-07 19:28:45 +0100
committerGuido Guenther <agx@sigxcpu.org>2007-12-07 19:28:45 +0100
commitc3d1f05c1ee4a6113cf842f80389f0809cdd4949 (patch)
tree3bc5972d21292c23f9654bf23671e17e61ead7c9
parent87a4c86a617c55f26f5d32c37e8fdc3ace1c7f84 (diff)
git-ls-files: separate filenames by '\0', based on a patch from Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> (Closes: #454470)
-rw-r--r--gbp/git_utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gbp/git_utils.py b/gbp/git_utils.py
index 2ad4235c..39ff89af 100644
--- a/gbp/git_utils.py
+++ b/gbp/git_utils.py
@@ -78,10 +78,10 @@ class GitRepository(object):
def index_files(self):
"""List files in the index"""
- out, ret = self.__git_getoutput('ls-files')
+ out, ret = self.__git_getoutput('ls-files', ['-z'])
if ret:
raise GitRepositoryError, "Error listing files %d" % ret
- files = [ line.strip() for line in out ]
+ files = [ file for file in out[0].split('\0') if file ]
return files