Re: Joining cg-*-id
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Sep 20, 2005, 19:34 UTC
- Message-ID
- <Pine.LNX.4.58.0509201224360.2553@g5.osdl.org>
- In-Reply-To
- <Pine.LNX.4.58.0509200906120.2553@g5.osdl.org>
On Tue, 20 Sep 2005, Linus Torvalds wrote:
Show 8 quoted lines
> > (Side note: the "gitk" thing works really badly. gitk doesn't quote its > arguments to "git-rev-list", so something like > > gitk --since="1 month ago" > > does NOT work, while "--since=yesterday" does, because it has no spaces. > Gaah. "Obi-Paul Mackerras, you're our only hope")
Fixed thusly, I think.
There is 'eval' magic with pure lists. I'm getting convinced that tcl is evil after all - that's just _confusing_. A real language shouldn't have semantic differences from this change, but it clearly does.
However, getting gitk working also shows a problem with --topo-order (which gitk uses) and the time limits. See
[torvalds@g5 git]$ git-rev-list $(git-rev-parse --since="8 days ago" HEAD) | wc 80 80 3280 [torvalds@g5 git]$ git-rev-list --topo-order $(git-rev-parse --since="8 days ago" HEAD) | wc 10 10 410
which is because when we sort things topologically, they won't be in date order any more (surprise surprise), so the whole date-cut-off logic doesn't actually work.
So I'm sad to say that
gitk --since="5 days ago"
still doesn't do what you'd actually _want_ it to do with gitk. But at least gitk can now parse the arguments right.
Linus
---
diff --git a/gitk b/gitk --- a/gitk +++ b/gitk @@ -33,8 +33,8 @@ proc getcommits {rargs} { set nextupdate [expr $startmsecs + 100] set ncmupdate 1 if [catch { - set parse_args [concat --default HEAD $rargs] - set parsed_args [split [eval exec git-rev-parse $parse_args] "\n"] + set parse_cmd [concat git-rev-parse --default HEAD $rargs] + set parsed_args [split [eval exec $parse_cmd] "\n"] }] { # if git-rev-parse failed for some reason... if {$rargs == {}} {