aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* 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>
* Add C D L and T links to index pageGravatar Lars 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 querystringsGravatar Lars 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 parameterGravatar Lars 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 diffstatGravatar Lars 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 parameterGravatar Lars 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 idGravatar Lars 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 parameterGravatar Lars 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 configfilesGravatar Lars Hjemli2007-05-16-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 MakefileGravatar Lars Hjemli2007-05-16-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/deleteGravatar Lars 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 scalingGravatar Lars 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.Gravatar 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 availableGravatar Lars 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 breakageGravatar Lars Hjemli2007-05-15-6/+5
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show tag heading even if first tag is of the lightweight kindGravatar Lars 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 declarationsGravatar Lars 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 filesGravatar Lars Hjemli2007-05-15-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 locationGravatar Lars Hjemli2007-05-15-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 breakageGravatar Lars Hjemli2007-05-15-7/+7
|
* cgit.css: try to make diffs look a little bit nicerGravatar Lars Hjemli2007-05-15-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 nicerGravatar Lars Hjemli2007-05-15-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>
* Add log filtering by path and link to it from tree viewGravatar Lars Hjemli2007-05-14-13/+37
| | | | | | | This enables path-filtering in log-view, and adds a link per entry in tree-view to show the log for each file/directory. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* cgit v0.4Gravatar Lars Hjemli2007-05-14-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add commitdiff between commit and each of it's parentGravatar Lars Hjemli2007-05-14-10/+63
| | | | | | | | | | A link is added next to each parent of a commit, leading to the new diff-functionality in ui-diff.c. Also added support for a path-parameter to filelevel diffs accessed via the diffstat. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add graphical diffstat to commit viewGravatar Lars Hjemli2007-05-14-33/+130
| | | | | | | | The diffstat is calculated against the leftmost parent of the commit. This gives nice information for "normal" merges while octopus merges are less than optimal, so the diffstat isn't calculated for those merges. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add max-commit-count parameter to cgitrcGravatar Lars Hjemli2007-05-14-2/+10
| | | | | | | | | This enabled customizing number of commits shown per page in log view. It also changes the default from 100 to 50, mainly due to the more cpu intensive log pages (number of files/lines changed) but also since 100 log messages requires excessive scrolling. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show number of changed lines in log viewGravatar Lars Hjemli2007-05-14-1/+11
| | | | | | | Use the new file-diff interface to calculate number of changed lines per commit. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Simplify ui-diff.c using the new file-level diff interfaceGravatar Lars Hjemli2007-05-13-86/+2
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add standard interface for file diff functionsGravatar Lars Hjemli2007-05-13-0/+86
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Show number of changed files in log viewGravatar Lars Hjemli2007-05-13-2/+15
| | | | | | | | | This uses the new tree-diff functions to calculate number of files changed per commit. Also fix some whitespace issues. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Use standard tree-diff function when showing diffstat for single commitGravatar Lars Hjemli2007-05-13-51/+15
| | | | | | | | | Remove unneeded code from ui-commit.c and replace with call to standard diff-functions. Also fix some whitespace issues. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add shared diff-handling functionsGravatar Lars Hjemli2007-05-13-2/+50
| | | | | | This adds a standard interface for tree diffing. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* css: fix bad rendering in Internet ExplorerGravatar Lars Hjemli2007-05-12-2/+7
| | | | | | | The layout-tables used border-collapse:separate, which maked all pages look really bad in IE. Fix it. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add links to enable downloading of tagged blobsGravatar Lars Hjemli2007-05-12-9/+85
| | | | | | | | | | | | 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>
* Makefile: add support for building w.o. preinstalled gitGravatar Lars Hjemli2007-05-12-1/+13
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Tag release v0.3Gravatar Lars Hjemli2007-05-11-1/+1
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Update README with submodule build infoGravatar Lars Hjemli2007-05-11-13/+39
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add submodule links in tree listingGravatar Lars Hjemli2007-05-11-12/+27
| | | | | | | | | When a submodule occurs in a tree, generate a link to show the module/commit. The link is specified as a sprintf string in /etc/cgitrc, using parameters 'module-link' and 'repo.module-link'. This should probably be extended with repo.module-link.$path. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add submodules.sh and use it during buildsGravatar Lars Hjemli2007-05-11-13/+222
| | | | | | | | | | | | This adds a shell script which can be be used to initialize, list and update submodules in a git repository. It reads the file .gitmodules to find a mapping between submodule path and repository url for the initial clone of all submodules. The script is used during cgit builds to enable automatic download and checkout of the git git repository. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Added git as a submoduleGravatar Lars Hjemli2007-05-11-1/+1
| | | | | | | | This commit adds the subdirectory 'git' as a submodule containing the git git repository, but doesn't add support for automatically cloning the submodule. Signed-off-by: Lars Hjemli <hjemli@gmail.com>
* Add support for downloading single blobsGravatar Lars Hjemli2007-05-09-3/+47
| | | | Signed-off-by: Lars Hjemli <hjemli@gmail.com>