diff options
author | Peter Wu <lekensteyn@gmail.com> | 2013-11-22 19:52:44 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2013-11-22 19:52:44 +0100 |
commit | ca85432c68099397aeb60b0f9fd1ca9186c4c8b5 (patch) | |
tree | 87a4a21e039c441b297cf974777a120eba517879 | |
parent | b696923617e79a6af0360805b993a20fec2f86dc (diff) | |
download | scripts-ca85432c68099397aeb60b0f9fd1ca9186c4c8b5.tar.gz |
git-log-describe: match only git's "commit" text
-rwxr-xr-x | git-log-describe.awk | 2 |
1 files changed, 2 insertions, 0 deletions
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; |