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:
Jan Alexander Steffens (heftig) 2023-05-21 17:06:22 +02:00 committed by Levente Polyak
parent edc14ef19c
commit 1c399778f9
No known key found for this signature in database
GPG Key ID: FC1B547C8D8172C8
1 changed files with 1 additions and 1 deletions

View File

@ -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"