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:
9999 # For each renamed file
100100 echo "$RENAMES" | while read -r LINE; do
101101 # 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}')
104105
105106 # Check if there are actual content changes using git diff with -M (detect renames)
106107 # If there's output from the diff command beyond the rename header, there are content changes
107108 DIFF_OUTPUT=$(git diff --cached -M -- "$SOURCE" "$DEST")
108109 # Count lines that start with +/- (changes) but ignore the rename header lines
109110 CHANGE_COUNT=$(echo "$DIFF_OUTPUT" | grep -v "^renamed:" | grep -v "^─" | grep -E "^\+|^-" | wc -l)
110111
111- echo "Git diff for $SOURCE → $DEST: $CHANGE_COUNT lines changed"
112+ echo "Git diff for ' $SOURCE' → ' $DEST' : $CHANGE_COUNT lines changed"
112113
113114 # Determine if this is just a rename or if content was also changed
114115 if [ "$CHANGE_COUNT" -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments