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

Disallow creating a repository with a .git suffix #957

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

minwoox
Copy link
Member

@minwoox minwoox commented May 10, 2024

Motivation:
It is undesirable for repositories to be created with a .git suffix due to potential conflicts or confusion with Git's repository structure and management.

Modifications:

  • Disallow creating a repository whose suffix is .git

Result:

Motivation:
It is undesirable for repositories to be created with a `.git` suffix due to potential conflicts or confusion with Git's repository structure and management.

Modifications:
- Disallow creating a repository whose suffix is `.git`

Result:
- You can no longer create a repository whose suffix is `.git`
@minwoox minwoox added the defect label May 10, 2024
@minwoox minwoox added this to the 0.66.0 milestone May 10, 2024
Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@jrhee17 jrhee17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

@@ -437,7 +438,8 @@ private static boolean isValidChildName(String name) {
return false;
}

return !name.endsWith(SUFFIX_REMOVED) && !name.endsWith(SUFFIX_PURGED);
return !name.endsWith(SUFFIX_REMOVED) && !name.endsWith(SUFFIX_PURGED) &&
!name.endsWith(GIT_EXTENSION); // Git repository whose name ends with '.git' is not allowed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I understood if there are any users out there who use .git suffixes, the project/repositories just won't be loaded server start-up will be successful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my intention. 👍

@minwoox minwoox merged commit f47657e into line:main Jun 13, 2024
9 checks passed
@minwoox minwoox deleted the disallow_.git branch June 13, 2024 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove ".git" suffix when creating a repository
3 participants