Skip to content

Commit

Permalink
gitk: Fix bug introduced by previous commit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras committed Jul 13, 2007
1 parent cdaee5d commit 6ebedab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -7478,9 +7478,9 @@ set revtreeargs {}
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
Expand Down

0 comments on commit 6ebedab

Please sign in to comment.