Fix isGitURL regular expression#47109
Merged
tianon merged 1 commit intomoby:masterfrom Jan 18, 2024
Merged
Conversation
Escape period (.) so regular expression does not match any character before "git". Signed-off-by: David Dooling <[email protected]>
tonistiigi
approved these changes
Jan 18, 2024
tianon
reviewed
Jan 18, 2024
| } | ||
| invalidGitUrls = []string{ | ||
| "http://github.com/docker/docker.git:#branch", | ||
| "https://github.com/docker/dgit", |
Member
There was a problem hiding this comment.
We might have to change this example if we revisit docker/cli#1738 (since this really should be a valid Git URL), but these don't have to be real repos so at that point it could change to something like https://example.com/dgit and still be sufficient for the case it's verifying. 👍
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.
- What I did
Escape period (.) so regular expression does not match any character before "git".
- How I did it
Created a failing test, fixed the regular expression, and verified the test passed.
- How to verify it
Run the tests.
- Description for the changelog
Fix IsGitURL regular expression to not match any character before ending "git"
- A picture of a cute animal (not mandatory but encouraged)