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] Provide way to preserve Sessions when switching git branches #127

Open
timtyrrell opened this issue Apr 29, 2022 · 4 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@timtyrrell
Copy link

Is your feature request related to a problem? Please describe.
Currently, with auto_session_use_git_branch = true, if you switch your git branch, the old git branch session appears to overwrite the previously saved git branch session.

Describe the solution you'd like
Directions on using existing hooks or a code change to handle it

Describe alternatives you've considered
This plugin mentions using callbacks with Telescope, I was hoping there was some way to detect when the branch changes outside of Vim.

@timtyrrell timtyrrell added the enhancement New feature or request label Apr 29, 2022
@rmagatti
Copy link
Owner

rmagatti commented May 3, 2022

Hey @timtyrrell, this is exactly the case I mentioned in this comment.
#68 (comment)

I still don't know of a good solution for it, the workaround provided in the comment below mine could help with at least not saving the wrong session but it doesn't really achieve the desired behaviour imo.

@timtyrrell
Copy link
Author

@rmagatti sounds like the workaround is to disable the autosave/restore?

Thanks for the response, feel free to close this unless you want to keep it around. I understand the complexity more now.

@rmagatti
Copy link
Owner

rmagatti commented May 5, 2022

@timtyrrell yeah pretty much. I'll keep it around for now.

@l-bowman
Copy link

l-bowman commented May 2, 2023

I'd also love to have this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants