From: "Shawn O. Pearce" <spearce@spearce.org>
To: Julian Phillips <julian@quantumfyre.co.uk>
Cc: git@vger.kernel.org
Subject: Re: Restraining git pull/fetch to the current branch
Date: Thu, 11 Jan 2007 19:59:21 -0500 [thread overview]
Message-ID: <20070112005921.GE23864@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0701112127000.12870@beast.quantumfyre.co.uk>
Julian Phillips <julian@quantumfyre.co.uk> wrote:
> While trying out git on a large repository (10000s of commits, 1000s of
> branches, ~2.5Gb when packed) at work I noticed that doing a pull was
> taking a long time (longer than I was prepared to wait anyway).
>
> A quick test showed that a small repository (1 commit, 24k .git/objects)
> with 1000 branches took 1m30 to do "git pull" (local xfs partition). I
> don't know if this is reasonable or not, but all I actually cared
> about was updating the current branch, which "git pull origin
> <branch_name>" did in 0.3s.
>
> So what I would like to know is: is there any way to make a pull/fetch
> with no options default to only fetching the current branch? (other than
> scripting "git pull/fetch origin $(git symbolic-ref HEAD)" that is)
No, but fortunately bash has a fancy alias tool:
alias gp='git pull origin $(git symbolic-ref HEAD)'
perhaps your shell can help. :-)
Life is going to be painful with that repository with current Git
(1.5.0 and later) as the new default configuration for a clone is to
copy every branch into refs/remotes/origin/*, where * is wildcarded
against the current set of branches on the remote repository.
If that takes "a long time" you will be processing a lot of refs
you don't care about (or need to care about).
--
Shawn.
next prev parent reply other threads:[~2007-01-12 0:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-11 21:47 Restraining git pull/fetch to the current branch Julian Phillips
2007-01-12 0:59 ` Shawn O. Pearce [this message]
2007-01-12 1:09 ` Junio C Hamano
2007-01-12 14:08 ` Julian Phillips
2007-01-15 13:06 ` Julian Phillips
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=20070112005921.GE23864@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=julian@quantumfyre.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.