summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorCrestez Dan Leonard <cdleonard@gmail.com>2013-11-21 15:19:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-11-22 23:30:51 (GMT)
commit109efbe4f24b1748f42af52ca6d528b2d7ffe048 (patch)
tree47f345cb0102b87002c99ec49867ad2985701f1a /git-p4.py
parentbecb4336cb05c5ec456babaeafefa2e24ee85773 (diff)
downloadgit-109efbe4f24b1748f42af52ca6d528b2d7ffe048.zip
git-109efbe4f24b1748f42af52ca6d528b2d7ffe048.tar.gz
git-109efbe4f24b1748f42af52ca6d528b2d7ffe048.tar.bz2
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>
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 31e71ff..fe988ce 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 -"