@cryptotaxi247 / kubo / commits / 573804aa4

fix(mkreleaselog): handle commit 0

At commit 0, there is no parent.

Steven Allen committed May 10, 2021 at 16:44 UTC 573804aa4c0300a7cd41be093abd915d1877859a
1 file changed +4 -2
bin/mkreleaselog
+4 -2
@@ -120,8 +120,10 @@ release_log() {
120 "$start..$end" |
121 while read commit subject; do
122 # Skip gx-only PRs.
123 - git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" |
124 - grep -v "${IGNORED_FILES}" >/dev/null || continue
123 + if git rev-parse '$commit^' >/dev/null 2>&1 &&
124 + ! git -C "$dir" diff-tree --no-commit-id --name-only "$commit^" "$commit" | grep -v "${IGNORED_FILES}" >/dev/null; then
125 + continue
126 + fi
127
128 if [[ "$subject" =~ '^Merge pull request #([0-9]+) from' ]]; then
129 local prnum="${BASH_REMATCH[2]}"