-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Branch popup #303
Branch popup #303
Conversation
This is now complete, bar that getting the branches is currently sync and should probably be async or cached (so the calls are currently inefficient). I'm not sure about the async stuff so it might take a bit of time to work out. |
This comment has been minimized.
This comment has been minimized.
@WizardOhio24 where are we on this one? since you are already working on the next PR :D |
I'm still working on this, I was just waiting for tui to be bumped so the styles could be fixed/implemented. |
bf64de7
to
b0785fc
Compare
This currently has a thing(bug?) where it automatically stages all files which have been changed, this isn't a bug, but I don't think it's what the user would expect. Otherwise this is complete, I think. |
How do regular git GUIs handle it when you switch branches while having file changes in the working dir? |
How about refusing to switch branches if you have uncommitted changes? |
I think it's a bug, it stages and unstages changes which do and undo each other, I'll try to do it the same way git does a checkout. |
@WizardOhio24 libgit2 is very mature, I would be surprised if switching-branches has such a significant bug. if so we should create an issue |
It's not a bug with libgit2, I meant the way you would do it in git (e.g |
This comment has been minimized.
This comment has been minimized.
Everything should work now. The checkout displays an error message if there is uncommitted changes on the current branch, as you suggested (and the way git does it (I think)). I'm not sure how long the branch names need to be so I've made them cutoff at 15 characters, the commit hash and message take up the remaining space. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@WizardOhio24 nope, tried that |
looks like we need more unit tests |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Fixed, it was not ignoring files in .gitignore |
@WizardOhio24 any idea why the last commits do net get run in CI anymore? |
See https://www.githubstatus.com/, I think. |
@WizardOhio24 are you going to write some tests for |
@WizardOhio24 lets create a followup PR with some tests, I want to get this out for other to play around with. thanks for all the work you put into this❤️ |
Implements a branch popup which can be accessed by pressing 'b' in the status tab.
A new branch can be created by pressing 'c' while the branch popup is open and a branch can be checked out by selecting the branch and pressing enter.
This does currently work but it is still a work in progress.
Linked to #91.