Update 'pages/user-repos.md' #3

Closed
login wants to merge 1 commits from master into master
First-time contributor

The repo name doesn't have to have a ".git" on the end, and the ".git" is visible in the URL.

The repo name doesn't have to have a ".git" on the end, and the ".git" is visible in the URL.
Owner

Using foo.git as the repo's directory is the usual naming convention for bare repos. However, cgit does not include .git in the URL for repos. All of the repos I control on git.tilde.institute (gbmor/, tilde/) use this naming structure, but .git is omitted by cgit from the HTTP path.

The only way I can think of .git being visible is if the foo.git folder was not a repo but contained a repo, bar.git such that the structure is:

public_repos/foo.git/bar.git

In which case foo.git would not be interpreted as a bare repo but as an intentionally named parent directory and namespaced accordingly by cgit as:

$USER
  foo.git/bar
Using `foo.git` as the repo's directory is the usual naming convention for bare repos. However, cgit does not include `.git` in the URL for repos. All of the repos I control on git.tilde.institute (gbmor/, tilde/) use this naming structure, but `.git` is omitted by cgit from the HTTP path. The only way I can think of `.git` being visible is if the `foo.git` folder was not a repo but contained a repo, `bar.git` such that the structure is: `public_repos/foo.git/bar.git` In which case `foo.git` would not be interpreted as a bare repo but as an intentionally named parent directory and namespaced accordingly by `cgit` as: ``` $USER foo.git/bar ```
Author
First-time contributor

Then why does https://git.tilde.institute/login/tcoin/ work while the folder naming structure I have used is tcoin and not tcoin.git? I cloned the repo from Github.

Then why does https://git.tilde.institute/login/tcoin/ work while the folder naming structure I have used is `tcoin` and not `tcoin.git`? I cloned the repo from Github.
login closed this pull request 2020-07-11 06:56:08 +00:00
login reopened this pull request 2020-07-11 06:56:35 +00:00
login closed this pull request 2020-07-11 07:00:19 +00:00
Owner

It's still smart enough to be able to tell it's a repo even though it's not a bare repo, but calling the parent folder tcoin.git while it's not a bare repo will make cgit think the repo's name is tcoin.git.

In this case, the guide refers to using bare repos and instructs the reader to add the location as a remote, then push to it, rather than interact with it directly.

It's still smart enough to be able to tell it's a repo even though it's not a bare repo, but calling the parent folder `tcoin.git` while it's not a bare repo will make `cgit` think the repo's name is `tcoin.git`. In this case, the guide refers to using bare repos and instructs the reader to add the location as a remote, then push to it, rather than interact with it directly.

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: institute/wiki#3
No description provided.