Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Commit 109efbe

Browse files
cdleonardgitster
authored andcommitted
git p4: Use git diff-tree instead of format-patch
The output of git format-patch can vary with user preferences. In particular setting diff.noprefix will break the "git apply" that is done as part of "git p4 submit". Acked-by: Pete Wyckoff <[email protected]> Signed-off-by: Crestez Dan Leonard <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent becb433 commit 109efbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-p4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ def applyCommit(self, id):
13081308
else:
13091309
die("unknown modifier %s for %s" % (modifier, path))
13101310

1311-
diffcmd = "git format-patch -k --stdout \"%s^\"..\"%s\"" % (id, id)
1311+
diffcmd = "git diff-tree -p \"%s\"" % (id)
13121312
patchcmd = diffcmd + " | git apply "
13131313
tryPatchCmd = patchcmd + "--check -"
13141314
applyPatchCmd = patchcmd + "--check --apply -"

0 commit comments

Comments
 (0)