libgit2 / libgit2/libgit2sharp
Commands.Move throwing LibGit2Sharp.AmbiguousSpecificationException when renaming a folder
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ả
Reproduction steps
Use the "Commands.Move" function to rename a folder in a git repository.
Expected behavior
Folder is renamed in the git repository
Actual behavior
Getting unhandled exception when running:
Commands.Move(repo, "existing_folder_name", "desired_folder_name");
Exception:
LibGit2Sharp.AmbiguousSpecificationException: 'More than one file matches the pathspec 'existing_foldere_name'. You can either force a literal path evaluation (GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH), or use git_status_foreach().'
Seems the problem is within the "Commands" class, function "BuildFrom", which calls "repository.RetrieveStatus(relativePath)".
Version of LibGit2Sharp (release number or SHA1)
0.26.2
Operating system(s) tested; .NET runtime tested
Windows 10
.NET Framework 4.6.1
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
Bắt đầu với Commands.Move và hàm BuildFrom của nó, sau đó kiểm tra lệnh gọi repository.RetrieveStatus(relativePath) được mô tả trong báo cáo. Tái hiện việc đổi tên thư mục bằng Commands.Move(repo, "existing_folder_name", "desired_folder_name") trên LibGit2Sharp 0.26.2. Hoàn tất khi thư mục được đổi tên mà không có AmbiguousSpecificationException.
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ó
- 3/5
- Thời gian dự kiến
- 1-2 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
- 45/100