git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Arash Bannazadeh-Mahani via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Arash <axbannaz@gmail.com>, Junio C Hamano <gitster@pobox.com>,
	Arash Bannazadeh-Mahani <axbannaz@gmail.com>
Subject: [PATCH 1/1] gitk: Addressing error running on MacOS with large repos.
Date: Thu, 03 Oct 2019 13:49:10 -0700 (PDT)	[thread overview]
Message-ID: <5594c953f0901f3f5643fc8003c37e37ea7221e7.1570135749.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.375.git.gitgitgadget@gmail.com>

From: Arash Bannazadeh-Mahani <axbannaz@gmail.com>

The change is stemmed from a problem on the MacOS where, if --all
is passed to gitk it should show all the refs/commits graphically.
However, on really large git repos, in my instance a git repo with
over 52,000 commits, gitk will report an error,
"Error executing git log: couldn't execute "git": argument list too long".
Mac OS has a limit of which my large repo exceeds. This works fine on Linux,
however, not sure about Windows.

Looking at gitk script, the decision to have all commit-ids on the command line
comes from return value of parseviewargs() function which uses the value of
"allknown" to return. If it is '1' then --all is translated to a string of all
the commit-ids in the repo, otherwise --all is passed as-is to `git log` cli,
which according to git-log man page it is the same as listing all the
commit-ids.

So, this change is to prevent --all option from being expanded into list
of all refs on the command line.

Signed-off-by: Arash Bannazadeh-Mahani <axbannaz@gmail.com>
---
 gitk-git/gitk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gitk-git/gitk b/gitk-git/gitk
index abe4805ade..96634d9d33 100755
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -250,8 +250,13 @@ proc parseviewargs {n arglist} {
 		set nextisval 1
 		lappend glflags $arg
 	    }
-	    "--not" - "--all" {
+	    "--not" {
 		lappend revargs $arg
+	    }
+		"--all" {
+		# we recognize this argument;
+		# no expansion needed, use it with 'git log' as-is
+		set allknown 0
 	    }
 	    "--merge" {
 		set vmergeonly($n) 1
-- 
gitgitgadget

      reply	other threads:[~2019-10-03 20:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03 20:49 [PATCH 0/1] gitk: Addressing error running on MacOS with large repos Arash via GitGitGadget
2019-10-03 20:49 ` Arash Bannazadeh-Mahani via GitGitGadget [this message]

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=5594c953f0901f3f5643fc8003c37e37ea7221e7.1570135749.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=axbannaz@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).