Merge branch 'ew/http-alternates-as-redirects-warning'
[gitweb.git] / builtin / remote.c
index 2b415911bfbc3438c48f5ad645bf5d9cc4612943..addf97ad29343b2328adce2c27ccea92aee6af7a 100644 (file)
@@ -769,7 +769,9 @@ static int rm(int argc, const char **argv)
                                strbuf_reset(&buf);
                                strbuf_addf(&buf, "branch.%s.%s",
                                                item->string, *k);
-                               git_config_set(buf.buf, NULL);
+                               result = git_config_set_gently(buf.buf, NULL);
+                               if (result && result != CONFIG_NOTHING_SET)
+                                       die(_("could not unset '%s'"), buf.buf);
                        }
                }
        }