mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 20:15:47 +08:00
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:
parent
014f19b6ea
commit
ca6adfbdd6
|
@ -40,7 +40,7 @@ class ThemeStore::GitImporter
|
||||||
Discourse::Utils.execute_command("git", "checkout", "about.json")
|
Discourse::Utils.execute_command("git", "checkout", "about.json")
|
||||||
# adding and diffing on staged so that we catch uploads
|
# adding and diffing on staged so that we catch uploads
|
||||||
Discourse::Utils.execute_command("git", "add", "-A")
|
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
|
end
|
||||||
ensure
|
ensure
|
||||||
FileUtils.rm_rf local_temp_folder if local_temp_folder
|
FileUtils.rm_rf local_temp_folder if local_temp_folder
|
||||||
|
|
|
@ -170,6 +170,7 @@ describe RemoteTheme do
|
||||||
@theme.save
|
@theme.save
|
||||||
@theme.reload
|
@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")
|
expect(remote.diff_local_changes[:diff]).to include("background-color: blue")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user