Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit90a6e1c

Browse files
committed
Add '-z' on top of '--raw' to avoid path name mangling
Authored based on#1099 (comment)Fixes#1099
1 parent696e4ed commit90a6e1c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎git/diff.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def diff(self, other=Index, paths=None, create_patch=False, **kwargs):
108108
args.append("-p")
109109
else:
110110
args.append("--raw")
111+
args.append("-z")
111112

112113
# in any way, assure we don't see colored output,
113114
# fixes https://github.com/gitpython-developers/GitPython/issues/172
@@ -483,7 +484,7 @@ def handle_diff_line(line):
483484
ifnotline.startswith(":"):
484485
return
485486

486-
meta,_,path=line[1:].partition('\t')
487+
meta,_,path=line[1:].partition('\x00')
487488
old_mode,new_mode,a_blob_id,b_blob_id,_change_type=meta.split(None,4)
488489
# Change type can be R100
489490
# R: status letter

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp