Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for listing deleted submodules. #1001

Merged
merged 2 commits into from
Feb 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion get-changed-paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ function get_diff() {
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
}
fi
done < <(git submodule | awk '{print $2}')
done < <(git submodule status --recursive | grep -v "^-" | awk '{print $2}')


if [[ "$filter" == "D" ]]; then
while read -r sub; do
echo "$sub"
done < <(git submodule status --recursive | grep -e "^-" | awk '{print $2}')
fi

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

Expand Down