Re: [PATCH] Re: Gitk --all error when there are more than 797 refs in a repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pat Thoyts <patthoyts@xxxxxxxxxxxxxxxxxxxxx> writes:

> commit 7f289ca8370e5e2f9622a4fbc30b934eb97b984f
> Author: Pat Thoyts <patthoyts@xxxxxxxxxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxxxx>
>
> 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
>      }

That looks like an ugly hack (aka sweeping the issue under the rug).

What if there are many tags and the user used --tags?  Don't you have
exactly the same problem?  Likewise, what if $revs were "..master"?

The right approach would be to understand what limit it is busting (it is
not likely to be the command line length limit for this particular "exec",
as it only gets "git" "rev-parse" "--all") first, and then fix that.

>      if {[catch {set ids [eval exec git rev-parse $revs]} err]} {
>         # we get stdout followed by stderr in $err

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]