libgit2 / libgit2/libgit2sharp

Working Directory for a branch seems to be incorrect.

オープン
#1,972 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

説明

I think there is an error in the Working Directory for a branch, particularly if a branch is associated with a WorkTree.

It always shows the same path as the Repository. However if a branch is associated with a work tree, it's working directory is probably not the same as the repository.

  1. Create a work tree and an associated branch.
  2. Create the Repository in code (pointing to the Repositories path).
  3. Examine all the branches by iterating through Repos.Branches.
  4. The working directory of the new branch is pointing to the working directory of the Repository, not the path to the work tree.
Version of LibGit2Sharp (release number or SHA1)
<PackageReference Include="LibGit2Sharp" Version="0.26.2" />
Operating system(s) tested; .NET runtime tested

VS 2022, Win 11
net6.0-windows10.0.19041.0

I know how to get the correct path if you think it is a bug.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ソースファイルもテストも指定されていません。まず、記載された work-tree のシナリオを再現し、次に Repos.Branches と branch の Working Directory の値を追跡して、Repository のパスと比較してください。work tree に関連付けられた branch が Repository のパスではなく、その work tree のパスを報告し、プロジェクトに適用可能なテスト場所がある場合は回帰テストによるカバレッジも追加されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, git
領域
devtools
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
38/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。