git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Pickens <jepicken@gmail.com>
To: Git ML <git@vger.kernel.org>
Cc: Jeff King <peff@peff.net>
Subject: Re: 'git clone' doesn't use alternates automatically?
Date: Sat, 31 Jan 2009 13:08:16 -0700	[thread overview]
Message-ID: <885649360901311208s4bc17ae3me2062b07b302291e@mail.gmail.com> (raw)
In-Reply-To: <20090131071238.GC3033@coredump.intra.peff.net>

On Sat, Jan 31, 2009 at 12:12 AM, Jeff King <peff@peff.net> wrote:
> but presumably in your example the second clone is _not_ on the NFS
> mount, and therefore can't hardlink.

That's correct.

> So you can try "git clone -s" to specify that you definitely want
> alternates.

Well, the clone gets the alternates either way.  It just doesn't
use them to avoid copying the data unless I give -s.  More
importantly, if 'git clone' worked the way I thought, then when I
clone a remote repository for which I have a local mirror, I
could avoid typing '--reference <path to local mirror>' by adding
<path to local mirror>/objects to the alternates file in the
remote repository.

> I don't recall clone ever being that clever, but I could be wrong (it is
> not an area of the code that I am too familiar with).
>
> Can you try a test with a few different versions to see if it ever
> behaved as you expected (and if it does, bisect to find the breakage)?

Damn.  I was hoping the response would be "it's a regression, and
here's a patch to fix it".  I went ahead and tested a few old
versions and they all behave the same way.

So, is there any reason 'git clone' shouldn't automatically use
the alternates that it copied into the new repository?  I might
look into writing a patch if nobody objects.

James

  reply	other threads:[~2009-01-31 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-30 22:12 'git clone' doesn't use alternates automatically? James Pickens
2009-01-31  7:12 ` Jeff King
2009-01-31 20:08   ` James Pickens [this message]
2009-01-31 21:08     ` Jakub Narebski
2009-01-31 21:43       ` James Pickens
2009-01-31 21:55     ` Jeff King
2009-02-01  1:19       ` Junio C Hamano
2009-02-02 13:07         ` Jeff King
2009-02-03  4:30           ` Junio C Hamano
2009-02-03  6:06             ` Jeff King
2009-02-01  0:55     ` Junio C Hamano
2009-02-01  1:32       ` James Pickens
2009-02-01  1:38         ` Junio C Hamano

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=885649360901311208s4bc17ae3me2062b07b302291e@mail.gmail.com \
    --to=jepicken@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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).