public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail•com>
To: git@vger•kernel.org
Cc: Jakub Narebski <jnareb@gmail•com>
Subject: [PATCH 3/7] gitweb: Use @hist_opts as git-rev-list parameters in git_history
Date: Wed,  6 Sep 2006 15:08:07 +0200	[thread overview]
Message-ID: <11575480922090-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <11575480912922-git-send-email-jnareb@gmail.com>

Add new global configuration variable @hist_opts, which holds
additional, history specific options (parameters) to git-rev-list
called in git_history subroutine.  Default value is '--full-history',
as it was.

Signed-off-by: Jakub Narebski <jnareb@gmail•com>
---
 gitweb/gitweb.perl |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 4c76032..2191853 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -176,9 +176,23 @@ # - more costly is '-C' (or '-C', '-M'),
 #   (number of changed files + number of removed files) * (number of new files)
 # - even more costly is '-C', '--find-copies-harder' with cost
 #   (number of files in the original tree) * (number of new files)
-# - one might want to include '-B' option, e.g. '-B', '-M'
+# - one might want to include '-B' option, e.g. have it ('-B', '-M'),
+#   or for example '-l<num>' together with '-M' and perhaps '-C'
 our @diff_opts = ('-M'); # taken from git_commit
 
+# options fo git-rev-list used in git_history
+# - default is '--full-history', which is slowest but works with merges,
+#   and was done to not change the output from previous version when
+#   path limiting was done by piping revisions to git-diff-tree --stdin
+# - less costly is (), i.e. without '--full-history', which of course
+#   changes output and provides _simplified_ history of a file
+# - for files which appeared late in the history less costly is
+#   --full-history, --remove-empty, although it changes output in
+#   the rare case when name vanished the appeared thorough the history;
+#   it improves performance of course only the last page of history
+# - least costly, but changing output, is having --remove-mepty only
+our @hist_opts = ('--full-history');
+
 our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
 do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
 
@@ -3137,7 +3151,7 @@ sub git_history {
 	}
 
 	open my $fd, "-|",
-		git_cmd(), "rev-list", $limit, "--full-history", $hash_base, "--", $file_name
+		git_cmd(), "rev-list", $limit, @hist_opts, $hash_base, "--", $file_name
 			or die_error(undef, "Open git-rev-list-failed");
 	my @revlist = map { chomp; $_ } <$fd>;
 	close $fd
-- 
1.4.2

  reply	other threads:[~2006-09-06 13:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06 13:04 [PATCH 0/7] gitweb: Trying to improve history view speed Jakub Narebski
2006-09-06 13:08 ` [PATCH 1/7] gitweb: Make pickaxe search a feature Jakub Narebski
2006-09-06 13:08   ` [PATCH 2/7] gitweb: Paginate history output Jakub Narebski
2006-09-06 13:08     ` Jakub Narebski [this message]
2006-09-06 13:08       ` [PATCH 4/7] gitweb: Add parse_rev_list for later use Jakub Narebski
2006-09-06 13:08         ` [PATCH 5/7] gitweb: Use parse_rev_list in git_shortlog and git_history Jakub Narebski
2006-09-06 13:08           ` [PATCH 6/7] gitweb: Assume parsed revision list in git_shortlog_body and git_history_body Jakub Narebski
2006-09-06 13:08             ` [PATCH 7/7] gitweb: Set page to 0 if it is not defined, in git_history Jakub Narebski
2006-09-06 20:56               ` [PATCH 8/8] gitweb: Remove --parents from call to git-rev-list in parse_rev_list Jakub Narebski
2006-09-06 21:08                 ` Linus Torvalds
2006-09-06 21:18                   ` Jakub Narebski
2006-09-06 21:51                     ` Junio C Hamano
2006-09-06 21:53                 ` Jakub Narebski
2006-09-07  8:39                   ` Jakub Narebski
2006-09-07  0:37   ` [PATCH 1/7] gitweb: Make pickaxe search a feature Junio C Hamano
2006-09-07  8:34     ` Jakub Narebski
2006-09-07  9:02       ` Junio C Hamano
2006-09-07  9:07         ` Jakub Narebski
2006-09-06 15:57 ` [PATCH 0/7] gitweb: Trying to improve history view speed Linus Torvalds
2006-09-06 17:06   ` Jakub Narebski
2006-09-06 18:30     ` Linus Torvalds
2006-09-06 18:48       ` Jakub Narebski
2006-09-06 19:04         ` Linus Torvalds
2006-09-06 22:01 ` Junio C Hamano
2006-09-09  8:42 ` Jakub Narebski
2006-09-09  9:10   ` Junio C Hamano
2006-09-09  9:24     ` Jakub Narebski
2006-09-09  9:54       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11575480922090-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox