git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Alternates and push

From
Theodore Tso <tytso@mit.edu>
Date
Sep 7, 2008, 23:41 UTC
Message-ID
<20080907234118.GA8161@mit.edu>
In-Reply-To
<7viqt9rvwm.fsf@gitster.siamese.dyndns.org>
On Sat, Sep 06, 2008 at 11:06:49AM -0700, Junio C Hamano wrote:
Show 19 quoted lines
> 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
Previous: Jan HudecNext: Junio C Hamano
Message 13 of 20 in “Alternates and push”
  1. Jon SmirlSep 6, 2008
  2. Theodore TsoSep 6, 2008
  3. Junio C HamanoSep 6, 2008
  4. Jon SmirlSep 6, 2008
  5. Shawn O. PearceSep 6, 2008
  6. Petr BaudisSep 9, 2008
  7. Shawn O. PearceSep 9, 2008
  8. Jan HudecSep 7, 2008
  9. Junio C HamanoSep 7, 2008
  10. Jan HudecSep 7, 2008
  11. Junio C HamanoSep 7, 2008
  12. Jan HudecSep 8, 2008
  13. Theodore TsoSep 7, 2008
  14. Junio C HamanoSep 8, 2008
  15. Theodore TsoSep 8, 2008
  16. Junio C HamanoSep 8, 2008
  17. Junio C HamanoSep 8, 2008
  18. Junio C HamanoSep 8, 2008
  19. Daniel BarkalowSep 8, 2008
  20. Shawn O. PearceSep 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.