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

Re: [Outreachy PATCH 1/2] t0410: use rev-parse to get the subtree OID

From
DTDorine Tipo <dorine.a.tipo@gmail.com>
Date
Oct 15, 2026, 15:47 UTC
Message-ID
<atD1oFyLb0k4oFWN@Stealth>
In-Reply-To
<xmqqcxtcqcfa.fsf@gitster.g>
On Wed, Oct 14, 2026 at 01:01:29PM -0700, Junio C Hamano wrote:
Show 27 quoted lines
> 
> [devil's advocate hat on]
> 
> That may avoid piping, but are they chekcing the same thing?  If
> HEAD had a tree that sorts before a_dir due to a bug, the original
> test would have used that tree instead of the tree of a_dir.  Later
> tests may have noticed that the tree object is not what is expected
> for a_dir and led to the discovery of such a bug.  The new test goes
> directly to a_dir so it wouldn't catch such a bug.
> 
> [devil's advoicate hat off]
> 
> Arguably, the use of "head -1" in the original pipeline is
> unnecessary as 'repo' prepared there only has a_dir/something and
> nothing else, and if the extra tree that was added by a bug sorted
> after a_dir, it would have hidden such a bug, instead of catching
> it.  So in the sense, it would be better to assume that the tree
> would be created in a shape that we expect and explicitly name the
> directory we are interested in i.e., "HEAD:a_dir".
> 
> So, one thing we may want to add to the second paragraph of the
> proposed log message is that the original assumed silently that the
> first tree object in ls-tree output is the tree we are intrerested
> in, without even validating what path the tree was stored at, and it
> would be an improvement to name 'a_dir' explicitly in the test.
> 
> 

Thank you, that makes sense. I'll add that to the second paragraph in v2. I'll wait a little to see if any changes are needed on patch 2/2, then send v2 with everything together.

Previous: Junio C HamanoNext: Dorine Tipo
Message 4 of 10 in “t0410: fix exit code and hash assumptions in the missing-tree test”
  1. 0/2 t0410: fix exit code and hash assumptions in the missing-tree testDorine Tipo, Oct 14, 2026
  2. 1/2 t0410: use rev-parse to get the subtree OIDDorine Tipo, Oct 14, 2026
  3. Junio C HamanoOct 14, 2026
  4. Dorine TipoOct 15, 2026
  5. 2/2 t0410: keep git's exit code in test_grep callsDorine Tipo, Oct 14, 2026
  6. 0/2 t0410: fix exit code and hash assumptions in the missing-tree testDorine Tipo, Oct 20, 2026
  7. 1/2 t0410: use rev-parse to get the subtree OIDDorine Tipo, Oct 20, 2026
  8. Laveesh BansalNov 14, 2026
  9. 2/2 t0410: keep git's exit code in test_grep callsDorine Tipo, Oct 20, 2026
  10. Laveesh BansalNov 14, 2026

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.