diff --git a/bin/git-forgit b/bin/git-forgit index cd7b2dab..659b5123 100755 --- a/bin/git-forgit +++ b/bin/git-forgit @@ -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/' } diff --git a/tests/working-tree-changes.test.sh b/tests/working-tree-changes.test.sh index 03aa29c5..47448445 100644 --- a/tests/working-tree-changes.test.sh +++ b/tests/working-tree-changes.test.sh @@ -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" - }