mirror of
https://github.com/wfxr/forgit.git
synced 2026-09-10 07:16:23 -04:00
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:
parent
d4bece432b
commit
3f636c164a
|
|
@ -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/'
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue