git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Pat Thoyts <patthoyts@users.sourceforge.net>
Cc: "Murphy, John" <john.murphy@bankofamerica.com>, git@vger.kernel.org
Subject: Re: [PATCH] Re: Gitk --all error when there are more than 797 refs in a repository
Date: Fri, 18 Sep 2009 17:16:40 +0200	[thread overview]
Message-ID: <4AB3A458.5070100@viscovery.net> (raw)
In-Reply-To: <878wgcbb52.fsf@users.sourceforge.net>

Pat Thoyts schrieb:
> "Murphy, John" <john.murphy@bankofamerica.com> writes:
>> There is a error when running  gitk --all when there are more than 797 refs in a repository.
>> We get an error message:
>>
>> Error reading commits: fatal ambiguous argument '3': unknown revision or path not in the working tree.
>> Use '--' to separate paths from revisions.
>>
>> I believe issue is with this line of the code in proc parseviewrevs:
>>
>>       if {[catch {set ids [eval exec git rev-parse "$revs"]} err]}
>>
>> When there are more than 797 refs the output of git rev-parse is too large to fit into the string, ids.
>>
>> 797 refs = 32,677 bytes.
>> 798 refs = 32,718 bytes my guess is a little too close for comfort to 32,768 bytes.
>>
>> As I was deleting refs locally the error message would change from '3' to any char [A-Z,0-9].

I cannot reproduce the error. I have a repository with 100 commits in a
linear history and 5000 refs (50 refs per commit). They are named
refs/heads/branch-XXXX. I don't see any problems with 'gitk --all'.

> +proc git-rev-parse {args} {
> +    set ids {}
> +    set pipe [open |[linsert $args 0 git rev-parse] r]
> +    while {[gets $pipe line] != -1} {
> +        lappend ids $line
> +    }
> +    close $pipe
> +    return $ids
> +}
> +    
>  proc parseviewrevs {view revs} {
>      global vposids vnegids
>  
>      if {$revs eq {}} {
>  	set revs HEAD
>      }
> -    if {[catch {set ids [eval exec git rev-parse $revs]} err]} {
> +    if {[catch {set ids [git-rev-parse $revs]} err]} {

Sorry, but you are changing the wrong end of git rev-parse. The limit is
on the command line, but if you run 'gitk --all', then $revs is simply
"--all" - no limit is exceeded. You changed the output of rev-parse, but
there is no limit on how much Tcl can eat of rev-parse's output.

The error must be in some other git invocation.

-- Hannes

  reply	other threads:[~2009-09-18 15:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 19:07 Gitk --all error when there are more than 797 refs in a repository Murphy, John
2009-09-18 14:06 ` [PATCH] " Pat Thoyts
2009-09-18 15:16   ` Johannes Sixt [this message]
2009-09-19  0:07   ` Paul Mackerras
2009-09-21 14:02     ` Murphy, John
2009-09-21 14:09       ` Johannes Sixt
2009-09-21 14:11         ` Murphy, John
2009-09-21 15:59           ` Johannes Sixt
2009-09-21 23:56             ` Pat Thoyts
2009-09-22  1:23               ` Murphy, John
2009-09-22  1:39               ` Junio C Hamano
2009-09-22  1:47                 ` Junio C Hamano
2009-09-22 22:48                   ` Pat Thoyts
2009-11-03 10:04                 ` Alex Riesen
2009-11-03 10:41                   ` Paul Mackerras
2009-09-22 23:30               ` Paul Mackerras
2009-09-23  0:02                 ` Junio C Hamano
2009-11-03  9:40                   ` Paul Mackerras
2009-11-03 14:59                     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AB3A458.5070100@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=john.murphy@bankofamerica.com \
    --cc=patthoyts@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).