Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Koppe <andy.koppe@gmail.com>2023-08-20 21:50:08 +0300
committerJunio C Hamano <gitster@pobox.com>2023-08-21 21:40:10 +0300
commitf1f8a258567268974b9bbd012c33ad219a31aa0e (patch)
treebcd9ee55e4bb42eff9a588313bef32193d15cf5e /t/t4205-log-pretty-formats.sh
parenta58dd835e9536cf9e7adcd404d008a44d29af804 (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-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