-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Search git status] support previewing merge conflicts (#262)
Report files containing merge conflicts as "Unmerged" when previewing to distinguish them from normal changes. Also, update some comments, tests, and docs related to Search git status for clarity.
- Loading branch information
Showing
5 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
mock git diff "echo \$argv" | ||
set file dir/file.txt | ||
set output (_fzf_preview_changed_file " D out.log") | ||
|
||
set output (_fzf_preview_changed_file " D $file") | ||
|
||
contains -- "| Unstaged |" $output && not contains "| Staged |" $output | ||
contains "| Unstaged |" $output && not contains "| Staged |" $output | ||
@test "only shows unstaged changes if file was only deleted in working tree" $status -eq 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mock git diff "echo \$argv" | ||
set output (_fzf_preview_changed_file "UU out.log") | ||
|
||
@test "shows merge conflicts as unmerged" $output[2] = "| Unmerged |" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
mock git diff "echo \$argv" | ||
set file dir/file.txt | ||
set output (_fzf_preview_changed_file "MM $file") | ||
set output (_fzf_preview_changed_file "MM dir/file.txt") | ||
|
||
contains -- "| Unstaged |" $output && contains "| Staged |" $output | ||
contains "| Unstaged |" $output && contains "| Staged |" $output | ||
@test "shows staged and unstaged changes if the file is modified in both places" $status -eq 0 |