File tree 1 file changed +3
-14
lines changed
1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -62,20 +62,9 @@ echo "Creating diff directory from modified path..."
62
62
rm -rf " $DIFF_DIR "
63
63
cp -a " $MODIFIED_PATH " " $DIFF_DIR "
64
64
65
- # Create diff-log.txt from modified-log.txt
66
- cp " $MODIFIED_LOG " " $DIFF_LOG "
67
-
68
- # Final step: Remove all matching lines from diff-log.txt
69
- echo " Finalizing diff-log.txt by removing matches from original-log.txt..."
70
- while IFS= read -r original_line; do
71
- # Extract relative path and hash from the original log
72
- original_relative_path=$( echo " $original_line " | cut -d' |' -f1 | xargs)
73
- original_hash=$( echo " $original_line " | cut -d' |' -f2 | xargs)
74
-
75
- # Create the matching pattern and remove it from diff-log.txt
76
- grep_pattern=" ^${original_relative_path// ./ \\ .} | $original_hash $"
77
- sed -i " /$grep_pattern /d" " $DIFF_LOG "
78
- done < " $ORIGINAL_LOG "
65
+ # Create diff-log.txt using grep -vxFf
66
+ echo " Creating diff-log.txt by comparing original-log.txt and modified-log.txt..."
67
+ grep -vxFf " $ORIGINAL_LOG " " $MODIFIED_LOG " > " $DIFF_LOG "
79
68
80
69
# Remove matching files from the diff directory
81
70
echo " Removing matching files from diff directory..."
You can’t perform that action at this time.
0 commit comments