summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4a065c8)
raw | patch | inline | side by side (parent: 4a065c8)
author | Bert Wesarg <bert.wesarg@googlemail.com> | |
Thu, 9 Dec 2010 20:46:23 +0000 (21:46 +0100) | ||
committer | Pat Thoyts <patthoyts@users.sourceforge.net> | |
Fri, 28 Jan 2011 00:16:50 +0000 (00:16 +0000) |
Support the following states with type change in git-gui: AT, MT, TD, TM
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
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 8d576b398c097a4c2c7cfe2336711bc206e3ab58..886719a8ce475049ddf9e32b9129210f2a685ec5 100755 (executable)
--- a/git-gui.sh
+++ b/git-gui.sh
{MD {mc "Staged for commit, missing"}}
{_T {mc "File type changed, not staged"}}
+ {MT {mc "File type changed, old type staged for commit"}}
+ {AT {mc "File type changed, old type staged for commit"}}
{T_ {mc "File type changed, staged"}}
+ {TM {mc "File type change staged, modification not staged"}}
+ {TD {mc "File type change staged, file missing"}}
{_O {mc "Untracked, not staged"}}
{A_ {mc "Staged for commit"}}
|| $current_diff_path eq {}
|| {__} eq $state
|| {_O} eq $state
- || {_T} eq $state
- || {T_} eq $state
+ || [string match {?T} $state]
+ || [string match {T?} $state]
|| [has_textconv $current_diff_path]} {
set s disabled
} else {
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 83b3d9d21b44d1f9c494e8b74f62cbdf2ac08ac1..5ce46877bfb24701187f5ff5e94ce4aaf8b666b2 100644 (file)
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
_? {continue}
A? -
D? -
- T_ -
+ T? -
M? {set files_ready 1}
_U -
U? {
}
AM -
AD -
+ AT -
+ TM -
+ TD -
MM -
+ MT -
MD {
set file_states($path) [list \
_[string index $m 1] \
diff --git a/lib/index.tcl b/lib/index.tcl
index e9db0c49895fbebdf8dbe7c0472546a05fea26a0..5d7bbf23eddeb2ff146487b28a79feee1d296289 100644 (file)
--- a/lib/index.tcl
+++ b/lib/index.tcl
set s $file_states($path)
switch -glob -- [lindex $s 0] {
A? {set new _O}
- M? {set new _M}
+ MT -
+ TM -
T_ {set new _T}
+ M? {set new _M}
+ TD -
D_ {set new _D}
D? {set new _?}
?? {continue}
AD {set new __}
?D {set new D_}
_O -
+ AT -
AM {set new A_}
+ TM -
+ MT -
_T {set new T_}
_U -
U? {
switch -glob -- [lindex $file_states($path) 0] {
A? -
M? -
- T_ -
+ T? -
D? {
lappend pathList $path
if {$path eq $current_diff_path} {