Skip to content

A platform for community discussion. Free, open, simple.

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

Penar Musaraj61e35ce5dcf5
diff --git a/lib/theme_store/git_importer.rb b/lib/theme_store/git_importer.rb
index b844547e7db..ac91cdec13a 100644
--- a/lib/theme_store/git_importer.rb
+++ b/lib/theme_store/git_importer.rb
@@ -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