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

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 15, 2016, 13:56 UTC
Message-ID
<alpine.DEB.2.20.1603151448220.4690@virtualbox>
In-Reply-To
<CACsJy8B+c8=Y0Lb-TxjGF4689xP2Vyqjp4Q6CuffTLDWDMh3gg@mail.gmail.com>
Hi Duy,
On Tue, 15 Mar 2016, Duy Nguyen wrote:
Show 12 quoted lines
> On Tue, Mar 15, 2016 at 1:53 PM, Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >> That approach to implement the UI that directly faces the end users
> >> via scripting would let your users choose layouts more flexibly.
> >> Some people may want a repository and its worktrees next to each
> >> other, some others may want the worktrees embedded inside the main
> >> repository, yet some others may want layouts other than those two.
> >
> > Having the worktree in a totally different location than the associated
> > repository is *very* confusing.
> 
> I disagree (unless I misunderstood you).

How is it not confusing having all of your worktrees, no matter whether they connect to git.git, to git-for-windows/build-extra.git, to Alexpux/MSYS2-packages.git, to cygwin.git, to curl/curl.git, to whatever.git inside $HOME/worktrees/?

I tell you how it is not confusing. It is not confusing by artificially re-creating the hierarchy inside the $HOME/worktrees/ directory.

And you only need to re-create the hierarchy because, you guessed it, you tried to disconnect the worktrees from their repositories.

So it is nothing but a bad old workaround, is what it is.
> One of the use cases I have for multi worktree is move all repos to a
> central place. Remember the .git directory security bug?
I remember.
> It would not happen if the repo is put away.

Sure. And with the repository being put elsewhere, you also buy the tedium to no longer be able to simply "less .git/rebase-apply/patch". Which I have to type *a lot*. You win some, you lose some. If you ask me, you lose some more, but in some cases that is worth it.

> And it would be easier to backup repo data too. Also, "git worktree
> list" is there to locate any worktree. I don't see why it's confusing.

Yeah, it is clear to me now that you do not find it confusing. Even if I find that fact in and of itself confusing, because it is very, very confusing to me to have the repository so far away from my worktree as to forget where it actually is, opening the door real wide for trouble e.g. by archiving my repository behind my worktree's back.

You win some, you lose some. I am simply not prepared to lose *that* much. My worktrees will stay inside my originally checked out working directory, thankyouverymuch.

Ciao, Dscho

Previous: Duy NguyenNext: Duy Nguyen
Message 11 of 16 in “Introduce a way to create a branch and worktree at the same time”
  1. 0/1 Introduce a way to create a branch and worktree at the same timeJohannes Schindelin, Mar 10, 2016
  2. 1/1 branch: allow conveniently adding new worktrees for new branchesJohannes Schindelin, Mar 10, 2016
  3. Duy NguyenMar 10, 2016
  4. Duy NguyenMar 10, 2016
  5. Johannes SchindelinMar 10, 2016
  6. Johannes SchindelinMar 10, 2016
  7. Duy NguyenMar 11, 2016
  8. Junio C HamanoMar 11, 2016
  9. Johannes SchindelinMar 15, 2016
  10. Duy NguyenMar 15, 2016
  11. Johannes SchindelinMar 15, 2016
  12. Duy NguyenMar 15, 2016
  13. Mikael MagnussonMar 11, 2016
  14. Johannes SchindelinMar 14, 2016
  15. Johannes SixtMar 15, 2016
  16. Eric SunshineMar 10, 2016

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.