return check_ref(ref->name, flags);
}
-static void die_initial_contact(int unexpected)
+static NORETURN void die_initial_contact(int unexpected)
{
/*
* A hang-up after seeing some response from the other end
enum protocol protocol;
enum protocol_version version = get_protocol_version_config();
+ /*
+ * NEEDSWORK: If we are trying to use protocol v2 and we are planning
+ * to perform a push, then fallback to v0 since the client doesn't know
+ * how to push yet using v2.
+ */
+ if (version == protocol_v2 && !strcmp("git-receive-pack", prog))
+ version = protocol_v0;
+
/* Without this we cannot rely on waitpid() to tell
* what happened to our children.
*/