Check if the path being checked is the create a new repo is actually the suggested new path#19141
Merged
tidy-dev merged 1 commit intodevelopmentfrom Aug 22, 2024
Conversation
sergiou87
approved these changes
Aug 22, 2024
Member
sergiou87
left a comment
There was a problem hiding this comment.
Looks good! And I agree with both suggestions 🤔
Also thinking if isGitRepository is something that could get unit-tested.
Approving anyway since this chunk of work makes sense, and I'll let you decide how to handle the rest (if you want)
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.
Closes #19137
Description
This PR updates our isGitHubRepository method to not incorrectly identify subfolders of a directory as being repositories and block the user from creating a repository out of subdirectory with the "This directory appears to be a Git repository".
Other thoughts:
path+nameor 2) they really want submodules. This could be an opportunity to instead of showing an error show a "Did you know?" message about submodules and/or a warning..Screenshots
Below we see that
github/testingis a repository so if I addingtestingto the path. It is now checking ifgithub/testing/testingis a repository which it is not.CleanShot.2024-08-21.at.11.44.13.mp4
Release notes
Notes: [Fixed] The "Create a New Repository" dialog allows creation of repositories of repository subfolders.