All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pat Thoyts <patthoyts@users.sourceforge.net>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: "Murphy, John" <john.murphy@bankofamerica.com>,
	Paul Mackerras <paulus@samba.org>,
	git@vger.kernel.org
Subject: Re: [PATCH] Re: Gitk --all error when there are more than 797 refs in a repository
Date: 22 Sep 2009 00:56:48 +0100	[thread overview]
Message-ID: <874oqvc0n3.fsf@users.sourceforge.net> (raw)
In-Reply-To: <4AB7A2E7.5000601@viscovery.net>

Johannes Sixt <j.sixt@viscovery.net> writes:

>Murphy, John schrieb:
>
>On Windows, 'gitk --all' starts with branch-0797, on Linux it starts with
>branch-0999 aka master.

That script gives me a repository I can test against. thanks.
The start_rev_list function calls parseviewrevs and expands the
arguments into a list of appropriate revision ids. In this case --all
gets expanded to a list of 1000 sha1 ids. This is appended to any
other view arguments and passed to git log on the command line
yielding our error.
git log can accept a --all argument it seems so it looks like we can
just short-circuit the parseviewrevs function when --all is passed in
and return --all instead of expanding the list. The following seems to
work for me with this test repository.
John, if this works for you can you also check that editing and
creating new gitk views on your real repository continues to work ok.

commit 7f289ca8370e5e2f9622a4fbc30b934eb97b984f
Author: Pat Thoyts <patthoyts@users.sourceforge.net>
Date:   Tue Sep 22 00:55:50 2009 +0100

    Avoid expanding --all when passing arguments to git log.
    There is no need to expand --all into a list of all revisions as
    git log can accept --all as an argument. This avoids any
    command-line
    length limitations caused by expanding --all into a list of all
    revision ids.

    Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>

diff --git a/gitk b/gitk
index a0214b7..635b97e 100755
--- a/gitk
+++ b/gitk
@@ -241,6 +241,8 @@ proc parseviewrevs {view revs} {

     if {$revs eq {}} {
        set revs HEAD
+    } elseif {$revs eq "--all"} {
+        return $revs
     }
     if {[catch {set ids [eval exec git rev-parse $revs]} err]} {
        # we get stdout followed by stderr in $err

-- 
Pat Thoyts                            http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97  10 CE 11 E6 04 E0 B9 DD

  reply	other threads:[~2009-09-21 23:57 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
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 [this message]
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=874oqvc0n3.fsf@users.sourceforge.net \
    --to=patthoyts@users.sourceforge.net \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=john.murphy@bankofamerica.com \
    --cc=paulus@samba.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.