aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Add more menuitems on repo pagesGravatar Lars Hjemli2007-06-18-16/+49
| | | | | | | | | | | | | | 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. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_diff_link()Gravatar Lars Hjemli2007-06-18-69/+75
| | | | | | | | | | | | | | | | | | 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. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-commit: use cgit_commit_link() for parent linksGravatar Lars Hjemli2007-06-17-6/+4
| | | | | | | | 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. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-log: honor id=sha1 on querystringGravatar Lars Hjemli2007-06-17-1/+4
| | | | | | | | | 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. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_commit_link() + support for id=sha1 to commit viewGravatar Lars Hjemli2007-06-17-18/+31
| | | | | | | | 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>
* Add git_log_link() and fix bug in generic repolink functionGravatar Lars Hjemli2007-06-17-20/+24
| | | | | | | | | | | 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>
* ui-tree: html/css cleanupGravatar Lars Hjemli2007-06-17-23/+12
| | | | | | | | 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). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-shared: use strcmp() to compare stringsGravatar Lars Hjemli2007-06-17-2/+2
| | | | | | | Somehow a couple of pointer comparisions crept into the new repolink() and cgit_tree_link() functions. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add and use cgit_tree_link()Gravatar Lars Hjemli2007-06-17-38/+107
| | | | | | | This creates a new function used to generate links to 'tree' page and uses the function everywhere a link to the 'tree' page is generated. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: make blob viewer generate valid htmlGravatar Lars Hjemli2007-06-17-1/+0
| | | | | | | A leftover '</td></tr>' made ui-tree generate invalid html for blob content. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-tree: unify with ui-view, use path to select tree/blobGravatar Lars Hjemli2007-06-17-112/+174
| | | | | | 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.
* cgit.css: make it validateGravatar Lars Hjemli2007-06-07-8/+7
| | | | | | This fixes a few validation-issues in the css. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-diff: close td/tr/table properlyGravatar Lars Hjemli2007-06-07-0/+2
| | | | | | | | 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. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-diff: emit table/tr/td at better locationsGravatar Lars Hjemli2007-06-05-9/+7
| | | | | | | | | | This fixes a bug which made the diff-link for each parent of a commit output a diff without correct styles. It also adds an error-message if the head commit specified on the querystring isn't a valid commit object. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Implemented configurable HEAD shortlog on summary page.Gravatar Ondrej Jirman2007-05-31-1/+16
| | | | | | | | | | 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>
* Check for NULL commit buffer in cgit_parse_commit()Gravatar Ondrej Jirman2007-05-31-0/+3
| | | | | | This can be NULL, so try not to segfault. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add option to disable pager to cgit_print_log().Gravatar Ondrej Jirman2007-05-31-17/+19
| | | | | | | This is needed for upcomming shortlog on summary page patch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Handle single-line and empty commit subjectsGravatar Ondrej Jirman2007-05-31-3/+8
| | | | | | | | | | If commit object ends with \0 after subject line, then info->subject was not set. This commit fixes this and also sets subject to ** empty ** if it would otherwise be empty, so that there is something to click on. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use &amp; instead of & in URLs.Gravatar Ondrej Jirman2007-05-31-13/+13
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Fixed unexpected tags in html output.Gravatar Ondrej Jirman2007-05-31-6/+7
| | | | | | At least those that were catched by tidy. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* cgit v0.5Gravatar Lars Hjemli2007-05-24-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Bad html: it's nice to add alt-attributesGravatar Lars Hjemli2007-05-24-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Bad html: <form> should have an action-attributeGravatar Lars Hjemli2007-05-24-1/+1
| | | | | | Don't know how the href-attribute got in there... Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Close a <tr> properlyGravatar Lars Hjemli2007-05-24-1/+1
| | | | | | No reason to generate illegal html. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add repo.readme parameterGravatar Lars Hjemli2007-05-24-15/+23
| | | | | | | | | | 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>
* Remove unused variable from ui-repolist.c:read_agefile()Gravatar Lars Hjemli2007-05-24-1/+0
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show time since last change on index pageGravatar Lars Hjemli2007-05-23-1/+43
| | | | | | | | | | | | | | | | | | | | When creating the index page, an optional file can be scanned per repository to obtain a timestamp for last modification within the repo. If such a file cannot be found, st_mtime for repo.defbranch is used instead. This information is then printed in a new column, "Idle", using the new function cgit_print_age(). The new parameter "repo.agefile" can be used to specify (globally) a relative path to scan (default value is "info/web/last-modified"). The content of the "last-modified" file can be generated by the post-receive hook with a command like this: git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ --count=1 > $GIT_DIR/info/web/last-modified Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use cgit_print_age() on summary and log pagesGravatar Lars Hjemli2007-05-23-10/+6
| | | | | | Update the pages to show relative dates instead of yyyy-mm-dd hh:mm:ss Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add cgit_print_age() functionGravatar Lars Hjemli2007-05-23-8/+94
| | | | | | | 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>
* css: make column headings boldGravatar Lars Hjemli2007-05-21-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make frontpage friendlierGravatar Lars Hjemli2007-05-21-15/+43
| | | | | | | This is an attempt to make the index page more usable by changing how repo groups and repo links are displayed. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Merge branch 'repogroups'Gravatar Lars Hjemli2007-05-21-0/+21
|\ | | | | | | | | | | | | * repogroups: Adjust apperance of repogroup headers Don't highlight repogroup headings Teach cgit how to group repositories by category
| * Adjust apperance of repogroup headersGravatar Lars Hjemli2007-05-21-1/+1
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * Don't highlight repogroup headingsGravatar Lars Hjemli2007-05-19-1/+1
| | | | | | | | | | | | Specify class='nohover' to avoid highlighting this row. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * Teach cgit how to group repositories by categoryGravatar Lars Hjemli2007-05-19-0/+21
| | | | | | | | | | | | | | | | | | The new parameter 'repo.group' is used to set the repository group for the following repositores. Whenever this parameter changes value, a subheading is generated in the index page (printing the current value of repo.group). Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Merge branch 'virtual-url'Gravatar Lars Hjemli2007-05-21-51/+139
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * virtual-url: Don't be fooled by trailing '/' in url-parameter cache_safe_filename() needs more buffers Enable url=value querystring parameter Add lookup-function for valid repo commands Move cgit_get_repoinfo into shared.c
| * | Don't be fooled by trailing '/' in url-parameterGravatar Lars Hjemli2007-05-19-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | cgit_parse_url() didn't check if the path-part of urls contained a real path or just a trailing slash. This made the log-page die since the path filtering supplied an invalid path argument. This fixes it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * | cache_safe_filename() needs more buffersGravatar Lars Hjemli2007-05-19-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | The single static buffer makes it impossible to use the result of two different calls to this function simultaneously. Fix it by using 4 buffers. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * | Enable url=value querystring parameterGravatar Lars Hjemli2007-05-19-40/+98
| | | | | | | | | | | | | | | | | | | | | This makes is possible to use repo-urls like '/pub/scm/git/git.git' and even add path specifications, like '/pub/scm/git/git.git/log/documentation'. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * | Add lookup-function for valid repo commandsGravatar Lars Hjemli2007-05-19-0/+24
| | | | | | | | | | | | | | | | | | This will be usefull when parsing url arguments. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * | Move cgit_get_repoinfo into shared.cGravatar Lars Hjemli2007-05-19-14/+14
| |/ | | | | | | | | | | This function will be usefull when parsing url arguments. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Merge branch 'index-header'Gravatar Lars Hjemli2007-05-20-0/+24
|\ \ | | | | | | | | | | | | | | | * index-header: Teach cgit howto include an external file on index page. Add html_include()
| * | Teach cgit howto include an external file on index page.Gravatar Lars Hjemli2007-05-19-0/+9
| | | | | | | | | | | | | | | | | | | | | The new parameter index-header can be used to name an external file which will be included verbatim at the top of the index page. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * | Add html_include()Gravatar Lars Hjemli2007-05-19-0/+15
| |/ | | | | | | | | | | | | This is a function used to include external htmlfiles in cgit- generated pages. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Use git-1.5.2Gravatar Lars Hjemli2007-05-20-5/+3
|/ | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Remove unused extern declarations from cgit.hGravatar Lars Hjemli2007-05-19-4/+0
| | | | | | Some unused declarations from the early days of cgit are removed. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add knobs to enable/disable files/lines changed in log viewGravatar Lars Hjemli2007-05-18-13/+48
| | | | | | | | | | | These columns can cause lots of IO on the server, so add settings to explicitly enable them. Also, add per repo settings to optionally disable the columns if sitewide enabled. While at it, do not allow repo.snapshot to enable snapshots if the global setting is disabled. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Restrict length of repo description on repolist pageGravatar Lars Hjemli2007-05-16-1/+9
| | | | | | | | | | If any repo has a very long description, all repos suffer since the repo-links in the right-most column gets pushed out of sight. Fix it by introducing max-repodesc-length parameter in cgitrc, and default to 60 chars. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Don't die when diffing trees with subprojectsGravatar Lars Hjemli2007-05-16-19/+43
| | | | | | | | | The subprojects needs special handling, since they refer to objects which normally won't exist in the refering repository. Fix some extended header bugs and missing features while at it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Do not wrap filemode column in diffstat tableGravatar Lars Hjemli2007-05-16-0/+4
| | | | | | | The diffstat looks rather ugly when the filemode is wrapped to one char per line, so lets force it to not wrap. Signed-off-by: Lars Hjemli <hjemli@gmail.com>