On Fri, Jun 01, 2012 at 10:01:58AM -0700, Junio C Hamano wrote: > >> Request credentials from the user if none are already defined when a > >> HTTP 401 is received on a restricted repository. Then, resubmit the > >> request and return the final result. > >> > >> This allows all webdav transactions to obtain credentials without having > >> to individually handle the case in each request. Having push working > >> with HTTP auth is needed for a use case I have where storing the > >> credentials in .netrc or using SSH keys is inappropriate. > > > > We already do this at a higher level in http_request, which in turns > > calls into finish_active_slot. So if we were going to go this route, > > wouldn't we also want to remove the 401 handling in http_request? > > Wouldn't the higher levels know a lot more about the context this > request was made, though? What problem does the patch try to solve? > Some higher level callers missing the "if we got 401, then reset and > retry" logic? Wouldn't it be saner to fix the breakage there? I don't know that the higher level really has much more context; the URL is really the only context we use. I think the problem is adequately solved in http_request; it is simply that the http-push code paths do not use it. The patch solves that by pushing it to a lower level. -Peff -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html