File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 11## [ Unreleased]
22
33- Add ` --only ` option to only include specific files or directories in the diff.
4+ - Add ` rails-diff dotfiles ` to compare dotfiles (configuration files) in the repository.
45- [ BUGFIX] --fail-on-diff wasn't aborting with errors on diff.
56
67## [ 0.5.0] - 2025-03-10
Original file line number Diff line number Diff line change @@ -67,7 +67,14 @@ rails-diff generated scaffold Post --fail-on-diff
6767rails-diff generated authentication --commit 7df1b8
6868```
6969
70- ### Options
70+ ### Compare dotfiles (configuration files)
71+
72+ ``` bash
73+ # Compare configuration files like .gitignore, .rspec, .rubocop.yml
74+ rails-diff dotfiles
75+ ```
76+
77+ ### Global Options
7178
7279#### --fail-on-diff
7380
Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ def file(*files)
2626
2727 options [ :fail_on_diff ] ? abort ( diff ) : puts ( diff )
2828 end
29+
30+ desc "dotfiles" , "Compare dotfiles in your repository with the ones generated by Rails"
31+ def dotfiles
32+ dotfiles = `git ls-files --cached --others --exclude-standard -- '.*'` . split ( "\n " )
33+
34+ file ( *dotfiles )
2935 end
3036
3137 desc "generated GENERATOR [args]" , "Compare files that would be created by a Rails generator"
You can’t perform that action at this time.
0 commit comments