summaryrefslogtreecommitdiffstatshomepage
Commit message (Collapse)AuthorAgeLines
* Bad html: it's nice to add alt-attributesLars Hjemli2007-05-24-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Bad html: <form> should have an action-attributeLars 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> properlyLars Hjemli2007-05-24-1/+1
| | | | | | No reason to generate illegal html. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add repo.readme parameterLars Hjemli2007-05-23-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()Lars Hjemli2007-05-23-1/+0
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show time since last change on index pageLars Hjemli2007-05-22-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 pagesLars Hjemli2007-05-22-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() functionLars Hjemli2007-05-22-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 boldLars Hjemli2007-05-21-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make frontpage friendlierLars 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'Lars Hjemli2007-05-20-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 headersLars Hjemli2007-05-20-1/+1
| | | | | | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * Don't highlight repogroup headingsLars Hjemli2007-05-18-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 categoryLars Hjemli2007-05-18-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'Lars Hjemli2007-05-20-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-parameterLars Hjemli2007-05-18-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 buffersLars Hjemli2007-05-18-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 parameterLars Hjemli2007-05-18-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 commandsLars Hjemli2007-05-18-0/+24
| | | | | | | | | | | | | | | | | | This will be usefull when parsing url arguments. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| * | Move cgit_get_repoinfo into shared.cLars Hjemli2007-05-18-14/+14
| |/ | | | | | | | | | | This function will be usefull when parsing url arguments. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* | Merge branch 'index-header'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.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()Lars Hjemli2007-05-18-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.2Lars Hjemli2007-05-20-5/+3
|/ | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Remove unused extern declarations from cgit.hLars Hjemli2007-05-18-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 viewLars 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 pageLars 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 subprojectsLars 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 tableLars 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>
* Add C D L and T links to index pageLars Hjemli2007-05-16-1/+15
| | | | | | | | | These are of course Commit, Diff, Log and Tree pages, all accessed w.o. specifying refname or sha1. Sadly, the layout is neither pretty nor accessible. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Make git_pageurl handle NULL querystringsLars Hjemli2007-05-16-2/+6
| | | | | | This is suddenly useful after the repo.defbranch-related changes. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for tree listing via h parameterLars Hjemli2007-05-16-0/+10
| | | | | | This makes the tree page benefit from repo.defbranch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add link to commitdiff below diffstatLars Hjemli2007-05-16-2/+10
| | | | | | | This link is a lot easier to locate than the links to the right of the parent entries. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for commitdiff via h parameterLars Hjemli2007-05-16-7/+21
| | | | | | | | | The commitdiff will be generated against the first parent, and the diff page also gets the benefit of repo.defbranch. Cleaned up some bad whitespace in cgit.h while at it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Change commit-view to expect h parameter, not idLars Hjemli2007-05-16-10/+13
| | | | | | The change makes the commit-page benefit from repo.defbranch. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Enable default value for head parameterLars Hjemli2007-05-16-14/+7
| | | | | | | | | | | | | Pages which expect head to be specified in the querystring can now be given a default value, configurable per repository (via repo.defbranch, which defaults to "master"). Currently, only the log page actually works without parameters, but the defbranch is bound to be exploited. This also removes some dead code from shared.c Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Restrict deep nesting of configfilesLars Hjemli2007-05-15-4/+6
| | | | | | | | | | | | There is no point in restricting the number of included config- files, but there is a point in restricting the nestinglevel of configfiles: to avoid recursive inclusions. This is easily achieved by decrementing the static nesting-variable upon exit from cgit_read_config(). Also fix some whitespace breakage. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Include cgit.conf in MakefileLars Hjemli2007-05-15-0/+5
| | | | | | | | | This allows persistent overrides of Makefile settings without touching the Makefile. Suggested in a patch by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-diff: show /dev/null as filename for add/deleteLars Hjemli2007-05-15-1/+4
| | | | | | | The diff headers showed an invalid filename when a patch created or deleted a file. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use tables and css to create the diffstat graph, fix scalingLars Hjemli2007-05-15-15/+27
| | | | | | | | There was no need to use image-files for the graphs, so lets drop them. At the same time, fix scaling of the graphs so that the full width is used only if atleast 100 LOC are changed in one of the files. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Do not alter incoming sha1 when handling the download refs.Lars Hjemli2007-05-15-2/+5
| | | | | | | The code used to overwrite the const sha1 parameter just to avoid declaring an extra variable. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Don't hardcode urls when SCRIPT_NAME is availableLars Hjemli2007-05-15-4/+9
| | | | | | | Also, let the makefile define the name of the installed cgi and use that definition as a default value for cgit_script_name variable. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* ui-shared.c: fix whitespace breakageLars Hjemli2007-05-15-6/+5
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show tag heading even if first tag is of the lightweight kindLars Hjemli2007-05-15-13/+19
| | | | | | | | | 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>
* Specify static storage class for file-local declarationsLars Hjemli2007-05-15-11/+11
| | | | | | | | Also fix some whitespace issues while at it. Noticed by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add include-parameter to config filesLars Hjemli2007-05-14-8/+15
| | | | | | | | | This parameter can be used to include another config-file, like a standalone repository listing. Suggested in a patch by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Let makefile override the configfile locationLars Hjemli2007-05-14-5/+8
| | | | | | | | | | Pass CGIT_CONFIG from makefile during build, to enable stuff like make CGIT_CONFIG=/var/cgit/cgit.conf Noticed by Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* cgit.c: fix whitespace breakageLars Hjemli2007-05-14-7/+7
|
* cgit.css: try to make diffs look a little bit nicerLars Hjemli2007-05-14-13/+32
| | | | | | This makes the diffview look more like 'git-diff' in a terminal. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* cgit.css: try do make diffstat a little bit nicerLars Hjemli2007-05-14-4/+3
| | | | | | | I'm still no webdesigner, but this seems to be a more pleasant "visual experience". Signed-off-by: Lars Hjemli <hjemli@gmail.com>