git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Phillip Susi <psusi@cfl.rr.com>,
	git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
	Stephen Bash <bash@genarts.com>
Subject: Re: clone breaks replace
Date: Tue, 11 Jan 2011 12:50:31 -0500	[thread overview]
Message-ID: <20110111175031.GA2085@sigill.intra.peff.net> (raw)
In-Reply-To: <7vr5cj49vi.fsf@alter.siamese.dyndns.org>

On Tue, Jan 11, 2011 at 09:40:17AM -0800, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > Sure, I think that is a sane way for the user to think about it, but do
> > we actually support multiple views? I thought replacement objects were
> > all or nothing.
> 
> It is not implausible for a long running large project to restart their
> history from a physical root commit every year, stiching the year-long
> segments together at their ends with replacements, to make a default clone
> to get a year's worth of the most recent history while allowing people to
> get more by asking, no?

Oh, absolutely I think it is reasonable. I just meant that we do not
have a convenient way of saying "fetch these replace objects, but only
use this particular subset". I think you are stuck with something manual
like:

  # grab "view" from upstream and name it; let's imagine it links 2010
  # history into 2009
  git fetch origin refs/replace/$sha1 refs/views/2009/$sha1

  # now we feel like using them
  git for-each-ref --shell --format='%(refname)' refs/views/2009 |
    while read ref; do
      git update-ref "refs/replace/${ref#refs/views/2009}" "$ref"
    done

Which is a little overkill for the simple example you gave, but would
also handle something as complex as a view like "pretend the foo/
subtree never existed" or even "pretend the foo/ subtree existed all
along".

Not that I'm sure such things are actually sane to do, performance-wise.
The replace system is fast, but it was designed for a handful of
objects, not hundreds or thousands.

Anyway. My point is that we don't have the porcelain to do something
like managing views or enabling/disabling them in a sane manner.

-Peff

  reply	other threads:[~2011-01-11 17:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-06 21:00 clone breaks replace Phillip Susi
2011-01-06 21:33 ` Jonathan Nieder
2011-01-06 21:59   ` Junio C Hamano
2011-01-07 19:43   ` Phillip Susi
2011-01-07 20:51     ` Jonathan Nieder
2011-01-07 21:15       ` Stephen Bash
2011-01-07 21:34       ` Jonathan Nieder
2011-01-07 21:44       ` Phillip Susi
2011-01-07 21:49         ` Jonathan Nieder
2011-01-07 22:09           ` Phillip Susi
2011-01-07 22:09           ` Jeff King
2011-01-07 22:58             ` Junio C Hamano
2011-01-11  5:36               ` Jeff King
2011-01-11 17:40                 ` Junio C Hamano
2011-01-11 17:50                   ` Jeff King [this message]
2011-01-11 17:56                     ` Jonathan Nieder
2011-01-11 18:03                       ` Jeff King
2011-01-11 19:32                       ` Christian Couder
2011-01-08  0:43             ` Phillip Susi
2011-01-11  5:47               ` Jeff King
2011-01-11  6:52                 ` Jonathan Nieder
2011-01-11 15:37                   ` Phillip Susi
2011-01-11 18:22                     ` Jonathan Nieder
2011-01-11 18:42                       ` Phillip Susi
2011-01-11 15:24                 ` Phillip Susi
2011-01-11 17:39                   ` Jeff King
2011-01-11 19:48                     ` Johannes Sixt
2011-01-11 19:51                       ` Jeff King
2011-01-11 20:00                         ` Johannes Sixt
2011-01-11 20:22                           ` Phillip Susi
2011-01-11 20:50                             ` Jonathan Nieder
2011-01-12  0:59                               ` Phillip Susi
2011-01-14 20:53                                 ` small downloads and immutable history (Re: clone breaks replace) Jonathan Nieder
2011-01-15  5:27                                   ` Phillip Susi

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=20110111175031.GA2085@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=bash@genarts.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=psusi@cfl.rr.com \
    /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).