git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Michael Haggerty <mhagger@alum.mit.edu>
Subject: Re: [PATCH/RFC 0/3] --seed as an alias for --dissociate --reference
Date: Wed, 20 May 2015 22:01:49 -0700	[thread overview]
Message-ID: <xmqqmw0yle0y.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150521041435.GA18978@peff.net> (Jeff King's message of "Thu, 21 May 2015 00:14:35 -0400")

Jeff King <peff@peff.net> writes:

> .... Having just read through it, I think a succinct name for the
> idea is "seed". That is, we seed the clone with objects from another
> repository.

That's a nice name.

> That thread also brought up the idea that we do not necessarily need to
> seed from a local repository; we could do something like:
>
>   1. Fetch from the seed repo into refs/seed/*
>
>   2. Fetch from the real clone source; the fetch is optimized by the
>      presence of refs/seed/*.
>
>   3. Delete refs/seed/*. Optionally repack to drop any objects needed
>      only by the seed refs.
>
> This is awkward with the "--reference" interface, because its
> implementation is publicly tied to the concept of alternates. Whereas
> "--seed" is about the end result you want; we can implement it using
> alternates or with a clone, depending on where the repo is located.

> There are a few open issues with this series:
>
>   1. Assuming that "seed" is a reasonable verb for this concept, is
>      "--seed=<repo>" OK for the option?  Would "--seed-from=<repo>" be
>      better? (Also, the response "bleh, seed is a terrible name" is
>      fine, too, but only if accompanied by your own suggestion :) ).

The seed may not even have to be a repository.  A bundle file hosted
on CDN that is reachable via (resumable) wget would be another good
way to prime the well, and it would fit with the above framework
nicely.  Grab it, fetch from it into a temporary hierarchy and then
run "fetch --prune" against the repository you originally wanted to
clone from.

>   2. My main goal here is making the concept easier to explain to users.
>      The documentation in the third patch explains "--seed" as an alias
>      for the other options, which probably isn't helping much. It might
>      make sense to have a patch 4/3 that explains "--seed" first, and
>      then explains "--reference" as "like --seed, but keep the
>      relationship after the clone". Or maybe they should just get their
>      own descriptions entirely.
>
>   3. We can't dissociate from a specific alternate, so using "--seed"
>      implies that all "--reference" options get dissociated. In this
>      series, I issue a warning in that case.  But that would be easily
>      solved if "--seed" used the fetch strategy described above, even
>      for local clones (which would probably still be quite fast if we
>      took clone's usual hard-link shortcut instead of actually fetching
>      from a local clone).
>
> I don't have particular plans to implement generic "--seed" from remotes
> anytime soon. I think this takes us a step in the right direction
> interface-wise, and it does introduce a succinct concept and
> option.

Yes.  I like the name, the concept and the general direction.

  parent reply	other threads:[~2015-05-21  5:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  4:14 [PATCH/RFC 0/3] --seed as an alias for --dissociate --reference Jeff King
2015-05-21  4:15 ` [PATCH 1/3] clone: use OPT_STRING_LIST for --reference Jeff King
2015-05-21  4:16 ` [PATCH 2/3] clone: reorder --dissociate and --reference options Jeff King
2015-05-21  4:16 ` [PATCH 3/3] clone: add `--seed` shorthand Jeff King
2015-05-21 16:05   ` Johannes Schindelin
2015-05-21 19:45     ` Philip Oakley
2015-05-22  6:37       ` Johannes Schindelin
2015-05-22  6:49         ` Jeff King
2015-05-24 19:07           ` Junio C Hamano
2015-05-27  8:19             ` Jeff King
2015-05-27 19:35               ` Junio C Hamano
2015-05-22  6:50     ` Jeff King
2015-05-21  5:01 ` Junio C Hamano [this message]
2015-05-21  5:06   ` [PATCH/RFC 0/3] --seed as an alias for --dissociate --reference Jeff King
2015-05-21 16:41     ` Junio C Hamano
2015-05-24 23:53 ` Michael Haggerty

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqmw0yle0y.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mhagger@alum.mit.edu \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).