Message ID | 2f162a2f39f5d413fbe196e56d15ecf3080a2a8b.1678468864.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | ref-filter: ahead/behind counting, faster --merged option | expand |
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index a58053a54c5..6614469d2d6 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -1501,4 +1501,17 @@ test_expect_success 'git for-each-ref --stdin: matches' ' test_cmp expect actual ' +test_expect_success 'git for-each-ref with non-existing refs' ' + cat >in <<-EOF && + refs/heads/this-ref-does-not-exist + refs/tags/bogus + EOF + + git for-each-ref --format="%(refname)" --stdin <in >actual && + test_must_be_empty actual && + + xargs git for-each-ref --format="%(refname)" <in >actual && + test_must_be_empty actual +' + test_done