lappend cmd diff-index
lappend cmd --cached
} elseif {$w eq $ui_workdir} {
- lappend cmd diff-files
+ if {[string index $m 0] eq {U}} {
+ lappend cmd diff
+ } else {
+ lappend cmd diff-files
+ }
}
lappend cmd -p
set new_m [lindex $s 0]
set icon_name [lindex $s 1]
+ set s [string index $new_m 0]
+ if {$s eq {U}} {
+ set s _
+ }
display_file_helper $ui_index $path $icon_name \
- [string index $old_m 0] \
- [string index $new_m 0]
+ [string index $old_m 0] $s
+
+ if {[string index $new_m 0] eq {U}} {
+ set s U
+ } else {
+ set s [string index $new_m 1]
+ }
display_file_helper $ui_workdir $path $icon_name \
- [string index $old_m 1] \
- [string index $new_m 1]
+ [string index $old_m 1] $s
if {$new_m eq {__}} {
unset file_states($path)
set m [lindex $s 0]
set icon_name [lindex $s 1]
- if {[string index $m 0] ne {_}} {
+ set s [string index $m 0]
+ if {$s ne {U} && $s ne {_}} {
display_all_files_helper $ui_index $path \
- $icon_name [string index $m 0]
+ $icon_name $s
}
- if {[string index $m 1] ne {_}} {
+
+ if {[string index $m 0] eq {U}} {
+ set s U
+ } else {
+ set s [string index $m 1]
+ }
+ if {$s ne {_}} {
display_all_files_helper $ui_workdir $path \
- $icon_name [string index $m 1]
+ $icon_name $s
}
}
?D {set new D_}
_O -
AM {set new A_}
- U_ -
+ U? {
+ if {[file exists $path]} {
+ set new M_
+ } else {
+ set new D_
+ }
+ }
?M {set new M_}
?? {continue}
}
set all_icons(_$ui_workdir) file_plain
set all_icons(M$ui_workdir) file_mod
set all_icons(D$ui_workdir) file_question
+set all_icons(U$ui_workdir) file_merge
set all_icons(O$ui_workdir) file_plain
set max_status_desc 0
{DO "Staged for removal, still present"}
{U_ "Requires merge resolution"}
+ {UU "Requires merge resolution"}
{UM "Requires merge resolution"}
{UD "Requires merge resolution"}
} {