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

Remove suffix from repo folder #341

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ctriquet-cs
Copy link

When cloning a Git project .git suffix is repository URL is kept what results in the creation of a folder named repository_name.git.

That PR proposes to remove that .git suffix.

Copy link

welcome bot commented Feb 28, 2024

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@yuvipanda
Copy link
Contributor

Thank you for the PR, @ctriquet-cs!

One question I have now is about backwards compatibility - what would happen in cases when the repo was previously already cloned with the .git prefix, and now that gets stripped out? That may lead to a new clone instead of just updating the currently existing clone, which may be alarming to the user if they have already done some work on the existing clone.

I think we can make this behavior backwards compatible in the following way:

  1. If .git is present in the URL of the repo, but we don't have an existing clone on the filesystem, strip .git
  2. If .git is present in the URL of the repo but we do have an existing clone on the filesystem including the .git suffix, let it be.

We'll probably also need a test added to catch this.

How does that sound, @ctriquet-cs?

@ctriquet-cs
Copy link
Author

@yuvipanda Sorry for the delay in my response.
Yes, that sounds like a good idea to maintain backwards compatibility. I have made the necessary modifications and added the corresponding unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants