3
0
Fork 0
mirror of https://github.com/tj-actions/changed-files synced 2025-02-20 21:01:53 +00:00

Merge pull request #710 from tj-actions/chore/use-local-scoped-variables

This commit is contained in:
Tonye Jack 2022-10-25 16:04:27 -06:00 committed by GitHub
commit c4d29bf5b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,9 +25,10 @@ if [[ -n $INPUT_DIFF_RELATIVE ]]; then
fi
function get_diff() {
base="$1"
sha="$2"
filter="$3"
local base="$1"
local sha="$2"
local filter="$3"
while IFS='' read -r sub; do
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[-]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then
@ -69,8 +70,9 @@ function get_diff() {
}
function get_renames() {
base="$1"
sha="$2"
local base="$1"
local sha="$2"
while IFS='' read -r sub; do
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[-]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then