From f0fc230482b82d4049c4ba52c6aa1ef0cf22ea6a Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Tue, 14 Feb 2023 04:14:01 -0700 Subject: [PATCH] Update get-changed-paths.sh --- get-changed-paths.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/get-changed-paths.sh b/get-changed-paths.sh index edc8df1f..480a5ab4 100755 --- a/get-changed-paths.sh +++ b/get-changed-paths.sh @@ -71,13 +71,13 @@ function get_diff() { local filter="$3" while IFS='' read -r sub; do - sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? + sub_commit_pre="$(git diff "$base" "$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? if [[ $exit_status -ne 0 ]]; then echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha" exit 1 fi - sub_commit_cur="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? + sub_commit_cur="$(git diff "$base" "$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? if [[ $exit_status -ne 0 ]]; then echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha" exit 1 @@ -106,13 +106,13 @@ function get_renames() { local sha="$2" while IFS='' read -r sub; do - sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? + sub_commit_pre="$(git diff "$base" "$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? if [[ $exit_status -ne 0 ]]; then echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha" exit 1 fi - sub_commit_cur="$(git diff "$base$DIFF$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? + sub_commit_cur="$(git diff "$base" "$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$? if [[ $exit_status -ne 0 ]]; then echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha" exit 1