diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-08-31 01:00:49 +0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-04 21:28:55 -0700 |
commit | ff515d81faa22f26b611ed7fd06a76d0c300ea39 (patch) | |
tree | d36f97dfe3dafaf08f62974f70b3a3ae740d7173 | |
parent | 48c74a58b129e7230d74b2fba5c2d29eaa1f11dc (diff) | |
download | git-ff515d81faa22f26b611ed7fd06a76d0c300ea39.tar.gz git-ff515d81faa22f26b611ed7fd06a76d0c300ea39.tar.xz |
git-gui: Support conflict states _U & UT.
Support _U (local deleted, remote modified) and
UT (file type changed in conflict) modes.
Note that 'file type changed' does not refer to
changes in the executable bit, instead it denotes
replacing a file with a link, or vice versa.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-x | git-gui.sh | 6 | ||||
-rw-r--r-- | lib/commit.tcl | 1 | ||||
-rw-r--r-- | lib/diff.tcl | 2 | ||||
-rw-r--r-- | lib/index.tcl | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/git-gui.sh b/git-gui.sh index 061fac768..90338785a 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1669,10 +1669,12 @@ foreach i { {D_ {mc "Staged for removal"}} {DO {mc "Staged for removal, still present"}} + {_U {mc "Requires merge resolution"}} {U_ {mc "Requires merge resolution"}} {UU {mc "Requires merge resolution"}} {UM {mc "Requires merge resolution"}} {UD {mc "Requires merge resolution"}} + {UT {mc "Requires merge resolution"}} } { set text [eval [lindex $i 1]] if {$max_status_desc < [string length $text]} { @@ -1843,7 +1845,7 @@ proc toggle_or_diff {w x y} { # Do not stage files with conflicts if {[info exists file_states($path)]} { set state [lindex $file_states($path) 0] - if {[string index $state 0] eq {U}} { + if {[string first {U} $state] >= 0} { set col 1 } } @@ -2814,7 +2816,7 @@ proc popup_diff_menu {ctxm ctxmmg x y X Y} { } else { set state {__} } - if {[string index $state 0] eq {U}} { + if {[string first {U} $state] >= 0} { tk_popup $ctxmmg $X $Y } else { if {$::ui_index eq $::current_diff_side} { diff --git a/lib/commit.tcl b/lib/commit.tcl index f4ab70784..297731562 100644 --- a/lib/commit.tcl +++ b/lib/commit.tcl @@ -151,6 +151,7 @@ The rescan will be automatically started now. D? - T_ - M? {set files_ready 1} + _U - U? { error_popup [mc "Unmerged files cannot be committed. diff --git a/lib/diff.tcl b/lib/diff.tcl index 4a7138be9..14a479ffd 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -166,7 +166,7 @@ proc show_diff {path w {lno {}} {scroll_pos {}}} { lappend cmd diff-index lappend cmd --cached } elseif {$w eq $ui_workdir} { - if {[string index $m 0] eq {U}} { + if {[string first {U} $m] >= 0} { lappend cmd diff } else { lappend cmd diff-files diff --git a/lib/index.tcl b/lib/index.tcl index d01140646..b045219a1 100644 --- a/lib/index.tcl +++ b/lib/index.tcl @@ -164,6 +164,7 @@ proc write_update_index {fd pathList totalCnt batch after} { _O - AM {set new A_} _T {set new T_} + _U - U? { if {[file exists $path]} { set new M_ |