summaryrefslogtreecommitdiff
path: root/gitweb
Commit message (Collapse)AuthorAgeFilesLines
* gitweb: Allow configuring the default projects order and add order 'none'Frank Lichtenheld2007-04-101-4/+7
| | | | | | | | | | | | | | | | | Introduce new configuration variable $default_projects_order that can be used to specify the default order of projects on the index page if no 'o' parameter is given. Allow a new value 'none' for order that will cause the projects to be in the order we learned about them. In case of reading the list of projects from a file, this should be the order as they are listed in the file. In case of reading the list of projects from a directory this will probably give random results depending on the filesystem in use. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Allow forks with project list fileFrank Lichtenheld2007-04-101-7/+27
| | | | | | | | | | | | Make it possible to use the forks feature even when reading the list of projects from a file, by creating a list of known prefixes as we go. Forks have to be listed after the main project in order to be recognised as such. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Acked-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'maint'Junio C Hamano2007-04-051-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Fix lseek(2) calls with args 2 and 3 swapped Honor -p<n> when applying git diffs Fix dependency of common-cmds.h Fix renaming branch without config file DESTDIR support for git/contrib/emacs gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patches Document --left-right option to rev-list. Revert "builtin-archive: use RUN_SETUP" rename contrib/hooks/post-receieve-email to contrib/hooks/post-receive-email. rerere: make sorting really stable. Fix t4200-rerere for white-space from "wc -l"
| * gitweb: Fix bug in "blobdiff" view for split (e.g. file to symlink) patchesJakub Narebski2007-04-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git_patchset_body needs patch generated with --full-index option to detect split patches, meaning two patches which corresponds to single difftree (raw diff) entry. An example of such situation is changing type (mode) of a file, e.g. from plain file to symbolic link. Add, in git_blobdiff, --full-index option to patch generating git diff invocation, for the 'html' format output ("blobdiff" view). "blobdiff_plain" still uses shortened sha1 in the extended git diff header "index <hash>..<hash>[ <mode>]" line. Noticed-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: Quote hash keys, and do not use barewords keysJakub Narebski2007-04-041-8/+8
| | | | | | | | | | | | | | | | | | Ensure that in all references to an element of a hash, the key is singlequoted, instead of using bareword: use $hash{'key'} instead of $hash{key} Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | gitweb: Whitespace cleanup - tabs are for indent, spaces are for align (3)Jakub Narebski2007-04-041-24/+24
|/ | | | | | | | | | Code should be look the same way, regardless of tab size. Use tabs for indent, but spaces for align. Indent continued part of command spanning multiple lines, but only once. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Support comparing blobs (files) with different namesJakub Narebski2007-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fix the bug that caused "blobdiff" view called with new style URI for a rename with change diff to be show as new (added) file diff. New style URI for "blobdiff" for rename means with $hash_base ('hb') and $hash_parent_base ('hpb') paramaters denoting tree-ish (usually commit) of a blobs being compared, together with both $file_name ('f') and $file_parent ('fp') parameters. It is done by adding $file_parent ('fp') to the path limiter, meaning that diff command becomes: git diff-tree [options] hpb hb -- fp f Other option would be finding hash of a blob using git_get_hash_by_path subroutine and comparing blobs using git-diff, or using extended SHA-1 syntax and compare blobs using git-diff: git diff [options] hpb:fp hp:f Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Cleanup and uniquify die_error callsJakub Narebski2007-03-271-3/+3
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add example of config file and how to generate projects list to ↵Jakub Narebski2007-03-251-2/+43
| | | | | | | | | | | gitweb/INSTALL Add simple example of config file (turning on and allowing override of a few %features). Also example config file and script to generate list of projects in a format that can be used as GITWEB_LIST / $projects_list. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add some installation notes in gitweb/INSTALLJakub Narebski2007-03-241-0/+184
| | | | | | | | | | | | | | | Add some installation and configuration notes for gitweb in gitweb/INSTALL. Make use of filling gitweb configuration by Makefile. It does not cover (yet?) all the configuration variables and options. Some of contents duplicates information in gitweb/README file (it is referred from gitweb/INSTALL). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix not marking signoff lines in "log" viewJakub Narebski2007-03-241-1/+1
| | | | | | | | | The CSS selector for signoff lines style was too strict: in the "log" view the commit message is not encompassed in container "page_body" div. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Don't escape attributes in CGI.pm HTML methodsJakub Narebski2007-03-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to escape HTML tag's attributes in CGI.pm HTML methods (like CGI::a()), because CGI.pm does attribute escaping automatically. $cgi->a({ ... -attribute => atribute_value }, tag_contents) is translated to <a ... attribute="attribute_value">tag_contents</a> The rules for escaping attribute values (which are string contents) are different. For example you have to take care about escaping embedded '"' and "'" characters; CGI::a() does that for us automatically. CGI::a() does not HTML escape tag_contents; we would need to write <a href="URL">some <b>bold</b> text</a> for example. So we use esc_html (or esc_path) to escape tag_contents as needed. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change to use explicitly function call cgi->escapHTML()Li Yang2007-03-241-2/+2
| | | | | | | | | Change to use explicitly function call cgi->escapHTML(). This fix the problem on some systems that escapeHTML() is not functioning, as default CGI is not setting 'escape' parameter. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix "next" link in commit viewJakub Narebski2007-03-231-1/+1
| | | | | | | | | | Fix copy'n'paste error in commit c9d193df which caused that "next" link for merge commits in "commit" view (merge: _commit_ _commit_ ...) was to "commitdiff" view instead of being to "commit" view. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: fix mismatched parenthesisJunio C Hamano2007-02-061-1/+1
| | | | | | An earlier commit 04179418 broke gitweb. Badly. Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Convert project name to UTF-8Yasushi SHOJI2007-02-051-3/+3
| | | | | | | | | | If the repository directory name is in non-ascii, $project needs to be converted from perl internal to utf-8 because it will be used as title, page path, and snapshot filename. use to_utf8() to do the conversion. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Assorted typo fixesPavel Roskin2007-02-031-1/+1
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* [PATCH] Rename git-repo-config to git-config.Tom Prince2007-01-281-1/+1
| | | | | Signed-off-by: Tom Prince <tom.prince@ualberta.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix git_patchset_body not closing <div class="patch">Jakub Narebski2007-01-091-3/+4
| | | | | | | | | | | Fix case when git_patchset_body didn't close <div class="patch">, for patchsets with last patch empty. This patch also removes some commented out code in git_patchset_body. 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: Remove superfluous "|" in "commit" viewJakub Narebski2007-01-071-1/+1
| | | | | | | | Remove superfluous trailing "|" separator from difftree part of "commit" view for new files (created in given commit). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix split patches output (e.g. file to symlink)Jakub Narebski2007-01-061-2/+2
| | | | | | | | | | | | | Do not replace /dev/null in two-line from-file/to-file diff header for split patches ("split" patch mean more than one patch per one diff-tree raw line) by a/file or b/file link. Split patches differ from pair of deletion/creation patch in git diff header: both a/file and b/file are hyperlinks, in all patches in a split. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Revert "gitweb: There can be empty patches (in git_patchset_body)"Jakub Narebski2007-01-061-1/+1
| | | | | | | | | This reverts commit 1ebb948f656c03a5bdaab4de1a113b9ffcb98bea, as that patch quieted warning but was not proper solution. The previous commit was. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix errors in git_patchset_body for empty patchesJakub Narebski2007-01-061-1/+3
| | | | | | | | | | | We now do not skip over empty patches in git_patchset_body (where empty means that they consist only of git diff header, and of extended diff header, for example "pure rename" patch). This means that after extended diff header there can be next patch (i.e. /^diff /) or end of patchset, and not necessary patch body (i.e. /^--- /). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix error in "rename to"/"copy to" git diff header outputJakub Narebski2007-01-061-3/+3
| | | | | | | | | | Fix error in git_patchset_body subroutine, which caused "rename to"/"copy to" line in extended diff header to be displayed incorrectly. While at it, fix align. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix error in git_patchest_body for file creation/deletion patchJakub Narebski2007-01-061-1/+5
| | | | | | | | | | | | $from_id, $to_id variables should be local per PATCH. Fix error in git_patchset_body for file creation (deletion) patches, where instead of /dev/null as from-file (to-file) diff header line, it had link to previous file with current file name. This error occured only if there was another patch before file creation (deletion) patch. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Blame "linenr" link jumps to previous state at "orig_lineno"Luben Tuikov2007-01-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blame currently displays the commit id which introduced a block of one or more lines, the line numbers wrt the current listing of the file and the file's line contents. The commit id displayed is hyperlinked to the commit. Currently the linenr links are hyperlinked to the same commit id displayed to the left, which is _no_ different than the block of lines displayed, since it is the _same commit_ that is hyperlinked. And thus clicking on it leads to the same state of the file for that chunk of lines. I.e. data mining is not currently possible with gitweb given a chunk of lines introduced by a commit. This patch makes such data mining possible. The line numbers are now hyperlinked to the parent of the commit id of the block of lines. Furthermore they are linked to the line where that block was introduced. Thus clicking on a linenr link will show you the file's line(s) state prior to the commit id you were viewing. So clicking continually on a linenr link shows you how this line and its line number changed over time, leading to the initial commit where it was first introduced. Signed-off-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix "Use of uninitialized value" warning in git_tags_bodyJakub Narebski2007-01-041-2/+6
| | | | | | | | | Fix "Use of uninitialized value" warning in git_tags_body generated for lightweight tags of tree and blob object; those don't have age ($tag{'age'}) defined. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix shortlog only showing HEAD revision.Robert Fitzsimons2007-01-031-1/+1
| | | | | | | | | My change in 190d7fdcf325bb444fa806f09ebbb403a4ae4ee6 had a small bug found by Michael Krufky which caused the passed in hash value to be ignored, so shortlog would only show the HEAD revision. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: There can be empty patches (in git_patchset_body)Jakub Narebski2007-01-031-1/+1
| | | | | | | | | | | We now do not skip over empty patches in git_patchset_body (where empty means that they consist only of git diff header, and of extended diff header), so uncomment branch of code dealing with empty patches (patches which do not have even two-line from/to header) Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix bug in git_difftree_body (was '!=' instead of 'ne')Jakub Narebski2007-01-031-1/+1
| | | | | | | | Fix bug in git_difftree_body subroutine; it was used '!=' comparison operator for strings (file type) instead of correct 'ne'. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Fix error in git_project_index subroutineJakub Narebski2007-01-031-1/+1
| | | | | | | | | | Instead of "$projectroot/$pr->{'path'}" to get the path to project GIT_DIR, it was used "$projectroot/$project" which is valid only for actions where project parameter is set, and 'project_index' is not one of them. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Precompile CGI routines for mod_perlJakub Narebski2006-12-281-0/+4
| | | | | | | | | | | | | | | | | | Following advice from CGI(3pm) man page, precompile all CGI routines for mod_perl, in the BEGIN block. If you want to compile without importing use the compile() method instead: use CGI(); CGI->compile(); This is particularly useful in a mod_perl environment, in which you might want to precompile all CGI routines in a startup script, and then import the functions individually in each mod_perl script. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add mod_perl version string to "generator" meta headerJakub Narebski2006-12-281-1/+2
| | | | | | | | | | | | Add mod_perl version string (the value of $ENV{'MOD_PERL'} if it is set) to "generator" meta header. The purpose of this is to identify version of gitweb, now that codepath may differ for gitweb run as CGI script, run under mod_perl 1.0 and run under mod_perl 2.0. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Re-enable rev-list --parents for parse_commit.Robert Fitzsimons2006-12-271-5/+5
| | | | | | | | | | Re-enable rev-list --parents for parse_commit which was removed in (208b2dff95bb48682c351099023a1cbb0e1edf26). rev-list --parents is not just used to return the parent headers in the commit object, it includes any grafts which are vaild for the commit. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Use rev-list --skip option.Robert Fitzsimons2006-12-251-23/+1
| | | | | Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change history action to use parse_commits.Robert Fitzsimons2006-12-251-18/+9
| | | | | | | Also added missing accesskey. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change atom, rss actions to use parse_commits.Robert Fitzsimons2006-12-251-11/+7
| | | | | Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change header search action to use parse_commits.Robert Fitzsimons2006-12-251-14/+9
| | | | | Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change log action to use parse_commits.Robert Fitzsimons2006-12-251-11/+14
| | | | | | | Also add missing next link to bottom of page. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Change summary, shortlog actions to use parse_commits.Robert Fitzsimons2006-12-251-22/+12
| | | | | | | Also added missing accesskey. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: We do longer need the --parents flag in rev-list.Robert Fitzsimons2006-12-251-5/+6
| | | | | | | | | | We only want to know the direct parents of a given commit object, these parents are available in the --header output of rev-list. If --parents is supplied with --full-history the output includes merge commits that aren't relevant. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add parse_commits, used to bulk load commit objects.Robert Fitzsimons2006-12-251-17/+74
| | | | | | | | | Add a new method parse_commits which is able to parse multiple commit objects at once. Reworked parse_commit to share the commit object parsing logic. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Paginate commit/author/committer search outputRobert Fitzsimons2006-12-231-45/+103
| | | | | | | | Paginate commit/author/committer search output to only show 100 commits at a time, added appropriate nav links. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Allow search to be disabled from the config file.Robert Fitzsimons2006-12-221-0/+13
| | | | | Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Require a minimum of two character for the search text.Robert Fitzsimons2006-12-221-0/+3
| | | | | Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Use rev-list pattern search options.Robert Fitzsimons2006-12-221-10/+10
| | | | | | | Use rev-list pattern search options instead of hand coded perl. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: optimize git_summary.Robert Fitzsimons2006-12-221-3/+3
| | | | | | | | We don't need to call git_get_head_hash at all just pass in "HEAD" and use the return id field. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: optimize git_shortlog_body.Robert Fitzsimons2006-12-221-1/+3
| | | | | | | Don't call gitweb_have_snapshot from within the loop. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: optimize git_get_last_activity.Robert Fitzsimons2006-12-221-1/+2
| | | | | | | Only return one line of output and we don't need the refname value. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* gitweb: Add missing show '...' links change.Robert Fitzsimons2006-12-221-0/+1
| | | | | | | | | Part of the patch for "gitweb: Show '...' links in "summary" view only if there are more items" (313ce8cee665447e4476d7e8985b270346a8e5a1) is missing. Add it back in. Signed-off-by: Robert Fitzsimons <robfitz@273k.net> Signed-off-by: Junio C Hamano <junkio@cox.net>