gabrielcsapo / gabrielcsapo/node-git-server

`.git` suffix inconsistently enforced

Abierto
#101 2 comentarios 1 reacción 0 asignados Ver en GitHub
breaking enhancement help wanted
Lenguaje dominante
TypeScript
Estrellas
262
Forks
81
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.