From: "Lars Hjemli" <hjemli@gmail.com>
To: hanwen@xs4all.nl
Cc: git@vger.kernel.org
Subject: Re: git branch performance problem?
Date: Wed, 10 Oct 2007 23:34:49 +0200 [thread overview]
Message-ID: <8c5c35580710101434n3a4f77edm50d205d53fbc9200@mail.gmail.com> (raw)
In-Reply-To: <f329bf540710101424q22309489sada99907e94b2cd0@mail.gmail.com>
On 10/10/07, Han-Wen Nienhuys <hanwenn@gmail.com> wrote:
> 2007/10/10, Han-Wen Nienhuys <hanwenn@gmail.com>:
> > > 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.
>
> More to the point, I seemed to have lost my entire repository. This is
> the type of surprise I don't enjoy.
Yeah, this is bad, I'm sorry to have caused you trouble. But I fail to
see how 'git pack-refs --all' could possibly trash your repository. A
few questions:
What version of git are you using?
What's the output from these commands:
$ cat .git/packed-refs
$ cat .git/HEAD
$ find .git/refs -type f | wc -l
> Now, can someone explain why 'git branch' takes forever if there are
> only two non-remote branches ?
That's because git-branch always traverses the complete directory tree
below .git/refs, even if you only want to see the 'local' branches (I
have a patch cooking to fix this).
--
larsh
next prev parent reply other threads:[~2007-10-10 21:35 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 20:22 git branch performance problem? Han-Wen Nienhuys
2007-10-10 20:44 ` Lars Hjemli
2007-10-10 21:17 ` Han-Wen Nienhuys
2007-10-10 21:24 ` Han-Wen Nienhuys
2007-10-10 21:30 ` Han-Wen Nienhuys
2007-10-10 21:39 ` J. Bruce Fields
2007-10-10 21:45 ` Lars Hjemli
2007-10-10 21:49 ` Han-Wen Nienhuys
2007-10-10 21:53 ` J. Bruce Fields
2007-10-10 22:01 ` Han-Wen Nienhuys
2007-10-10 21:53 ` Johannes Schindelin
2007-10-10 22:55 ` Spam: " Brandon Casey
2007-10-11 9:41 ` Mike Ralphson
2007-10-11 10:58 ` Johannes Schindelin
2007-10-10 23:39 ` Linus Torvalds
2007-10-11 2:26 ` Han-Wen Nienhuys
2007-10-11 6:41 ` Alex Riesen
2007-10-11 10:46 ` Johannes Schindelin
2007-10-11 13:11 ` Han-Wen Nienhuys
2007-10-11 15:16 ` Linus Torvalds
2007-10-12 17:19 ` Salikh Zakirov
2007-10-10 21:34 ` Lars Hjemli [this message]
2007-10-10 21:54 ` [PATCH] git-branch: only traverse the requested refs Lars Hjemli
2007-10-10 23:00 ` Johannes Schindelin
2007-10-10 23:30 ` Lars Hjemli
-- strict thread matches above, loose matches on Subject: below --
2007-10-12 17:32 git branch performance problem? Salikh Zakirov
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=8c5c35580710101434n3a4f77edm50d205d53fbc9200@mail.gmail.com \
--to=hjemli@gmail.com \
--cc=git@vger.kernel.org \
--cc=hanwen@xs4all.nl \
/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).