aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-which-tag.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-which-tag.sh b/git-which-tag.sh
index b5d7390..0ccb719 100755
--- a/git-which-tag.sh
+++ b/git-which-tag.sh
@@ -6,7 +6,8 @@ set -eu
git log --color=never --all --pretty='%h' --grep="${1}" | while read -r ID ; do
tags="$(git tag --no-column -l 'v*' --sort='version:refname' --contains "$ID" \
| head -n 5 | tr '\n' ' ')"
+ subject="$(git rev-list --max-count=1 --no-commit-header --format=%s "$ID")"
if [ -n "$tags" ] ; then
- printf "%s: %s\n" "$ID" "$tags"
+ printf "%s: %s %s\n" "$ID" "$tags" "$subject"
fi
done