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:
-rw-r--r--pretty.c4
-rwxr-xr-xt/t4205-log-pretty-formats.sh6
2 files changed, 7 insertions, 3 deletions
diff --git a/pretty.c b/pretty.c
index 7f3abb676c..cf964b060c 100644
--- a/pretty.c
+++ b/pretty.c
@@ -1961,6 +1961,10 @@ void userformat_find_requirements(const char *fmt, struct userformat_want *w)
case 'D':
w->decorate = 1;
break;
+ case '(':
+ if (starts_with(fmt + 1, "decorate"))
+ w->decorate = 1;
+ break;
}
}
}
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 16626e4fe9..5aabc9f7d8 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -590,9 +590,9 @@ test_expect_success 'pretty format %decorate' '
git log --format="%(decorate:prefix=,suffix=)" -1 >actual2 &&
test_cmp expect2 actual2 &&
- echo "[ HEAD -> foo; tag: bar; qux ]" >expect3 &&
- git log --format="%(decorate:prefix=[ ,suffix= ],separator=%x3B )" \
- -1 >actual3 &&
+ echo "[ bar; qux; foo ]" >expect3 &&
+ git log --format="%(decorate:prefix=[ ,suffix= ],separator=%x3B ,tag=)" \
+ --decorate-refs=refs/ -1 >actual3 &&
test_cmp expect3 actual3 &&
# Try with a typo (in "separator"), in which case the placeholder should