libgit2 / libgit2/libgit2sharp
Cannot stage a folder which contains a file with name ".git"
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.5k
- Forks
- 925
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction steps
- Use LibGit2Sharp to work on a local git repository
- Create some random sub folders in that local repository folder
- Create in some of these subfolders a file with the name ".git"
- Try to stage all changes
Expected behavior
Like with e.g. Git for Windows
https://git-scm.com/download/win
The file gets just added to the repro without any exception
At least I would expect a better error description
Actual behavior
The LibGit2Sharp stage process crashes with an exception.
The exception contains the message "Invalid path"
It took a while till I figured out why this actually happens.
Version of LibGit2Sharp (release number or SHA1)
Nuget version of LibGit2Sharp: 0.26.0 (Current latest)
Nuget version of LibGit2Sharp.NativeBinaries: 2.0.267 (Newer version available but not compatible to newest LibGit2Sharp)
Operating system(s) tested; .NET runtime tested
Windows 10 Version 1903 - Build 18362.239
Project settings
The project in which I use the LibGit2Sharp is build with Visual Studio 2019.
The project uses the .Net Framework 4.7.2
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
Reproduce staging on Windows 10 with LibGit2Sharp 0.26.0 and LibGit2Sharp.NativeBinaries 2.0.267 using a repository containing a file named ".git" in a subfolder. Compare the behavior with Git for Windows, then trace the staging path that produces the "Invalid path" exception. Done means the file can be staged without an exception, or the error clearly identifies the cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, git
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100