git p4: Use git diff-tree instead of format-patch
[gitweb.git] / git-p4.py
index 31e71ff8b248339749bbcd045acdf602a1a21463..fe988cec49b865a24ea9445b28544baa964138db 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -1308,7 +1308,7 @@ def applyCommit(self, id):
             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 -"