gabrielcsapo / gabrielcsapo/node-git-server

`.git` suffix inconsistently enforced

未关闭
#101 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
breaking enhancement help wanted
主要语言
TypeScript
星标
262
派生
81
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 src/git.ts 第 288 行的仓库创建逻辑和列表行为开始,然后将它们与 src/util.ts 第 150 行进行比较。检查 bare 仓库和已 checkout 的仓库通常如何寻址,并确定后缀处理应保持一致,还是应取决于 checkout;完成的标准是制定出一致同意的策略,并在所有仓库路由中实现匹配的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, node.js, typescript
领域
api, backend
Issue 类型
缺陷
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。