Repository navigation
fix(key): refuse a numbered fallback key longer than 64 characters - #525
Draft
roschaefer wants to merge 2 commits into
Draft
roschaefer wants to merge 2 commits into
roschaefer wants to merge 2 commits into
Conversation
When every candidate key of an upstream is taken, git-splice appends -2, -3 and so on to the last candidate. Candidates can be 60 characters long, so from -1000 on the key grew past the 64 characters a key may have. It was still recorded in the repository's config, and from then on every command refused that config until the key was renamed by hand. The candidate is now cut short by the number's length before the number is appended, dropping a '.', '_' or '-' left at the cut, and a key that still isn't valid is refused instead of recorded. Fixes #64
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 41 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Shortening the candidate handled an edge case that takes 999 taken keys: more code than the case is worth. Refusing before recording keeps the config readable, and a key recorded by hand is picked up as usual.
This branch has not been deployed
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.
When every candidate key of an upstream is taken, git-splice appends -2,
-3 and so on to the last candidate. Candidates can be 60 characters long,
so from -1000 on the key grew past the 64 characters a key may have. It
was still recorded in the repository's config, and from then on every
command refused that config until the key was renamed by hand.
Such a key is now refused before it is recorded, so the config stays
usable, and the refusal says how to record a key by hand. Shortening the
candidate to fit was tried and dropped: more code than a case that needs
999 taken keys is worth.
Fixes #64