git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Vajna <vmiklos@frugalware.org>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH] gitweb: New cgi parameter: filter
Date: Sun, 8 Jul 2007 03:35:43 +0200	[thread overview]
Message-ID: <20070708013543.GD29994@genesis.frugalware.org> (raw)

Currently the only supported value is "nomerges". This allows one to filter
merges from many actions, like rss, log and shortlog.

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---
 gitweb/gitweb.perl |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index dc609f4..ce592cf 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -383,6 +383,13 @@ if (defined $hash_base) {
 	}
 }
 
+our $filter = $cgi->param('filter');
+if (defined $filter) {
+	if ($filter != "nomerges") {
+		die_error(undef, "Invalid filter parameter");
+	}
+}
+
 our $hash_parent_base = $cgi->param('hpb');
 if (defined $hash_parent_base) {
 	if (!validate_refname($hash_parent_base)) {
@@ -534,6 +541,7 @@ sub href(%) {
 		action => "a",
 		file_name => "f",
 		file_parent => "fp",
+		filter => "filter",
 		hash => "h",
 		hash_parent => "hp",
 		hash_base => "hb",
@@ -1770,6 +1778,7 @@ sub parse_commits {
 		($arg ? ($arg) : ()),
 		("--max-count=" . $maxcount),
 		("--skip=" . $skip),
+		((defined $filter and $filter == "nomerges") ? ("--no-merges") : ()),
 		$commit_id,
 		"--",
 		($filename ? ($filename) : ())
-- 
1.5.3.rc0.39.g46f7-dirty

             reply	other threads:[~2007-07-08  1:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-08  1:35 Miklos Vajna [this message]
2007-07-09 21:18 ` [PATCH] gitweb: New cgi parameter: filter VMiklos
2007-07-11 21:19 ` Jakub Narebski
2007-07-11 23:00   ` [PATCH] gitweb: new cgi parameter: option Miklos Vajna
2007-07-12 10:11     ` Jakub Narebski
2007-07-12 11:49       ` Johannes Schindelin
2007-07-12 18:39       ` [PATCH] gitweb: new cgi parameter: opt Miklos Vajna
2007-07-12 18:45       ` [PATCH] gitweb: new cgi parameter: option Junio C Hamano
2007-07-13  0:03         ` Jakub Narebski

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=20070708013543.GD29994@genesis.frugalware.org \
    --to=vmiklos@frugalware.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).