All of lore.kernel.org
 help / color / mirror / Atom feed
From: Crestez Dan Leonard <cdleonard@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] git p4: Use git diff-tree instead of format-patch
Date: Thu, 21 Nov 2013 17:19:03 +0200	[thread overview]
Message-ID: <528E2467.4030900@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 299 bytes --]


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".

Signed-off-by: Crestez Dan Leonard <cdleonard@gmail.com>
---
  git-p4.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)



[-- Attachment #2: 0001-git-p4-Use-git-diff-tree-instead-of-format-patch.patch --]
[-- Type: text/x-patch, Size: 524 bytes --]

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 -"


             reply	other threads:[~2013-11-21 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21 15:19 Crestez Dan Leonard [this message]
2013-11-21 19:47 ` [PATCH] git p4: Use git diff-tree instead of format-patch Junio C Hamano
2013-11-22 23:12   ` Pete Wyckoff
2013-11-22 23:35     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=528E2467.4030900@gmail.com \
    --to=cdleonard@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.