* [PATCH 1/3] git-gui: fix typo in image data
@ 2010-12-09 20:46 Bert Wesarg
2010-12-09 20:46 ` [PATCH 2/3] git-gui: remove 'no such variable' for s error when encounter unknown file states Bert Wesarg
2011-01-28 9:34 ` [PATCH 1/3] git-gui: fix typo in image data Pat Thoyts
0 siblings, 2 replies; 4+ messages in thread
From: Bert Wesarg @ 2010-12-09 20:46 UTC (permalink / raw)
To: Pat Thoyts; +Cc: Shawn O. Pearce, Gustaf Hendeby, git, Bert Wesarg
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
git-gui.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index c85a53c..3ef9129 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1958,8 +1958,8 @@ static unsigned char file_merge_bits[] = {
} -maskdata $filemask
image create bitmap file_statechange -background white -foreground green -data {
-#define file_merge_width 14
-#define file_merge_height 15
+#define file_statechange_width 14
+#define file_statechange_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,
--
1.7.3.2.1200.ge4bf6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] git-gui: remove 'no such variable' for s error when encounter unknown file states
2010-12-09 20:46 [PATCH 1/3] git-gui: fix typo in image data Bert Wesarg
@ 2010-12-09 20:46 ` Bert Wesarg
2010-12-09 20:46 ` [PATCH 3/3] git-gui: learn more type change states Bert Wesarg
2011-01-28 9:34 ` [PATCH 1/3] git-gui: fix typo in image data Pat Thoyts
1 sibling, 1 reply; 4+ messages in thread
From: Bert Wesarg @ 2010-12-09 20:46 UTC (permalink / raw)
To: Pat Thoyts; +Cc: Shawn O. Pearce, Gustaf Hendeby, git, Bert Wesarg
$s will be referenced in the error message. Which was broken since
"git-gui: Automatically update-index all included files before commit"
(bbe3b3b, 2006-11-16).
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
lib/commit.tcl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/commit.tcl b/lib/commit.tcl
index 7f459cd..83b3d9d 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -161,7 +161,8 @@ The rescan will be automatically started now.
#
set files_ready 0
foreach path [array names file_states] {
- switch -glob -- [lindex $file_states($path) 0] {
+ set s $file_states($path)
+ switch -glob -- [lindex $s 0] {
_? {continue}
A? -
D? -
--
1.7.3.2.1200.ge4bf6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] git-gui: learn more type change states
2010-12-09 20:46 ` [PATCH 2/3] git-gui: remove 'no such variable' for s error when encounter unknown file states Bert Wesarg
@ 2010-12-09 20:46 ` Bert Wesarg
0 siblings, 0 replies; 4+ messages in thread
From: Bert Wesarg @ 2010-12-09 20:46 UTC (permalink / raw)
To: Pat Thoyts; +Cc: Shawn O. Pearce, Gustaf Hendeby, git, Bert Wesarg
Support the following states with type change in git-gui: AT, MT, TD, TM
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
Cc: Gustaf Hendeby <hendeby@isy.liu.se>
---
git-gui.sh | 8 ++++++--
lib/commit.tcl | 6 +++++-
lib/index.tcl | 10 ++++++++--
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index 3ef9129..f50a5fc 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1993,7 +1993,11 @@ foreach i {
{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"}}
@@ -3535,8 +3539,8 @@ proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
|| $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 83b3d9d..5ce4687 100644
--- a/lib/commit.tcl
+++ b/lib/commit.tcl
@@ -166,7 +166,7 @@ The rescan will be automatically started now.
_? {continue}
A? -
D? -
- T_ -
+ T? -
M? {set files_ready 1}
_U -
U? {
@@ -453,7 +453,11 @@ A rescan will be automatically started now.
}
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 e9db0c4..5d7bbf2 100644
--- a/lib/index.tcl
+++ b/lib/index.tcl
@@ -103,8 +103,11 @@ proc write_update_indexinfo {fd pathList totalCnt batch after} {
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}
@@ -167,7 +170,10 @@ proc write_update_index {fd pathList totalCnt batch after} {
AD {set new __}
?D {set new D_}
_O -
+ AT -
AM {set new A_}
+ TM -
+ MT -
_T {set new T_}
_U -
U? {
@@ -261,7 +267,7 @@ proc unstage_helper {txt paths} {
switch -glob -- [lindex $file_states($path) 0] {
A? -
M? -
- T_ -
+ T? -
D? {
lappend pathList $path
if {$path eq $current_diff_path} {
--
1.7.3.2.1200.ge4bf6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] git-gui: fix typo in image data
2010-12-09 20:46 [PATCH 1/3] git-gui: fix typo in image data Bert Wesarg
2010-12-09 20:46 ` [PATCH 2/3] git-gui: remove 'no such variable' for s error when encounter unknown file states Bert Wesarg
@ 2011-01-28 9:34 ` Pat Thoyts
1 sibling, 0 replies; 4+ messages in thread
From: Pat Thoyts @ 2011-01-28 9:34 UTC (permalink / raw)
To: Bert Wesarg; +Cc: Shawn O. Pearce, Gustaf Hendeby, git
This patchset look fine - thank you, applying to master.
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-28 9:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-09 20:46 [PATCH 1/3] git-gui: fix typo in image data Bert Wesarg
2010-12-09 20:46 ` [PATCH 2/3] git-gui: remove 'no such variable' for s error when encounter unknown file states Bert Wesarg
2010-12-09 20:46 ` [PATCH 3/3] git-gui: learn more type change states Bert Wesarg
2011-01-28 9:34 ` [PATCH 1/3] git-gui: fix typo in image data Pat Thoyts
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).