return 0;
}
+static int initialized;
+
static void promisor_remote_init(void)
{
- static int initialized;
-
if (initialized)
return;
initialized = 1;
git_config(promisor_remote_config, NULL);
}
+static void promisor_remote_clear(void)
+{
+ while (promisors) {
+ struct promisor_remote *r = promisors;
+ promisors = promisors->next;
+ free(r);
+ }
+
+ promisors_tail = &promisors;
+}
+
+void promisor_remote_reinit(void)
+{
+ initialized = 0;
+ promisor_remote_clear();
+ promisor_remote_init();
+}
+
struct promisor_remote *promisor_remote_find(const char *remote_name)
{
promisor_remote_init();