summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cdaee5d)
raw | patch | inline | side by side (parent: cdaee5d)
author | Paul Mackerras <paulus@samba.org> | |
Fri, 13 Jul 2007 03:45:55 +0000 (13:45 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Fri, 13 Jul 2007 03:45:55 +0000 (13:45 +1000) |
When I added the "--" case to the code scanning the arguments, I missed
the fact that since the switch statement uses -regexp, the "--" case
will match any argument containing "--", e.g. "--all". This fixes it
by taking out the -regexp (since we don't actually need regular
expression matching) and adjusting the match strings.
A side effect of this is that previously any argument starting with
"-d" would be taken to indicate date mode; now the argument has to be
exactly "-d" if you want date mode.
Signed-off-by: Paul Mackerras <paulus@samba.org>
the fact that since the switch statement uses -regexp, the "--" case
will match any argument containing "--", e.g. "--all". This fixes it
by taking out the -regexp (since we don't actually need regular
expression matching) and adjusting the match strings.
A side effect of this is that previously any argument starting with
"-d" would be taken to indicate date mode; now the argument has to be
exactly "-d" if you want date mode.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index b9219c2c70c64ab70b29ce3f0416037af080f0fe..39e452aba96ec0c15fcdefcfb10bff05d6631eb9 100755 (executable)
--- a/gitk
+++ b/gitk
set cmdline_files {}
set i 0
foreach arg $argv {
- switch -regexp -- $arg {
- "^$" { }
- "^-d" { set datemode 1 }
+ switch -- $arg {
+ "" { }
+ "-d" { set datemode 1 }
"--" {
set cmdline_files [lrange $argv [expr {$i + 1}] end]
break