aboutsummaryrefslogtreecommitdiff
path: root/gitweb
Commit message (Collapse)AuthorAge
* gitweb: git_annotate didn't expect negative numeric timezoneJakub Narebski2006-08-26
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Uniquify version info output, add meta generator in page headerJakub Narebski2006-08-17
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add support for per project git URLsJakub Narebski2006-08-16
| | | | | | | | | | | | | | | | | | | | It is now possible for project to have individual clone/fetch URLs. They are provided in new file 'cloneurl' added below project's $GIT_DIR directory. If there is no cloneurl file, concatenation of git base URLs with project name is used. This is merge of Jakub Narebski and David Rientjes gitweb: Show project's git URL on summary page with Aneesh Kumar gitweb: Add support for cloneurl. gitweb: Support multiple clone urls patches. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: consolidate action URL generation.Martin Waitz2006-08-15
| | | | | | | | | Use the href() function instead of string concatenation to generate most URLs to our own CGI. This is a work in progress, not everything has been converted yet. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: provide function to format the URL for an action link.Martin Waitz2006-08-15
| | | | | | | | | Provide a new function which can be used to generate an URL for the CGI. This makes it possible to consolidate the URL generation in order to make it easier to change the encoding of actions into URLs. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Show project's git URL on summary pageJakub Narebski2006-08-15
| | | | | | | | | | | | | | | | | | | | From 31e4de9f22a3b17d4ad0ac800132e4e1a0a15006 Mon Sep 17 00:00:00 2001 From: David Rientjes <rientjes@google.com> Date: Tue, 15 Aug 2006 11:43:04 -0700 Subject: [PATCH] gitweb: Show project's git URL on summary page Add support for showing multiple clone/fetch git URLs for project on a summary page. URL for project is created from base URL and project name. For example for XMMS2 project (xmms.se) the git base URL would be git://git.xmms.se/xmms2. With corrections from David Rientjes <rientjes@google.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: configurable home link stringYasushi SHOJI2006-08-14
| | | | | | | | | | | | | | | | | | I've always found difficult to figure out git URL for clone from gitweb URL because git:// and http:// are different on many site including kernel.org. I've found this enhancement at http://dev.laptop.org/git when I was on git channel, and thought that it'd be nice if all public gitweb site show it's git URL on its page. This patch allow us to change the home link string. The current default is "projects" as we all see on gitweb now. ie. kernel.org might set this variable to "git://git.kernel.org/pub/scm/" Signed-off-by: Yasushi SHOJI <yashi@atmark-techno.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate printing difftree in git_commit into git_difftree_bodyJakub Narebski2006-08-14
| | | | | | | | | | | | Separate printing difftree in git_commit into separate git_difftree_body subroutine. Add support for "C" (copied) status. For "M" and "C" add parameter 'fp' (filename parent) to the "diff" link; currently not supported by git_blobdiff ("blobdiff" action). Reindented, realigned, added comments. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: True fix: Support for the standard mime.types map in gitwebJakub Narebski2006-08-14
| | | | | | | | | | | | True fix for error in mimetype_guess, error introduced in original commit 2d00737489b8c61ed616b261c7c9bd314e2b0b41 and later fixed temporarily by commenting out the line that caused error in commit 57bd4d3523efecf60197040cad34154aff4ddf80. Gitweb now supports mime.types map $mimetypes_file relative to project. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Skip comments in mime.types like fileJakub Narebski2006-08-14
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change appereance of marker of refs pointing to given objectJakub Narebski2006-08-14
| | | | | | | | | | | | | | | | | | | | | | | Change git_get_references to include type of ref in the %refs value, which means putting everything after 'refs/' as a ref name, not only last part of the name. Instead of separating refs pointing to the same object by " / " separator, use anonymous array reference to store all refs pointing to given object. Use 'git-ls-remote .' if $projectroot/$project/info/refs does not exist. (Perhaps it should be used always.) Refs are now in separate span elements. Class is dependent on the ref type: currently known classes are 'tag', 'head', 'remote', and 'ref' (last one for HEAD and other refs in the main directory). There is encompassing span element of class refs, just in case of unknown ref type. This might be considered cleaner separating of git_get_references into filling %refs hash only, and not taking part in formatting ref marker. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate finding project owner into git_get_project_ownerJakub Narebski2006-08-14
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate main part of git_history into git_history_bodyJakub Narebski2006-08-14
| | | | | | | | | Separates main part of git_history into git_history_body subroutine, and makes output more similar to git_shortlog. Adds "diff to current" link only for history of regular file (blob). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Refactor printing shortened title in git_shortlog_body and git_tags_bodyJakub Narebski2006-08-14
| | | | | | | | | | | Separate printing of perhaps shortened title (subject) in git_shortlog_body and git_tags_body into format_subject_html. While at it, remove presentation element <b>...</b> used to format title (subject) and move formatting to CSS. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate ref parsing in git_get_refs_list into parse_refJakub Narebski2006-08-14
| | | | | | | | | Note that for each ref there are usually two calls to git subroutines: first to get the type of ref, second to parse ref if ref is of commit or tag type. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Great subroutines renamingJakub Narebski2006-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename some of subroutines to better reflect what they do. Some renames were not performed because subroutine name reflects hash key. Subroutines name guideline: * git_ prefix for subroutines related to git commands, git repository, or to gitweb actions * git_get_ prefix for inner subroutines calling git command or reading some file in the repository and returning some output * parse_ prefix for subroutines parsing some text (or reading and parsing some text) into hash or list * format_ prefix for subroutines formatting, post-processing or generating some HTML/text fragment * _get_ infix for subroutines which return result * _print_ infix for subroutines which print fragment of output * _body suffix for subroutines which outputs main part (body) of related action (usually table) * _nav suffix for subroutines related to navigation bars * _div suffix for subroutines returning or printing div element * subroutine names should not be based on how the result is obtained, as this might change easily Renames performed: - git_get_referencing => format_ref_marker - git_get_paging_nav => format_paging_nav - git_read_head => git_get_head_hash - git_read_hash => git_get_hash_by_ref - git_read_description => git_get_project_description - git_read_projects => git_get_projects_list - read_info_ref => git_get_references - git_read_refs => git_get_refs_list - date_str => parse_date - git_read_tag => parse_tag - git_read_commit => parse_commit - git_blob_plain_mimetype => blob_mimetype - git_page_nav => git_print_page_nav - git_header_div => git_print_header_div Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'jn/web'Junio C Hamano2006-08-12
|\
| * gitweb: Whitespace cleanup - tabs are for indent, spaces are for alignJakub Narebski2006-08-10
| | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: blame table row no highlight fixLuben Tuikov2006-08-07
| | | | | | | | | | | | | | | | | | | | | | Until now blame just used the commit/tree/tags/etc style of highlight-able table rows, which have alternating light/dark rows that flash when mouse pointer passes over them. This is very annoying in blame, since the text is static and it interferes with the per-revision block highlighting. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: bugfix: git_commit and git_commitdiff parentsLuben Tuikov2006-08-07
|/ | | | | | | | | | | | | | | In git_commit() the hash base of $from_id is $parent, not $hash: - If status is "D", then action blob for $from_id wants $parent, not $hash. History needs $parent too. - If status is "R", then action blob for $from_id wants $parent, not $hash. Similarly in git_commitdiff() the hash base of $from_id is $hash_parent, not $hash. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Remove unused variables in git_shortlog_body and git_headsJakub Narebski2006-08-07
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fix $project usageMatthias Lederhofer2006-08-06
| | | | | | | | There were some places where $project was used even if it was not defined. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fix commitdiff_plain for root commitsMatthias Lederhofer2006-08-06
| | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Skip nonmatching lines in difftree output, consistentlyJakub Narebski2006-08-06
| | | | | | | | This fixes error for commitdiff on root commit (without parents). Noticed-by: Matthias Lederhofer (matled) Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fix commitdiff for root commitsJakub Narebski2006-08-06
| | | | | | | | | | | | | | | After changing all "-|" open invocations to list form, commitdiff for initial commit (without parent) got broken; it returned incorrectly empty patch earlier. Use '--root' option to git-diff-tree for initial (root) commit. No checking for empty $hash_parent in git_commitdiff_plain -- we rely on gitweb to give correct parameters for commitdiff_plain action. Noticed by Matthias Lederhofer (matled). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: check if HTTP_ACCEPT is really setMatthias Lederhofer2006-08-06
| | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Refactor untabifying - converting tabs to spacesJakub Narebski2006-08-06
| | | | | | | | Add untabify subroutine and use it. It also fixes git_diff_print which used to get the tabstop wrong. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Inline $rss_linkJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: PATH_INFO=/ means no projectJakub Narebski2006-08-06
| | | | | | | Prepared for refactoring input validation. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: No error messages with unescaped/unprotected user inputJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: No periods for error messagesJakub Narebski2006-08-06
| | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Acked-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Cleanup and uniquify error messagesJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Don't undefine query parameter related variables before die_errorJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Use undef for die_error to use default first (status) parameter valueJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: die_error first (optional) parameter is HTTP statusJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Separate input validation and dispatch, add comment about opml actionJakub Narebski2006-08-06
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: git_tree displays blame based on repository configLuben Tuikov2006-08-04
| | | | | | | | | git_tree() will now conditionally display "blame" depending on how "gitweb.blame" variable is configured using "git-repo-config". Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: do not use @@FOO@@ for replaced tokensJunio C Hamano2006-08-02
| | | | | | | This makes it easier to run gitweb/gitweb.perl without token substitution. Using @@ makes Perl emit "unintended interpolation" warnings. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: require $ENV{'GITWEB_CONFIG'}Matthias Lederhofer2006-08-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch it is possible to use gitweb.perl for developing by loading the configuration from $GITWEB_CONFIG. This might also be useful for normal usage of gitweb. Example: % cat cfg $GIT = '/usr/bin/git'; $projectroot = '/home/matled/src/git'; $projects_list = '/home/matled/src/git/git/gitweb/list'; % cat run #!/bin/sh export GATEWAY_INTERFACE="CGI/1.1" export HTTP_ACCEPT="*/*" export REQUEST_METHOD="GET" export GITWEB_CONFIG='./cfg' export QUERY_STRING=""$1"" exec ./gitweb.perl % time ./run p=git/.git > /dev/null This makes it easy to check for warnings and do performance tests after changes, you can also pipe this to lynx -dump -force-html /dev/stdin to get more than just html. This also documents the original patch adding require $GITWEB_CONFIG. Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: optionally read config from GITWEB_CONFIGJeff King2006-08-02
| | | | | | | | | | | | Configuration will first be taken from variables inside the gitweb.cgi script, which in turn come from the Makefile. Afterwards, the contents of GITWEB_CONFIG are read, overriding the builtin defaults. This should eliminate the need for editing the gitweb script at all. Users should edit the Makefile and/or add a config file. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb/README: do not bug Kay with gitweb questions anymoreJunio C Hamano2006-08-01
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: use out-of-line GIT logo.Martin Waitz2006-08-01
| | | | | | | | Use the normal web server instead of the CGI to provide the git logo, just like the gitweb.css. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fill in gitweb configuration by MakefileMartin Waitz2006-08-01
| | | | | | | | | | | | Generate gitweb/gitweb.cgi to reduce the need to patch gitweb.cgi by the end user. The GIT installation directory is already known by the Makefile, and can be inserted directly into gitweb. All other gitweb configuration parameters can now be specified by providing GITWEB_* variables while building GIT. These are described in gitweb/README. Signed-off-by: Martin Waitz <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Refactoring git_project_listJakub Narebski2006-07-31
| | | | | | | | Slightly reworking git_project_list, including moving setting $order, as it is used only in this action. Mostly reindent. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: avoid undefined value warning in print_page_pathJunio C Hamano2006-07-31
| | | | | | | The function unconditionally tried to match $type but some callers did not pass it. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: when showing history of a tree, show tree link not blobJunio C Hamano2006-07-31
| | | | | | Otherwise clicking on that erroneous blob link would produce nonsense. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fix use of uninitialized value.Junio C Hamano2006-07-31
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: an obvious cut and paste error.Junio C Hamano2006-07-31
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: There can be more than two levels of subdirectoriesJunio C Hamano2006-07-31
| | | | | | | | Earlier code to read .git/refs/{tags,heads} hierarchy had a hardcoded up-to-two-level assumption. Lift it by using File::Find. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: use a hash to lookup the sub for an actionMatthias Lederhofer2006-07-31
| | | | | Signed-off-by: Matthias Lederhofer <matled@gmx.net> Signed-off-by: Junio C Hamano <junkio@cox.net>