libgit2 / libgit2/libgit2sharp

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

Aperta
#1,699 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
C#
Stelle
3.5k
Fork
925
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre lo staging su Windows 10 con LibGit2Sharp 0.26.0 e LibGit2Sharp.NativeBinaries 2.0.267 usando un repository che contiene un file denominato ".git" in una sottocartella. Confrontare il comportamento con Git for Windows, quindi tracciare il percorso di staging che produce l’eccezione "Invalid path". L’attività è completata quando il file può essere aggiunto allo staging senza un’eccezione oppure quando l’errore identifica chiaramente la causa.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp, git
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.