Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/select base branch #59

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Juksuu
Copy link

@Juksuu Juksuu commented Nov 16, 2021

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 Juksuu force-pushed the feature/select-base-branch branch 2 times, most recently from 95a9e75 to 7453602 Compare November 21, 2021 11:41
@Juksuu Juksuu force-pushed the feature/select-base-branch branch from 7453602 to a7a9208 Compare November 22, 2021 14:46
@polarmutex
Copy link
Collaborator

is this ready to be reviewed?

@Juksuu
Copy link
Author

Juksuu commented Nov 24, 2021

Yes

@halfdan
Copy link

halfdan commented Oct 19, 2022

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

@jrgirvan
Copy link

jrgirvan commented Mar 3, 2023

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

@Juksuu
Copy link
Author

Juksuu commented Mar 3, 2023

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.

@jrgirvan
Copy link

jrgirvan commented Mar 3, 2023

Cool, will take a look thanks

bradsherman added a commit to bradsherman/git-worktree.nvim that referenced this pull request Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to select branch to base the new worktree and branch on [feature request]
4 participants