Re: [PATCH v4] Allow update hooks to update refs on their own.
From: Steven Grimm <hidden>
Date: 2016-06-15 22:43:56
On Dec 2, 2007, at 6:16 PM, Junio C Hamano wrote:
quoted
..., but an "ok, but btw I changed your commit" status from receive-pack seems like it would be useful, for two reasons:Sensible argument. I stand corrected.
If we want that status in principle, I'd argue that sending down the updated commit SHA1 is actually the right way to indicate it, because it gives the client all the information it needs to make an intelligent choice about what to do next. If you don't transmit the modified SHA1, the client will have to do another fetch to find out what rewriting was done by the server, and if another push happened in the meantime, the client will have to basically guess about which commits correspond to the ones it pushed. I'm going to have to modify the "ok" line for this either way, and it's not like the extra 39 bytes (for sending a hex SHA1 instead of a one-character status indicator) is going to hurt in any but the narrowest corner cases. But if people really object to that, I will add a simple flag to the "ok" line. -Steve