Skip to content

Commit 3ee6abf

Browse files
authored
feat: add support for listing deleted submodules. (#1001)
1 parent e26c036 commit 3ee6abf

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

get-changed-paths.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ function get_diff() {
9191
echo "::warning::Failed to get changed files for submodule ($sub) between: ${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904} ${sub_commit_cur}. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
9292
}
9393
fi
94-
done < <(git submodule | awk '{print $2}')
94+
done < <(git submodule status --recursive | grep -v "^-" | awk '{print $2}')
95+
96+
97+
if [[ "$filter" == "D" ]]; then
98+
while read -r sub; do
99+
echo "$sub"
100+
done < <(git submodule status --recursive | grep -e "^-" | awk '{print $2}')
101+
fi
95102

96103
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "$base$DIFF$sha" && exit_status=$? || exit_status=$?
97104

0 commit comments

Comments
 (0)