@cryptotaxi247 / kubo / commits / d2c49278f

fix: pass the repo directory into the ignored_commit function

fixes #9012

Steven Allen committed Jun 23, 2022 at 10:29 UTC d2c49278f6e215ef37f2c6e0e5a847516b3d3ce7
1 file changed +5 -4
bin/mkreleaselog
+5 -4
@@ -52,7 +52,7 @@ IGNORE_FILES=(
52
53 if [[ ${#INCLUDE_MODULES[@]} -gt 0 ]]; then
54 INCLUDE_REGEX="(${$(printf "|%s" "${INCLUDE_MODULES[@]}"):1})"
55 -else
55 +else
56 INCLUDE_REGEX="" # "match anything"
57 fi
58
@@ -149,11 +149,12 @@ pr_link() {
149 }
150
151 ignored_commit() {
152 - local commit="$1"
152 + local repo="$1"
153 + local commit="$2"
154 local matches
155
156 # Check to see if this commit includes any non-ignored files.
156 - matches=$(git -C "$dir" diff-tree --no-commit-id --name-only -r "$commit^" "$commit" \
157 + matches=$(git -C "$repo" diff-tree --no-commit-id --name-only -r "$commit^" "$commit" \
158 -- "${IGNORE_FILES_PATHSPEC[@]}" | wc -l)
159 [[ "$matches" -eq 0 ]]
160 }
@@ -175,7 +176,7 @@ release_log() {
176 "$start..$end" |
177 while read commit subject; do
178 # Skip commits that only touch ignored files.
178 - if ignored_commit "$commit"; then
179 + if ignored_commit "$dir" "$commit"; then
180 continue
181 fi
182