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

Re: [PATCH 3/3] Teach "git branch" about --new-workdir

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jul 23, 2007, 03:56 UTC
Message-ID
<20070723035644.GC32566@spearce.org>
In-Reply-To
<Pine.LNX.4.64.0707230000020.14781@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 15 quoted lines
> On Sun, 22 Jul 2007, Julian Phillips wrote:
> 
> > On Sun, 22 Jul 2007, Johannes Schindelin wrote:
> > 
> > > Well, I am really not interested in shooting myself in the foot, and 
> > > having that option in checkout would make that much more likely.  So I 
> > > really, really want to have this in git-branch.
> > 
> > Fair enough.  Your patch - so you get to choose.  I don't have any 
> > strong objections (and no power to express any if I did :P) - just 
> > airing my POV ;)
> 
> In related news, you got me convinced that my "solution" is not 
> sufficient.  So I guess this patch has to wait until after 1.5.3 _and_ 
> after we convinced Junio to put his BASE index extension in again.

The last time we had that thing in Git it really screwed with git-gui. I'm not looking forward to it coming back.

But anyway, I think there's something else that needs to be fixed before this symlink workdir thing is fully in core git. Right now we delete the .git/config and .git/packed-refs files when we edit them. This means it is *very* unsafe to run `git-config` or `git-tag -d` in a symlinked workdir, as the workdir will get its own config or packed-refs file and the real repository directory won't be affected.

Now .git/config switching from symlink to real file is maybe almost a feature.

But .git/packed-refs switching from symlink to real file is *not* a feature. Its a massive bug.

I live by new-workdir. I do everything with it. And today I just spent over an hour sorting out cases where my many, many workdirs have different refs than their base repositories, because their packed-refs files are different. Grrrrrrrrrrrrrrrrrr.

So we really need to make anyone that edits packed-refs (and maybe also config) resolve the symlink and do the edit in the target directory. Then we can consider adding this workdir thing to core git.

Yes, I know, stop whining and submit a patch. I'll get around to it soon if nobody else beats me. I just want to voice yet another reason why this shouldn't be in 1.5.3.

-- 
Shawn.
Previous: Johannes SchindelinNext: Junio C Hamano
Message 12 of 46 in “Teach "git branch" about --new-workdir”
  1. 3/3 Teach "git branch" about --new-workdirJohannes Schindelin, Jul 22, 2007
  2. Daniel BarkalowJul 22, 2007
  3. Johannes SchindelinJul 22, 2007
  4. Julian PhillipsJul 22, 2007
  5. Johannes SchindelinJul 22, 2007
  6. Julian PhillipsJul 22, 2007
  7. Johannes SchindelinJul 22, 2007
  8. Julian PhillipsJul 22, 2007
  9. Jakub NarebskiJul 22, 2007
  10. Johannes SchindelinJul 22, 2007
  11. Johannes SchindelinJul 22, 2007
  12. Shawn O. PearceJul 23, 2007
  13. Junio C HamanoJul 23, 2007
  14. Shawn O. PearceJul 23, 2007
  15. Shawn O. PearceJul 23, 2007
  16. Johannes SchindelinJul 23, 2007
  17. Johannes SchindelinJul 23, 2007
  18. Marius Storm-OlsenJul 24, 2007
  19. Johannes SchindelinJul 24, 2007
  20. Junio C HamanoJul 24, 2007
  21. Johannes SchindelinJul 24, 2007
  22. Marius Storm-OlsenJul 24, 2007
  23. Julian PhillipsJul 24, 2007
  24. Marius Storm-OlsenJul 24, 2007
  25. Johannes SchindelinJul 24, 2007
  26. Josef WeidendorferJul 24, 2007
  27. Johannes SchindelinJul 24, 2007
  28. Josef WeidendorferJul 24, 2007
  29. Jakub NarebskiJul 25, 2007
  30. Johannes SchindelinJul 24, 2007
  31. Marius Storm-OlsenJul 24, 2007
  32. Marius Storm-OlsenJul 24, 2007
  33. Johannes SchindelinJul 24, 2007
  34. Marius Storm-OlsenJul 24, 2007
  35. Johannes SchindelinJul 24, 2007
  36. Marius Storm-OlsenJul 24, 2007
  37. Alex RiesenJul 24, 2007
  38. Marius Storm-OlsenJul 25, 2007
  39. Johannes SchindelinJul 25, 2007
  40. Steven GrimmJul 25, 2007
  41. Andy ParkinsJul 25, 2007
  42. Marius Storm-OlsenJul 25, 2007
  43. Johannes SchindelinJul 25, 2007
  44. Linus TorvaldsJul 25, 2007
  45. Christian MICHONJul 26, 2007
  46. Julian PhillipsJul 23, 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.