fix: ignore mnemonic diff prefixes in patches · gitpython-developers/GitPython@ee854dc · GitHub
Skip to content

Commit ee854dc

Browse files
committed
fix: ignore mnemonic diff prefixes in patches
1 parent 07e8055 commit ee854dc

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

git/diff.py

Lines changed: 4 additions & 1 deletion

git/index/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,6 +1547,8 @@ def diff(
15471547
args.extend(paths)
15481548

15491549
kwargs["as_process"] = True
1550+
if create_patch:
1551+
self.repo.git(c="diff.mnemonicPrefix=false")
15501552
proc = self.repo.git.diff(*args, **kwargs)
15511553

15521554
diff_method = (

test/test_diff.py

Lines changed: 20 additions & 0 deletions

0 commit comments

Comments
 (0)