Pārlūkot izejas kodu

Determining deleted files accounts for moved

With this change the logic that determines which files should be flagged
for deletion takes into account file that git has flagg as "renamed".
Jason Crist 4 gadi atpakaļ
vecāks
revīzija
f0e77f222b
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      sandbox.sh

+ 2 - 2
sandbox.sh

@@ -128,8 +128,8 @@ How do you wish to proceed? [1]"
 
 
   fi
   fi
 
 
-  # Determine which files have been removed from the repository (as of this head, within the past three months) according to git
-  files_to_delete=$(git log --format=format:"" --name-only --since="last three months" --diff-filter=D HEAD)
+  # Determine which files have been removed from the repository (or renamed) as of this head, within the past three months, according to git
+  files_to_delete=$(git log --format=format:"" --name-only --since="last three months" -M100% --diff-filter=D HEAD)
 
 
   # Determine which files have been removed locally but not comitted as a change
   # Determine which files have been removed locally but not comitted as a change
   uncomitted_files_to_delete=$(git diff HEAD --name-only --diff-filter=D)
   uncomitted_files_to_delete=$(git diff HEAD --name-only --diff-filter=D)