From: Olga Telezhnaya Date: Fri, 22 Feb 2019 16:05:45 GMT Subject: [PATCH RFC 04/20] for-each-ref: tests for new atom %(rest) added Message-ID: <0102016915f49a4f-cdb13ec8-58ea-47aa-a64a-517db120961e-000000@eu-west-1.amazonses.com> In-Reply-To: <0102016915f499b8-5813fc52-230b-469e-b939-a1244e83a2b9-000000@eu-west-1.amazonses.com> Add tests for new formatting atom %(rest). We need this atom for cat-file command. Signed-off-by: Olga Telezhnaia --- t/t6300-for-each-ref.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh index 0ffd63071392e..fb361369a037c 100755 --- a/t/t6300-for-each-ref.sh +++ b/t/t6300-for-each-ref.sh @@ -322,6 +322,12 @@ test_expect_success 'exercise strftime with odd fields' ' test_cmp expected actual ' +test_expect_success 'Check format %(rest) gives empty output ' ' + echo >expected && + git for-each-ref --format="%(rest)" refs/heads >actual && + test_cmp expected actual +' + cat >expected <<\EOF refs/heads/master refs/remotes/origin/master -- https://github.com/git/git/pull/568