Skip to content

Commit 3e5769c

Browse files
committed
nits and a fix from a bad rebase
Signed-off-by: Taylor Silva <dev@taydev.net>
1 parent cad238e commit 3e5769c

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

assets/check

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ filter_include=$(jq '.source.commit_filter.include // []' <<< "$payload")
3131
filter_include_all_match=$(jq -r '.source.commit_filter.include_all_match // false' <<< "$payload")
3232
filter_exclude=$(jq '.source.commit_filter.exclude // []' <<< "$payload")
3333
filter_exclude_all_match=$(jq -r '.source.commit_filter.exclude_all_match // false' <<< "$payload")
34+
version_depth=$(jq -r '.source.version_depth // 1' <<< "$payload")
3435
reverse=false
3536

3637
configure_git_global "${git_config_payload}"
@@ -121,31 +122,32 @@ else
121122
paths_search=`echo "-- $paths $ignore_paths" | tr "\n\r" " "`
122123
fi
123124

125+
set -x
124126
list_command="git rev-list --all --first-parent $log_range $paths_search"
125127
if jq -e 'length > 0' <<<"$filter_include"
126128
then
127129
list_command+=" | git rev-list --stdin --date-order --first-parent --no-walk=unsorted "
128-
if [ "$filter_include_all_match" == "true" ]; then
129-
list_command+="--all-match"
130-
fi
131130
include_items=$(echo $filter_include | jq -r -c '.[]')
132131
for wli in "$include_items"
133132
do
134133
list_command+=" --grep=\"$wli\""
135134
done
135+
if [ "$filter_include_all_match" == "true" ]; then
136+
list_command+=" --all-match"
137+
fi
136138
fi
137139

138140
if jq -e 'length > 0' <<<"$filter_exclude"
139141
then
140-
list_command+=" | git rev-list --stdin --date-order --invert-grep --first-parent --no-walk=unsorted "
141-
if [ "$filter_exclude_all_match" == "true" ]; then
142-
list_command+="--all-match"
143-
fi
142+
list_command+=" | git rev-list --stdin --date-order --invert-grep --first-parent --no-walk=unsorted "
144143
exclude_items=$(echo $filter_exclude | jq -r -c '.[]')
145144
for bli in "$exclude_items"
146145
do
147146
list_command+=" --grep=\"$bli\""
148147
done
148+
if [ "$filter_exclude_all_match" == "true" ]; then
149+
list_command+=" --all-match"
150+
fi
149151
fi
150152

151153

0 commit comments

Comments
 (0)