Lars Hjemli [Sat, 27 Oct 2007 08:13:42 +0000 (10:13 +0200)]
Add support for config param summary-branches
This parameter can be used to specify max number of branches to show
on the summary page (if not all branches will be displayed, the "most
idle" branches are the ones to be pruned). The default value for this
parameter is 0, which disables the pruning.
Lars Hjemli [Wed, 24 Oct 2007 19:14:44 +0000 (21:14 +0200)]
Skip unknown header fields when parsing tags and commits
Both the commit- and tagparser failed to handle unexpected header fields.
This adds futureproofing by simply skipping any header we don't know/care
about.
Lars Hjemli [Wed, 19 Sep 2007 22:56:53 +0000 (00:56 +0200)]
Use trim_end() to remove trailing slashes
All urls and paths read from cgitrc needs to be 'normalized', i.e. get any
trailing slashes removed, and the trim_end() function works out nice for
this purpose.
Removing the trailing slashes also happens to fix the case where the virtual
root should be a single slash; that case used to require specifying the full
hostname (including the http:// prefix), but now it can simply be specified
as /.
Lars Hjemli [Wed, 19 Sep 2007 22:00:06 +0000 (00:00 +0200)]
ui-tree: show last line of blob
The last line in a blob was never printed by ui-tree::print_object(), which
was particularly annoying when the blob missed a final newline. This fixes
the issue.
Noticed-by: <mkraai@beckman.com> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli [Tue, 4 Sep 2007 09:04:47 +0000 (11:04 +0200)]
Set xdemitconf_t.findfunc=NULL
This function-pointer was introduced in git v1.5.3-rc0-42-gf258475. It
needs to have a value, and setting it to NULL triggers the old behaviour
for selecting hunk headers.
Lars Hjemli [Mon, 23 Jul 2007 20:51:45 +0000 (22:51 +0200)]
ui-snapshot: whitespace/formatting cleanup
Introduce a #define for number of snapshot archive entries, move all decls
to function entrypoint, remove some trailing whitespace and reformat a few
lines.
Lars Hjemli [Sun, 22 Jul 2007 21:57:48 +0000 (23:57 +0200)]
Merge branch 'master' of git://git.klever.net/patchwork/cgit
* 'master' of git://git.klever.net/patchwork/cgit:
link raw blob from tree file view
fix: changed view link to blob in summary.
allow selective enabling of snapshots
shorten snapshot names to repo basename
introduce cgit_repobasename
added snapshot filename to the link
add plain uncompressed tar snapshort format
introduced .tar.bz2 snapshots
compress .tar.gz using gzip as a filter
added a chk_non_negative check
css: adjust vertical-align of commit info th cells
add support for snapshot tarballs
Michael Krelin [Sat, 21 Jul 2007 00:05:34 +0000 (02:05 +0200)]
introduced .tar.bz2 snapshots
- reworked write_tar_gzip_archive to handle arbitrary filter as a
write_compressed_tar_archive
- reformatted whitespaces in the said function to adhere to common cgit
standards
- added wrappers around write_compressed_tar_archive for .tar.gz and .tar.bz2
- added a hint for vim to use 8 characters shift width by default
Michael Krelin [Wed, 18 Jul 2007 12:40:03 +0000 (14:40 +0200)]
add support for snapshot tarballs
- reworked cgit_print_snapshot to use a list of supported archivers and pick
one for the suffix supplied
- moved printing of snaphot links into ui-snapshot and make it iterate through
the said list
Lars Hjemli [Fri, 29 Jun 2007 18:32:08 +0000 (20:32 +0200)]
Merge branch 'lh/menu'
* lh/menu:
Add ofs argument to cgit_log_link and use it in ui-log.c
Add trim_end() and use it to remove trailing slashes from repo paths
Do not include current path in the "tree" menu link
Add setting to enable/disable extra links on index page
Change S/L/T to summary/log/tree
Change "files" to "tree"
Include querystring as part of cached filename for repo summary page
Add more menuitems on repo pages
Lars Hjemli [Tue, 26 Jun 2007 16:04:31 +0000 (18:04 +0200)]
Add trim_end() and use it to remove trailing slashes from repo paths
The new function removes all trailing instances of an arbitrary character
from a copy of the supplied char array. This is then used to remove any
trailing slashes from cgit_query_path.
Lars Hjemli [Tue, 26 Jun 2007 15:32:03 +0000 (17:32 +0200)]
Do not include current path in the "tree" menu link
When generating the menu links on repo pages the tree link included the
current path. This made the link pretty useless whenever the current path
was set so this commit just passes NULL instead.
Lars Hjemli [Mon, 18 Jun 2007 22:56:40 +0000 (00:56 +0200)]
Add setting to enable/disable extra links on index page
The summary/log/tree links displayed for each repository on the index
page lost some of their purpose when the header menu was added, so this
commit introduces the parameter 'enable-index-links' which must be set
to 1 to enable these links.
Suggested-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Lars Hjemli [Mon, 18 Jun 2007 19:17:24 +0000 (21:17 +0200)]
Include querystring as part of cached filename for repo summary page
When adding support for the h parameter to the summary page (passing current
branch between pages), the builtin cache returned basically random results
for summary page since the cached filename didn't honour the querystring.
This fixes the issue for now, but someday it might be worthwhile to generate
'canonical' filenames in the cache for all pages, i.e. something a bit more
clever than just including the querystring.
Lars Hjemli [Mon, 18 Jun 2007 07:42:10 +0000 (09:42 +0200)]
Add version info from git-describe
A new script, gen-version.sh, is now invoked from 'make version' to generate
the file VERSION. This file contains a version identifier generated by
git-describe and is included in the Makefile.
Lars Hjemli [Sun, 17 Jun 2007 22:18:42 +0000 (00:18 +0200)]
Add more menuitems on repo pages
In an attempt to get better usability, a set of 'semistatic' menuitems
are added to the page header on all pages except the repository index.
The menuitems (summary, log, files, commit and diff) honours the current
branch and revision. To switch the current branch one can use the branch
links on the summary page.
The backlink to the repository index page is now available by clicking
the static page heading.
Lars Hjemli [Sun, 17 Jun 2007 16:12:03 +0000 (18:12 +0200)]
Add cgit_diff_link()
This adds a new function used to generate links to the diff page and uses
it everywhere such links appear (expect for single files in the diffstat
displayed on the commit page: this is now a link to the tree page).
The updated diff-page now expects zero, one or two revision specifiers, in
parameters head, id and id2. Id defaults to head unless otherwise specified,
while head (as usual) defaults to repo.defbranch. If id2 isn't specified, it
defaults to the first parent of id1.
The most important change is of course that now all repo pages (summary, log,
tree, commit and diff) has support for passing on the current branch and
revision, i.e. the road is now open for a 'static' menu with links to all
of these pages.
Lars Hjemli [Sun, 17 Jun 2007 13:44:22 +0000 (15:44 +0200)]
ui-commit: use cgit_commit_link() for parent links
This replaces the old cgit_pageurl() function with the brand new
cgit_commit_link() function, making parent links in commit view preserve
the current branch.
Lars Hjemli [Sun, 17 Jun 2007 12:58:45 +0000 (14:58 +0200)]
ui-log: honor id=sha1 on querystring
This teaches ui-log to prefer id=sha1 and fallback to h=rev if no id-
parameter is specified. With this change, summary, log, commit and tree
views now passes current branch using h parameter and current revision
using id parameter.
Lars Hjemli [Sun, 17 Jun 2007 12:53:02 +0000 (14:53 +0200)]
Add cgit_commit_link() + support for id=sha1 to commit view
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).
Lars Hjemli [Sun, 17 Jun 2007 11:57:51 +0000 (13:57 +0200)]
Add git_log_link() and fix bug in generic repolink function
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.
Lars Hjemli [Sun, 17 Jun 2007 11:17:00 +0000 (13:17 +0200)]
ui-tree: html/css cleanup
Various fixes to make html and css more "clean". The only visible change
is the link to file/directory log: it is now printed as "L" (for Log)
instead of "H" (for History).
Lars Hjemli [Sat, 16 Jun 2007 18:20:42 +0000 (20:20 +0200)]
ui-tree: unify with ui-view, use path to select tree/blob
This teaches ui-tree to show both trees and blobs, thereby making ui-view
superfluous. At the same time, ui-tree is extended to honour the specified
path instead of requiering a tree/blob sha1.
Lars Hjemli [Wed, 6 Jun 2007 21:02:40 +0000 (23:02 +0200)]
ui-diff: close td/tr/table properly
The previous commit fixed the diff-view when two trees where specified on
the querystring (sha1/sha2) but made the generated html invalid when only
a commit sha1 is specified. This fixes it.
Ondrej Jirman [Sat, 26 May 2007 01:33:41 +0000 (03:33 +0200)]
Implemented configurable HEAD shortlog on summary page.
This mirrors similiar functionality in gitweb. After clicking on
project on projectlist you will immediatelly see quick summary
of last N commits on HEAD.