From ca85432c68099397aeb60b0f9fd1ca9186c4c8b5 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 22 Nov 2013 19:52:44 +0100 Subject: git-log-describe: match only git's "commit" text --- git-log-describe.awk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'git-log-describe.awk') diff --git a/git-log-describe.awk b/git-log-describe.awk index 0ac233e..9bb5896 100755 --- a/git-log-describe.awk +++ b/git-log-describe.awk @@ -24,6 +24,8 @@ function has_color(str) { indent_len = length($0) - text_len; } +# match only git's "commit" label, not something from the commit message. +$0 ~ /^commit/ && $1 == "commit" && $2 ~ /^[0-9a-f]{5,40}$/ { hash = $2; -- cgit v1.2.1