revert: undo backslash filename handling in _forgit_worktree_changes

Reverts commmit 2c17635d4f, because it
introduced a regression on older git versions where `_forgit_add` no
longer showed untracked files.
This commit is contained in:
sandroid 2026-03-29 14:54:57 +02:00
parent d4bece432b
commit 3f636c164a
No known key found for this signature in database
GPG key ID: 91418C9982B8B76E
2 changed files with 1 additions and 11 deletions

View file

@ -224,8 +224,7 @@ _forgit_worktree_changes() {
untracked=$(git config --get-color color.status.untracked red)
show_untracked=$(git config status.showUntrackedFiles)
git -c color.status=always -c status.relativePaths=true status --porcelain -zs --untracked="${show_untracked:-all}" |
tr '\0' '\n' |
git -c color.status=always -c status.relativePaths=true -c core.quotePath=false status -s --untracked="${show_untracked:-all}" |
grep -F -e "$changed" -e "$unmerged" -e "$untracked" |
sed -E 's/^(..[^[:space:]]*)[[:space:]]+(.*)$/[\1] \2/'
}

View file

@ -23,7 +23,6 @@
git add "staged file.txt"
touch "untracked_file.txt"
touch 'untracked_with_\backslash'
}
function test_forgit_worktree_changes_contains_modified() {
@ -57,11 +56,3 @@
assert_not_contains "tracked file.txt" "$output"
}
function test_forgit_worktree_changes_supports_backslashes() {
local output
output=$(_forgit_worktree_changes)
assert_contains 'untracked_with_\backslash' "$output"
}