DEV: Ignore renames when diffing theme changes (take 2)

Better fix than ca6adfbd
This commit is contained in:
Penar Musaraj 2019-11-06 14:45:18 -05:00
parent 9ef97ff44f
commit 61e35ce5dc

View File

@ -38,9 +38,9 @@ class ThemeStore::GitImporter
Discourse::Utils.execute_command("rm -rf ./*/")
Discourse::Utils.execute_command("cp", "-rf", "#{local_temp_folder}/#{exporter.export_name}/.", @temp_folder)
Discourse::Utils.execute_command("git", "checkout", "about.json")
# adding and diffing on staged so that we catch uploads
# add + diff staged to catch uploads but exclude renamed assets
Discourse::Utils.execute_command("git", "add", "-A")
return Discourse::Utils.execute_command("git", "diff", "--staged", "--no-renames")
return Discourse::Utils.execute_command("git", "diff", "--staged", "--diff-filter=r")
end
ensure
FileUtils.rm_rf local_temp_folder if local_temp_folder