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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:26

Chris Packham [off-list ref] 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.  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).

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

From: Chris Packham <hidden>
Date: 2016-06-15 23:02:27

On Sat, Sep 6, 2014 at 6:29 AM, Junio C Hamano [off-list ref] wrote:
Chris Packham [off-list ref] writes:
quoted
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.
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help