All of lore.kernel.org
 help / color / mirror / Atom feed
From: Theodore Tso <tytso@MIT.EDU>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jon Smirl <jonsmirl@gmail.com>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Alternates and push
Date: Sun, 7 Sep 2008 19:41:18 -0400	[thread overview]
Message-ID: <20080907234118.GA8161@mit.edu> (raw)
In-Reply-To: <7viqt9rvwm.fsf@gitster.siamese.dyndns.org>

On Sat, Sep 06, 2008 at 11:06:49AM -0700, Junio C Hamano wrote:
> We could instead redefine the semantics of the existing alternates
> mechanism.  This technically *breaks* backward compatibility, but I
> suspect it won't hurt many existing installations:
> 
>  - Declare that a freestanding object store is illegal.  In other words,
>    if a directory "$D/objects" is (1) used as $GIT_OBJECT_DIRECTORY's
>    value, (2) pointed by some repository's "alternates" file, or (3)
>    listed in $GIT_ALTERNATE_OBJECT_DIRECTORIES's value, this change makes
>    it illegal for "$D" not being a proper git repository.
> 
>    This will not break your example of your repository's object store
>    borrowing from the object store inside Linus's repository.
> 
>  - When you have "$D/objects" in alternates, start relying on "$D/refs"
>    being correct (i.e. repository $D is not corrupt).  This technically
>    makes the system slightly less robust, as we are depending on _other
>    people's_ good behaviour even more when you use alternates, but you are
>    already depending on them having good objects in $D/objects anyway, so
>    it is not a big deal.

One way that wouldn't break backwards compatibility would be to use
$D/refs if it exists, but if it isn't, fall back to existing behavior
(which is to say, only use the refs in the repository, not in the
borrowed repository/object store).  Is there a reason why this would
be problematic?

							- Ted

  parent reply	other threads:[~2008-09-07 23:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 12:42 Alternates and push Jon Smirl
2008-09-06 16:20 ` Theodore Tso
2008-09-06 18:06   ` Junio C Hamano
2008-09-06 18:24     ` Jon Smirl
2008-09-06 19:21       ` Shawn O. Pearce
2008-09-09  8:35         ` Petr Baudis
2008-09-09 14:57           ` Shawn O. Pearce
2008-09-07 18:49     ` Jan Hudec
2008-09-07 18:56       ` Junio C Hamano
2008-09-07 19:17         ` Jan Hudec
2008-09-07 19:18         ` Junio C Hamano
2008-09-08 17:56           ` Jan Hudec
2008-09-07 23:41     ` Theodore Tso [this message]
2008-09-08  0:02       ` Junio C Hamano
2008-09-08  0:41         ` Theodore Tso
2008-09-08  2:53           ` Junio C Hamano
2008-09-08  5:07       ` Junio C Hamano
2008-09-08  6:42         ` Junio C Hamano
2008-09-08  7:24           ` Daniel Barkalow
2008-09-08 14:56             ` Shawn O. Pearce

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=20080907234118.GA8161@mit.edu \
    --to=tytso@mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jonsmirl@gmail.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 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.