cbdevnet/fugit

Leading '/' in reponame

Closed this issue · 0 comments

git supports ssh URLs in two forms:

  • ssh://[user@]host.xz/repo
  • [user@]host.xz:repo

Using the first form, the repo identifier contains a leading slash; using the second, it doesn't.
The slash in the ssh:// form is a necessary delimiter.

For compatibility this leads to the awkward form:
[user@]host.xz:/repo

It also means that confdir filenames always need to start with an underscore or won't support the ssh:// form.

Possible workarounds:

  • Create entries for both 'repo' and '/repo'
  • When using confdir, create a symlink

Both of those methods create administrative overhead.

My proposed solution is to always strip the leading slash. However, this would break existing configs.

Comments?