fix(commitpkg): reliably check tree status regardless of configuration
Check git status --porcelain, not --short. `--short` is influenced by user configuration like `status.branch` making it non-empty even on a clean tree. Use `--porcelain` to avoid this.
This commit is contained in:
parent
edc14ef19c
commit
1c399778f9
|
@ -173,7 +173,7 @@ done
|
|||
# check for PKGBUILD standards
|
||||
check_pkgbuild_validity
|
||||
|
||||
if [[ -n $(git status --short --untracked-files=no) ]]; then
|
||||
if [[ -n $(git status --porcelain --untracked-files=no) ]]; then
|
||||
stat_busy 'Staging files'
|
||||
for f in $(git ls-files --modified); do
|
||||
git add "$f"
|
||||
|
|
Loading…
Reference in New Issue