summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f2816b3)
raw | patch | inline | side by side (parent: f2816b3)
author | Gustaf Hendeby <hendeby@isy.liu.se> | |
Fri, 22 Aug 2008 20:10:27 +0000 (22:10 +0200) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 25 Aug 2008 04:36:17 +0000 (21:36 -0700) |
Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui.sh | patch | blob | history | |
lib/commit.tcl | patch | blob | history | |
lib/index.tcl | patch | blob | history |
diff --git a/git-gui.sh b/git-gui.sh
index ad65aaad5a696ec355d9b965b13704f57145678f..8ad6567edd465bde71ad336042cf2ae4008ed86e 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
0xfa, 0x17, 0x02, 0x10, 0xfe, 0x1f};
} -maskdata $filemask
+image create bitmap file_statechange -background white -foreground green -data {
+#define file_merge_width 14
+#define file_merge_height 15
+static unsigned char file_statechange_bits[] = {
+ 0xfe, 0x01, 0x02, 0x03, 0x02, 0x05, 0x02, 0x09, 0x02, 0x1f, 0x62, 0x10,
+ 0x62, 0x10, 0xba, 0x11, 0xba, 0x11, 0x62, 0x10, 0x62, 0x10, 0x02, 0x10,
+ 0x02, 0x10, 0x02, 0x10, 0xfe, 0x1f};
+} -maskdata $filemask
+
set ui_index .vpane.files.index.list
set ui_workdir .vpane.files.workdir.list
set all_icons(M$ui_index) file_fulltick
set all_icons(D$ui_index) file_removed
set all_icons(U$ui_index) file_merge
+set all_icons(T$ui_index) file_statechange
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 all_icons(T$ui_workdir) file_statechange
set max_status_desc 0
foreach i {
{MM {mc "Portions staged for commit"}}
{MD {mc "Staged for commit, missing"}}
+ {_T {mc "File type changed, not staged"}}
+ {T_ {mc "File type changed, staged"}}
+
{_O {mc "Untracked, not staged"}}
{A_ {mc "Staged for commit"}}
{AM {mc "Portions staged for commit"}}
if {$::is_3way_diff
|| $current_diff_path eq {}
|| ![info exists file_states($current_diff_path)]
- || {_O} eq [lindex $file_states($current_diff_path) 0]} {
+ || {_O} eq [lindex $file_states($current_diff_path) 0]
+ || {_T} eq [lindex $file_states($current_diff_path) 0]
+ || {T_} eq [lindex $file_states($current_diff_path) 0]} {
set s disabled
} else {
set s normal
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 40a710355751836e78b65101592b753266f507ca..f4ab70784c9beb3b155bc27e41a9f7d483ec6708 100644 (file)
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
_? {continue}
A? -
D? -
+ T_ -
M? {set files_ready 1}
U? {
error_popup [mc "Unmerged files cannot be committed.
__ -
A_ -
M_ -
+ T_ -
D_ {
unset file_states($path)
catch {unset selected_paths($path)}
diff --git a/lib/index.tcl b/lib/index.tcl
index 3c1fce7475d362d1880d915ff4bdf168fda28593..7c27f2af6cc7fe29647199db7635ad3487a32238 100644 (file)
--- a/lib/index.tcl
+++ b/lib/index.tcl
switch -glob -- [lindex $s 0] {
A? {set new _O}
M? {set new _M}
+ T_ {set new _T}
D_ {set new _D}
D? {set new _?}
?? {continue}
?D {set new D_}
_O -
AM {set new A_}
+ _T {set new T_}
U? {
if {[file exists $path]} {
set new M_
switch -glob -- [lindex $file_states($path) 0] {
U? {continue}
?M -
+ ?T -
?D {
puts -nonewline $fd "[encoding convertto $path]\0"
display_file $path ?_
switch -glob -- [lindex $file_states($path) 0] {
A? -
M? -
+ T_ -
D? {
lappend pathList $path
if {$path eq $current_diff_path} {
_O -
?M -
?D -
+ ?T -
U? {
lappend pathList $path
if {$path eq $current_diff_path} {
switch -glob -- [lindex $file_states($path) 0] {
U? {continue}
?M -
+ ?T -
?D {lappend paths $path}
}
}
switch -glob -- [lindex $file_states($path) 0] {
U? {continue}
?M -
+ ?T -
?D {
lappend pathList $path
if {$path eq $current_diff_path} {