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

Behavior of sl clone with empty basename differs from git clone #828

Open
gyroninja opened this issue Jan 27, 2024 · 4 comments
Open

Behavior of sl clone with empty basename differs from git clone #828

gyroninja opened this issue Jan 27, 2024 · 4 comments
Assignees

Comments

@gyroninja
Copy link

gyroninja commented Jan 27, 2024

$ git clone https://github.com/facebook/sapling/

Clones sapling into a new directory named sapling

$ sl clone https://github.com/facebook/sapling/

Clones sapling into the current directory

I find the behavior of git to be more intuitive. I encountered this when trying to follow the build commands for another project and swapping out git for sl.

@sggutier
Copy link
Contributor

Thanks for reporting this @gyroninja . As a workaround you can avoid adding the last / and then it should automatically create a directory with the name of the repo, e.g.,

$ sl clone https://github.com/facebook/sapling

@sggutier sggutier self-assigned this Jan 29, 2024
facebook-github-bot pushed a commit that referenced this issue Jan 30, 2024
Summary:
Addresses #828 .

With this change the destination directory for http urls is automatically detected if the url for cloning ends with `/`, e.g., `https://github.com/facebook/sapling/`

Reviewed By: zzl0

Differential Revision: D53208561

fbshipit-source-id: 83992c76ff83b6d6db6b7ff12769f00ff8dce69c
@sggutier
Copy link
Contributor

70c4b54 should solve this

@gyroninja
Copy link
Author

gyroninja commented Jan 30, 2024

Unless there is some path normalization going on there is still not parity with that commit on "https://github.com/facebook/sapling//"

@sggutier
Copy link
Contributor

Ah, good point

@sggutier sggutier reopened this Jan 30, 2024
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

No branches or pull requests

2 participants