libgit2 / libgit2/libgit2sharp
Worktrees.Add throws an exception if a slash is in the branch name
オープン
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Reproduction steps
have a repository with the branches
- main [default]
- feature/branch-name
Clone the repository and add the worktree.
SourceCode:
var cloneOptions = new CloneOptions()
{
CredentialsProvider = (_url, _user, _cred) => this.Credentials,
Checkout = true,
RecurseSubmodules = true,
};
this.gitRepositoryPath = Repository.Clone(this.SourceUrl, this.WorkdirPath, cloneOptions);
using (var repo = new Repository(this.gitRepositoryPath))
{
var path = Path.Combine(this.WorkdirPath, "..", this.Branch);
repo.Worktrees.Add(this.Branch, path, false);
}
Expected behavior
Worktree should be created
Actual behavior
Exception is thrown:
failed to make directory 'xxx/.git/worktrees/feature/branch-name': The system cannot find the path specified.
Version of LibGit2Sharp (release number or SHA1)
0,26, 0.27.0-preview-0182
Operating system(s) tested; .NET runtime tested
Windows 10, Windows Server 2016, .Net Framework 4.8
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Worktrees.Add エントリポイントから開始し、Windows 上で issue に記載されている feature/branch-name ブランチを使って失敗を再現します。worktree ディレクトリの作成を追跡し、スラッシュを含むブランチの追加が報告された例外なしで完了することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- devtools, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 40/100