Re: Implementing branch attributes in git config

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: sean
Date: Tuesday, May 9, 2006 - 6:38 pm

On Tue, 9 May 2006 17:17:58 -0700 (PDT)
Linus Torvalds <torvalds@osdl.org> wrote:


This patch or something like it is needed for repo-config in order to query
the new case sensitive portion of section names.   This is on top of your two
patches:

diff --git a/repo-config.c b/repo-config.c
index 63eda1b..9a9194f 100644
--- a/repo-config.c
+++ b/repo-config.c
@@ -65,11 +65,14 @@ static int show_config(const char* key_,
 static int get_value(const char* key_, const char* regex_)
 {
 	int i;
+	char *tl;
+
+	key = strdup(key_);
+	for (tl=key+strlen(key)-1; tl >= key && *tl != '.'; --tl)
+		*tl = tolower(*tl);
+	for (tl=key; *tl && *tl != '.'; ++tl)
+		*tl = tolower(*tl);
 
-	key = malloc(strlen(key_)+1);
-	for (i = 0; key_[i]; i++)
-		key[i] = tolower(key_[i]);
-	key[i] = 0;
 
 	if (use_key_regexp) {
 		key_regexp = (regex_t*)malloc(sizeof(regex_t));
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Implementing branch attributes in git config, Junio C Hamano, (Tue May 9, 11:03 am)
Re: Implementing branch attributes in git config, Linus Torvalds, (Tue May 9, 12:24 pm)
Re: Implementing branch attributes in git config, Junio C Hamano, (Tue May 9, 3:42 pm)
Re: Implementing branch attributes in git config, Linus Torvalds, (Tue May 9, 5:17 pm)
Re: Implementing branch attributes in git config, sean, (Tue May 9, 6:38 pm)
Re: Implementing branch attributes in git config, Linus Torvalds, (Tue May 9, 7:08 pm)
Re: Implementing branch attributes in git config, Martin Langhoff, (Wed May 10, 12:19 am)
Re: Implementing branch attributes in git config, Johannes Schindelin, (Wed May 10, 4:07 am)
Re: Implementing branch attributes in git config, Linus Torvalds, (Wed May 10, 8:37 am)
Re: Implementing branch attributes in git config, Martin Langhoff, (Wed May 10, 4:17 pm)
Re: Implementing branch attributes in git config, Linus Torvalds, (Wed May 10, 4:55 pm)
Re: Implementing branch attributes in git config, Linus Torvalds, (Wed May 10, 5:11 pm)
Re: Implementing branch attributes in git config, Martin Langhoff, (Wed May 10, 5:13 pm)
Re: Implementing branch attributes in git config, Nicolas Pitre, (Wed May 10, 6:53 pm)
Re: Implementing branch attributes in git config, Jeff King, (Thu May 11, 2:51 am)
Re: Implementing branch attributes in git config, Johannes Schindelin, (Thu May 11, 3:30 am)
Re: Implementing branch attributes in git config, Jeff King, (Thu May 11, 4:39 am)
Re: Implementing branch attributes in git config, Junio C Hamano, (Thu May 11, 10:22 am)