提交 749b668c 编写于 作者: T Tolga Ceylan 提交者: Junio C Hamano

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: NTolga Ceylan <tolga.ceylan@gmail.com>
Acked-by: NPete Wyckoff <pw@padd.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 109efbe4
......@@ -1308,7 +1308,7 @@ def applyCommit(self, id):
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 -"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册