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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, May 14, 2012 at 09:49:28AM -0700, Junio C Hamano wrote:
> Heiko Voigt <hvoigt@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]