From: Alexander Gavrilov <angavrilov@gmail.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>
Subject: [PATCH (GIT-GUI) 5/8] git-gui: Support conflict states _U & UT.
Date: Sun, 31 Aug 2008 01:00:49 +0400 [thread overview]
Message-ID: <200808310100.49998.angavrilov@gmail.com> (raw)
In-Reply-To: <200808310059.47327.angavrilov@gmail.com>
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>
---
git-gui.sh | 6 ++++--
lib/commit.tcl | 1 +
lib/diff.tcl | 2 +-
lib/index.tcl | 1 +
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index 8d4f715..a3000b6 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 f4ab707..2977315 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 52b79e4..a7fcdc6 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 7c27f2a..06a4fb0 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_
--
1.6.0.20.g6148bc
next prev parent reply other threads:[~2008-08-30 21:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 20:52 [PATCH (GIT-GUI) 0/8] Add mergetool functionality to git-gui Alexander Gavrilov
2008-08-30 20:54 ` [PATCH (GIT-GUI) 1/8] git-gui: Don't allow staging files with conflicts Alexander Gavrilov
2008-08-30 20:55 ` [PATCH (GIT-GUI) 2/8] git-gui: Support resolving conflicts via the diff context menu Alexander Gavrilov
2008-08-30 20:56 ` [PATCH (GIT-GUI) 3/8] git-gui: Support calling merge tools Alexander Gavrilov
2008-08-30 20:59 ` [PATCH (GIT-GUI) 4/8] git-gui: Support more " Alexander Gavrilov
2008-08-30 21:00 ` Alexander Gavrilov [this message]
2008-08-30 21:02 ` [PATCH (GIT-GUI) 6/8] git-gui: Reimplement and enhance auto-selection of diffs Alexander Gavrilov
2008-08-30 21:04 ` [PATCH (GIT-GUI) 7/8] git-gui: Make F5 reselect a diff, if an untracked file is selected Alexander Gavrilov
2008-08-30 21:05 ` [PATCH (GIT-GUI) 8/8] git-gui: Show special diffs for complex conflict cases Alexander Gavrilov
2008-09-08 12:10 ` [PATCH (GIT-GUI) 1/8] git-gui: Don't allow staging files with conflicts Johannes Sixt
2008-09-08 12:25 ` Alexander Gavrilov
2008-09-17 11:40 ` [PATCH/RFC 0/2] git-gui: issues with merge tool series Johannes Sixt
2008-09-17 11:40 ` [PATCH/RFC 1/2] Revert "git-gui: Don't allow staging files with conflicts." Johannes Sixt
2008-09-17 11:40 ` [PATCH/RFC 2/2] git-gui: Do not automatically stage file after merge tool finishes Johannes Sixt
2008-09-17 12:25 ` Alexander Gavrilov
2008-09-24 17:50 ` Shawn O. Pearce
2008-09-24 19:08 ` [PATCH/RFC 2/2 v2] " Johannes Sixt
2008-09-17 12:50 ` [PATCH/RFC 0/2] git-gui: issues with merge tool series Alexander Gavrilov
2008-09-17 21:40 ` Johannes Sixt
2008-09-17 22:24 ` Alexander Gavrilov
2008-09-24 17:48 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808310100.49998.angavrilov@gmail.com \
--to=angavrilov@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).