summaryrefslogtreecommitdiff
path: root/merge-blobs.h
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-07-22 01:53:29 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-07-22 13:29:32 -0700
commit63766510a15f67cdd067ae0c0dcecb06fc6bfbf1 (patch)
treeadc4114cbffce1756ec6454a3bb7a108031ae169 /merge-blobs.h
parentbundle tests: use ">file" not ": >file" (diff)
downloadtgif-63766510a15f67cdd067ae0c0dcecb06fc6bfbf1.tar.xz
bundle tests: use test_cmp instead of grep
Change the bundle tests to fully compare the expected "git ls-remote" or "git bundle list-heads" output, instead of merely grepping it. This avoids subtle regressions in the tests. In f62e0a39b6 (t5704 (bundle): add tests for bundle --stdin, 2010-04-19) the "bundle --stdin <rev-list options>" test was added to make sure we didn't include the tag. But since the --stdin mode didn't work until 5bb0fd2cab (bundle: arguments can be read from stdin, 2021-01-11) our grepping of "master" (later "main") missed the important part of the test. Namely that we should not include the "refs/tags/tag" tag in that case. Since the test only grepped for "main" in the output we'd miss a regression in that code. So let's use test_cmp instead, and also in the other nearby tests where it's easy. This does make things a bit more verbose in the case of the test that's checking the bundle header, since it's different under SHA1 and SHA256. I think this makes test easier to follow. I've got some WIP changes to extend the "git bundle" command to dump parts of the header out, which are easier to understand if we test the output explicitly like this. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-blobs.h')
0 files changed, 0 insertions, 0 deletions