diff options
author | Jan Alexander Steffens (heftig) <heftig@archlinux.org> | 2023-05-21 17:06:22 +0200 |
---|---|---|
committer | Levente Polyak <anthraxx@archlinux.org> | 2023-05-23 01:47:00 +0200 |
commit | 1c399778f9a52552f1bfe20eb7e08b89ef8abe12 (patch) | |
tree | 53cc2216cedfcb46fc16412d7d7fd5591917f04c | |
parent | edc14ef19c4de0133c8a0908459788d0b78a4c47 (diff) | |
download | devtools-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.in | 2 |
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" |