From e101d825a222a67c9fdf51b3269391a8f904a7be Mon Sep 17 00:00:00 2001 From: spacewander Date: Sat, 5 Nov 2016 12:10:03 +0800 Subject: [PATCH] strip out branches like trap-effort-signals --- bin/git-changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/git-changelog b/bin/git-changelog index 74a4867..5b4dbac 100755 --- a/bin/git-changelog +++ b/bin/git-changelog @@ -217,7 +217,7 @@ commitList() { # fetch our tags local _ref _date _tag _tab='%x09' - local _tag_regex='^[[:alnum:][:blank:][:punct:]]+/.*' + local _tag_regex='tag: *' while IFS=$'\t' read _ref _date _tag; do [[ -z "${_tag}" ]] && continue # strip out tags form () @@ -225,10 +225,10 @@ commitList() { _tag="${_tag# }"; _tag="${_tag//[()]/}" # trap tag if it points to last commit (HEAD) _tag="${_tag#HEAD*, }" + # strip out branches + [[ ! "${_tag}" =~ ${_tag_regex} ]] && continue # strip out any additional tags pointing to same commit, remove tag label _tag="${_tag%%,*}"; _tag="${_tag#tag: }" - # strip out tags that are actually feature branches (git-flow support) - [[ "${_tag}" =~ ${_tag_regex} ]] && continue # add tag to assoc array; copy tag to tag_list_keys for ordered iteration tags_list+=( "${_tag}:${_ref}=>${_date}" ) tags_list_keys+=( "${_tag}" )