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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 03, 2017 at 11:00:09AM -0700, Jonathan Tan wrote:

> > 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@xxxxxxxxxxx>" &&
> > +	git commit -am "$LONG
> > +
> > +    Body test" --author="$LONG <long@xxxxxxxxxxx>" &&
> 
> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]