aboutsummaryrefslogtreecommitdiff
path: root/gitweb
Commit message (Collapse)AuthorAge
* Merge branch 'lt/web'Junio C Hamano2006-07-30
|\ | | | | | | | | | | | | | | * lt/web: gitweb.cgi: git_blame2: slight optimization reading the blame lines gitweb.cgi: git_blame2: Revision blocks now have alternating colors gitweb.cgi: git_blame2: Allow back-trekking through commits gitweb.cgi: git_blame2: an alternative simple working git blame
| * gitweb.cgi: git_blame2: slight optimization reading the blame linesLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | Eliminate git_read_blame_line() -- move that code inline and optimize it. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: git_blame2: Revision blocks now have alternating colorsLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A revision block is the largest number of adjacent lines of code originating from the same revision. This patch adds color to git_blame2(), in that no two adjacent revision blocks have the same color. The color alternates between light and dark. As we annotate the code lines, we alternate the color (light, dark) of code lines _per revision_. This makes it easier to see line conglomerations per revision. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: git_blame2: Allow back-trekking through commitsLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | This patch adds the capability of back-trekking through commits from git_blame2() as follows: blame2->commit->blame2->commit->blame2->...->initial commit. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: git_blame2: an alternative simple working git blameLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an alternative simple working git-blame called git_blame2(). Simple, because it displays just three columns: the commit, the line number and the line of code. Alternative, because the original git_blame() is left untouched. Lines of code are printed html escaped, but as-is. git_blame2() uses git-blame as opposed to git-annotate used by git_blame(). Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | Merge branch 'lt/web'Junio C Hamano2006-07-28
|\ \ | |/
| * gitweb.cgi: Centralize printing of the page pathLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | Centralize printing of the page path so that if the entity is a blob, we can set the page path to be the link to the HEAD revision of the "raw" blob. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: Show "raw" head of project link even when $hash is not definedLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | Some callers of git_history() do not set $hash of $file_name. Add code to find it, if it is not defined. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: Include direct link to "raw" files from "history"Luben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | | | | | | | In "history" view, the "page_path" is now also a URL link to the "raw" format of the file, which will always give you the latest version in the repository. This is helpful for externally linking files, such that the latest version is always referenced and in "raw" format. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * gitweb.cgi: Teach git_history() to read hash from $hash_baseLuben Tuikov2006-07-24
| | | | | | | | | | | | | | | | | | Teach git_history() to take its hash argument from the hb parameter, i.e. from $hash_base. Also change all "a=history" actions to pass "hb=" instead of "h=". Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: fix two warningsJohannes Schindelin2006-07-26
| | | | | | | | | | | | | | These warnings cluttered up my log. Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: escape tag commentsDaniel Drake2006-07-25
|/ | | | | | | | I have a tag with a comment which includes an & character. Firefox wouldn't display my gitweb summary page due to malformed XML. This solves the problem. Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb.css: Use monospace fonts for commits and tree-diff.Luben Tuikov2006-07-13
| | | | | | | | Use monospace fonts for the commit header, commit message, and tree-diff. This helps viewing commit logs with ASCII art. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Make command invocations go through the git wrapperAlp Toker2006-07-12
| | | | | | | | | This patch makes invocations of core git commands go through the 'git' binary itself, which improves readability and might help system administrators lock down their CGI environment for security. Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Include a site name in page titlesAlp Toker2006-07-11
| | | | | | | | | | This helps users tell one 'git' bookmark apart from the other in their browser and improves the indexing of gitweb sites in Web search engines. The title defaults to the SERVER_NAME environment variable, often given by the webserver. Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Send XHTML as 'application/xhtml+xml' where possibleAlp Toker2006-07-11
| | | | | | | | | | | | | | | | | "The 'text/html' media type [RFC2854] is primarily for HTML, not for XHTML. In general, this media type is NOT suitable for XHTML." This patch makes gitweb use content negotiation to conservatively send pages as Content-Type 'application/xhtml+xml' when the user agent explicitly claims to support it. It falls back to 'text/html' even if the user agent appears to implicitly support 'application/xhtml+xml' due to a '*/*' glob, working around an insidious bug in Internet Explorer where sending the correct media type prevents the page from being displayed. Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb.cgi: Teach "a=blob" action to know the blob/file mime typeLuben Tuikov2006-07-10
| | | | | | | | | | | | Now action "blob" knows the file type: if the file type is not "text/*" then action "blob" defaults to "blob_plain", i.e. the file is downloaded raw for the browser to interpret. If the file type is "text/*", then "blob" defaults to the current "cat -n"-like output, from which you can click "plain", to get the "blob_plain" output. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb.cgi: Create $git_temp if it doesn't existLuben Tuikov2006-07-10
| | | | | | | | | Unless we'd done diffs, $git_temp doesn't exist and then mime lookups fail. Explicitly create it, if it doesn't exist already. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add "raw" output option to blobs in "tree" view formatLuben Tuikov2006-07-09
| | | | | | | | | | | | | | | | | | Add a "raw" output option to blobs in "tree" view format, so that the user doesn't have to click on "blob", wait for the (binary) file to be uploaded and shown in "blob" mode, and then click on "plain" to download the (binary) file. This is useful when the file is clearly binary and we don't want the browser to upload and display it in "blob" mode, but we just want to download it. Case in point: pdf files, wlg. Note: the "raw" format is equivalent to the blob->plain view, not blob->head view. I.e. the view has the hash of the file as listed by git-ls-tree, not just "HEAD". Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Declare global variables with "our"Dennis Stosberg2006-07-01
| | | | | | | Variables declared with "my" in the file scope cannot be accessed from subroutines with mod_perl. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Enable tree (directory) history displayLuben Tuikov2006-07-01
| | | | | | | | | | | This patch allows history display of whole trees/directories a la "git-rev-list HEAD -- <dir or file>". I find this useful especially when a project lives in its own subdirectory, as opposed to being all of the GIT repository (i.e. when a sub-project is merged into a super-project). Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: optimize per-file history generationJunio C Hamano2006-07-01
| | | | | | | | | | | | | The rev-list command that is recent enough can filter commits based on paths they touch, so use it instead of generating the full list and limiting it by passing it with diff-tree --stdin. [jc: The patch originally came from Luben Tuikov but the it was corrupt, but it was short enough to be applied by hand. I added the --full-history to make the output compatible with the original while doing so.] Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: whitespace cleanup around '='Jakub Narebski2006-06-22
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Use $hash_base as $search_hash if possibleTimo Hirvonen2006-06-22
| | | | | | | | $hash (h parameter) does not always point to a commit. Use $hash_base as $search_hash when it is defined. Signed-off-by: Timo Hirvonen <tihirvon@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Make use of $PATH_INFO for project parameterJakub Narebski2006-06-21
| | | | | | | | | | | | | | | Allow to have project name in the path part of URL, just after the name of script. For example instead of gitweb.cgi?p=git.git you can write gitweb.cgi/git.git or gitweb.cgi/git.git/ Not used in URLs inside gitweb; it means that the above alternate syntax must be generated by hand, at least for now. Side effect: project name parameter is now stripped of leading and trailing slash before validation. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Move $gitbin earlier in gitweb.cgiJakub Narebski2006-06-21
| | | | | | | (cherry picked from 9dca843086356b964f27d8fabe1e3c48074a9f02 commit) Signed-off-by: Jakub Narebski <jnareb.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add git version to gitweb outputJakub Narebski2006-06-21
| | | | | | | | Add git-core binaries used version as the comment at the beginning of HTML output, just below the comment with version of git web interface version. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: whitespace cleanupJakub Narebski2006-06-21
| | | | | | | | | Do not use tabs to align variable initialization (actually use tabs only at the beginning of line, for code indent). Remove trailing whitespace. Make whitespace usage more consistent. Signed-off-by: Jakub Narebski <jnareb.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: style done with stylesheetJakub Narebski2006-06-20
| | | | | | | | Replace (almost) all 'style' attributes with 'class' attribute and adding rule to CSS file. Some tables use CSS for styling instead of legacy styling attributes. [jc: too many rejects -- hand fixed and reindented]
* gitweb: A couple of page title tweakingJakub Narebski2006-06-20
| | | | | [jc: the e-mailed patch did not apply, so I had to guess but I think I got the result right.]
* Fix: Support for the standard mime.types map in gitwebJakub Narebski2006-06-20
| | | | | | Temporary fix: commented out offending line in mimetype_guess. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: add type="text/css" to stylesheet linkJakub Narebski2006-06-19
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Make CSS file gitweb/gitweb.css more readableJakub Narebski2006-06-19
| | | | | | | | | | | | Taken from git://git.xmms.se/xmms2/gitweb-xmms2.git commit 561262030d58a6325f500b36d836dbe02a5abc68 "Make CSS readable" by Daniel Svensson, with extra parts removed and consistent whitespace usage. [jc: tabified the results to cleaning things up, and removed an added item that was commented out. ] Signed-off-by: Junio C Hamano <junkio@cox.net>
* Fix gitweb stylesheetJakub Narebski2006-06-18
| | | | | | | An earlier commit forgot to move some piece from the CGI script to the external stylesheet. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Support for the standard mime.types map in gitwebPetr Baudis2006-06-18
| | | | | | | | gitweb will try to look up the filename mimetype in /etc/mime.types and optionally a user-configured mime.types map as well. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: text files for 'blob_plain' action without charset by defaultJakub Narebski2006-06-18
| | | | | | | | $default_text_plain_charset is undefined (no specified charset) by default. Additionally ':raw' layer for binmode is used for outputting file content. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: safely output binary files for 'blob_plain' actionJakub Narebski2006-06-18
| | | | | | | | | | | | | | | gitweb tries now to output correct Content-Type header for 'blob_plain' action; for now text/plain for text files, appropriate image MIME type for *.png, *.gif and *.jpg/*.jpeg files, and application/octet-stream for other binary files. Introduced new configuration variables: $default_blob_plain_mimetype and $default_text_plain_charset (only 'utf-8' is guaranteed to work for the latter). binmode changed to ':raw' in git_blob_plain for output of non-text files. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Move gitweb style to gitweb.cssJakub Narebski2006-06-18
| | | | | | | Move gitweb style from embedded <style> element in gitweb/gitweb.cgi to external CSS file gitweb/gitweb.css. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Update gitweb README: gitweb is now included with gitJakub Narebski2006-06-17
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Make the `blame' interface in gitweb optional.Florian Forster2006-06-16
| | | | | | | | | | Since `git-annotate' is an expensive operation to run it may be desirable to deactivate this functionality. This patch introduces the `gitweb.blame' option to git-repo-config and disables the blame support by default. Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Adding a `blame' interface.Florian Forster2006-06-16
| | | | | | | | | | | | | | This patch adds an interface for `git-blame' to `gitweb.cgi'. Links to it are placed in `git_blob'. Internally the code uses `git-annotate' because `git-blame's output differs for files that have been renamed in the past. However, I like the term `blame' better. [jc: blame can be told to produce the compatible format btw...] Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge git://git.kernel.org/pub/scm/git/gitwebJunio C Hamano2006-06-10