diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2018-04-03 16:28:14 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-04-05 23:30:03 (GMT) |
commit | 46fc89ce74b46e88764c796b3ab20d5ab90a5e96 (patch) | |
tree | 9482654c6bde0e91f72fe6f42b7ceff5e8111783 /config.c | |
parent | e9313952bf85bcc8b602f582b2e71660d670f97b (diff) | |
download | git-46fc89ce74b46e88764c796b3ab20d5ab90a5e96.zip git-46fc89ce74b46e88764c796b3ab20d5ab90a5e96.tar.gz git-46fc89ce74b46e88764c796b3ab20d5ab90a5e96.tar.bz2 |
config --replace-all: avoid extra line breaks
When replacing multiple config entries at once, we did not re-set the
flag that indicates whether we need to insert a new-line before the new
entry. As a consequence, an extra new-line was inserted under certain
circumstances.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) { |