git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Sep 21, 2009, 15:59 UTC
Message-ID
<4AB7A2E7.5000601@viscovery.net>
In-Reply-To
<6F87406399731F489FBACE5C5FFA0458518E11@ex2k.bankofamerica.com>
Murphy, John schrieb:
Show 11 quoted lines
> Johannes Sixt writes:
> 
>> But in order to have a $revs that exceeds 32K, you would already have
> to
>> invoke gitk with a huge command line that exceeds the limit (but this
> is
>> not possible), no?
> 
>> How do you run gitk?
> 
> gitk --all

I see it. Here is a bash script that creates a repository that reproduces the error. It is important that refs which sort alphabetically earlier also point to earlier commits.

-- snip --
#!/bin/bash
git init
echo initial > file && git add file && git commit -m initial
for ((i = 0; i < 1000; i++))
do
	echo $i > file &&
	git commit -m $i file > /dev/null &&
	printf -v l "branch-%04d" $i &&
	git update-ref refs/heads/$l HEAD
done
git gc
-- snip --

On Windows, 'gitk --all' starts with branch-0797, on Linux it starts with branch-0999 aka master.

I'm just throwing this out to interested parties; I'll not look into it at this time.

Thanks, -- Hannes

Previous: Murphy, JohnNext: Pat Thoyts
Message 8 of 19 in “Gitk --all error when there are more than 797 refs in a repository”
  1. Murphy, JohnSep 17, 2009
  2. Re: Gitk --all error when there are more than 797 refs in a repositoryPat Thoyts, Sep 18, 2009
  3. Johannes SixtSep 18, 2009
  4. Re: Gitk --all error when there are more than 797 refs in a repositoryPaul Mackerras, Sep 19, 2009
  5. Murphy, JohnSep 21, 2009
  6. Johannes SixtSep 21, 2009
  7. Murphy, JohnSep 21, 2009
  8. Johannes SixtSep 21, 2009
  9. Pat ThoytsSep 21, 2009
  10. Murphy, JohnSep 22, 2009
  11. Junio C HamanoSep 22, 2009
  12. Junio C HamanoSep 22, 2009
  13. Pat ThoytsSep 22, 2009
  14. Alex RiesenNov 3, 2009
  15. Paul MackerrasNov 3, 2009
  16. Paul MackerrasSep 22, 2009
  17. Junio C HamanoSep 23, 2009
  18. Paul MackerrasNov 3, 2009
  19. Junio C HamanoNov 3, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.