gabrielcsapo / gabrielcsapo/node-git-server
`.git` suffix inconsistently enforced
- Ngôn ngữ chính
- TypeScript
- Star
- 262
- Fork
- 81
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
When creating a new repo, a `.git` suffix is appended here: https://github.com/gabrielcsapo/node-git-server/blob/e25c481b85f8b929146b4ea46227d0b6fd83caf4/src/git.ts#L288 and it appears to be enforced in `list`, but not everywhere
However the `.git` suffix is not a requirement anywhere else - this server is perfectly happy serving git repositories without a `.git` suffix afaict... https://github.com/gabrielcsapo/node-git-server/blob/e25c481b85f8b929146b4ea46227d0b6fd83caf4/src/util.ts#L150
This inconsistency has tripped me up a bit. I would personally be in favour of enforcing a .git suffix everywhere - possibly by redirecting to `.git` suffixed URL if a non-git suffixed URL is encountered.
This is inconsistent with bare/checked-out repo conventions though... which might suggest to enforce `.git` only if `checkout` is `false`...
I think for us we're going to enforce and stick to the suffix externally for the meantime - but it'd be good to gather opinions of other maintainers/users.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với logic tạo repository trong src/git.ts tại dòng 288 và hành vi của danh sách, sau đó so sánh chúng với src/util.ts tại dòng 150. Xem xét cách các repository bare và repository đã checkout thường được định địa chỉ, đồng thời xác định liệu việc xử lý hậu tố có nên nhất quán hay phụ thuộc vào checkout; công việc được coi là hoàn tất khi có chính sách đã được thống nhất và hành vi tương ứng trên tất cả các route của repository.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, node.js, typescript
- Lĩnh vực
- api, backend
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100