Fix: remove explicit -u flag in git status command in _forgit_add (#455)

git status includes untracked files by default, so passing the flag
explicitly is not necessary. This allows overriding forgits behavior
by setting showUntrackedFiles = no in the .gitconfig.
This commit is contained in:
sandr01d 2025-07-15 21:00:04 +02:00 committed by GitHub
parent c0df9a56d0
commit fd373ba6c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -477,7 +477,7 @@ _forgit_add() {
files=()
while IFS='' read -r file; do
files+=("$file")
done < <(git -c color.status=always -c status.relativePaths=true -c core.quotePath=false status -su |
done < <(git -c color.status=always -c status.relativePaths=true -c core.quotePath=false status -s |
grep -F -e "$changed" -e "$unmerged" -e "$untracked" |
sed -E 's/^(..[^[:space:]]*)[[:space:]]+(.*)$/[\1] \2/' |
FZF_DEFAULT_OPTS="$opts" fzf |