aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorAndy Koppe <andy.koppe@gmail.com>2023-08-20 19:50:08 +0100
committerJunio C Hamano <gitster@pobox.com>2023-08-21 11:40:10 -0700
commitf1f8a258567268974b9bbd012c33ad219a31aa0e (patch)
treebcd9ee55e4bb42eff9a588313bef32193d15cf5e /t
parentpretty: add %(decorate[:<options>]) format (diff)
downloadgit-f1f8a258567268974b9bbd012c33ad219a31aa0e.tar.gz
git-f1f8a258567268974b9bbd012c33ad219a31aa0e.zip
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')
-rwxr-xr-xt/t4205-log-pretty-formats.sh7
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