Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-config --rename-section could rename wrong section
author
Pavel Roskin
<proski@gnu.org>
Sun, 4 Feb 2007 03:01:04 +0000
(22:01 -0500)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 4 Feb 2007 05:35:22 +0000
(21:35 -0800)
The "git-config --rename-section" implementation would match sections
that are substrings of the section name to be renamed.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
config.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
3b0f5e8
)
diff --git
a/config.c
b/config.c
index c08c66890f0162fe69452927c48d6835178ed12d..d82107124a53bca99ee65ea31dceb3871bf6796f 100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-896,7
+896,7
@@
int git_config_rename_section(const char *old_name, const char *new_name)
if (buf[i] != old_name[j++])
break;
}
- if (buf[i] == ']') {
+ if (buf[i] == ']'
&& old_name[j] == 0
) {
/* old_name matches */
ret++;
store.baselen = strlen(new_name);