This fixes a bug in the prev/next links on the log page: when on the default
branch the links to prev/next page would contain h=(null).
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This adds a function to generate links to the commit page and extends said
page to use id from querystring as primary revision specified (fallback to
h).
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
The generic repolink function compared head with cgit_query_head, which
almost always would be the same pointer. The test now compares with
repo.defbranch, which is the wanted behavour.
Bug discovered while adding cgit_log_link(), so this commit also contain
that change.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This mirrors similiar functionality in gitweb. After clicking on
project on projectlist you will immediatelly see quick summary
of last N commits on HEAD.
[lh: changed from HEAD to cgit_query_head]
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This parameter can be used to specify a repo-specific includefile, which will
then be printed on the summary page for the repo.
If the parametervalue is a not an absolute path, it is taken to be relative
to repo.path.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This function can be used to print relative dates, just as in gitweb. Next
step will be to actually use the new function.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
The tag printing code waited for valid tags before printing the
table heading, but forgot to count unannotated tags. This fixes it.
Noticed by Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
All tags below refs/archives are shown on the repo summary page as
download links. The links referes to the tagged objects, using the
tag name as filename for download.
This can be used to add shortcuts for release tarballs, documentation
and other blobs stored in the object database, especially blobs that
are not reachable during cloning.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
There is nothing bad about a tag that has no tag-object, but the old code
didn't handle such tags correctly. Fix it.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
The parameter "max-message-length" can be specified in cgitrc, default value
is 60.
This affects the log message shown in repo summary and shortlog.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>