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

Re: git branch performance problem?

From
Han-Wen Nienhuys <hanwenn@gmail.com>
Date
Oct 10, 2007, 21:17 UTC
Message-ID
<f329bf540710101417w640b2421v73279cc8e34449b8@mail.gmail.com>
In-Reply-To
<8c5c35580710101344t3aed4214h4f999072483c4cb5@mail.gmail.com>
2007/10/10, Lars Hjemli <hjemli@gmail.com>:
Show 12 quoted lines
> On 10/10/07, Han-Wen Nienhuys <hanwenn@gmail.com> wrote:
> > I'm seeing very slow performance with 'git-branch'.  Is this the
> > canonical way to find out the current branch?
>
> You could also try 'git symbolic-ref HEAD', but see below...
>
> > hanwen@lilypond:/tmp/z$ find .git/refs/remotes | wc -l
> > 1856
>
> You probably want to run 'git gc' (which will run 'git pack-refs',
> i.e. put all files currently under .git/refs into a single file). This
> should speed up 'git branch' (and quite possibly other commands too).
This seems rather unuseful. After running gc pack-refs --all, I lost my HEAD,

hanwen@lilypond:~/vc/git5$ git show HEAD fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree. Use '--' to separate paths from revisions

Is there a way to only pack refs under a certain subdirectory of .git/refs ? (I'm thinking of .git/refs/remotes )

-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Previous: Lars HjemliNext: Han-Wen Nienhuys
Message 3 of 25 in “git branch performance problem?”
  1. Han-Wen NienhuysOct 10, 2007
  2. Lars HjemliOct 10, 2007
  3. Han-Wen NienhuysOct 10, 2007
  4. Han-Wen NienhuysOct 10, 2007
  5. Han-Wen NienhuysOct 10, 2007
  6. J. Bruce FieldsOct 10, 2007
  7. Lars HjemliOct 10, 2007
  8. Han-Wen NienhuysOct 10, 2007
  9. J. Bruce FieldsOct 10, 2007
  10. Han-Wen NienhuysOct 10, 2007
  11. Johannes SchindelinOct 10, 2007
  12. Brandon CaseyOct 10, 2007
  13. Mike RalphsonOct 11, 2007
  14. Johannes SchindelinOct 11, 2007
  15. Linus TorvaldsOct 10, 2007
  16. Han-Wen NienhuysOct 11, 2007
  17. Alex RiesenOct 11, 2007
  18. Johannes SchindelinOct 11, 2007
  19. Han-Wen NienhuysOct 11, 2007
  20. Linus TorvaldsOct 11, 2007
  21. Salikh ZakirovOct 12, 2007
  22. Lars HjemliOct 10, 2007
  23. git-branch: only traverse the requested refsLars Hjemli, Oct 10, 2007
  24. Johannes SchindelinOct 10, 2007
  25. Lars HjemliOct 10, 2007

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.