Web lists-archives.com

Re: [PATCH] fixup! diff: batch fetching of missing blobs




Duy Nguyen <pclouds@xxxxxxxxx> writes:

> I feel lost (and the answer "go read partial clone code!" is perfectly
> acceptable) but why would we need to diff trees of two different
> repositories?

It's just a speculation into far future to open possibilities of
what we cannot do right now.  There is no *NEED*, just like there is
no need for a single process of git to be working in multiple
repositories at the same time (you can just fork another one into
the other repository).


>> It is likely
>> that a caller with such a need would simply make sure that objects
>> in both repositories are available by using the in-core alternate
>> object store mechanism, making it a more-or-less moot point to be
>> able to pass a repository instance through the callchain X-<.  We
>> probably should make it, and spell it out somewhere in a long term
>> vision shared among the developers, an explicit goal to get rid of
>> the internal (ab)use of the alternate object store mechanism.
>
> I think submodule code so far is doing this way. Though I don't see
> any reason we need it for submodule code. Objects are not supposed to
> be shared between the super- and the sub-repo.

Yup, that is why I made that comment---if we were to pass repository
pointer throughout all the codepaths, one of the goal (eh, rather, a
useful yardstick to measure how close we are to the goal) should be
that we use less and less of that pattern to access objects from
random repositories using the in-core alternate mechanism.