From: Brandon Williams <bmwill@google.com>
To: Stefan Beller <sbeller@google.com>
Cc: Jeff King <peff@peff.net>, Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Nov 2016, #06; Mon, 28)
Date: Wed, 30 Nov 2016 17:14:39 -0800 [thread overview]
Message-ID: <20161201011439.GF192901@google.com> (raw)
In-Reply-To: <CAGZ79kaaJgsa8SsvWiGkmKQU7Wv_PD6O50ybm=rxPySk=z9N7Q@mail.gmail.com>
On 11/30, Stefan Beller wrote:
> > Oh interesting, I wonder if there is a way to not have to perform a
> > chdir since taking a lock to lstat wouldn't be ideal.
>
> I think we could rewrite is_submodule_populated to be
>
> int is_submodule_populated_cheap_with_no_chdir(char *path)
> {
> return stat(path + ".git")
> }
>
> i.e. just take the presence of the .git file/dir as a hint to run
> the child process?
I like this approach, its a quick (thread-safe) check to see if the
submodule is interesting. If there happens to be an error with the
submodule's .git file/directory then the child process will fail out.
--
Brandon Williams
next prev parent reply other threads:[~2016-12-01 1:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-29 0:15 What's cooking in git.git (Nov 2016, #06; Mon, 28) Junio C Hamano
2016-11-29 1:05 ` Brandon Williams
2016-11-29 6:37 ` Jeff King
2016-11-29 6:51 ` Jeff King
2016-11-30 19:54 ` Brandon Williams
2016-11-30 23:28 ` Brandon Williams
2016-11-30 23:32 ` Jeff King
2016-11-30 23:40 ` Jeff King
2016-11-30 23:42 ` Brandon Williams
2016-11-30 23:46 ` Jeff King
2016-11-30 23:57 ` Brandon Williams
2016-11-30 23:59 ` Jeff King
2016-12-01 0:04 ` Jeff King
2016-12-01 0:08 ` Brandon Williams
2016-12-01 0:14 ` Stefan Beller
2016-12-01 1:14 ` Brandon Williams [this message]
2016-12-01 0:06 ` Brandon Williams
2016-12-01 0:19 ` Jeff King
2016-11-30 23:43 ` Stefan Beller
2016-12-01 7:09 ` Johannes Sixt
2016-12-01 7:19 ` Jeff King
2016-11-29 6:59 ` Jeff King
2016-11-29 18:31 ` Junio C Hamano
2016-11-29 18:37 ` Jeff King
2016-11-29 19:21 ` Stefan Beller
2016-11-29 19:26 ` Junio C Hamano
2016-11-29 19:29 ` Stefan Beller
2016-11-30 0:25 ` Stefan Beller
2016-12-01 8:30 ` bw/transport-protocol-policy Jeff King
2016-12-01 18:14 ` bw/transport-protocol-policy Brandon Williams
2016-12-01 19:20 ` bw/transport-protocol-policy Jeff King
2016-12-01 19:35 ` bw/transport-protocol-policy Brandon Williams
2016-12-01 19:46 ` bw/transport-protocol-policy Jeff King
2016-12-01 19:53 ` bw/transport-protocol-policy Brandon Williams
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=20161201011439.GF192901@google.com \
--to=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=sbeller@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.