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

Re: [RFC/PATCH] Add multiple workdir support to branch/checkout

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 6, 2011, 00:43 UTC
Message-ID
<7vsjn73q6j.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAG+J_DzZrFx2v09zNxKm2xyA82MyKRTq3AEus3QthtpZYhQn0A@mail.gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
Show 11 quoted lines
> On Wed, Oct 5, 2011 at 7:49 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> This reminds me of how we ended up handling the "scary warning" around
>> detached HEAD. It is not wrong nor even dangerous to detach. It is not
>> wrong nor even dangerous to make commits on detached HEAD. It is however
>> dangerous to switch away from that state without saving it to a ref, and
>> that is where we give warnings.
>
> If you have the same branch in two workdirs, then if you commit to
> that branch in one workdir, you have to reset --hard in the other. In
> that case, wouldn't it make more sense to just use a detached head in
> the second workdir?

Not at all. My build infrastructure determines where to install the built binary based on what branch is checked out. Having a head detached at a commit that is at the tip of one branch is not necessarily the same as having the branch actually checked out.

> Also, if we wait till commit time to tell the user "sorry, topic's
> been updated elsewhere", now the user is in a perilous state.

Wouldn't the "elsewhere" user would be warned before being able to update the branch? I thought the whole point of your adding "this branch is checked out over there" is exactly so that the "elsewhere" user can come talk to you before that happens. These two people might be yourself, of course.

Previous: Jay SoffianNext: Jay Soffian
Message 22 of 35 in “Add multiple workdir support to branch/checkout”
  1. Add multiple workdir support to branch/checkoutJay Soffian, Oct 5, 2011
  2. Jay SoffianOct 5, 2011
  3. Nguyen Thai Ngoc DuyOct 5, 2011
  4. Jay SoffianOct 5, 2011
  5. Junio C HamanoOct 5, 2011
  6. Jay SoffianOct 5, 2011
  7. Junio C HamanoOct 5, 2011
  8. Jay SoffianOct 5, 2011
  9. Andreas KreyOct 5, 2011
  10. Jay SoffianOct 5, 2011
  11. Jonathan NiederOct 5, 2011
  12. Jay SoffianOct 5, 2011
  13. Jonathan NiederOct 5, 2011
  14. Junio C HamanoOct 5, 2011
  15. Jay SoffianOct 5, 2011
  16. Jay SoffianOct 5, 2011
  17. Nguyen Thai Ngoc DuyOct 5, 2011
  18. Junio C HamanoOct 5, 2011
  19. Nguyen Thai Ngoc DuyOct 5, 2011
  20. Junio C HamanoOct 5, 2011
  21. Jay SoffianOct 6, 2011
  22. Junio C HamanoOct 6, 2011
  23. Jay SoffianOct 6, 2011
  24. Junio C HamanoOct 6, 2011
  25. Jay SoffianOct 6, 2011
  26. Junio C HamanoOct 6, 2011
  27. Jay SoffianOct 6, 2011
  28. Nguyen Thai Ngoc DuyOct 6, 2011
  29. Bernhard R. LinkOct 6, 2011
  30. Jeff KingOct 6, 2011
  31. Nguyen Thai Ngoc DuyOct 5, 2011
  32. Junio C HamanoOct 5, 2011
  33. Jay SoffianOct 5, 2011
  34. Jay SoffianOct 5, 2011
  35. Julián LanderrecheOct 8, 2011

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.