Skip to content

Commit 1a51a1d

Browse files
Support backfilling commits missing in GHA
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent c26286a commit 1a51a1d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

git/git_commits_range.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ if [ -z "${HEAD}" ] || [ "${HEAD}" = "${ZERO}" ]; then
2525
fi
2626

2727
if [ -z "${BEFOR}" ] || [ "${BEFOR}" = "${ZERO}" ]; then
28+
git -C "${REPO}" cat-file -e "${HEAD}^{commit}" 2>/dev/null || exit 0
2829
git -C "${REPO}" rev-list --max-count="${LIMIT}" --skip="${SKIP}" "${HEAD}"
2930
else
31+
git -C "${REPO}" cat-file -e "${HEAD}^{commit}" 2>/dev/null || exit 0
32+
git -C "${REPO}" cat-file -e "${BEFOR}^{commit}" 2>/dev/null || exit 0
3033
git -C "${REPO}" rev-list --max-count="${LIMIT}" --skip="${SKIP}" "${BEFOR}..${HEAD}"
3134
fi
32-

0 commit comments

Comments
 (0)