From c1f27ad0dadcab90939c157cd516a4204fd9919d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Mon, 21 Jun 2021 15:22:46 -0300 Subject: doc/git-permalink.*.1: Mark SUPPORTED REMOTES and OVERRIDES as .SS Make SUPPORTED REMOTES and OVERRIDES subsections (.SS) of a new parent section: CONFIGURATIONS. Also put SUPPORTED REMOTES before OVERRIDES on the order. --- doc/git-permalink.en.1 | 65 +++++++++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 32 deletions(-) (limited to 'doc/git-permalink.en.1') diff --git a/doc/git-permalink.en.1 b/doc/git-permalink.en.1 index 00108c3..53af5a1 100644 --- a/doc/git-permalink.en.1 +++ b/doc/git-permalink.en.1 @@ -34,39 +34,9 @@ Show show help text. Show version number. -.SH OVERRIDES +.SH CONFIGURATION -If you want to configure the permalink URL template for a project with an unsupported origin you can do so via \fBgit-config\fR(1). - -There are two configuration options available: - -.TP -\fBgit-permalink.template-file-commit\fR -An URL template where the name of the \fIfile\fR comes first, and the \fIcommit\fR comes second. -cgit uses this style of URL, with something like in: - -.nf - https://git.euandreh.xyz/fallible/tree/%s?id=%s -.fi - -On this example, the name of the \fIfile\fR comes first and \fIcommit\fR comes at the very end after "id=". - -.TP -\fBgit-permalink.template-commit-file\fR -An URL template where the \fIcommit\fR comes first, and the name of the \fIfile\fR comes second. -sourcehut uses this style of URL, with something like: - -.nf - https://git.sr.ht/~sircmpwn/scdoc/tree/%s/item/%s -.fi - -On this example, the \fIcommit\fR comes first on the URL path, and the \fIfile\fR name comes at the end. - -.P -If none of those values are found by \fBgit-config\fR(1) and \fBgit-permalink\fR can't guess the URL, it exits with an error. - - -.SH SUPPORTED REMOTES +.SS SUPPORTED REMOTES The current supported remotes are: @@ -101,6 +71,37 @@ See .UE for discussion and more information. +.SS OVERRIDES + +If you want to configure the permalink URL template for a project with an unsupported origin you can do so via \fBgit-config\fR(1). + +There are two configuration options available: + +.TP +\fBgit-permalink.template-file-commit\fR +An URL template where the name of the \fIfile\fR comes first, and the \fIcommit\fR comes second. +cgit uses this style of URL, with something like in: + +.nf + https://git.euandreh.xyz/fallible/tree/%s?id=%s +.fi + +On this example, the name of the \fIfile\fR comes first and \fIcommit\fR comes at the very end after "id=". + +.TP +\fBgit-permalink.template-commit-file\fR +An URL template where the \fIcommit\fR comes first, and the name of the \fIfile\fR comes second. +sourcehut uses this style of URL, with something like: + +.nf + https://git.sr.ht/~sircmpwn/scdoc/tree/%s/item/%s +.fi + +On this example, the \fIcommit\fR comes first on the URL path, and the \fIfile\fR name comes at the end. + +.P +If none of those values are found by \fBgit-config\fR(1) and \fBgit-permalink\fR can't guess the URL, it exits with an error. + .SH EXAMPLES -- cgit v1.2.3