summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <heftig@archlinux.org>2023-05-21 17:06:22 +0200
committerLevente Polyak <anthraxx@archlinux.org>2023-05-23 01:47:00 +0200
commit1c399778f9a52552f1bfe20eb7e08b89ef8abe12 (patch)
tree53cc2216cedfcb46fc16412d7d7fd5591917f04c
parentedc14ef19c4de0133c8a0908459788d0b78a4c47 (diff)
downloaddevtools-1c399778f9a52552f1bfe20eb7e08b89ef8abe12.tar.xz
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.
-rw-r--r--src/commitpkg.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/commitpkg.in b/src/commitpkg.in
index 26117dc..e761d8e 100644
--- a/src/commitpkg.in
+++ b/src/commitpkg.in
@@ -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"