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

Commit 749b668

Browse files
skinowskigitster
authored andcommitted
git-p4: format-patch to diff-tree change breaks binary patches
When applying binary patches a full index is required. format-patch already handles this, but diff-tree needs '--full-index' argument to always output full index. When git-p4 runs git-apply to test the patch, git-apply rejects the patch due to abbreviated blob object names. This is the error message git-apply emits in this case: error: cannot apply binary patch to '<filename>' without full index line error: <filename>: patch does not apply Signed-off-by: Tolga Ceylan <[email protected]> Acked-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 109efbe commit 749b668

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 diff-tree -p \"%s\"" % (id)
1311+
diffcmd = "git diff-tree --full-index -p \"%s\"" % (id)
13121312
patchcmd = diffcmd + " | git apply "
13131313
tryPatchCmd = patchcmd + "--check -"
13141314
applyPatchCmd = patchcmd + "--check --apply -"

0 commit comments

Comments
 (0)