summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorTolga Ceylan <tolga.ceylan@gmail.com>2014-05-07 05:48:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-07 17:27:22 (GMT)
commit749b668c7db563609de3de7595504f2dca8eef7d (patch)
tree4f20dfc8556c8820771420e9b2aa3ca5c57d4706 /git-p4.py
parent109efbe4f24b1748f42af52ca6d528b2d7ffe048 (diff)
downloadgit-749b668c7db563609de3de7595504f2dca8eef7d.zip
git-749b668c7db563609de3de7595504f2dca8eef7d.tar.gz
git-749b668c7db563609de3de7595504f2dca8eef7d.tar.bz2
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 <tolga.ceylan@gmail.com> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index fe988ce..17760c7 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1308,7 +1308,7 @@ class P4Submit(Command, P4UserMap):
else:
die("unknown modifier %s for %s" % (modifier, path))
- diffcmd = "git diff-tree -p \"%s\"" % (id)
+ diffcmd = "git diff-tree --full-index -p \"%s\"" % (id)
patchcmd = diffcmd + " | git apply "
tryPatchCmd = patchcmd + "--check -"
applyPatchCmd = patchcmd + "--check --apply -"