From: Junio C Hamano <gitster@pobox.com>
To: Heiko Voigt <hvoigt@hvoigt.net>
Cc: git@vger.kernel.org, Jens Lehmann <jens.lehmann@web.de>,
Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>,
"W. Trevor King" <wking@tremily.us>,
Eric Sunshine <sunshine@sunshineco.com>,
Karsten Blees <karsten.blees@gmail.com>
Subject: Re: [PATCH v3 0/4] submodule config lookup API
Date: Thu, 21 May 2015 11:40:44 -0700 [thread overview]
Message-ID: <xmqqy4khixjn.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <20150521170616.GA22979@book.hvoigt.net> (Heiko Voigt's message of "Thu, 21 May 2015 19:06:16 +0200")
Heiko Voigt <hvoigt@hvoigt.net> writes:
> This is finally the next iteration of the submodule config api. The last
> iteration can be found here:
>
> http://article.gmane.org/gmane.comp.version-control.git/252601
>
> This iteration fixes the lookup of submodules by name
> (submodule_from_name()) where one needed to pass in the gitmodule sha1
> by mistake. To keep it simple for the user and behave as documented we
> should take the commit sha1 which is now fixed here. We now also test
> the lookup by name in the api tests.
>
> This should be ready for inclusion.
>
> Cheers Heiko
>
> Here is the interdiff to the last iteration:
>
> diff --git a/submodule-config.c b/submodule-config.c
> index 96623ad..177767d 100644
> --- a/submodule-config.c
> +++ b/submodule-config.c
> @@ -25,6 +25,11 @@ struct submodule_entry {
> struct submodule *config;
> };
>
> +enum lookup_type {
> + lookup_name,
> + lookup_path,
> +};
Please lose the comma after the last element in enum. Some
compilers do not like it, I was told.
> + switch (lookup_type) {
> + case lookup_name:
> + submodule = cache_lookup_name(cache, sha1, key);
> + break;
> + case lookup_path:
> + submodule = cache_lookup_path(cache, sha1, key);
> + break;
Is this too deeply indented?
next prev parent reply other threads:[~2015-05-21 18:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-21 17:06 [PATCH v3 0/4] submodule config lookup API Heiko Voigt
2015-05-21 17:07 ` [PATCH v3 1/4] implement submodule config cache for lookup of submodule names Heiko Voigt
2015-05-21 17:08 ` [PATCH v3 2/4] extract functions for submodule config set and lookup Heiko Voigt
2015-05-21 17:08 ` [PATCH v3 3/4] use new config API for worktree configurations of submodules Heiko Voigt
2015-05-21 17:09 ` [PATCH v3 4/4] do not die on error of parsing fetchrecursesubmodules option Heiko Voigt
2015-05-21 18:40 ` Junio C Hamano [this message]
2015-05-26 15:46 ` Re: [PATCH v3 0/4] submodule config lookup API Heiko Voigt
2015-05-21 18:50 ` René Scharfe
2015-05-26 15:24 ` Heiko Voigt
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=xmqqy4khixjn.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hvoigt@hvoigt.net \
--cc=jens.lehmann@web.de \
--cc=jrnieder@gmail.com \
--cc=karsten.blees@gmail.com \
--cc=peff@peff.net \
--cc=sunshine@sunshineco.com \
--cc=wking@tremily.us \
/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).