Merge branch 'rs/config-write-section-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 28 Nov 2017 04:38:33 +0000 (13:38 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Nov 2017 04:38:33 +0000 (13:38 +0900)
There was a recent semantic mismerge in the codepath to write out a
section of a configuration section, which has been corrected.

* rs/config-write-section-fix:
config: flip return value of write_section()

1  2 
config.c
diff --combined config.c
index adb7d7a3e5ee164d24f1d2420677a8ad5b61e49f,201ad36d34376ceee44b530197863924fb7051b4..c38401a75048d84283d977bd8663d34a07e2f237
+++ b/config.c
@@@ -16,6 -16,7 +16,6 @@@
  #include "string-list.h"
  #include "utf8.h"
  #include "dir.h"
 -#include "color.h"
  
  struct config_source {
        struct config_source *prev;
@@@ -1350,6 -1351,9 +1350,6 @@@ int git_default_config(const char *var
        if (starts_with(var, "advice."))
                return git_default_advice_config(var, value);
  
 -      if (git_color_config(var, value, dummy) < 0)
 -              return -1;
 -
        if (!strcmp(var, "pager.color") || !strcmp(var, "color.pager")) {
                pager_use_color = git_config_bool(var,value);
                return 0;
@@@ -2315,7 -2319,7 +2315,7 @@@ static ssize_t write_section(int fd, co
        struct strbuf sb = store_create_section(key);
        ssize_t ret;
  
-       ret = write_in_full(fd, sb.buf, sb.len) == sb.len;
+       ret = write_in_full(fd, sb.buf, sb.len);
        strbuf_release(&sb);
  
        return ret;