git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 1/2] gitweb: Remove unused git_get_{preceding,following}_references
Date: Sun, 27 Aug 2006 23:44:38 +0200	[thread overview]
Message-ID: <200608272344.38542.jnareb@gmail.com> (raw)
In-Reply-To: <200608272343.14653.jnareb@gmail.com>

Remove unused (and with errors in implementation)
git_get_{preceding,following}_references subroutines.

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

diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ba5024a..6918947 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -784,57 +784,6 @@ sub git_get_references {
 	return \%refs;
 }
 
-sub git_get_following_references {
-	my $hash = shift || return undef;
-	my $type = shift;
-	my $base = shift || $hash_base || "HEAD";
-
-	my $refs = git_get_references($type);
-	open my $fd, "-|", $GIT, "rev-list", $base
-		or return undef;
-	my @commits = map { chomp; $_ } <$fd>;
-	close $fd
-		or return undef;
-
-	my @reflist;
-	my $lastref;
-
-	foreach my $commit (@commits) {
-		foreach my $ref (@{$refs->{$commit}}) {
-			$lastref = $ref;
-			push @reflist, $lastref;
-		}
-		if ($commit eq $hash) {
-			last;
-		}
-	}
-
-	return wantarray ? @reflist : $lastref;
-}
-
-sub git_get_preceding_references {
-	my $hash = shift || return undef;
-	my $type = shift;
-
-	my $refs = git_get_references($type);
-	open my $fd, "-|", $GIT, "rev-list", $hash
-		or return undef;
-	my @commits = map { chomp; $_ } <$fd>;
-	close $fd
-		or return undef;
-
-	my @reflist;
-
-	foreach my $commit (@commits) {
-		foreach my $ref (@{$refs->{$commit}}) {
-			return $ref unless wantarray;
-			push @reflist, $ref;
-		}
-	}
-
-	return @reflist;
-}
-
 sub git_get_rev_name_tags {
 	my $hash = shift || return undef;
 
-- 
1.4.1.1

  reply	other threads:[~2006-08-27 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-27 21:43 [PATCH 0/2] gitweb: Get rid of failed experiments ;-) Jakub Narebski
2006-08-27 21:44 ` Jakub Narebski [this message]
2006-08-27 21:45 ` [PATCH 2/2] gitweb: Remove git_to_hash function Jakub Narebski
2006-08-27 22:22 ` [PATCH 0/2] gitweb: Get rid of failed experiments ;-) Junio C Hamano
2006-08-31 19:32   ` [PATCH] gitweb: Remove forgotten call to git_to_hash Dennis Stosberg

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=200608272344.38542.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 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).