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

[PATCH 0/1] worktree: delete branches auto-created by 'worktree add'

From
Pratyush Yadav <me@yadavpratyush.com>
Date
Dec 14, 2019, 16:14 UTC
Message-ID
<20191214161438.16157-1-me@yadavpratyush.com>
Hi,

This fixes a small annoyance I had with git-worktree. Most of the feature is explained in the patch, so I'm using the cover letter to leave a couple of notes.

- Since the patch changes current behaviour of git-worktree-remove, it
  might break existing scripts. In that case, we might want to add a
  config variable and command line option to trigger that. But for the
  sake of simplicity, I went with making the behaviour default. I don't
  mind making it optional if people think that would be a better idea.
- To make sure no commits are lost, the branch is not deleted if it has
  moved since its creation. This is a more conservative approach. An
  alternative would be to run 'git branch -d' directly without checking if
  branch has moved. This will mean new commits not in upstream branch are
  still preserved but if the branch is simply moved to another commit it
  will still be deleted.
Pratyush Yadav (1):
  worktree: delete branches auto-created by 'worktree add'
 Documentation/git-worktree.txt |  9 ++++--
 builtin/worktree.c             | 52 ++++++++++++++++++++++++++++++++--
 t/t2403-worktree-move.sh       | 45 +++++++++++++++++++++++++++++
 3 files changed, 101 insertions(+), 5 deletions(-)

-- 2.24.1

Next: Pratyush Yadav
Message 1 of 10 in “worktree: delete branches auto-created by 'worktree add'”
  1. 0/1 worktree: delete branches auto-created by 'worktree add'Pratyush Yadav, Dec 14, 2019
  2. 1/1 worktree: delete branches auto-created by 'worktree add'Pratyush Yadav, Dec 14, 2019
  3. Pratyush YadavDec 18, 2019
  4. Eric SunshineDec 18, 2019
  5. Eric SunshineDec 27, 2019
  6. Pratyush YadavJan 4, 2020
  7. Eric SunshineJan 5, 2020
  8. Eric SunshineJan 6, 2020
  9. Pratyush YadavJan 6, 2020
  10. Eric SunshineJan 9, 2020

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.