git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC PATCHv2 1/2] am: add gitk patch format

From
Chris Packham <judge.packham@gmail.com>
Date
Sep 5, 2014, 21:54 UTC
Message-ID
<CAFOYHZDeasZMFfupoXXV7ZKox-E2iDer_kEzQuZ9OhexQ=99aQ@mail.gmail.com>
In-Reply-To
<xmqq8ulxrkeq.fsf@gitster.dls.corp.google.com>
On Sat, Sep 6, 2014 at 6:29 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Chris Packham <judge.packham@gmail.com> writes:
>
>> So teaching git mailinfo to do s/^    // (either when asked to or
>> using some heuristic) would be a better approach? I also think we
>> should accept "Author:" as an acceptable fallback if "From:" is not
>> present.
>
> Not as "a fallback" in the sense that "Author:" should not be
> treated any specially when "am" (which stands for "apply mail") is\
> operating on the patches in e-mails.

I was proposing we avoid the "Patch does not have a valid e-mail address." error when we can dwim and determine the email address from "Author:". I originally was going to say "From:" should take precedence but it would be another way to indicate that the true author is not necessarily the person who sent the email.

Show 9 quoted lines
> Whatever wants to convert the
> output from "log --pretty" as if it came from "log --pretty=email"
> would certainly need to flip "Author:" to "From:" (what should
> happen when it sees "From:" in the input, though???), and whatgver
> wannts to pick metainfo from "log --pretty" output like mailinfo
> does for "log --pretty=email" output would certainly need to pick
> the authorship from "Author:" (without paying any attention to
> "From:" if one exists).
>

Wow. I didn't know --pretty=email existed. Better yet it works for diff-tree so gitk should probably be using that to produce something that can be exported/imported easily.

I do wonder what the original use-case for "write commit to file" was. Once it's been written to a file what is one supposed to do with it? It's not something that 'git am' can consume (currently). Using 'git apply' or 'patch' would lose the commit message plus you have to manually stage/commit the changes.

Previous: Junio C Hamano
Message 14 of 14 in “am: bug report and new patch format support”
  1. 0/1 am: bug report and new patch format supportChris Packham, Sep 3, 2014
  2. 1/1 am: add gitk patch formatChris Packham, Sep 3, 2014
  3. Chris PackhamSep 3, 2014
  4. Chris PackhamSep 3, 2014
  5. 0/2 am: bug fix and new patch format supportChris Packham, Sep 3, 2014
  6. 1/2 am: add gitk patch formatChris Packham, Sep 3, 2014
  7. Junio C HamanoSep 3, 2014
  8. Chris PackhamSep 4, 2014
  9. Junio C HamanoSep 4, 2014
  10. Chris PackhamSep 4, 2014
  11. 2/2 am: avoid re-directing stdin twiceChris Packham, Sep 3, 2014
  12. Chris PackhamSep 5, 2014
  13. Junio C HamanoSep 5, 2014
  14. Chris PackhamSep 5, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.