libgit2 / libgit2/libgit2sharp
Checkout with modified but not dirty submodules
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Version : vNext & master
Native : 1.0.72 - git2-4d6362b
There are two types of modified submodules, one that shows as modified due to a index pointer(SHA) mismatch, and one due to the submodule's content actually being changed/modified. Git knows the different and does not require a 'checkout -force'. or a 'git submodule update' on each submodule before doing a checkout, but libgit2sharp/libgit2 does require the checkout to be forced.
Is this the intended/designed result with modified/index and modified/dirty submodules? Or a bug?
It is a thrown exception from libgit2, so I coded around it with a exception bound helper extension to determine if the errors are related to submodules and to go determine if just the index changed and thus it is safe to flip the force option on or if the submodules are dirty and what are the 'real' exceptions within each submodule and throw those. It just seems like this should be one in one the libraries like it is within git (IMHO)...
This will not be a forced git checkout:
diff --git a/external/cecil b/external/cecil
index 33d50b8..fc76b93 160000
--- a/external/cecil
+++ b/external/cecil
@@ -1 +1 @@
-Subproject commit 33d50b874fd527118bc361d83de3d494e8bb55e1
+Subproject commit fc76b93e3e0064b2d751796878f9cbe88df1d5f4
This would be a forced git checkout:
diff --git a/external/rx b/external/rx
index b29a4b0..17e8477 160000
--- a/external/rx
+++ b/external/rx
@@ -1 +1 @@
-Subproject commit b29a4b0fda609e0af33ff54ed13652b6ccf0e05e
-Subproject commit b29a4b0fda609e0af33ff54ed13652b6ccf0e05e-dirty
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ソースファイルもテストも指定されていません。まず、index pointer が異なる submodule と、内容が dirty な submodule を使って checkout の動作を再現し、次に libgit2sharp の checkout エラー処理を追跡します。完了の条件は、pointer のみの変更では force を必要とせず、一方で dirty な submodule は引き続き保護され、基になるエラーが保持されることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100