DEV: Ignore renames when diffing theme changes

Renamed assets are quite noisy when checking whether a remote theme has local changes.
This commit is contained in:
Penar Musaraj 2019-11-05 11:52:04 -05:00
parent 014f19b6ea
commit ca6adfbdd6
2 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class ThemeStore::GitImporter
Discourse::Utils.execute_command("git", "checkout", "about.json")
# adding and diffing on staged so that we catch uploads
Discourse::Utils.execute_command("git", "add", "-A")
return Discourse::Utils.execute_command("git", "diff", "--staged")
return Discourse::Utils.execute_command("git", "diff", "--staged", "--no-renames")
end
ensure
FileUtils.rm_rf local_temp_folder if local_temp_folder

View File

@ -170,6 +170,7 @@ describe RemoteTheme do
@theme.save
@theme.reload
expect(remote.diff_local_changes[:diff]).not_to include("similarity index 100%")
expect(remote.diff_local_changes[:diff]).to include("background-color: blue")
end
end