Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/git-forgit
Original file line number Diff line number Diff line change
Expand Up @@ -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/'
}
Expand Down
9 changes: 0 additions & 9 deletions tests/working-tree-changes.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
git add "staged file.txt"

touch "untracked_file.txt"
touch 'untracked_with_\backslash'
}

function test_forgit_worktree_changes_contains_modified() {
Expand Down Expand Up @@ -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"
}