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 10, 2016, 13:24 UTC
Message-ID
<alpine.DEB.2.20.1603101422190.4690@virtualbox>
In-Reply-To
<CACsJy8D7+sXF9gRj15kidgK_xzSVHqChSFdqHpJ3PwxMOw2rHA@mail.gmail.com>
Hi Duy,
On Thu, 10 Mar 2016, Duy Nguyen wrote:
Show 13 quoted lines
> On Thu, Mar 10, 2016 at 6:51 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> >> It gets rather tiresome, and also typo-prone, to call "git branch xyz
> >> upstream/master && git worktree add xyz xyz" all the time.
> >
> > You can actually do "git worktree -b xyz xyz upstream/master" for the
> > same effect. Maybe we can avoid "xyz" duplication with "-b -" or a new
> > option name?
> 
> Another option is just do "worktree -b xyz . upstream/master"
> 
> when the destination already exists and is a directory, the real
> worktree location is <dest>/<branch name>. Similar to "mv abc def"
> becomes "mv abc def/abc" when def is already a directory.

Hmm. That sounds too clever to me. It is clever, alright, but it is also confusing: "Wait, what? Where is my... Darn! It already existed! And now I have my-cool-worktree/my-cool-worktree/! Blergh."

Please count that as mild opposition to that idea :-)

Ciao, Dscho

Previous: Duy NguyenNext: Johannes Schindelin
Message 5 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.