git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: Orgad and Raizel Shaneh <orgads@gmail.com>,
	git@vger.kernel.org, Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: git-diff-tree does not use alternate objects for submodules
Date: Wed, 09 May 2012 15:19:01 -0700	[thread overview]
Message-ID: <7v1umtq9pm.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120509215815.GC74366@book.hvoigt.net> (Heiko Voigt's message of "Wed, 9 May 2012 23:58:17 +0200")

Heiko Voigt <hvoigt@hvoigt.net> 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.

  reply	other threads:[~2012-05-09 22:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-08 13:42 git-diff-tree does not use alternate objects for submodules Orgad and Raizel Shaneh
2012-05-08 15:36 ` Junio C Hamano
2012-05-08 15:37   ` Junio C Hamano
2012-05-09 21:58   ` Heiko Voigt
2012-05-09 22:19     ` Junio C Hamano [this message]
2012-05-09 22:53       ` Junio C Hamano
2012-05-13 17:23         ` Heiko Voigt
2012-05-13 22:13           ` Heiko Voigt
2012-05-14 16:24             ` [PATCH v2] teach add_submodule_odb() to look for alternates Heiko Voigt
2012-05-14 16:49           ` git-diff-tree does not use alternate objects for submodules Junio C Hamano
2012-05-14 17:51             ` Heiko Voigt
2012-05-14 18:03               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v1umtq9pm.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=orgads@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).