mirror of
https://github.com/notwa/rc
synced 2024-11-05 02:29:06 -08:00
don't spit out git status
when there's nothing to do
This commit is contained in:
parent
13c5e3ff21
commit
0ca819ffc4
1 changed files with 5 additions and 1 deletions
|
@ -76,6 +76,10 @@ else
|
|||
|
||||
if [ "$1" = commit ]; then
|
||||
mv README.md~ README.md || die 'failed to overwrite readme'
|
||||
if ! git diff --no-patch --exit-code README.md; then
|
||||
git commit README.md -m 'regenerate readme' || die 'failed to commit'
|
||||
else
|
||||
warn 'nothing to do'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue