feat(config): add branch="any" option to configure fallback behavior#108
Open
AVGVSTVS96 wants to merge 1 commit intofolke:mainfrom
Open
feat(config): add branch="any" option to configure fallback behavior#108AVGVSTVS96 wants to merge 1 commit intofolke:mainfrom
branch="any" option to configure fallback behavior#108AVGVSTVS96 wants to merge 1 commit intofolke:mainfrom
Conversation
branch="any" option to configure fallback behavior
This allows persistence to fallback to another branch's session if the current branch doesn't have an available session.
d99f854 to
2db6a13
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new
branch="any"configuration option that enables more flexible session fallback behavior.Why? I prefer to always fall back to a known session, I don't want a newly created branch to negate my previously saved sessions.
Changes
branch="any"allows sessions to fall back to the most recent session from any branchbranch=true) remains unchangedConfiguration Options
branch = false: Single session per directory, not branch-specificbranch = true(default): Branch-specific session, won't fall back to other branchesbranch = "any": Branch-specific session, falls back to any other branch if current branch has no sessionImplementation
Added
find_any_branch_session()function that:This is useful for workflows where you switch between branches frequently and want to restore your work even when the current branch doesn't have a saved session yet.