Yes, when git-p4 runs git-apply to test the patch, this fails
due to abbreviated blob object names. I think git-apply requires
full object names for binary patches.

On 04/26/2014 05:43 AM, Pete Wyckoff wrote: wrote on Thu, 24 Apr 2014 21:46 -0700:
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.

Signed-off-by: Tolga Ceylan <>
--- |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ b/
index cdfa2df..4ee6739 100755
--- a/
+++ b/
@@ -1311,7 +1311,7 @@ class P4Submit(Command, P4UserMap):
                  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 "
          tryPatchCmd = patchcmd + "--check -"
          applyPatchCmd = patchcmd + "--check --apply -"

This looks like a straightforward change, but can you give a
bit more background on why a full index is required?  Do you
mean that "git apply" will reject a patch with abbreviated
blob object names?

                -- Pete

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to