summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 32e0bca)
raw | patch | inline | side by side (parent: 32e0bca)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 08:08:51 +0000 (03:08 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sat, 18 Nov 2006 08:08:51 +0000 (03:08 -0500) |
It just felt wrong to me that I was using _ as part of the mode argument
to display_file to mean "don't care/use existing" and * as part of
the mode argument to mean "force to _".
So instead use ? to mean "don't care/use existing" and _ to mean
"force to _". The code is a lot clearer this way and hopefully it
won't drive another developer insane, as it did me.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
to display_file to mean "don't care/use existing" and * as part of
the mode argument to mean "force to _".
So instead use ? to mean "don't care/use existing" and _ to mean
"force to _". The code is a lot clearer this way and hopefully it
won't drive another developer insane, as it did me.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 62545b70945bad20779409c2cd2889c561735c0d..901d93236e6b5630e7f9fc6a4e5dd0a3916e272f 100755 (executable)
--- a/git-gui
+++ b/git-gui
incr z2 -1
display_file \
[string range $buf_rdi $z1 $z2] \
- [string index $buf_rdi [expr {$z1 - 2}]]_
+ [string index $buf_rdi [expr {$z1 - 2}]]?
incr c
}
if {$c < $n} {
incr z2 -1
display_file \
[string range $buf_rdf $z1 $z2] \
- _[string index $buf_rdf [expr {$z1 - 2}]]
+ ?[string index $buf_rdf [expr {$z1 - 2}]]
incr c
}
if {$c < $n} {
set pck [split $buf_rlo "\0"]
set buf_rlo [lindex $pck end]
foreach p [lrange $pck 0 end-1] {
- display_file $p _O
+ display_file $p ?O
}
rescan_done $fd buf_rlo $after
}
set icon [lindex $info 1]
}
- if {$s0 eq {_}} {
+ if {$s0 eq {?}} {
set s0 [string index $state 0]
- } elseif {$s0 eq {*}} {
+ } elseif {$s0 eq {_}} {
set s0 _
}
- if {$s1 eq {_}} {
+ if {$s1 eq {?}} {
set s1 [string index $state 1]
- } elseif {$s1 eq {*}} {
+ } elseif {$s1 eq {_}} {
set s1 _
}
switch -glob -- [lindex $file_states($path) 0] {
AD -
MD -
- _D {set new D*}
+ _D {set new D_}
_M -
MM -
- M_ {set new M*}
+ M_ {set new M_}
_O -
AM -
- A_ {set new A*}
+ A_ {set new A_}
?? {continue}
}