Git development
 help / color / mirror / Atom feed
From: Dorine Tipo <dorine.a.tipo@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, kaartic.sivaraam@gmail.com,
	christian.couder@gmail.com, siddharthasthana31@gmail.com,
	usmanakinyemi202@gmail.com, Dorine Tipo <dorine.a.tipo@gmail.com>
Subject: [Outreachy PATCH v2 0/2] t0410: fix exit code and hash assumptions in the missing-tree test
Date: Tue, 20 Oct 2026 19:01:25 +0300	[thread overview]
Message-ID: <20261020160127.29096-1-dorine.a.tipo@gmail.com> (raw)
In-Reply-To: <20261014134504.1152225-1-dorine.a.tipo@gmail.com>

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

Changes since v1:
 - 1/2: expanded the log message to note that the original pipeline
   silently assumed the first tree in the ls-tree output was the one
   we wanted, and that naming a_dir explicitly is an improvement.
   Thanks, Junio.
 - 2/2: unchanged.

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

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(-)

Range-diff against v1:
1:  b8f514e0a2 ! 1:  dcf6c7da4c t0410: use rev-parse to get the subtree OID
    @@ Commit message
     
         The pipeline goes against t/README which says not to pipe the output
         of a git command, since only the last command's exit code is kept.
    -    'cut -b13-52' also assumes a 40-character SHA-1 name, so under SHA-256
    -    TREE2 holds an abbreviated OID.
    +    It also silently assumes that the first tree in the ls-tree output is
    +    the one we want, without checking which path it is stored at.
    +    And 'cut -b13-52' also assumes a 40-character SHA-1 name, so under
    +    SHA-256 TREE2 holds an abbreviated OID.
     
    -    Use 'git rev-parse HEAD:a_dir' instead. It returns the full OID in a
    -    single command, the same way TREE is computed with
    -    'git rev-parse foo^{tree}' just above.
    +    Use 'git rev-parse HEAD:a_dir' instead. It names the directory we are
    +    interested in explicitly and returns the full OID in a single command,
    +    the same way TREE is computed with 'git rev-parse foo^{tree}' just
    +    above.
     
    +    Helped-by: Junio C Hamano <gitster@pobox.com>
         Signed-off-by: Dorine Tipo <dorine.a.tipo@gmail.com>
     
      ## t/t0410-partial-clone.sh ##
2:  5823e65a88 = 2:  f810625e77 t0410: keep git's exit code in test_grep calls
-- 
2.34.1


  parent reply	other threads:[~2026-10-20 16:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-15 15:47     ` Dorine Tipo
2026-10-14 13:45 ` [Outreachy PATCH 2/2] t0410: keep git's exit code in test_grep calls Dorine Tipo
2026-10-20 16:01 ` Dorine Tipo [this message]
2026-10-20 16:01   ` [Outreachy PATCH v2 1/2] t0410: use rev-parse to get the subtree OID Dorine Tipo
2026-10-20 16:01   ` [Outreachy PATCH v2 2/2] t0410: keep git's exit code in test_grep calls Dorine Tipo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261020160127.29096-1-dorine.a.tipo@gmail.com \
    --to=dorine.a.tipo@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=siddharthasthana31@gmail.com \
    --cc=usmanakinyemi202@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox