Message ID | 1e3d499431aee563f6104f5ef1192658ece4ae4b.1679311616.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b2c51b75902acfbb8ab8ac9aadc919bf5a447c1b |
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