mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
style.fish: Just ask for uncommitted changes
I keep some files around that I don't *want* to commit or ignore, but it's fine to restyle them. It's also fine to restyle everything if you are about to commit something because then it'll be committed in the correct style.
This commit is contained in:
parent
7d3127ac2b
commit
8dbd23372f
1 changed files with 5 additions and 3 deletions
|
@ -23,9 +23,11 @@ if test $all = yes
|
|||
set -l files (git status --porcelain --short --untracked-files=all | sed -e 's/^ *[^ ]* *//')
|
||||
if set -q files[1]
|
||||
echo
|
||||
echo You have uncommitted changes. Cowardly refusing to restyle the entire code base.
|
||||
echo
|
||||
exit 1
|
||||
echo 'You have uncommitted changes. Are you sure you want to restyle?'
|
||||
read -P 'y/N? ' -n1 -l ans
|
||||
if not string match -qi "y" -- $ans
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
set c_files src/*.h src/*.cpp src/*.c
|
||||
set fish_files share/**.fish
|
||||
|
|
Loading…
Reference in a new issue