All of lore.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 8/8] gitweb: Remove --parents from call to git-rev-list in parse_rev_list
Date: Wed,  6 Sep 2006 22:56:22 +0200	[thread overview]
Message-ID: <11575761821830-git-send-email-jnareb@gmail.com> (raw)
In-Reply-To: <11575480921132-git-send-email-jnareb@gmail.com>

This option is removed by default, because with --full-history option
(which is by default used in git_history) --parents means full history
with parenthood, which means that we get all the connecting merges
too.  And since we asked for the _full_ history, that means EVERY
SINGLE MERGE.  Even those that do not change given file (or
directory).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Benchmarks (7 means patch before, 8 means this patch):
# 1:gitweb/new~n 2:%e 3:%U 4:%s 5:ab-n10_cgi_time[ms] 6:[+/-sd] 7:ab-n10_perl_time[ms] 8:[+/-sd]
7 2.59  1.53 0  2621.073  234.2  2742.230   96.6
8 2.89  1.80 0  3081.722  246.6  3306.196  367.2
8 2.95  1.81 0  2952.253  155.9  3175.441  128.0

 gitweb/gitweb.perl |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index edded74..68ddbe6 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1131,6 +1131,13 @@ # to parse individual commits.
 #
 # parse_rev_list parameters are passed to git-rev-list, so they should
 # include at least starting revision; just in case we default to HEAD
+#
+# if you want in parsed info to have full equivalent of first generating
+# list of interesting revisions, then calling parse_commit on each of revs,
+# i.e. if you want to have full parent info which includes grafts,
+# you have to include '--parents' in the parse_rev_list parameters;
+# it is excluded by default as it changes notion which revs are interesting
+# e.g. '--full-history' with '--parents' include EVERY SINGLE MERGE.
 sub parse_rev_list {
 	my @rev_opts = @_;
 	my @revlist;
@@ -1138,7 +1145,7 @@ sub parse_rev_list {
 	@rev_opts = ("HEAD") unless @rev_opts;
 
 	local $/ = "\0";
-	open my $fd, "-|", git_cmd(), "rev-list", "--header", "--parents", @rev_opts
+	open my $fd, "-|", git_cmd(), "rev-list", "--header", @rev_opts
 		or return \@revlist;
 
 	while (my $revinfo = <$fd>) {
-- 
1.4.2

  reply	other threads:[~2006-09-06 20:56 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     ` [PATCH 3/7] gitweb: Use @hist_opts as git-rev-list parameters in git_history Jakub Narebski
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               ` Jakub Narebski [this message]
2006-09-06 21:08                 ` [PATCH 8/8] gitweb: Remove --parents from call to git-rev-list in parse_rev_list 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=11575761821830-git-send-email-jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.