Thread (19 messages) flat view 19 messages, 5 authors, 2016-08-11

Re: Joining cg-*-id

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:07
Subsystem: the rest · Maintainer: Linus Torvalds


On Tue, 20 Sep 2005, Linus Torvalds wrote:
(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 == {}} {
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help