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 <pw@padd.com> Signed-off-by: Crestez Dan Leonard <cdleonard@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
becb4336cb
commit
109efbe4f2
@ -1308,7 +1308,7 @@ class P4Submit(Command, P4UserMap):
|
||||
else:
|
||||
die("unknown modifier %s for %s" % (modifier, path))
|
||||
|
||||
diffcmd = "git format-patch -k --stdout \"%s^\"..\"%s\"" % (id, id)
|
||||
diffcmd = "git diff-tree -p \"%s\"" % (id)
|
||||
patchcmd = diffcmd + " | git apply "
|
||||
tryPatchCmd = patchcmd + "--check -"
|
||||
applyPatchCmd = patchcmd + "--check --apply -"
|
||||
|
Loading…
Reference in New Issue
Block a user