From: Heiko Voigt <hvoigt@hvoigt.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jens Lehmann <jens.lehmann@web.de>,
Jonathan Nieder <jrnieder@gmail.com>, Jeff King <peff@peff.net>
Subject: Re: [PATCH 2/5] implement submodule config cache for lookup of submodule names
Date: Sat, 14 Jun 2014 00:37:12 +0200 [thread overview]
Message-ID: <20140613223701.GA3799@sandbox-ub> (raw)
In-Reply-To: <xmqq38f96b9f.fsf@gitster.dls.corp.google.com>
On Thu, Jun 12, 2014 at 02:58:20PM -0700, Junio C Hamano wrote:
> Heiko Voigt <hvoigt@hvoigt.net> writes:
>
> > ...
> > +static int is_cache_init = 0;
>
> Please don't initialise variables in the .bss to zero by hand.
Ok will remove that.
> > + ...
> > + warning("%s:.gitmodules, multiple configurations found for "
> > + "submodule.%s.%s. Skipping second one!",
> > + commit_string, name, option);
> > +}
> > + ...
> > + if (strcmp(value, "untracked") && strcmp(value, "dirty") &&
> > + strcmp(value, "all") && strcmp(value, "none")) {
> > + warning("Invalid parameter \"%s\" for config option "
> > + "\"submodule.%s.ignore\"", value, var);
> > + goto release_return;
> > + }
>
> These two look inconsistent in different ways. I think we typically
> quote the names like so:
>
> warning("I have trouble with variable '%s' somehow", var);
Ok will change the quotation for the variable and parameter names.
Here is the fixup[1] I will queue in my branch.
Cheers Heiko
[1] ---8<----
Subject: [PATCH] fixup! implement submodule config cache for lookup of
submodule names
---
submodule-config.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/submodule-config.c b/submodule-config.c
index 437fbdb..f330ccc 100644
--- a/submodule-config.c
+++ b/submodule-config.c
@@ -26,7 +26,7 @@ struct submodule_entry {
};
static struct submodule_cache cache;
-static int is_cache_init = 0;
+static int is_cache_init;
static int config_path_cmp(const struct submodule_entry *a,
const struct submodule_entry *b,
@@ -230,7 +230,7 @@ static void warn_multiple_config(const unsigned char *commit_sha1,
if (commit_sha1)
commit_string = sha1_to_hex(commit_sha1);
warning("%s:.gitmodules, multiple configurations found for "
- "submodule.%s.%s. Skipping second one!",
+ "'submodule.%s.%s'. Skipping second one!",
commit_string, name, option);
}
@@ -298,8 +298,8 @@ static int parse_config(const char *var, const char *value, void *data)
}
if (strcmp(value, "untracked") && strcmp(value, "dirty") &&
strcmp(value, "all") && strcmp(value, "none")) {
- warning("Invalid parameter \"%s\" for config option "
- "\"submodule.%s.ignore\"", value, var);
+ warning("Invalid parameter '%s' for config option "
+ "'submodule.%s.ignore'", value, var);
goto release_return;
}
--
2.0.0
next prev parent reply other threads:[~2014-06-13 22:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 6:04 [PATCH 0/5] submodule config lookup API Heiko Voigt
2014-06-05 6:06 ` [PATCH 1/5] hashmap: add enum for hashmap free_entries option Heiko Voigt
2014-06-06 17:52 ` Karsten Blees
2014-06-10 10:17 ` Heiko Voigt
2014-06-11 9:12 ` Karsten Blees
2014-06-12 19:12 ` Junio C Hamano
2014-06-17 8:30 ` Karsten Blees
2014-06-17 19:04 ` Heiko Voigt
2014-06-17 22:19 ` Junio C Hamano
2014-06-05 6:07 ` [PATCH 2/5] implement submodule config cache for lookup of submodule names Heiko Voigt
2014-06-05 17:46 ` W. Trevor King
2014-06-06 5:20 ` Heiko Voigt
2014-06-08 9:04 ` Eric Sunshine
2014-06-10 10:19 ` Heiko Voigt
2014-06-12 21:58 ` Junio C Hamano
2014-06-13 22:37 ` Heiko Voigt [this message]
2014-06-05 6:08 ` [PATCH 3/5] extract functions for submodule config set and lookup Heiko Voigt
2014-06-05 6:09 ` [PATCH 4/5] use new config API for worktree configurations of submodules Heiko Voigt
2014-06-05 6:09 ` [PATCH 5/5] do not die on error of parsing fetchrecursesubmodules option Heiko Voigt
2014-06-12 21:59 ` [PATCH 0/5] submodule config lookup API Junio C Hamano
2014-06-13 22:41 ` Heiko Voigt
2014-06-16 17:58 ` Junio C Hamano
2014-06-17 19:00 ` Heiko Voigt
2014-06-12 22:04 ` Junio C Hamano
2014-06-13 7:13 ` Jens Lehmann
2014-06-13 17:50 ` 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
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=20140613223701.GA3799@sandbox-ub \
--to=hvoigt@hvoigt.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jens.lehmann@web.de \
--cc=jrnieder@gmail.com \
--cc=peff@peff.net \
/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).