ui-shared: remove toggle_ssdiff arg to cgit_commit_link()

This argument is never used with a value other than zero, so remove it
and simplify the code.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-shared: remove toggle_ssdiff arg to cgit_diff_link()

This argument is never used with a value other than zero, so remove it
and simplify the code.

Signed-off-by: John Keeping <john@keeping.me.uk>
Change "ss" diff flag to an enum

This will allow us to introduce a new "stat only" diff mode without
needing an explosion of mutually incompatible flags.

The old "ss" query parameter is still accepted in order to avoid
breaking saved links, but we no longer generate any URIs using it;
instead the new "dt" (diff type) parameter is used.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-diff: add "stat only" diff type

This prints the diffstat but stops before printing (or generating) any
of the body of the diff.

No cgitrc option is added here so that we can wait to see how useful
this is before letting people set it as the default.

Suggested-by: Konstantin Ryabitsev <mricon@kernel.org>
Signed-off-by: John Keeping <john@keeping.me.uk>
filter: fix libravatar email-filter https issue

Serving cgit via https and getting avatar via http gives error messages
about untrusted content. This decides whether or not to use https link
by looking at the environment variable HTTPS, which is set in CGI.
git: update to v2.2.1

Update to git version v2.2.1, including API changes.

Signed-off-by: Christian Hesse <mail@eworm.de>
Remove trailing slash after remove-suffix

When removing the ".git" suffix of a non-bare repository, also remove
the trailing slash for compatibility with cgit_repobasename().

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Extract clone URL printing to ui-shared.c

This will allow us to reuse the same logic to add clone URL <link/>
elements to the header of all repo-specific pages in order to support
the rel-vcs microformat.

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-summary: add "rel='vcs-git'" to clone URL links

This is described in the rel-vcs microformat[1].

[1] https://joeyh.name/rfc/rel-vcs/

Signed-off-by: John Keeping <john@keeping.me.uk>
ui-shared: add rel-vcs microformat links to HTML header

As described at https://joeyh.name/rfc/rel-vcs/.

Signed-off-by: John Keeping <john@keeping.me.uk>
repolist: add owner-filter

This allows custom links to be used for repository owners by
configuring a filter to be applied in the "Owner" column in the
repository list.
match other common markdown file extensions
git: use xz compressed archive for download
ui-shared: show absolute time in tooltip for relative dates

Signed-off-by: John Keeping <john@keeping.me.uk>
footer: link back to cgit home page

The footer has always been overrideable using the footer= in cgitrc, so
this won't anger anybody who cares about their footer.
Use split_ident_line() in parse_user()

Use Git's built-in ident line splitting algorithm instead of
reimplementing it. This does not only simplify the code but also makes
sure that cgit is consistent with Git when it comes to author parsing.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Revert "git: use xz compressed archive for download"

This reverts commit a87c9d8a9779eab0499efd3c44e090a28c7d1cdf.

We want to make OpenBSD people happy.