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

Three t4150 tests does not work as expected

From
Marcel Telka <marcel@telka.sk>
Date
May 17, 2024, 16:45 UTC
Message-ID
<ZkeJx97qdLoaC2H-@telcontar>
Hi,

I noticed that the following three t4150 tests probably does not work as expected:

- record as an empty commit when meeting e-mail message that lacks a patch
- record an empty patch as an empty commit in the middle of an am session
- create an non-empty commit when the index IS changed though "--allow-empty" is given
All of them does something like:
	git show HEAD --format="%B" >actual
	grep -f actual expected

While the 'actual' file usually contains something like (four lines between the 'cut' markers):

-------------------------- cut -------------------------- empty commit

-- 2.45.1

-------------------------- cut --------------------------

IOW, there are two empty lines there. Because of that the grep gets an empty RE from the 'actual' file and so it matches everything that comes in the 'expected' file.

Is this the expected behavior?
Thank you.
-- 
+-------------------------------------------+
| Marcel Telka   e-mail:   marcel@telka.sk  |
|                homepage: http://telka.sk/ |
+-------------------------------------------+
Next: Junio C Hamano
Message 1 of 2 in “Three t4150 tests does not work as expected”
  1. Marcel TelkaMay 17, 2024
  2. Junio C HamanoMay 17, 2024

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.