am: drop "dir" parameter from am_state_init
[gitweb.git] / builtin / remote.c
index 5339ed6ad17bb0c83e05d3e60d654c4f0632ee50..7682206c1e3a6e8655f59505e6e7e288ad2d3a65 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);
                        }
                }
        }