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

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

 



Orgad and Raizel Shaneh <orgads@xxxxxxxxx> writes:

> I have a project with a submodule. Both have objects/info/alternate
> (different ones).
>
> After running 'git gc', running gitk on the superproject results in:
>   Submodule sub 227e2b5...d8597e2 (commits not present)

When "--submodule" option was implemented in 752c0c, it was done with an
premature and incomplete optimization, and I think you are seeing an
unfortunate side effect of it. 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.

For now, an easiest workaround would be to rephrase the error message to
"commits not present" to "commit not present or missing", or something.
--
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]