Skip to content

Commit bdf2e66

Browse files
committed
Fix parsing for files with whitespace
Currently, the Tree object won't include any files that contain whitespace. split(c, 4) can return a 5-tuple, but we want a 4-tuple instead. Signed-off-by: Jeremy Kerr <[email protected]>
1 parent 4c39f9d commit bdf2e66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/git/tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def content_from_string(repo, text):
4545
``git.Blob`` or ``git.Tree``
4646
"""
4747
try:
48-
mode, typ, id, name = text.expandtabs(1).split(" ", 4)
48+
mode, typ, id, name = text.expandtabs(1).split(" ", 3)
4949
except:
5050
return None
5151

0 commit comments

Comments
 (0)