From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git <git@vger.kernel.org>, Antonio Ospite <ao2@ao2.it>
Subject: Re: [PATCH] builtin/grep.c: remote superflous submodule code
Date: Mon, 8 Oct 2018 17:14:00 -0700 [thread overview]
Message-ID: <CAGZ79kaxDch0qGWV612it+kLFhnfVhh+f_97kBf=KJFL-CJJOw@mail.gmail.com> (raw)
In-Reply-To: <xmqqh8hyvbnd.fsf@gitster-ct.c.googlers.com>
> Well, submodule-config.c has its implementation and another caller,
> which technically is outside submodule.c ;-)
i.e. there is a typo in my commit message.
I meant to say submodule-config.c
> repo_read_gitmodules
> has two more callers in unpack-trees.c these days, so perhaps we can
> do without this last paragraph.
Gah, looking at that code, did we have any reason to rush that series?
c.f. https://public-inbox.org/git/20170811171811.GC1472@book.hvoigt.net/
On Sat, Oct 6, 2018 at 5:33 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Stefan Beller <sbeller@google.com> writes:
>
> > After ff6f1f564c4 (submodule-config: lazy-load a repository's .gitmodules
> > file, 2017-08-03) this is no longer necessary, but that commit did not
> > cleanup the whole tree, but just show cased the new way how to deal with
> > submodules in ls-files.
>
> The log message of the above one singles out "grep" as a special
> case and explalins why it did not touch, by the way. You probably
> need to explain the reason why "this is no longer necessary" a bit
> better than the above---as it stands, it is "ff6f1f564c4 said it
> still is necessary, I say it is not".
That is true.
For grep, the reason seems to be, that we check is_submodule_active
based off the index, i.e. using
module = submodule_from_path(repo, &null_oid, path);
as the deciding factor, which falls in line with lazyloading.
However the use of the specialized gitmodules_config_oid
in grep is also guarded by the same commit ff6f1f564c4.
Going back to the use case of unpack-trees.c,
I think that we need to keep it there as alternatives
seem to be more complicated.
So I guess I'll just resend with a better commit message.
Thanks,
Stefan
next prev parent reply other threads:[~2018-10-09 0:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 22:45 [PATCH] builtin/grep.c: remote superflous submodule code Stefan Beller
2018-10-06 8:59 ` Antonio Ospite
2018-10-07 0:29 ` Junio C Hamano
2018-10-07 0:33 ` Junio C Hamano
2018-10-09 0:14 ` Stefan Beller [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-09 18:35 Stefan Beller
2018-10-10 0:10 ` Jonathan Tan
2018-10-10 22:49 ` Stefan Beller
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGZ79kaxDch0qGWV612it+kLFhnfVhh+f_97kBf=KJFL-CJJOw@mail.gmail.com' \
--to=sbeller@google.com \
--cc=ao2@ao2.it \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).