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

Re: git-diff-tree does not use alternate objects for submodules

From
Heiko Voigt <hvoigt@hvoigt.net>
Date
May 14, 2012, 17:51 UTC
Message-ID
<20120514175125.GD58058@book.hvoigt.net>
In-Reply-To
<7v7gweiu7b.fsf@alter.siamese.dyndns.org>
Hi,
On Mon, May 14, 2012 at 09:49:28AM -0700, Junio C Hamano wrote:
Show 10 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes:
> 
> > Here is the simplest approach I could think of (not sure if its maybe
> > too simple). On first sight it seems to work (even if I exchange the
> > absolute path in alternates with a relative one.
> 
> Conceptually looks very sound and trivially correct as long as the
> objets_directory.buf is always absolute path (I didn't check, and I do not
> offhand know if read_info_alternates() was designed to work when called
> with a relative path in relative_base).
It looks quite so:

In read_info_alternates() the alternates file underneath the passed relative_base is opened. It then passes it on to link_alt_odb_entries() which itself passes it unmodified to link_alt_odb_entry().

link_alt_odb_entry() uses realpath to combine relative entries with relative_base before recursively passing the entry to read_info_alternates().

For entries with absolute path relative_base does not seem to be relevant.

Cheers Heiko
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 12 in “git-diff-tree does not use alternate objects for submodules”
  1. Orgad and Raizel ShanehMay 8, 2012
  2. Junio C HamanoMay 8, 2012
  3. Junio C HamanoMay 8, 2012
  4. Heiko VoigtMay 9, 2012
  5. Junio C HamanoMay 9, 2012
  6. Junio C HamanoMay 9, 2012
  7. Heiko VoigtMay 13, 2012
  8. Heiko VoigtMay 13, 2012
  9. teach add_submodule_odb() to look for alternatesHeiko Voigt, May 14, 2012
  10. Junio C HamanoMay 14, 2012
  11. Heiko VoigtMay 14, 2012
  12. Junio C HamanoMay 14, 2012

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.