Re: git am and the wrong chunk of ---

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

Re: git am and the wrong chunk of ---

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:27

Jeff King [off-list ref] writes:
If I understand your issue, somebody is writing:


    From: them
    To: you
    Date: ...
    Subject: [PATCH] subject line

    commit message body
    ....

    some cover letter material that should go below the "---"
    ---
      [diffstat + diff]

How do you know when the commit message body ends, and the cover letter
begins? We already have two machine-readable formats for separating the
two ("---" after the commit message, and "-- >8 --" scissors before). Is
there some machine-readable hint? Is it always the paragraph before the
"---"? Chopping that off unconditionally seems like a dangerous
heuristic.
Or it could be like this:

    ...
    Subject: [PATCH] patch title

    Heya,

    I was walking my dog when I found a solution to this
    problem the other day.  Here it is.

    commit message body

    S-o-b: ...
    ---

And I agree that clever heuristics are dangerous.  We need to draw a
line somewhere anyway, and the line should be at the place that is
easily understandable to people.  That means mechanically parseable
and easy to follow convention to use markers e.g. "---".

Re: git am and the wrong chunk of ---

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:54:27

The users I am referring to generally have a --- line, rather than a scissor, between the cover text and commit.  Also, there is (almost) always a From: line and subject at the top of the patch proper.

Junio C Hamano [off-list ref] wrote:
Jeff King [off-list ref] writes:
quoted
If I understand your issue, somebody is writing:


    From: them
    To: you
    Date: ...
    Subject: [PATCH] subject line

    commit message body
    ....

    some cover letter material that should go below the "---"
    ---
      [diffstat + diff]

How do you know when the commit message body ends, and the cover
letter
quoted
begins? We already have two machine-readable formats for separating
the
quoted
two ("---" after the commit message, and "-- >8 --" scissors before).
Is
quoted
there some machine-readable hint? Is it always the paragraph before
the
quoted
"---"? Chopping that off unconditionally seems like a dangerous
heuristic.
Or it could be like this:

   ...
   Subject: [PATCH] patch title

   Heya,

   I was walking my dog when I found a solution to this
   problem the other day.  Here it is.

   commit message body

   S-o-b: ...
   ---

And I agree that clever heuristics are dangerous.  We need to draw a
line somewhere anyway, and the line should be at the place that is
easily understandable to people.  That means mechanically parseable
and easy to follow convention to use markers e.g. "---".
-- 
Sent from my mobile phone. Please excuse brevity and lack of formatting.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help