Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index c08c66890f..d82107124a 100644
--- 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);