libgit2 / libgit2/libgit2sharp
Checkout with modified but not dirty submodules
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 3.5k
- Fork
- 925
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Không có tệp nguồn hoặc bài kiểm thử nào được nêu. Hãy bắt đầu bằng cách tái hiện hành vi checkout với một submodule có index pointer khác biệt và một submodule có nội dung dirty, sau đó lần theo việc xử lý lỗi checkout của libgit2sharp. Hoàn thành có nghĩa là các thay đổi chỉ ở pointer không yêu cầu force, trong khi các submodule dirty vẫn được bảo vệ và các lỗi bên dưới của chúng được giữ nguyên.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, git
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100