diff options
author | Andy Koppe <andy.koppe@gmail.com> | 2023-08-20 21:50:08 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-08-21 21:40:10 +0300 |
commit | f1f8a258567268974b9bbd012c33ad219a31aa0e (patch) | |
tree | bcd9ee55e4bb42eff9a588313bef32193d15cf5e /t/t4205-log-pretty-formats.sh | |
parent | a58dd835e9536cf9e7adcd404d008a44d29af804 (diff) |
pretty: add pointer and tag options to %(decorate)
Add pointer and tag options to %(decorate) format, to allow to override
the " -> " string used to show where HEAD points and the "tag: " string
used to mark tags.
Document in pretty-formats.txt and test in t4205-log-pretty-formats.sh.
Signed-off-by: Andy Koppe <andy.koppe@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4205-log-pretty-formats.sh')
-rwxr-xr-x | t/t4205-log-pretty-formats.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh index 6ba399c5be..16626e4fe9 100755 --- a/t/t4205-log-pretty-formats.sh +++ b/t/t4205-log-pretty-formats.sh @@ -600,7 +600,12 @@ test_expect_success 'pretty format %decorate' ' echo "%(decorate:prefix=[ ,suffix= ],separater=; )" >expect4 && git log --format="%(decorate:prefix=[ ,suffix= ],separater=%x3B )" \ -1 >actual4 && - test_cmp expect4 actual4 + test_cmp expect4 actual4 && + + echo "HEAD->foo bar qux" >expect5 && + git log --format="%(decorate:prefix=,suffix=,separator= ,tag=,pointer=->)" \ + -1 >actual5 && + test_cmp expect5 actual5 ' cat >trailers <<EOF |