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

Re: [RESEND] [PATCH] fix gitk with lots of tags

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 18, 2006, 18:38 UTC
Message-ID
<Pine.LNX.4.64.0604181132440.3701@g5.osdl.org>
In-Reply-To
<20060418180614.GA31543@blackbean.org>
On Tue, 18 Apr 2006, Jim Radford wrote:
> 
> I've gotten no reposnse from Paul on this patch[1].  If it seems ok to
> you, would you mind putting it in your queue for him?  I hate to see
> gitk die with "argument list too long" messages.  They're so 640k.
Don't do this patch. It's wrong.
However, this simpler patch might be ok.

It just depends on the fact that git-rev-list can parse everything that git-rev-parse used to do these days, and thus the git-rev-parse call really isn't needed any more (and if that isn't true for some odd argument, we should make it true).

So the only thing we need to do is to add the "--default HEAD" thing to the front of the argument list.

		Linus
---
diff --git a/gitk b/gitk
index 87e7162..5d95779 100755
--- a/gitk
+++ b/gitk
@@ -19,16 +19,7 @@ proc gitdir {} {
 proc parse_args {rargs} {
     global parsed_args
 
-    if {[catch {
-	set parse_args [concat --default HEAD $rargs]
-	set parsed_args [split [eval exec git-rev-parse $parse_args] "\n"]
-    }]} {
-	# if git-rev-parse failed for some reason...
-	if {$rargs == {}} {
-	    set rargs HEAD
-	}
-	set parsed_args $rargs
-    }
+    set parsed_args [concat --default HEAD $rargs]
     return $parsed_args
 }
 
Previous: Jim RadfordNext: Paul Mackerras
Message 3 of 5 in “fix gitk with lots of tags”
  1. fix gitk with lots of tagsJim Radford, Apr 6, 2006
  2. [RESEND] [PATCH] fix gitk with lots of tagsJim Radford, Apr 18, 2006
  3. Linus TorvaldsApr 18, 2006
  4. Paul MackerrasApr 21, 2006
  5. Linus TorvaldsApr 21, 2006

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.