git-worktree.nvim icon indicating copy to clipboard operation
git-worktree.nvim copied to clipboard

Feature/select base branch

Open Juksuu opened this issue 4 years ago • 6 comments

I added an option to set branch from which to create new worktrees and branches. Currently this checks if a base branch is set and is valid and uses it, otherwise it uses the current worktree / branch.

I also added option to telescope extension where if making new worktree with completely new branch it will ask if user wants to use current worktree or set it manually. If manual selection is selected a git branches pop up will be shown where the base branch can be selected. If user inputs invalid base branch the current worktree / branch will be used.

@ThePrimeagen I also took the liberty to add stylua configuration and ran that for the whole project. It is its own commit so if you want me to take it away I can do that fairly easily.

Closes #57

Juksuu avatar Nov 16 '21 21:11 Juksuu

is this ready to be reviewed?

polarmutex avatar Nov 24 '21 14:11 polarmutex

Yes

Juksuu avatar Nov 24 '21 14:11 Juksuu

This is fantastic. It's really annoying having to create a branch separately first.

halfdan avatar Oct 19 '22 13:10 halfdan

Looking for this functionality myself. Had a look through the PR. I think first issue is styling, it's too hard to review, you've got about a 50-100 line PR hidden in a +1200 -1000 line PR You need to wind back the styling, if this is something that should be done and I'm not saying it shouldn't, lets get a separate PR/issue for it where it can be debated

Also you've had to duplicate the has_branch function, which rings bells, but the styling changes make it too hard to assess properly

jrgirvan avatar Mar 03 '23 04:03 jrgirvan

I have switched to use my own worktrees.nvim plugin. Which, including that this pr has been inactive for a while, is the reason I'm not going to continue with this pr. The styling changes are mostly on a separate commit, so it should not be hard to check the actual changes needed for this from the other 2 commits.

Juksuu avatar Mar 03 '23 10:03 Juksuu

Cool, will take a look thanks

jrgirvan avatar Mar 03 '23 10:03 jrgirvan