From 109efbe4f24b1748f42af52ca6d528b2d7ffe048 Mon Sep 17 00:00:00 2001 From: Crestez Dan Leonard Date: Thu, 21 Nov 2013 17:19:03 +0200 Subject: 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 Signed-off-by: Crestez Dan Leonard Signed-off-by: Junio C Hamano --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-p4.py') diff --git a/git-p4.py b/git-p4.py index 31e71ff8b..fe988cec4 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 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 -" -- cgit v1.2.1