git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v4] Allow update hooks to update refs on their own.

From
Jeff King <peff@peff.net>
Date
Dec 6, 2007, 06:36 UTC
Message-ID
<20071206063626.GA18698@coredump.intra.peff.net>
In-Reply-To
<7veje0gwru.fsf@gitster.siamese.dyndns.org>
On Wed, Dec 05, 2007 at 10:30:45PM -0800, Junio C Hamano wrote:
Show 20 quoted lines
> The rebase would be "rebase --onto W' X Z", so it is not strictly
> necessary to keep the fact that X corresponds to X', but somehow I
> thought it was necessary, and Steven's message was hinting about that:
> 
>   > 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.
> 
> (notice the last part).
> 
> So if we want to transmit minimum amount of information, we can just
> send a bit ("the ref was rewritten") back to send-pack without telling
> it what X' is (but it would not hurt to send it back either).  With that
> one bit of information, send-pack can refrain from updating tracking ref
> from Y to X.

Ah, I thought his argument was "we have to send back a bit, so why not just send the hash we made for informational purposes? It doesn't hurt, and maybe we can make use of it later."

I was assuming that we were interested _only_ in fixing the send-pack issues at this time, and that the rebasing or merging part of the workflow would be figured out later. But it is probably sensible to consider the whole workflow to see what is necessary at each step.

-Peff
Previous: Junio C HamanoNext: Steven Grimm
Message 31 of 44 in “Allow update hooks to update refs on their own”
  1. Allow update hooks to update refs on their ownSteven Grimm, Nov 27, 2007
  2. Jakub NarebskiNov 27, 2007
  3. Steven GrimmNov 27, 2007
  4. Junio C HamanoNov 28, 2007
  5. Steven GrimmNov 28, 2007
  6. Daniel BarkalowNov 28, 2007
  7. Junio C HamanoNov 28, 2007
  8. Steven GrimmNov 28, 2007
  9. Jeff KingNov 28, 2007
  10. Junio C HamanoNov 28, 2007
  11. Allow update hooks to update refs on their ownSteven Grimm, Nov 28, 2007
  12. Jeff KingNov 28, 2007
  13. Steven GrimmNov 28, 2007
  14. Jeff KingNov 28, 2007
  15. Junio C HamanoNov 28, 2007
  16. Allow update hooks to update refs on their ownSteven Grimm, Nov 28, 2007
  17. Jeff KingNov 28, 2007
  18. Junio C HamanoNov 28, 2007
  19. Steven GrimmNov 29, 2007
  20. Junio C HamanoNov 30, 2007
  21. Allow update hooks to update refs on their own.Steven Grimm, Dec 2, 2007
  22. Junio C HamanoDec 2, 2007
  23. Jeff KingDec 3, 2007
  24. Junio C HamanoDec 3, 2007
  25. Junio C HamanoDec 3, 2007
  26. Steven GrimmDec 5, 2007
  27. Junio C HamanoDec 5, 2007
  28. Junio C HamanoDec 5, 2007
  29. Jeff KingDec 6, 2007
  30. Junio C HamanoDec 6, 2007
  31. Jeff KingDec 6, 2007
  32. Steven GrimmDec 6, 2007
  33. Shawn O. PearceDec 3, 2007
  34. Junio C HamanoDec 3, 2007
  35. Shawn O. PearceDec 4, 2007
  36. Johannes SchindelinDec 3, 2007
  37. Shawn O. PearceDec 4, 2007
  38. Johannes SchindelinDec 4, 2007
  39. Shawn O. PearceDec 4, 2007
  40. Johannes SchindelinDec 4, 2007
  41. Steven GrimmDec 4, 2007
  42. Shawn O. PearceDec 4, 2007
  43. Junio C HamanoNov 28, 2007
  44. Jeff KingNov 28, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.