git_clone can't parse well for path with double slash
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 10.6k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
as the topic, git_clone will parse a local path with double slash truncated from the slash.
Reproduction steps
call git_clone(repo, addr, "/home/kipade//test",attr)
would equal as calling git_clone(repo, url, "/test",attr)
Expected behavior
it should recognize "/home/kipade//test" as "/home/kipade/test"
Actual behavior
Version of libgit2 (release number or SHA1)
current
Operating system(s) tested
linux
In fact, there are many circumstances that the caller would present such a local path with double slash, and most software(bash,and other scripts included) , system api can do well with such a path. I hope libgit2 can do so. thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the git_clone handling for local repository paths and reproduce the issue on Linux with /home/kipade//test. Trace where the path is truncated, then verify that the full path is preserved as equivalent to /home/kipade/test without changing other clone behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, git
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100