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

Re: [PATCH] Fix 'git am' in-body header continuations

From
Jeff King <peff@peff.net>
Date
Apr 4, 2017, 06:48 UTC
Message-ID
<20170404064844.argmnrdb7tuk2wkj@sigill.intra.peff.net>
In-Reply-To
<f5763dab-b829-f216-a377-8a71fc4f0c1e@google.com>
On Mon, Apr 03, 2017 at 11:00:09AM -0700, Jonathan Tan wrote:
Show 15 quoted lines
> > diff --git a/t/t4150-am.sh b/t/t4150-am.sh
> > index 89a5bacac..44807e218 100755
> > --- a/t/t4150-am.sh
> > +++ b/t/t4150-am.sh
> > @@ -983,7 +983,9 @@ test_expect_success 'am works with multi-line in-body headers' '
> >  	rm -fr .git/rebase-apply &&
> >  	git checkout -f first &&
> >  	echo one >> file &&
> > -	git commit -am "$LONG" --author="$LONG <long@example.com>" &&
> > +	git commit -am "$LONG
> > +
> > +    Body test" --author="$LONG <long@example.com>" &&
> 
> Instead of "Body test", I would write something more descriptive like "Not a
> continuation line because of blank line above", but I'm fine with either.

Yeah. I also wonder if we can make the indentation more obvious. I thought at first that the patch was whitespace mangled. :-/

Maybe:
  SP=" " &&
  cat >msg <<-EOF &&
  $LONG
  $SP This line is indented but not a header continuation.
  EOF
  git commit -F msg ...
or something.

It might also be easier to understand what's going on if this gets its own test. This is really just testing mailinfo. I wonder if it would make more sense in t5100, where we would not have to deal with all the commit/format-patch cruft.

-Peff
Previous: Jonathan Tan
Message 3 of 3 in “Fix 'git am' in-body header continuations”
  1. Fix 'git am' in-body header continuationsLinus Torvalds, Apr 3, 2017
  2. Jonathan TanApr 3, 2017
  3. Jeff KingApr 4, 2017

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.