libgit2 / libgit2/libgit2sharp

Cannot stage a folder which contains a file with name ".git"

未關閉
#1,699 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
C#
星號
3.5k
分支
925
PR 合併指標
30 天內沒有已合併 PR

描述

Reproduction steps
  1. Use LibGit2Sharp to work on a local git repository
  2. Create some random sub folders in that local repository folder
  3. Create in some of these subfolders a file with the name ".git"
  4. 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

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

在 Windows 10 上使用 LibGit2Sharp 0.26.0 和 LibGit2Sharp.NativeBinaries 2.0.267,透過一個在子資料夾中包含名為 ".git" 的檔案的 repository 重現 staging。將其行為與 Git for Windows 進行比較,然後追蹤產生 "Invalid path" 例外的 staging 路徑。完成的標準是該檔案可以在不引發例外的情況下被加入 staging,或錯誤能夠明確指出原因。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
csharp, git
領域
devtools
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。