Git development
 help / color / mirror / Atom feed
* [Outreachy PATCH 0/2] t0410: fix exit code and hash assumptions in the missing-tree test
@ 2026-10-14 13:45 Dorine Tipo
  2026-10-14 13:45 ` [Outreachy PATCH 1/2] t0410: use rev-parse to get the subtree OID Dorine Tipo
  2026-10-14 13:45 ` [Outreachy PATCH 2/2] t0410: keep git's exit code in test_grep calls Dorine Tipo
  0 siblings, 2 replies; 4+ messages in thread
From: Dorine Tipo @ 2026-10-14 13:45 UTC (permalink / raw)
  To: git
  Cc: kaartic.sivaraam, christian.couder, siddharthasthana31,
	usmanakinyemi202, Dorine Tipo

This series cleans up the 'rev-list stops traversal at missing and
promised tree' test in t0410:

 - Patch 1 replaces the 'git ls-tree | grep | head | cut' pipeline that
   finds the OID of a_dir with 'git rev-parse HEAD:a_dir'. The pipeline
   drops git's exit code, and its cut assumes a SHA-1 length, so it
   yields an abbreviated OID under SHA-256.

 - Patch 2 stores the output of 'git rev-parse' in variables before
   passing it to test_grep, so a failure in git stops the && chain.

I ran the full test suite with both SHA-1 and SHA-256, and it passes.

There are more places in t0410 that pass "$(git ...)" directly as an
argument. If this approach looks good, I'm happy to convert the rest
in a follow-up.

This is my microproject for Outreachy.

Dorine Tipo (2):
  t0410: use rev-parse to get the subtree OID
  t0410: keep git's exit code in test_grep calls

 t/t0410-partial-clone.sh | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-14 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14 13:45 [Outreachy PATCH 0/2] t0410: fix exit code and hash assumptions in the missing-tree test Dorine Tipo
2026-10-14 13:45 ` [Outreachy PATCH 1/2] t0410: use rev-parse to get the subtree OID Dorine Tipo
2026-10-14 20:01   ` Junio C Hamano
2026-10-14 13:45 ` [Outreachy PATCH 2/2] t0410: keep git's exit code in test_grep calls Dorine Tipo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox