From 1c399778f9a52552f1bfe20eb7e08b89ef8abe12 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Sun, 21 May 2023 17:06:22 +0200 Subject: 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. --- src/commitpkg.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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" -- cgit v1.2.3-70-g09d2