git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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 == {}} {
Previous: Linus TorvaldsNext: Paul Mackerras
Message 10 of 22 in “Joining cg-*-id”
  1. Pavel RoskinSep 19, 2005
  2. Petr BaudisSep 19, 2005
  3. Linus TorvaldsSep 19, 2005
  4. Petr BaudisSep 19, 2005
  5. Linus TorvaldsSep 20, 2005
  6. Petr BaudisSep 20, 2005
  7. Linus TorvaldsSep 20, 2005
  8. Petr BaudisSep 20, 2005
  9. Linus TorvaldsSep 20, 2005
  10. Linus TorvaldsSep 20, 2005
  11. Paul MackerrasSep 21, 2005
  12. Linus TorvaldsSep 21, 2005
  13. Paul MackerrasSep 21, 2005
  14. Petr BaudisSep 21, 2005
  15. Matthias UrlichsSep 20, 2005
  16. Junio C HamanoSep 20, 2005
  17. Matthias UrlichsSep 20, 2005
  18. Paul MackerrasSep 20, 2005
  19. Pavel RoskinSep 19, 2005
  20. Petr BaudisSep 19, 2005
  21. Pavel RoskinSep 20, 2005
  22. Petr BaudisSep 20, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.