[PATCH 17/16] http-push: refactor parsing of remote object names

2014-06-19 Thread Jeff King
We get loose object names like objects/??/... from the remote side, and need to convert them to their hex representation. The code to do so is rather hard to follow, as it uses some calculated lengths whose origins are hard to understand and verify (e.g., the path must be exactly 49 characters

Re: [PATCH 17/16] http-push: refactor parsing of remote object names

2014-06-19 Thread Jeff King
On Thu, Jun 19, 2014 at 05:58:10PM -0400, Jeff King wrote: It's still a little more magical than I would like, but I think this is the best we can do while still building on get_sha1_hex. Parsing it left-to-right would be better, but we would essentially end up reimplementing get_sha1_hex.