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

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

 



Heiko Voigt <hvoigt@xxxxxxxxxx> writes:
> On Tue, May 08, 2012 at 08:36:36AM -0700, Junio C Hamano wrote:
> ...
>> ... The code attempts to link the object store
>> of the submodule repository into the in-core representation of the object
>> store of the superproject (in submodule.c::add_submodule_odb()), but does
>> not do a good job of it.  It does not take alternates into account, and
>> who knows what else is missing.  Sigh...
>> 
>> The right approach to implement this feature would have been to fork a
>> child process and perform the submodule operation inside the child, which
>> will chdir into the submodule and treat as if it is a freestanding git
>> repository, without contaminating the superproject process.
>
> I will have a look if I can come up with something that reads the
> submodules alternate config and uses it. Do you have other config
> related things in mind that might be missing?

No, I do not, and that is exactly the point.

Making the process that works in the top-level superproject to imitate
what would happen if the processing happened inside the submodule is what
invited a bug like this.  Who knows what other discrepancies remain there.

If we forked a separate process, and made it to chdir to the submodule
tree, and had it do its usual thing there, we do not have to worry about
how good the imitation is, exactly because there won't be any imitation.
There will only be a git processing happening in the usual way inside the
submodule directory, as if the end user cd'ed there and typed the "git
status" command to see if the HEAD matches the given commit or if the
working tree is dirty.
--
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]