]> git.ipfire.org Git - thirdparty/git.git/blobdiff - config.c
config --replace-all: avoid extra line breaks
[thirdparty/git.git] / config.c
index 4c8571ab33bd6572a6035d7f3408f77cdfeb8dbf..c55d6a564e256b56e8f3f41feac2e0045936d1e1 100644 (file)
--- a/config.c
+++ b/config.c
@@ -2617,6 +2617,7 @@ int git_config_set_multivar_in_file_gently(const char *config_filename,
                        store.seen = 1;
 
                for (i = 0, copy_begin = 0; i < store.seen; i++) {
+                       new_line = 0;
                        if (store.offset[i] == 0) {
                                store.offset[i] = copy_end = contents_sz;
                        } else if (store.state != KEY_SEEN) {