зеркало из https://github.com/microsoft/git.git
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>
This commit is contained in:
Родитель
109efbe4f2
Коммит
749b668c7d
|
@ -1308,7 +1308,7 @@ class P4Submit(Command, P4UserMap):
|
||||||
else:
|
else:
|
||||||
die("unknown modifier %s for %s" % (modifier, path))
|
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 "
|
patchcmd = diffcmd + " | git apply "
|
||||||
tryPatchCmd = patchcmd + "--check -"
|
tryPatchCmd = patchcmd + "--check -"
|
||||||
applyPatchCmd = patchcmd + "--check --apply -"
|
applyPatchCmd = patchcmd + "--check --apply -"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче