gitweb: Remove unused git_get_{preceding,following}_references
Remove unused (and with errors in implementation) git_get_{preceding,following}_references subroutines. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Jakub Narebski committed
Aug 27, 2006 at 23:44 UTC
023782bd4df765b0555b8abc1830d9a90cdccca2
1 file changed
-51
gitweb/gitweb.perl
-51
@@ -784,57 +784,6 @@ sub git_get_references {
784
return \%refs;
785
}
786
787
-sub git_get_following_references {
788
- my $hash = shift || return undef;
789
- my $type = shift;
790
- my $base = shift || $hash_base || "HEAD";
791
-
792
- my $refs = git_get_references($type);
793
- open my $fd, "-|", $GIT, "rev-list", $base
794
- or return undef;
795
- my @commits = map { chomp; $_ } <$fd>;
796
- close $fd
797
- or return undef;
798
-
799
- my @reflist;
800
- my $lastref;
801
-
802
- foreach my $commit (@commits) {
803
- foreach my $ref (@{$refs->{$commit}}) {
804
- $lastref = $ref;
805
- push @reflist, $lastref;
806
- }
807
- if ($commit eq $hash) {
808
- last;
809
- }
810
- }
811
-
812
- return wantarray ? @reflist : $lastref;
813
-}
814
-
815
-sub git_get_preceding_references {
816
- my $hash = shift || return undef;
817
- my $type = shift;
818
-
819
- my $refs = git_get_references($type);
820
- open my $fd, "-|", $GIT, "rev-list", $hash
821
- or return undef;
822
- my @commits = map { chomp; $_ } <$fd>;
823
- close $fd
824
- or return undef;
825
-
826
- my @reflist;
827
-
828
- foreach my $commit (@commits) {
829
- foreach my $ref (@{$refs->{$commit}}) {
830
- return $ref unless wantarray;
831
- push @reflist, $ref;
832
- }
833
- }
834
-
835
- return @reflist;
836
-}
837
-
787
sub git_get_rev_name_tags {
788
my $hash = shift || return undef;
789