@@ -742,7 +742,23 @@ test_expect_success 'decorate-refs with glob' '
742742 octopus-a (octopus-a)
743743 reach
744744 EOF
745+ cat >expect.no-decorate <<-\EOF &&
746+ Merge-tag-reach
747+ Merge-tags-octopus-a-and-octopus-b
748+ seventh
749+ octopus-b
750+ octopus-a
751+ reach
752+ EOF
753+ git log -n6 --decorate=short --pretty="tformat:%f%d" \
754+ --decorate-refs="heads/octopus*" >actual &&
755+ test_cmp expect.decorate actual &&
745756 git log -n6 --decorate=short --pretty="tformat:%f%d" \
757+ --decorate-refs-exclude="heads/octopus*" \
758+ --decorate-refs="heads/octopus*" >actual &&
759+ test_cmp expect.no-decorate actual &&
760+ git -c log.excludeDecoration="heads/octopus*" log \
761+ -n6 --decorate=short --pretty="tformat:%f%d" \
746762 --decorate-refs="heads/octopus*" >actual &&
747763 test_cmp expect.decorate actual
748764'
@@ -787,6 +803,9 @@ test_expect_success 'decorate-refs-exclude with glob' '
787803 EOF
788804 git log -n6 --decorate=short --pretty="tformat:%f%d" \
789805 --decorate-refs-exclude="heads/octopus*" >actual &&
806+ test_cmp expect.decorate actual &&
807+ git -c log.excludeDecoration="heads/octopus*" log \
808+ -n6 --decorate=short --pretty="tformat:%f%d" >actual &&
790809 test_cmp expect.decorate actual
791810'
792811
@@ -801,6 +820,9 @@ test_expect_success 'decorate-refs-exclude without globs' '
801820 EOF
802821 git log -n6 --decorate=short --pretty="tformat:%f%d" \
803822 --decorate-refs-exclude="tags/reach" >actual &&
823+ test_cmp expect.decorate actual &&
824+ git -c log.excludeDecoration="tags/reach" log \
825+ -n6 --decorate=short --pretty="tformat:%f%d" >actual &&
804826 test_cmp expect.decorate actual
805827'
806828
@@ -816,11 +838,19 @@ test_expect_success 'multiple decorate-refs-exclude' '
816838 git log -n6 --decorate=short --pretty="tformat:%f%d" \
817839 --decorate-refs-exclude="heads/octopus*" \
818840 --decorate-refs-exclude="tags/reach" >actual &&
841+ test_cmp expect.decorate actual &&
842+ git -c log.excludeDecoration="heads/octopus*" \
843+ -c log.excludeDecoration="tags/reach" log \
844+ -n6 --decorate=short --pretty="tformat:%f%d" >actual &&
845+ test_cmp expect.decorate actual &&
846+ git -c log.excludeDecoration="heads/octopus*" log \
847+ --decorate-refs-exclude="tags/reach" \
848+ -n6 --decorate=short --pretty="tformat:%f%d" >actual &&
819849 test_cmp expect.decorate actual
820850'
821851
822852test_expect_success ' decorate-refs and decorate-refs-exclude' '
823- cat >expect.decorate <<-\EOF &&
853+ cat >expect.no- decorate <<-\EOF &&
824854 Merge-tag-reach (master)
825855 Merge-tags-octopus-a-and-octopus-b
826856 seventh
@@ -831,6 +861,21 @@ test_expect_success 'decorate-refs and decorate-refs-exclude' '
831861 git log -n6 --decorate=short --pretty="tformat:%f%d" \
832862 --decorate-refs="heads/*" \
833863 --decorate-refs-exclude="heads/oc*" >actual &&
864+ test_cmp expect.no-decorate actual
865+ '
866+
867+ test_expect_success ' deocrate-refs and log.excludeDecoration' '
868+ cat >expect.decorate <<-\EOF &&
869+ Merge-tag-reach (master)
870+ Merge-tags-octopus-a-and-octopus-b
871+ seventh
872+ octopus-b (octopus-b)
873+ octopus-a (octopus-a)
874+ reach (reach)
875+ EOF
876+ git -c log.excludeDecoration="heads/oc*" log \
877+ --decorate-refs="heads/*" \
878+ -n6 --decorate=short --pretty="tformat:%f%d" >actual &&
834879 test_cmp expect.decorate actual
835880'
836881
@@ -846,6 +891,10 @@ test_expect_success 'decorate-refs-exclude and simplify-by-decoration' '
846891 git log -n6 --decorate=short --pretty="tformat:%f%d" \
847892 --decorate-refs-exclude="*octopus*" \
848893 --simplify-by-decoration >actual &&
894+ test_cmp expect.decorate actual &&
895+ git -c log.excludeDecoration="*octopus*" log \
896+ -n6 --decorate=short --pretty="tformat:%f%d" \
897+ --simplify-by-decoration >actual &&
849898 test_cmp expect.decorate actual
850899'
851900
0 commit comments