summaryrefslogtreecommitdiff
path: root/t/t1403-show-ref.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-07-30tests: make use of the test_must_be_empty functionLibravatar Ævar Arnfjörð Bjarmason1-29/+17
Change various tests that use an idiom of the form: >expect && test_cmp expect actual To instead use: test_must_be_empty actual The test_must_be_empty() wrapper was introduced in ca8d148daf ("test: test_must_be_empty helper", 2013-06-09). Many of these tests have been added after that time. This was mostly found with, and manually pruned from: git grep '^\s+>.*expect.* &&$' t Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: detect dangling refs under --verify as wellLibravatar Vladimir Panteleev1-0/+22
Move detection of dangling refs into show_one(), so that they are detected when --verify is present as well as when it is absent. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: allow -d to work with --verifyLibravatar Vladimir Panteleev1-0/+9
Move handling of -d into show_one(), so that it takes effect when --verify is present as well as when it is absent. This is useful when the user wishes to avoid the costly iteration of refs. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-01-23show-ref: accept HEAD with --verifyLibravatar Vladimir Panteleev1-0/+11
Previously, when --verify was specified, show-ref would use a separate code path which did not handle HEAD and treated it as an invalid ref. Thus, "git show-ref --verify HEAD" (where "--verify" is used because the user is not interested in seeing refs/remotes/origin/HEAD) did not work as expected. Instead of insisting that the input begins with "refs/", allow "HEAD" as well in the codepath that handles "--verify", so that all valid full refnames including HEAD are passed to the same output machinery. Signed-off-by: Vladimir Panteleev <git@thecybershadow.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-20t: fix severe &&-chain breakageLibravatar Jeff King1-5/+5
These are tests which are missing a link in their &&-chain, in a location which causes a significant portion of the test to be missed (e.g., the test effectively does nothing, or consists of a long string of actions and output comparisons, and we throw away the exit code of at least one part of the string). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17show-ref: make --head always show the HEAD refLibravatar Doug Bell1-0/+167
The docs seem to say that doing git show-ref --head --tags would show both the HEAD ref and all the tag refs. However, doing both --head and either of --tags or --heads would filter out the HEAD ref. Also update the documentation to describe the new behavior and add tests for the show-ref command. [jc: Doug did proofread the tests, but it was done by me and bugs in it are mine]. Signed-off-by: Doug Bell <madcityzen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>