make config --add behave correctly for empty and NULL values
[gitweb.git] / builtin / config.c
index 5677c942b6936f3332b1b4ed12541f45c4228dfb..8224699663bf91e8b7c8732b41a6a939a21669c4 100644 (file)
@@ -599,7 +599,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
                check_argc(argc, 2, 2);
                value = normalize_value(argv[0], argv[1]);
                return git_config_set_multivar_in_file(given_config_source.file,
-                                                      argv[0], value, "^$", 0);
+                                                      argv[0], value, "a^", 0);
        }
        else if (actions == ACTION_REPLACE_ALL) {
                check_write();