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

Re: [PATCH] t4150: fix broken test for am --scissors

From
Andrei Rybak <rybak.a.v@gmail.com>
Date
Aug 4, 2018, 00:39 UTC
Message-ID
<80465ead-3bf5-ffc7-59d1-7ab3770430b6@gmail.com>
In-Reply-To
<xmqqh8kbuk4t.fsf@gitster-ct.c.googlers.com>
On 2018-08-04 01:04, Junio C Hamano wrote:
Show 5 quoted lines
> Hmph, I am not quite sure what is going on.  Is the only bug in the
> original that scissors-patch.eml and no-scissors-patch.eml files were
> incorrectly named?  IOW, if we fed no-scissors-patch.eml (which has
> a scissors line in it) with --scissors option to am, would it have
> worked just fine without other changes in this patch?
Just swapping eml files wouldn't be enough, because in old tests the
prepared commits touch different files: scissors-file and
no-scissors-file. And since tests are about cutting/keeping commit
message, it doesn't make much sense to keep two eml files which differ
only in contents of their diffs. I'll try to reword the commit message
to also include this bit.
 
Show 15 quoted lines
> I am not saying that we shouldn't make other changes or renaming the
> confusing .eml files.  I am just trying to understand what the
> nature of the breakage was.  For example, it is not immediately
> obvious why the new test needs to prepare the message _with_
> "Subject:" in front of the first line when it prepares the commit
> to be used for testing.
> 
> 	... goes back and thinks a bit ...
> 
> OK, the Subject: thing that appears after the scissors line serves
> as an in-body header to override the subject line of the e-mail
> itself.  That change is necessary to _drop_ the subject from the
> outer e-mail and replace it with the subject we do want to use.
> 
> So I can explain why "Subject:" thing needed to be added.

Yes, the adding of "Subject: " prefix is completely overlooked in the commit message. I'll add explanation in re-send.

> I cannot still explain why a blank line needs to be removed after
> the scissors line, though.  We should be able to have blank lines
> before the in-body header, IIRC.

I'll double check this and restore the blank line in v2, if the removal is not needed. IIRC, I removed it by accident and didn't think too much of it.

Thank you for review.
Previous: Junio C HamanoNext: Andrei Rybak
Message 4 of 12 in “[RFC] broken test for git am --scissors”
  1. Andrei RybakAug 3, 2018
  2. t4150: fix broken test for am --scissorsAndrei Rybak, Aug 3, 2018
  3. Junio C HamanoAug 3, 2018
  4. Andrei RybakAug 4, 2018
  5. t4150: fix broken test for am --scissorsAndrei Rybak, Aug 4, 2018
  6. Paul TanAug 6, 2018
  7. Junio C HamanoAug 6, 2018
  8. Andrei RybakAug 6, 2018
  9. Paul TanAug 7, 2018
  10. t4150: fix broken test for am --scissorsAndrei Rybak, Aug 6, 2018
  11. Junio C HamanoAug 6, 2018
  12. Andrei RybakAug 7, 2018

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.