File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -99,16 +99,17 @@ jobs:
99
99
# For each renamed file
100
100
echo "$RENAMES" | while read -r LINE; do
101
101
# Split the line into source and destination
102
- SOURCE=$(echo "$LINE" | awk '{print $1}')
103
- DEST=$(echo "$LINE" | awk '{print $2}')
102
+ # After sed processing, each LINE is in format: "oldname -> newname"
103
+ SOURCE=$(echo "$LINE" | awk -F ' -> ' '{print $1}')
104
+ DEST=$(echo "$LINE" | awk -F ' -> ' '{print $2}')
104
105
105
106
# Check if there are actual content changes using git diff with -M (detect renames)
106
107
# If there's output from the diff command beyond the rename header, there are content changes
107
108
DIFF_OUTPUT=$(git diff --cached -M -- "$SOURCE" "$DEST")
108
109
# Count lines that start with +/- (changes) but ignore the rename header lines
109
110
CHANGE_COUNT=$(echo "$DIFF_OUTPUT" | grep -v "^renamed:" | grep -v "^─" | grep -E "^\+|^-" | wc -l)
110
111
111
- echo "Git diff for $SOURCE → $DEST: $CHANGE_COUNT lines changed"
112
+ echo "Git diff for ' $SOURCE' → ' $DEST' : $CHANGE_COUNT lines changed"
112
113
113
114
# Determine if this is just a rename or if content was also changed
114
115
if [ "$CHANGE_COUNT" -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments