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

Re: [PATCH 3/2] t5004: resurrect original empty tar archive test

From
Jonathan Nieder <jrnieder@gmail.com>
Date
May 11, 2013, 06:03 UTC
Message-ID
<20130511060332.GA3394@elie>
In-Reply-To
<518BA64A.5020302@lsrfire.ath.cx>
Hi,
René Scharfe wrote:
> [Subject: t5004: resurrect original empty tar archive test]
[...]
Show 8 quoted lines
> The different approaches test different things: The existing one is
> for empty trees, for which we know the exact expected output and thus
> we can simply check it without extracting; the new one is for commits
> with empty trees, whose archives include stamps and so the more
> "natural" check by extraction is a better fit because it focuses on
> the interesting aspect, namely the absence of any archive entries.
>
> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>

When first reading I was a little confused: does this patch resurrect the original, existing test for empty tree handling in the form it had before patch 2/3, or is it adding a new, distinct test that complements the existing one that patch 2/3 modified?

A quick glance back at v1.8.2.2~7^2 (t5004: fix issue with empty archive test and bsdtar, 2013-04-10) cleared matters up. The original test that is being resurrected is the one from before that commit.

Maybe a reminder in the commit message would help.  E.g.,
	The earlier version of the same check (before 24676f02, "t5004: fix
	issue with empty archive test and bsdtar") revived by this patch tests
	a different thing: The modified check is for empty trees, for which we
	know the exact expected output and thus we can simply check it without
	extracting; the original one is for commits with empty trees, whose
	archives include stamps and so the more "natural" check by extraction
	is a better fit because it focuses on the interesting aspect, namely
	the absence of any archive entries.
With or without such a change,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>

Would it make sense to define HEADER_ONLY_TAR_OK as a lazy prereq in the same file (even though it is only used once), so the code that checks "tar" is not run if this test is being skipped (e.g., using GIT_TEST_SKIP) for some other reason?

Thanks, Jonathan

Previous: René ScharfeNext: Eric Sunshine
Message 4 of 6 in “t5004: ignore pax global header file”
  1. 1/2 t5004: ignore pax global header fileRené Scharfe, May 9, 2013
  2. 2/2 t5004: avoid using tar for checking emptiness of archiveRené Scharfe, May 9, 2013
  3. 3/2 t5004: resurrect original empty tar archive testRené Scharfe, May 9, 2013
  4. Jonathan NiederMay 11, 2013
  5. Eric SunshineMay 9, 2013
  6. René ScharfeMay 9, 2013

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.