gabrielcsapo / gabrielcsapo/node-git-server

`.git` suffix inconsistently enforced

オープン
#101 コメント 2 件 リアクション 1 件 担当者 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。