aboutsummaryrefslogtreecommitdiff
path: root/gitweb
Commit message (Collapse)AuthorAge
* gitweb: Describe (possible) gitweb.js minification in gitweb/READMEJakub Narebski2009-12-03
| | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'jn/gitweb-blame'Junio C Hamano2009-12-01
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/gitweb-blame: gitweb: Add link to other blame implementation in blame views gitweb: Make linking to actions requiring JavaScript a feature gitweb.js: fix padLeftStr() and its usage gitweb.js: Harden setting blamed commit info in incremental blame gitweb.js: fix null object exception in initials calculation gitweb: Minify gitweb.js if JSMIN is defined gitweb: Create links leading to 'blame_incremental' using JavaScript gitweb: Colorize 'blame_incremental' view during processing gitweb: Incremental blame (using JavaScript) gitweb: Add optional "time to generate page" info in footer Conflicts: Makefile gitweb/gitweb.css
| * gitweb: Add link to other blame implementation in blame viewsJakub Narebski2009-12-01
| | | | | | | | | | | | | | | | | | Add link to 'blame_incremental' action (which requires JavaScript) in 'blame' view, and add link to 'blame' action in 'blame_incremental' view. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb: Make linking to actions requiring JavaScript a featureJakub Narebski2009-11-30
| | | | | | | | | | | | | | | | | | | | | | | | Let gitweb turn some links (like 'blame' links) into linking to actions which require JavaScript (like 'blame_incremental' action) only if 'javascript-actions' feature is enabled. This means that links to such actions would be present only if both JavaScript is enabled and 'javascript-actions' feature is enabled. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb.js: fix padLeftStr() and its usageStephen Boyd2009-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | It seems that in Firefox-3.5 inserting &nbsp; with javascript inserts the literal &nbsp; instead of a space. Fix this by inserting the unicode representation for &nbsp; instead. Also fix the off-by-one error in the padding calculation that was causing one less space to be inserted than was requested by the caller. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Cc: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb.js: Harden setting blamed commit info in incremental blameJakub Narebski2009-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Internet Explorer 8 stops at beginning of blame filling with the following bug: "firstChild is null or not an object" at this line: a_sha1.firstChild.data = commit.sha1.substr(0, 8); It is (probably) caused by the fact that while a_sha1 element, which looks like this: <a href=""> </a> It has a firstChild which is a text node containing only whitespace (single space character) in other web browsers (Firefox 3.5, Opera 10, Google Chrome 3.0), IE8 clobbers DOM, removing trailing/leading whitespace. Protect against this bug by creating text element if it does not exist. Found-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb.js: fix null object exception in initials calculationStephen Boyd2009-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently handleLine() assumes that a commit author name will always start with a capital letter. It's possible that the author name is user@example.com and therefore calling a match() on the name will fail to return any matches. Subsequently joining these matches will cause an exception. Fix by checking that we have a match before trying to join the results into a set of initials for the author. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb: Create links leading to 'blame_incremental' using JavaScriptJakub Narebski2009-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new 'blame_incremental' view requires JavaScript to run. Not all web browsers implement JavaScript (e.g. text browsers such as Lynx), and not all users have JavaScript enabled. Therefore instead of unconditionally linking to 'blame_incremental' view, we use JavaScript to convert those links to lead to view utilizing JavaScript, by adding 'js=1' to link. Currently the only action that takes 'js=1' into account is 'blame', which then acts as if it was called as 'blame_incremental' action. Possible enhancement would be to do JavaScript redirect by setting window.location instead of modifying $format and $action in git_blame_common() subroutine. The only JavaScript-aware/using view is currently 'blame_incremental'. While at it move reading JavaScript to git_footer_html() subroutine. Note that in this view we do not add 'js=1' currently (even though perhaps we should; note that for consistency we should also add 'js=1' in links added by JavaScript part of 'blame_incremental'). This idea was originally implemented by Petr Baudis in http://article.gmane.org/gmane.comp.version-control.git/47614 but it added <script> element with fixBlameLinks() function in page header, to be added as onload event using 'onload' attribute of HTML 'body' element: <body onload="fixBlameLinks();">. This version adds script at then end of page (in the page footer), and uses JavaScript 'window.onload=fixLinks();'. Also in Petr version only links marked with 'blamelink' class were modified, and they were modified by replacing "a=blame" by "a=blame_incremental"... which doesn't work for path_info links, and might replace wrong part if there is "a=blame" in project name, ref name or file name. Slightly different solution was implemented by Martin Koegler in http://thread.gmane.org/gmane.comp.version-control.git/47902/focus=47905 Here GitAddLinks() function was in gitweb.js file, not as contents of <script> element. It was also included in page header (in <head> element) though, which means waiting for a script to load (and run). It was smarter in that to "fix" (modify) link, it split URL, modified value of 'a' parameter, and then recreated modified link. It avoids trouble with "a=blame" as substring in project name or file name, but it doesn't work with path_info URL/link in the way it was written. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb: Colorize 'blame_incremental' view during processingJakub Narebski2009-09-01
| | | | | | | | | | | | | | | | | | | | | | This requires using 3 colors, not only two, to choose a color that is different from colors of up to 2 neighbors. gitweb.js selects the least used color, if more than one color is possible. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb: Incremental blame (using JavaScript)Jakub Narebski2009-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'blame_incremental' view, which uses "git blame --incremental" and JavaScript (Ajax), where 'blame' use "git blame --porcelain". * gitweb generates initial info by putting file contents (from "git cat-file") together with line numbers in blame table * then gitweb makes web browser JavaScript engine call startBlame() function from gitweb.js * startBlame() opens XMLHttpRequest connection to 'blame_data' view, which in turn calls "git blame --incremental" for a file, and streams output of git-blame to JavaScript (gitweb.js) * XMLHttpRequest event handler updates line info in blame view as soon as it gets data from 'blame_data' (from server), and it also updates progress info * when 'blame_data' ends, and gitweb.js finishes updating line info, it fixes colors to match (as far as possible) ordinary 'blame' view, and updates information about how long it took to generate page. Gitweb deals with streamed 'blame_data' server errors by displaying them in the progress info area (just in case). The 'blame_incremental' view tries to be equivalent to 'blame' action; there are however a few differences in output between 'blame' and 'blame_incremental' view: * 'blame_incremental' always used query form for this part of link(s) which is generated by JavaScript code. The difference is visible if we use path_info link (pass some or all arguments in path_info). Changing this would require implementing something akin to href() subroutine from gitweb.perl in JavaScript (in gitweb.js). * 'blame_incremental' always uses "rowspan" attribute, even if rowspan="1". This simplifies code, and is not visible to user. * The progress bar and progress info are still there even after JavaScript part of 'blame_incremental' finishes work. Note that currently no link generated by gitweb leads to this new view. This code is based on patch by Petr Baudis <pasky@suse.cz> patch, which in turn was tweaked up version of Fredrik Kuivinen <frekui@gmail.com>'s proof of concept patch. This patch adds GITWEB_JS compile configuration option, and modifies git-instaweb.sh to take gitweb.js into account. The code for git-instaweb.sh was taken from Pasky's patch. Signed-off-by: Fredrik Kuivinen <frekui@gmail.com> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * gitweb: Add optional "time to generate page" info in footerJakub Narebski2009-09-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add "This page took XXX seconds and Y git commands to generate" to page footer, if global feature 'timed' is enabled (disabled by default). Requires Time::HiRes installed for high precision 'wallclock' time. Note that Time::HiRes is being required unconditionally; this is because setting $t0 variable needs to be done fairly early to have running time of the whole script. If Time::HiRes module were required only if 'timed' feature is enabled, the earliest place where starting time ($t0) could be calculated would be after reading gitweb config, making "time to generate page" info inaccurate. This code is based on example code by Petr 'Pasky' Baudis. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mr/gitweb-snapshot'Junio C Hamano2009-11-23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * mr/gitweb-snapshot: t/gitweb-lib: Split HTTP response with non-GNU sed gitweb: Smarter snapshot names gitweb: Document current snapshot rules via new tests t/gitweb-lib.sh: Split gitweb output into headers and body gitweb: check given hash before trying to create snapshot
| * | gitweb: Smarter snapshot namesMark Rada2009-11-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach gitweb how to produce nicer snapshot names by only using the short hash id. If clients make requests using a tree-ish that is not a partial or full SHA-1 hash, then the short hash will also be appended to whatever they asked for. If clients request snapshot of a tag (which means that $hash ('h') parameter has 'refs/tags/' prefix), use only tag name. Update tests cases in t9502-gitweb-standalone-parse-output. Gitweb uses the following format for snapshot filenames: <sanitized project name>-<version info>.<snapshot suffix> where <sanitized project name> is project name with '.git' or '/.git' suffix stripped, unless '.git' is the whole project name. For snapshot prefix it uses: <sanitized project name>-<version info>/ as compared to <sanitized project name>/ before (without version info). Current rules for <version info>: * if 'h' / $hash parameter is SHA-1 or shortened SHA-1, use SHA-1 shortened to to 7 characters * otherwise if 'h' / $hash parameter is tag name (it begins with 'refs/tags/' prefix, use tag name (with 'refs/tags/' stripped * otherwise if 'h' / $hash parameter starts with 'refs/heads/' prefix, strip this prefix, convert '/' into '.', and append shortened SHA-1 after '-', i.e. use <sanitized hash>-<shortened sha1> Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | gitweb: check given hash before trying to create snapshotMark Rada2009-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes things nicer in cases when you hand craft the snapshot URL but make a typo in defining the hash variable (e.g. netx instead of next); you will now get an error message instead of a broken tarball. Tests for t9501 are included to demonstrate added functionality. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | gitweb: Make 'history' view (re)use git_log_generic()Jakub Narebski2009-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make git_history use git_log_generic, passing git_history_body as one of its paramaters. This required changes to git_log_generic, in particular passing more things as parameters. While refactoring common code of 'log', 'shortlog' and 'history' view, we did unify pagination, using always the form used by 'history' view, namely first * prev * next in place of HEAD * prev * next used by 'log' and 'shortlog' views. The 'history' view now supports commit limiting via 'hpb' parameter, similarly to 'shortlog' (and 'log') view. Performance of 'history' view got improved a bit, as it doesn't run git_get_hash_by_path for "current" version in a loop. Error detection and reporting for 'history' view changed a bit. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | gitweb: Refactor common parts of 'log' and 'shortlog' viewsJakub Narebski2009-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put the common parts of git_log and git_shortlog into git_log_generic subroutine: git_log and git_shortlog are now thin wrappers calling git_log_generic with appropriate arguments. The unification of code responsible for 'log' and 'shorlog' actions lead to the following changes in gitweb output * 'tree' link in page_nav now uses $hash parameter, as was the case for 'shortlog' but not for 'log' * 'log' view now respect $hash_parent limiting, like 'shortlog' did * 'log' view doesn't have special case for empty list anymore, and it always uses page_header linking to summary view, like 'shortlog' did. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | gitweb: Refactor 'log' action generation, adding git_log_body()Jakub Narebski2009-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put the main part of 'log' view generation into git_log_body, similarly how it is done for 'shortlog' and 'history' views (and also for 'tags' and 'heads' views). This is preparation for extracting common code between 'log', 'shortlog' and 'history' actions. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'pb/maint-gitweb-blob-lineno'Junio C Hamano2009-11-10
|\ \ \ | | | | | | | | | | | | | | | | * pb/maint-gitweb-blob-lineno: gitweb: Fix blob linenr links in pathinfo mode
| * | | gitweb: Fix blob linenr links in pathinfo modePetr Baudis2009-11-06
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In pathinfo mode, we use <base href> that refers to the base location of gitweb in order for various external media links to work well. However, this means that for the page to refer to itself, it must regenerate full link, and this is exactly what the blob view page did not do for line numbers. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'sb/gitweb-link-author'Junio C Hamano2009-10-25
|\ \ \ | | | | | | | | | | | | | | | | * sb/gitweb-link-author: gitweb: linkify author/committer names with search
| * | | gitweb: linkify author/committer names with searchStephen Boyd2009-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's nice to search for an author by merely clicking on their name in gitweb. This is usually faster than selecting the name, copying the selection, pasting it into the search box, selecting between author/committer and then hitting enter. Linkify the avatar icon in log/shortlog view because the icon is directly adjacent to the name and thus more related. The same is not true when in commit/tag view where the icon is farther away. Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'gb/maint-gitweb-esc-param'Junio C Hamano2009-10-21
|\ \ \ \ | |/ / / | | | | | | | | | | | | * gb/maint-gitweb-esc-param: gitweb: fix esc_param
| * | | gitweb: fix esc_paramGiuseppe Bilotta2009-10-14
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom CGI escaping done in esc_param failed to escape UTF-8 properly. Fix by using CGI::escape on each sequence of matched characters instead of sprintf()ing a custom escaping for each byte. Additionally, the space -> + escape was being escaped due to greedy matching on the first substitution. Fix by adding space to the list of characters not handled on the first substitution. Finally, remove an unnecessary escaping of the + sign. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jn/gitweb-show-size'Junio C Hamano2009-10-18
|\ \ \ | | | | | | | | | | | | | | | | * jn/gitweb-show-size: gitweb: Add 'show-sizes' feature to show blob sizes in tree view
| * | | gitweb: Add 'show-sizes' feature to show blob sizes in tree viewJakub Narebski2009-09-07
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for 'show-sizes' feature to show (in separate column, between mode and filename) the size of blobs (files) in the 'tree' view. It passes '-l' option to "git ls-tree" invocation. For the 'tree' and 'commit' (submodule) entries, '-' is shown in place of size; for generated '..' "up directory" entry nothing is shown. The 'show-sizes' feature is enabled by default. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | gitweb: Do not show 'patch' link for merge commitsJakub Narebski2009-10-09
|/ / | | | | | | | | | | | | | | | | | | | | | | | | The 'patch' view is about generating text/plain patch that can be given to "git am", and "git am" doesn't understand merges anyway. Therefore link to 'patch' view should not be shown for merge commits. Also call to git-format-patch inside the 'patch' action would fail when 'patch' action is called for a merge commit, with "Reading git-format-patch failed" text as 'patch' view body. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'mr/gitweb-snapshot'Junio C Hamano2009-08-31
|\ \ | | | | | | | | | | | | | | | | | | * mr/gitweb-snapshot: gitweb: add t9501 tests for checking HTTP status codes gitweb: split test suite into library and tests gitweb: improve snapshot error handling
| * | gitweb: improve snapshot error handlingMark Rada2009-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last check in the second block of checks in the &git_snapshot routine is never executed because the second to last check is a superset of the last check. Switch the order of the last two checks. It has the advantage of giving clients a more specific reason why they cannot get a snapshot format if the format they have chosen is disabled. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2009-08-27
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * maint: Fix overridable written with an extra 'e' Documentation: git-archive: mark --format as optional in summary Round-down years in "years+months" relative date view
| * \ \ Merge branch 'maint-1.6.3' into maintJunio C Hamano2009-08-27
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.6.3: Fix overridable written with an extra 'e' Documentation: git-archive: mark --format as optional in summary Round-down years in "years+months" relative date view
| | * \ \ Merge branch 'maint-1.6.2' into maint-1.6.3Junio C Hamano2009-08-27
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint-1.6.2: Fix overridable written with an extra 'e' Documentation: git-archive: mark --format as optional in summary Round-down years in "years+months" relative date view Conflicts: Documentation/git-archive.txt
| | | * | | Fix overridable written with an extra 'e'Nanako Shiraishi2009-08-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'zf/maint-gitweb-acname' into maintJunio C Hamano2009-08-21
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * zf/maint-gitweb-acname: gitweb: parse_commit_text encoding fix
* | \ \ \ \ \ Merge branch 'mr/gitweb-xz'Junio C Hamano2009-08-23
|\ \ \ \ \ \ \ | | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mr/gitweb-xz: gitweb: add support for XZ compressed snapshots gitweb: update INSTALL regarding specific snapshot settings gitweb: support to globally disable a snapshot format
| * | | | | | gitweb: add support for XZ compressed snapshotsMark A Rada2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XZ compression format uses the LZMA2 compression algorithm, which often yields higher compression ratios than both GZip and BZip2 at the cost of using more CPU time and RAM. XZ is the slowest for compression, but still much faster than BZip2 for decompression, almost comparable to GZip (see benchmarks below). Some simple benchmarks show the pros and cons of using XZ compression; starting with an already tarball'd archive of the repos listed below. Memory usage seemed to be consistent for any given algorithm at their respective default compression levels. CPU: AMD Sempron 3400+ (1 core @ 1.8GHz with 256K L2 cache) Virtual Memory Usage GZip: 4152K BZip2: 13352K XZ: 102M Linux 2.6 series (f5886c7f96f2542382d3a983c5f13e03d7fc5259) 349M gzip 23.70s user 0.47s system 99% cpu 24.227 total 76M gunzip 3.74s user 0.74s system 94% cpu 4.741 total bzip2 130.96s user 0.53s system 99% cpu 2:11.97 total 59M bunzip2 31.05s user 1.02s system 99% cpu 32.355 total xz 448.78s user 0.91s system 99% cpu 7:31.28 total 51M unxz 7.67s user 0.80s system 98% cpu 8.607 total Git (0a53e9ddeaddad63ad106860237bbf53411d11a7) 11M gzip 0.77s user 0.03s system 99% cpu 0.792 total 2.5M gunzip 0.12s user 0.02s system 98% cpu 0.142 total bzip2 3.42s user 0.02s system 99% cpu 3.454 total 2.1M bunzip2 0.95s user 0.03s system 99% cpu 0.984 total xz 12.88s user 0.14s system 98% cpu 13.239 total 1.9M unxz 0.27s user 0.03s system 99% cpu 0.298 total XZ (669413bb2db954bbfde3c4542fddbbab53891eb4) 1.8M gzip 0.12s user 0.00s system 95% cpu 0.132 total 442K gunzip 0.02s user 0.00s system 97% cpu 0.027 total bzip2 1.28s user 0.01s system 99% cpu 1.298 total 363K bunzip2 0.15s user 0.01s system 100% cpu 0.157 total xz 1.62s user 0.03s system 99% cpu 1.652 total 347K unxz 0.05s user 0.00s system 99% cpu 0.058 total From a time and memory perspective, nothing compares to GZip, but if given an average upload speed of 20KB/s, it would take ~400 seconds longer to transfer the BZip2'd kernel snapshot than the XZ snapshot; the transfer time difference is even greater between GZip and XZ. The real time savings are relatively the same for all test cases, but less dramatic for smaller repositories. XZ decompresses ~1.8-2 times slower than GZip, and ~2.7-3.75 times faster than BZip2; XZ gets relatively faster as snapshots get larger. However, XZ takes relatively longer to compress as snapshots get larger. The downside for XZ'd snapshots is the large CPU and memory load put on the server to generate the compressed snapshot, though XZ will eventually have threading support, and the real clock time for making XZ'd snapshots would decrease if the server had a beefy multi-core CPU. XZ compression is disabled by default to allow upgrades to take place without any surprises, as the CPU and memory requirements will be an issue for high load or lightweight servers. Also, the XZ format is still new (format declared stable ~6 months ago), and there have been no "stable" releases of the utils yet. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: update INSTALL regarding specific snapshot settingsMark A Rada2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes instructions on how to disable a snapshot format and how to add options to a snapshot format (e.g. setting the compression level). Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: support to globally disable a snapshot formatMark A Rada2009-08-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow Gitweb administrators to set a 'disabled' key in the %known_snapshot_formats hash to disable a specific snapshot format. All formats are enabled by default to maintain backwards compatibility. Signed-off-by: Mark Rada <marada@uwaterloo.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | gitweb: pull ref markes pull out of subject <a> elementGiuseppe Bilotta2009-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 4afbaef (gitweb: ref markers link to named shortlogs, 2008-09-02), ref markers that accompany the subject in views such as shortlog and history point to something different from the subject itself. Therefore, they should not be included in the same <a> element. Benefits of the change are: * better compliance to the XHTML standards, that forbid links within links even though the restriction cannot be imposed via DTD; this also benefits visualization in some older browsers; * when hovering the subject, only the subject itself is underlined; when hovering the ref markers, only the text in the hovered ref marker is underlined; previously, hovering any written part of the subject column led to complete underlying of everything at the same time, with unpleasing effects. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | gitweb: Optimize git-favicon.pngBenjamin Kramer2009-08-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce size of git-favicon.png using a combination of optipng and pngout. From 164 bytes to 115 bytes (30% reduction). Also reduce git-logo.png's size by one byte using advcomp. Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'jn/gitweb-blame' (early part)Junio C Hamano2009-08-14
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'jn/gitweb-blame' (early part): gitweb: Use light/dark for class names also in 'blame' view gitweb: Add author initials in 'blame' view, a la "git gui blame" gitweb: Mark commits with no "previous" in 'blame' view gitweb: Use "previous" header of git-blame -p in 'blame' view gitweb: Mark boundary commits in 'blame' view gitweb: Make .error style generic
| * | | | | | gitweb: Use light/dark for class names also in 'blame' viewJakub Narebski2009-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using "light2" and "dark2" for class names in 'blame' view (in place of "light" and "dark" classes in other places) to avoid changing style on hover in 'blame' view while doing it for other views (like 'shortlog'), use more advanced CSS, relying on the fact that more specific selector wins. While at it add a few comments to gitweb CSS file, and consolidate some repeated info. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: Add author initials in 'blame' view, a la "git gui blame"Jakub Narebski2009-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example for "Junio C Hamano" initials would be "JH". Of course initials are added (below shortened SHA-1 of blamed commit) only if group of lines that blame the same commit has 2 or more lines in it. Initials are extracted using i18n /\b([[:upper:]])\B/g regexp. Additionally initials help to distinguish boundary commits, as they use bold weight font too (in addition to shortened SHA-1 of commit). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: Mark commits with no "previous" in 'blame' viewJakub Narebski2009-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "no-previous" class to mark blamed commits which do not have "previous" header. Those are commits in which blamed file was created (added); this includes boundary commits. This means that 'linenr' link leads to blamed commit, not (one of) parent of blamed commit. Therefore currently line number for such commit uses bold weight font to denote this situation; the effect is subtle. Use "multiple-previous" class in the opposite situation, where blamed commit has multiple "previous" headers (is an evil merge). Currently this class is not used for styling. In this situation 'linenr' link leads to first of "previous" commits (first parent). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: Use "previous" header of git-blame -p in 'blame' viewJakub Narebski2009-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Luben Tuikov changed 'lineno' link (line number link) from pointing to 'blame' view at given line at blamed commit, to the one at parent of blamed commit in 244a70e (Blame "linenr" link jumps to previous state at "orig_lineno", 2007-01-04). This made it possible to do data mining using 'blame' view, by going through history of a line using mentioned line number link. Original implementation called "git rev-parse <commit>^" to find SHA-1 of a parent of a given commit once per each blamed line. In 39c19ce (gitweb: cache $parent_commit info in git_blame(), 2008-12-11) this was improved so rev-parse was called once per each unique commit in git-blame output. Alternate solution would be to relax validation for 'hb' parameter by allowing extended SHA-1 syntax of the form <rev>^ (perhaps redirecting to gitweb URL with <rev>^ resolved, in practice moving call to rev-parse to 'the other side of link'). This solution had a bug that it didn't work for boundary commits. Boundary commits don't have parents, so "git rev-parse <commit>^" returned literal "<commit>^" (which didn't exists). Gitweb didn't detect this situation and passed this result literally as 'hb' parameter in 'linenr' link. Following such link currently gives 400 - Invalid hash base parameter error; 'hb' parameter is restricted via validate_refname to correct refnames and doesn't allow for extended SHA-1 syntax. This bug could have been fixed alternatively by checking if commit is boundary commit, or check if rev-parse result is unchanged (still ends in '^' prefix). The solution employing rev-parse to find parent of commit had inherent problem if blamed commit renamed file; then name of file would be different in its parent. Solving this outside git-blame would be difficult and costly (at least cost of additional fork for extra git command). Currently gitweb uses information in "previous" header, which was introduced by Junio C Hamano in 96e1170 (blame: show "previous" information in --porcelain/--incremental format, 2008-06-04) This (currently undocumented) header has the following format: "previous <sha1 of parent commit> <filename at parent>" Using "previous" header solves both problem of performance and the problem that blamed commit could have renaming blamed file. Because "previous" header can be repeated for the same commit when blamed commit is merge (has more than one parent), and we are interested usually in _first_ parent, currently we store only first value if blame header repeats. Using first parent (first "previous" line) was what gitweb did before; without this change gitweb would use last parent instead. If there is no previous commit 'linenr' link points to blamed commit and blamed filename, making it work correctly for boundary commits. Acked-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: Mark boundary commits in 'blame' viewJakub Narebski2009-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use "boundary" class to mark boundary commits, which currently results in using bold weight font for SHA-1 of a commit (to be more exact for all text in the first cell in row, that contains SHA-1 of a commit). Detecting boundary commits is done by watching for "boundary" header in "git blame -p" output. Because this header doesn't carry additional data the regular expression for blame header fields had to be slightly adjusted. With current gitweb API only root (parentless) commits can be boundary commits. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | gitweb: Make .error style genericJakub Narebski2009-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Style for td.error was introduced in 1f1ab5f (gitweb: style done with stylesheet, 2006-06-20) to replace inline style for errors in old multi-column "git annotate" based 'blame' view. This view was then since removed (replaced by "git-blame" based 'blame' view, with fewer colums), making this style unused. Make this style more generic by replacing td.error with .error to make it apply to any element. It will be used in 'blame_incremental' view to show error messages. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'zf/maint-gitweb-acname'Junio C Hamano2009-08-10
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | / / / | | |_|/ / / | |/| | | | * zf/maint-gitweb-acname: gitweb: parse_commit_text encoding fix
| * | | | | gitweb: parse_commit_text encoding fixZoltán Füzesi2009-08-05
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call to_utf8 when parsing author and committer names, otherwise they will appear with bad encoding if they written by using chop_and_escape_str. Signed-off-by: Zoltán Füzesi <zfuzesi@eaglet.hu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'maint'Junio C Hamano2009-08-05
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: gitweb/README: Document $base_url Documentation: git submodule: add missing options to synopsis Better usage string for reflog. hg-to-git: don't import the unused popen2 module send-email: remove debug trace config: Keep inner whitespace verbatim
| * | | | gitweb/README: Document $base_urlJakub Narebski2009-08-05
| |/ / / | | | | | | | | | | | | | | | | Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>