cwd: git_root follows a symlink by name when git cannot run
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Đọc lua/claudecode/cwd.lua và chế độ không có Git trong tests/integration/cwd_path_characters_spec.lua. Trước tiên, kiểm tra cách quá trình duyệt dự phòng và simplify() xử lý symlink, sau đó so sánh kết quả với Git thực bằng cách dùng realpath ở cả hai phía. Hoàn tất khi các trường hợp link và link/.. khớp với Git trong lúc Git không khả dụng; issue cũng yêu cầu check.sh và --record cho verify-diff-lifecycle.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
cwd.git_root follows a symbolic link by its name when git cannot run, so it answers with the wrong repository.
Defect. The fallback walk in lua/claudecode/cwd.lua is lexical. For a start folder that is a link into another repository, it tests the link's own folder, then the folders above the link's name. It answers the repository of the link's parent, where git answers the repository of the link target. A .. after a link (X/lnk/..) is also resolved by name by simplify(), while git resolves it through the target.
Reproduction (on main, Neovim 0.12.3 and 0.8.0):
git init r1 && git init r2 && mkdir -p r1/sub r2/deep
ln -s "$PWD/r2/deep" r1/sub/lnk
require("claudecode.cwd").git_root("<R>/r1/sub/lnk") gives <R>/r2 with git and <R>/r1 with git off PATH.
Fix. Start the walk from vim.loop.fs_realpath(start_dir) (available in Neovim 0.8) and fall back to the lexical path when it returns nil. The answer is then the physical repository path, as git rev-parse --show-toplevel returns it. Add a link case and a link/.. case to the no-git mode of tests/integration/cwd_path_characters_spec.lua, compared against real git with realpath on both sides (macOS has /tmp as a link). Full check.sh and --record for verify-diff-lifecycle.
Owner: the next maintainer pass on cwd.lua, together with the worktree issue. Deferred from the README verification run with the maintainer's agreement.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
- Ngôn ngữ chính
- Lua
- Star
- 3.2k
- Fork
- 223
- Merge trung bình
- 6 giờ 7 phút
- Pull request đã merge (30 ngày)
- 210
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Không có 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.
Issue khác của coder/claudecode.nvim
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coder/claudecode.nvim#588 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
coder/claudecode.nvim#313 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
coder/claudecode.nvim#590 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 56/100
coder/claudecode.nvim#589 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
coder/claudecode.nvim#586 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của coder/claudecode.nvim
Issue tương tự
-
documentation night-shift
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nvim-telescope/telescope.nvim#3718 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
leatherworking is wrongĐang mởbug discord guide:leatherworking locale:enUS triage v0.3.6
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Seeking Caitlin (95737) should be a breadcrumb: still shown after the follow-up is completedĐang mởData Correction Forever
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày