]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/t6300-cleanup' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 21 Mar 2017 22:03:30 +0000 (15:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Mar 2017 22:03:30 +0000 (15:03 -0700)
A test that creates a confusing branch whose name is HEAD has been
corrected not to do so.

* jk/t6300-cleanup:
  t6300: avoid creating refs/heads/HEAD

1  2 
t/t6300-for-each-ref.sh

diff --combined t/t6300-for-each-ref.sh
index aea1dfc7148e4885e52a579ca60ee622c49b5693,37e021f30ea66b0e613b4ad5246b49540116c432..a468041c50d9ef2c093ee4f149f297ad970065cf
@@@ -558,34 -558,9 +558,34 @@@ test_expect_success 'do not dereferenc
        test_when_finished "git checkout master" &&
        git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
        sed -e "s/^\* /  /" actual >expect &&
-       git checkout --orphan HEAD &&
+       git checkout --orphan orphaned-branch &&
        git for-each-ref --format="%(HEAD) %(refname:short)" refs/heads/ >actual &&
        test_cmp expect actual
  '
  
 +cat >trailers <<EOF
 +Reviewed-by: A U Thor <author@example.com>
 +Signed-off-by: A U Thor <author@example.com>
 +EOF
 +
 +test_expect_success 'basic atom: head contents:trailers' '
 +      echo "Some contents" > two &&
 +      git add two &&
 +      git commit -F - <<-EOF &&
 +      trailers: this commit message has trailers
 +
 +      Some message contents
 +
 +      $(cat trailers)
 +      EOF
 +      git for-each-ref --format="%(contents:trailers)" refs/heads/master >actual &&
 +      sanitize_pgp <actual >actual.clean &&
 +      # git for-each-ref ends with a blank line
 +      cat >expect <<-EOF &&
 +      $(cat trailers)
 +
 +      EOF
 +      test_cmp expect actual.clean
 +'
 +
  test_done