]> git.ipfire.org Git - thirdparty/git.git/commit
t6421: fix test to work when repo dir contains d0
authorKyle Lippincott <spectral@google.com>
Mon, 5 Aug 2024 17:10:08 +0000 (17:10 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Aug 2024 17:59:21 +0000 (10:59 -0700)
commitec60bb9fc416e0ded2336e8923c8249c661bfc80
tree1d3059b507859a6e1a8a694592eaf8f64a8fab4f
parentb928d57ca9aa7457ec0dee022c1664e8cd606b22
t6421: fix test to work when repo dir contains d0

The `grep` statement in this test looks for `d0.*<string>`, attempting
to filter to only show lines that had tabular output where the 2nd
column had `d0` and the final column had a substring of
[`git -c `]`fetch.negotiationAlgorithm`. These lines also have
`child_start` in the 4th column, but this isn't part of the condition.

A subsequent line will have `d1` in the 2nd column, `start` in the 4th
column, and `/path/to/git/git -c fetch.negotiationAlgorihm` in the final
column. If `/path/to/git/git` contains the substring `d0`, then this
line is included by `grep` as well as the desired line, leading to an
effective doubling of the number of lines, and test failures.

Tighten the grep expression to require `d0` to be surrounded by spaces,
and to have the `child_start` label.

Signed-off-by: Kyle Lippincott <spectral@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t6421-merge-partial-clone.sh