All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: GIT <git@vger.kernel.org>
Subject: Re: [RFC PATCHv2 1/2] am: add gitk patch format
Date: Fri, 5 Sep 2014 10:47:39 +1200	[thread overview]
Message-ID: <CAFOYHZC5pWadJiqY=F3gP4DKcNzhogfWH76jAcez5AjW7FJrVQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqiol3uwr5.fsf@gitster.dls.corp.google.com>

Hi Junio,

On Fri, Sep 5, 2014 at 5:21 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Chris Packham <judge.packham@gmail.com> writes:
>
>> Another thing that I've since realised is that this 'gitk' format is
>> also what you've get from git show or git log -p. So this is actually
>> allowing (for better or worse) things like 'git show $sha1 | git am
>> --patch-format=gitk'[*1*]. That may mean that we should call the
>> format something else ("pretty" perhaps?) and note that this is what
>> gitk, git show and some incantations of git log generate.
>
> I would not call it "pretty", because "--pretty" is merely a
> short-hand to "--pretty=<some format name>".
>
> The output format indents the log message text by four spaces for
> human reading to make it stand out from the patch text, and not
> meant for machine consumption.

Fair enough.

> I doubt that a patchset that does
> not update mailinfo and mailsplit to extract information and to undo
> the indentation could be a right solution.

I've read this sentence a couple of times and I can't understand it. I
get that you are against adding yet more special cases to 'git am' to
handle patches that weren't generated by 'git format-patch'. Are you
saying that this won't go in or that the solution should be
implemented differently.

> "am" itself should not
> be mucking with the input files.
>

At the very least we need to drop the first line and replace "Author"
with "From". Which would still leave the commit message indented.
Something like the following allows the patch to be applied

  sed -e '1d' -e 's/^Author:/From:/' <patch.patch | git am

But it'd be nice if am could do that for me to save my fingers some work.

  reply	other threads:[~2014-09-04 22:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03  9:35 [RFC PATCH 0/1] am: bug report and new patch format support Chris Packham
2014-09-03  9:35 ` [RFC PATCH 1/1] am: add gitk patch format Chris Packham
2014-09-03  9:59   ` Chris Packham
2014-09-03 10:18 ` [RFC PATCH 0/1] am: bug report and new patch format support Chris Packham
2014-09-03 22:21 ` [RFC PATCHv2 0/2] am: bug fix " Chris Packham
2014-09-03 22:21   ` [RFC PATCHv2 1/2] am: add gitk patch format Chris Packham
2014-09-03 23:19     ` Junio C Hamano
2014-09-04  0:46       ` Chris Packham
2014-09-04 17:21         ` Junio C Hamano
2014-09-04 22:47           ` Chris Packham [this message]
     [not found]             ` <CAPc5daWip1dQ5Or6hzmdjoBUStusvs-jK0ODNuzAotNfM5BLbQ@mail.gmail.com>
2014-09-05  1:23               ` Chris Packham
2014-09-05 18:29                 ` Junio C Hamano
2014-09-05 21:54                   ` Chris Packham
2014-09-03 22:21   ` [RFC PATCHv2 2/2] am: avoid re-directing stdin twice Chris Packham

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='CAFOYHZC5pWadJiqY=F3gP4DKcNzhogfWH76jAcez5AjW7FJrVQ@mail.gmail.com' \
    --to=judge.packham@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.