Re: [PATCH v3 5/6] grep: enable recurse-submodules to work on <tree> objects

3 messages, 3 authors, 2016-11-14 · open the first message on its own page

Re: [PATCH v3 5/6] grep: enable recurse-submodules to work on <tree> objects

From: Junio C Hamano <hidden>
Date: 2016-11-14 18:56:22

Jonathan Tan [off-list ref] writes:
quoted
quoted
to:
HEAD:file
HEAD:sub/file

Signed-off-by: Brandon Williams <redacted>
---
Unrelated tangent, but this makes readers wonder what the updated
trailer code would do to the last paragraph ;-).  Does it behave
sensibly (with some sane definition of sensibleness)?

I am guessing that it would, because neither To: or HEAD: is what we
normally recognize as a known trailer block element.
Yes, it behaves sensibly :-) because "Signed-off-by:" is preceded by a
blank line, so the trailer block consists only of that line.
Oh, that was not what I was wondering.  Imagine Brandon writing his
message that ends in these three questionable lines and then running
"commit -s --amend" to add his sign-off---that was the case I was
wondering.

Re: [PATCH v3 5/6] grep: enable recurse-submodules to work on <tree> objects

From: Jonathan Tan <hidden>
Date: 2016-11-14 19:08:28

On 11/14/2016 10:56 AM, Junio C Hamano wrote:
Jonathan Tan [off-list ref] writes:
quoted
quoted
quoted
to:
HEAD:file
HEAD:sub/file

Signed-off-by: Brandon Williams <redacted>
---
Unrelated tangent, but this makes readers wonder what the updated
trailer code would do to the last paragraph ;-).  Does it behave
sensibly (with some sane definition of sensibleness)?

I am guessing that it would, because neither To: or HEAD: is what we
normally recognize as a known trailer block element.
Yes, it behaves sensibly :-) because "Signed-off-by:" is preceded by a
blank line, so the trailer block consists only of that line.
Oh, that was not what I was wondering.  Imagine Brandon writing his
message that ends in these three questionable lines and then running
"commit -s --amend" to add his sign-off---that was the case I was
wondering.
Ah, I see. In that case, it would consider the last block as a trailer 
block and attach it directly:

   to:
   HEAD:file
   HEAD:sub/file
   Signed-off-by: ...

It is true that neither to: nor HEAD: are known trailers, but my patch 
set accepts trailer blocks that are 100% well-formed regardless of 
whether the trailers are known (to provide backwards compatibility with 
git-interpret-trailers, and to satisfy the certain use cases that I 
brought up). The "known trailer" check is used when the trailer block is 
not 100% well-formed.

This issue can be avoided if those lines were indented with at least one 
space or at least one tab.

Re: [PATCH v3 5/6] grep: enable recurse-submodules to work on <tree> objects

From: Brandon Williams <hidden>
Date: 2016-11-14 19:14:41

On 11/14, Jonathan Tan wrote:
On 11/14/2016 10:56 AM, Junio C Hamano wrote:
quoted
Jonathan Tan [off-list ref] writes:
quoted
quoted
quoted
to:
HEAD:file
HEAD:sub/file

Signed-off-by: Brandon Williams <redacted>
---
Unrelated tangent, but this makes readers wonder what the updated
trailer code would do to the last paragraph ;-).  Does it behave
sensibly (with some sane definition of sensibleness)?

I am guessing that it would, because neither To: or HEAD: is what we
normally recognize as a known trailer block element.
Yes, it behaves sensibly :-) because "Signed-off-by:" is preceded by a
blank line, so the trailer block consists only of that line.
Oh, that was not what I was wondering.  Imagine Brandon writing his
message that ends in these three questionable lines and then running
"commit -s --amend" to add his sign-off---that was the case I was
wondering.
Ah, I see. In that case, it would consider the last block as a
trailer block and attach it directly:

  to:
  HEAD:file
  HEAD:sub/file
  Signed-off-by: ...

It is true that neither to: nor HEAD: are known trailers, but my
patch set accepts trailer blocks that are 100% well-formed
regardless of whether the trailers are known (to provide backwards
compatibility with git-interpret-trailers, and to satisfy the
certain use cases that I brought up). The "known trailer" check is
used when the trailer block is not 100% well-formed.

This issue can be avoided if those lines were indented with at least
one space or at least one tab.
Who would have thought my simple example would cause this kind of
discussion!  I can update the commit message and indent the output so
that it looks like the following:

to:
  HEAD:file
  HEAD:sub/file

-- 
Brandon Williams
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help