{"thread":{"id":"3815","subject":"[PATCH] fix gitk with lots of tags","startedAt":"2006-04-06T20:36:37Z","lastAt":"2006-04-21T15:19:52Z","messageCount":5,"participants":["Jim Radford","Linus Torvalds","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18431","messageId":"20060406203637.GA15009@blackbean.org","threadId":"3815","inReplyTo":null,"subject":"[PATCH] fix gitk with lots of tags","fromName":"Jim Radford","fromEmail":"radford@blackbean.org","sentAt":"2006-04-06T20:36:37Z","receivedAt":"2006-04-06T20:36:37Z","isPatch":true,"sender":{"key":"radford@blackbean.org","avatar":null},"body":"Hi Paul,\n\nThis fix allow gitk to be used on repositories with lots of tags.  It\nbypasses git-rev-parse and passes its arguments to git-rev-list\ndirectly to avoid the command line length restrictions.\n\nSigned-Off-By: Jim Radford <radford@blackbean.org>\n\n-Jim\n\n---\ndiff --git a/gitk b/gitk\nindex 26fa79a..40672fb 100755\n--- a/gitk\n+++ b/gitk\n@@ -17,19 +17,11 @@ proc gitdir {} {\n }\n \n proc parse_args {rargs} {\n-    global parsed_args\n-\n-    if {[catch {\n-\tset parse_args [concat --default HEAD $rargs]\n-\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n-    }]} {\n-\t# if git-rev-parse failed for some reason...\n-\tif {$rargs == {}} {\n-\t    set rargs HEAD\n-\t}\n-\tset parsed_args $rargs\n+    if {$rargs == {}} {\n+        return HEAD\n+    } else {\n+\treturn $rargs\n     }\n-    return $parsed_args\n }\n \n proc start_rev_list {rlargs} {\n"},{"id":"18812","messageId":"20060418180614.GA31543@blackbean.org","threadId":"3815","inReplyTo":"20060406203637.GA15009@blackbean.org","subject":"[RESEND] [PATCH] fix gitk with lots of tags","fromName":"Jim Radford","fromEmail":"radford@blackbean.org","sentAt":"2006-04-18T18:06:14Z","receivedAt":"2006-04-18T18:06:14Z","isPatch":true,"sender":{"key":"radford@blackbean.org","avatar":null},"body":"Hi Junio,\n\nI've gotten no reposnse from Paul on this patch[1].  If it seems ok to\nyou, would you mind putting it in your queue for him?  I hate to see\ngitk die with \"argument list too long\" messages.  They're so 640k.\n\nThanks,\n-Jim\n\n[1] Maybe he judges people by the color of their IP address?\n    Then again, he could just be busy.\n\n---\n\nThis fix allow gitk to be used on repositories with lots of tags.  It\nbypasses git-rev-parse and passes its arguments to git-rev-list\ndirectly to avoid tcl's argument list length restrictions.\n\nSigned-Off-By: Jim Radford <radford@blackbean.org>\n\ndiff --git a/gitk b/gitk\nindex 26fa79a..40672fb 100755\n--- a/gitk\n+++ b/gitk\n@@ -17,19 +17,11 @@ proc gitdir {} {\n }\n \n proc parse_args {rargs} {\n-    global parsed_args\n-\n-    if {[catch {\n-\tset parse_args [concat --default HEAD $rargs]\n-\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n-    }]} {\n-\t# if git-rev-parse failed for some reason...\n-\tif {$rargs == {}} {\n-\t    set rargs HEAD\n-\t}\n-\tset parsed_args $rargs\n+    if {$rargs == {}} {\n+        return HEAD\n+    } else {\n+\treturn $rargs\n     }\n-    return $parsed_args\n }\n \n proc start_rev_list {rlargs} {\n"},{"id":"18819","messageId":"Pine.LNX.4.64.0604181132440.3701@g5.osdl.org","threadId":"3815","inReplyTo":"20060418180614.GA31543@blackbean.org","subject":"Re: [RESEND] [PATCH] fix gitk with lots of tags","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-04-18T18:38:32Z","receivedAt":"2006-04-18T18:38:32Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Tue, 18 Apr 2006, Jim Radford wrote:\n> \n> I've gotten no reposnse from Paul on this patch[1].  If it seems ok to\n> you, would you mind putting it in your queue for him?  I hate to see\n> gitk die with \"argument list too long\" messages.  They're so 640k.\n\nDon't do this patch. It's wrong.\n\nHowever, this simpler patch might be ok.\n\nIt just depends on the fact that git-rev-list can parse everything that \ngit-rev-parse used to do these days, and thus the git-rev-parse call \nreally isn't needed any more (and if that isn't true for some odd \nargument, we should make it true).\n\nSo the only thing we need to do is to add the \"--default HEAD\" thing to \nthe front of the argument list.\n\n\t\tLinus\n\n---\ndiff --git a/gitk b/gitk\nindex 87e7162..5d95779 100755\n--- a/gitk\n+++ b/gitk\n@@ -19,16 +19,7 @@ proc gitdir {} {\n proc parse_args {rargs} {\n     global parsed_args\n \n-    if {[catch {\n-\tset parse_args [concat --default HEAD $rargs]\n-\tset parsed_args [split [eval exec git-rev-parse $parse_args] \"\\n\"]\n-    }]} {\n-\t# if git-rev-parse failed for some reason...\n-\tif {$rargs == {}} {\n-\t    set rargs HEAD\n-\t}\n-\tset parsed_args $rargs\n-    }\n+    set parsed_args [concat --default HEAD $rargs]\n     return $parsed_args\n }\n \n"},{"id":"18968","messageId":"17480.50829.466038.316769@cargo.ozlabs.ibm.com","threadId":"3815","inReplyTo":"20060418180614.GA31543@blackbean.org","subject":"Re: [RESEND] [PATCH] fix gitk with lots of tags","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2006-04-21T11:48:29Z","receivedAt":"2006-04-21T11:48:29Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Jim Radford writes:\n\n> I've gotten no reposnse from Paul on this patch[1].  If it seems ok to\n> you, would you mind putting it in your queue for him?  I hate to see\n> gitk die with \"argument list too long\" messages.  They're so 640k.\n\nThe reservation I have about this is that I need to be able to tell\nthe file/directory names from the tags/heads/SHA1 IDs.  After the pass\nthrough git-rev-parse it's easy; I just take the things that match\n^[a-f0-9]{40}$ as IDs and the rest as file/directory names or\nswitches.\n\nJunio, did you tell me some time ago about a flag to git-rev-parse\nthat spits out just the file/directory names?  What was it again?\n\n> [1] Maybe he judges people by the color of their IP address?\n\nAs in _black_bean.org? :)\n\n>     Then again, he could just be busy.\n\nYeah.  Or just returned from international travel, or something like\nthat. :)\n\nPaul.\n"},{"id":"18969","messageId":"Pine.LNX.4.64.0604210817570.3701@g5.osdl.org","threadId":"3815","inReplyTo":"17480.50829.466038.316769@cargo.ozlabs.ibm.com","subject":"Re: [RESEND] [PATCH] fix gitk with lots of tags","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2006-04-21T15:19:52Z","receivedAt":"2006-04-21T15:19:52Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Fri, 21 Apr 2006, Paul Mackerras wrote:\n> \n> Junio, did you tell me some time ago about a flag to git-rev-parse\n> that spits out just the file/directory names?  What was it again?\n\n\tgit-rev-parse --no-flags --no-revs \"$@\"\n\nshould fo what you want.\n\n\t\tLinus\n"}]}