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, 06:53 UTC
Message-ID
<alpine.DEB.2.20.1603150746490.4690@virtualbox>
In-Reply-To
<xmqqmvq5bjlc.fsf@gitster.mtv.corp.google.com>
Hi Junio,
On Thu, 10 Mar 2016, Junio C Hamano wrote:
Show 14 quoted lines
> Duy Nguyen <pclouds@gmail.com> writes:
> 
> >> Granted, "git worktree remove" should be the work horse. But why not have
> >> two ways to skin the same cat? I, again, would prefer the short 'n sweet
> >> "git branch -d -w pull-rebase-prefix" invocation.
> >
> > If you put effort into making it happen, I'm not stopping you :)
> 
> I actually would ;-)  If I had to choose between the two, I'd prefer
> to see this new feature as part of the "worktree" subcommand, simply
> because "branch" is a fairly basic feature that can be used by those
> who are new to Git without knowing that the "worktree" feature even
> exists (hence not having to have one extra option description in its
> documentation that talks about "worktree" is a big plus).

I, in contrast, think it woild make for an excellent way to let users who are in the dear need for the worktree feature (like myself) find out about it.

Nobody reads release notes, but at least some people read man pages.
> Personally, I think you are better off implementing this set of
> features as a set of shell aliases (be it bash or tcsh).
True, if I was simply selfish, I would use shell aliases, too.
But I want others to benefit from my work, too, hence the patch.
Show 5 quoted lines
> 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. Unless, that is, you work on a single project, ever, of course, which is a luxury typically only awarded to maintainers, albeit not this one.

As such, *recommending* to have it elsewhere really is nothing but a workaround for some bugs that should still be squashed instead.

Ciao, Dscho

Previous: Junio C HamanoNext: Duy Nguyen
Message 9 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.