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

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

From
Andreas Krey <a.krey@gmx.de>
Date
Oct 5, 2011, 20:00 UTC
Message-ID
<20111005200043.GA32732@inner.h.iocl.org>
In-Reply-To
<CAG+J_Dzg2D+vmFRfLX01S2k98YZQBE0FFv76VAyPnXdetyWADQ@mail.gmail.com>

On Wed, 05 Oct 2011 15:11:30 +0000, Jay Soffian wrote: ...

Show 5 quoted lines
> >  - Error out (or warn if forced) upon any attempt to update the tip of a
> >   branch that is checked out in more than one place; and
> 
> I think that's a worse user experience. "Sorry, can't commit your
> changes because you've checked out this branch elsewhere."

This is actually pretty much the same as "you can't push into the currently checked-out branch".

I do come from CVS where multiple checkouts of the same branch are obviously common, but the semantics are different. git would need to allow to be in a detached state but still have a notion of a 'current' branch to mimic that; this tentative 'current' branch being what we need to merge or rebase onto later. Just thinking.

It may actually be logical to put the other workdirs into detached state when the branch they are on is committed into; however, this is seriously confusing.

Show 7 quoted lines
> Now the
> user's choices are:
> 
> 1. commit --force (and thus confusing the other workdirs)
> 2. checkout -b new_branch && commit
> 
> Both of which I think are worse than preventing the checkout in the first place.

Hmm. You mean forcing the user to make a new branch *earlier* than at commit time is better?

Andreas
Previous: Jay SoffianNext: Jay Soffian
Message 9 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.