about summary refs log tree commit diff
path: root/third_party/git/t/Git-SVN/Utils
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-21T10·03+0300
committerVincent Ambo <mail@tazj.in>2021-09-21T11·29+0300
commit43b1791ec601732ac31195df96781a848360a9ac (patch)
treedaae8d638343295d2f1f7da955e556ef4c958864 /third_party/git/t/Git-SVN/Utils
parent2d8e7dc9d9c38127ec4ebd13aee8e8f586a43318 (diff)
chore(3p/git): Unvendor git and track patches instead r/2903
This was vendored a long time ago under the expectation that keeping
it in sync with cgit would be easier this way, but it has proven not
to be a big issue.

On the other hand, a vendored copy of git is an annoying maintenance
burden. It is much easier to rebase the single (dottime) patch that we
have.

This removes the vendored copy of git and instead passes the git
source code to cgit via `pkgs.srcOnly`, which includes the applied
patch so that cgit can continue rendering dottime.

Change-Id: If31f62dea7ce688fd1b9050204e9378019775f2b
Diffstat (limited to 'third_party/git/t/Git-SVN/Utils')
-rwxr-xr-xthird_party/git/t/Git-SVN/Utils/add_path_to_url.t27
-rwxr-xr-xthird_party/git/t/Git-SVN/Utils/can_compress.t11
-rwxr-xr-xthird_party/git/t/Git-SVN/Utils/canonicalize_url.t26
-rwxr-xr-xthird_party/git/t/Git-SVN/Utils/collapse_dotdot.t23
-rwxr-xr-xthird_party/git/t/Git-SVN/Utils/fatal.t34
-rwxr-xr-xthird_party/git/t/Git-SVN/Utils/join_paths.t32
6 files changed, 0 insertions, 153 deletions
diff --git a/third_party/git/t/Git-SVN/Utils/add_path_to_url.t b/third_party/git/t/Git-SVN/Utils/add_path_to_url.t
deleted file mode 100755
index bfbd87845f77..000000000000
--- a/third_party/git/t/Git-SVN/Utils/add_path_to_url.t
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Test::More 'no_plan';
-
-use Git::SVN::Utils qw(
-	add_path_to_url
-);
-
-# A reference cannot be a hash key, so we use an array.
-my @tests = (
-	["http://x.com", "bar"]			=> 'http://x.com/bar',
-	["http://x.com", ""]			=> 'http://x.com',
-	["http://x.com/foo/", undef]		=> 'http://x.com/foo/',
-	["http://x.com/foo/", "/bar/baz/"]	=> 'http://x.com/foo/bar/baz/',
-	["http://x.com", 'per%cent']		=> 'http://x.com/per%25cent',
-);
-
-while(@tests) {
-	my($have, $want) = splice @tests, 0, 2;
-
-	my $args = join ", ", map { qq['$_'] } map { defined($_) ? $_ : 'undef' } @$have;
-	my $name = "add_path_to_url($args) eq $want";
-	is add_path_to_url(@$have), $want, $name;
-}
diff --git a/third_party/git/t/Git-SVN/Utils/can_compress.t b/third_party/git/t/Git-SVN/Utils/can_compress.t
deleted file mode 100755
index d7b49b8d546a..000000000000
--- a/third_party/git/t/Git-SVN/Utils/can_compress.t
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More 'no_plan';
-
-use Git::SVN::Utils qw(can_compress);
-
-# !! is the "convert this to boolean" operator.
-is !!can_compress(), !!eval { require Compress::Zlib };
diff --git a/third_party/git/t/Git-SVN/Utils/canonicalize_url.t b/third_party/git/t/Git-SVN/Utils/canonicalize_url.t
deleted file mode 100755
index 05795ab636d6..000000000000
--- a/third_party/git/t/Git-SVN/Utils/canonicalize_url.t
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/env perl
-
-# Test our own home rolled URL canonicalizer.  Test the private one
-# directly because we can't predict what the SVN API is doing to do.
-
-use strict;
-use warnings;
-
-use Test::More 'no_plan';
-
-use Git::SVN::Utils;
-my $canonicalize_url = \&Git::SVN::Utils::_canonicalize_url_ourselves;
-
-my %tests = (
-	"http://x.com"			=> "http://x.com",
-	"http://x.com/"			=> "http://x.com",
-	"http://x.com/foo/bar"		=> "http://x.com/foo/bar",
-	"http://x.com//foo//bar//"	=> "http://x.com/foo/bar",
-	"http://x.com/  /%/"		=> "http://x.com/%20%20/%25",
-);
-
-for my $arg (keys %tests) {
-	my $want = $tests{$arg};
-
-	is $canonicalize_url->($arg), $want, "canonicalize_url('$arg') => $want";
-}
diff --git a/third_party/git/t/Git-SVN/Utils/collapse_dotdot.t b/third_party/git/t/Git-SVN/Utils/collapse_dotdot.t
deleted file mode 100755
index 1da1cce156c4..000000000000
--- a/third_party/git/t/Git-SVN/Utils/collapse_dotdot.t
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Test::More 'no_plan';
-
-use Git::SVN::Utils;
-my $collapse_dotdot = \&Git::SVN::Utils::_collapse_dotdot;
-
-my %tests = (
-	"foo/bar/baz"			=> "foo/bar/baz",
-	".."				=> "..",
-	"foo/.."			=> "",
-	"/foo/bar/../../baz"		=> "/baz",
-	"deeply/.././deeply/nested"	=> "./deeply/nested",
-);
-
-for my $arg (keys %tests) {
-	my $want = $tests{$arg};
-
-	is $collapse_dotdot->($arg), $want, "_collapse_dotdot('$arg') => $want";
-}
diff --git a/third_party/git/t/Git-SVN/Utils/fatal.t b/third_party/git/t/Git-SVN/Utils/fatal.t
deleted file mode 100755
index 49e1438295c0..000000000000
--- a/third_party/git/t/Git-SVN/Utils/fatal.t
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Test::More 'no_plan';
-
-BEGIN {
-	# Override exit at BEGIN time before Git::SVN::Utils is loaded
-	# so it will see our local exit later.
-	*CORE::GLOBAL::exit = sub(;$) {
-	return @_ ? CORE::exit($_[0]) : CORE::exit();
-	};
-}
-
-use Git::SVN::Utils qw(fatal);
-
-# fatal()
-{
-	# Capture the exit code and prevent exit.
-	my $exit_status;
-	no warnings 'redefine';
-	local *CORE::GLOBAL::exit = sub { $exit_status = $_[0] || 0 };
-
-	# Trap fatal's message to STDERR
-	my $stderr;
-	close STDERR;
-	ok open STDERR, ">", \$stderr;
-
-	fatal "Some", "Stuff", "Happened";
-
-	is $stderr, "Some Stuff Happened\n";
-	is $exit_status, 1;
-}
diff --git a/third_party/git/t/Git-SVN/Utils/join_paths.t b/third_party/git/t/Git-SVN/Utils/join_paths.t
deleted file mode 100755
index d4488e7162cf..000000000000
--- a/third_party/git/t/Git-SVN/Utils/join_paths.t
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env perl
-
-use strict;
-use warnings;
-
-use Test::More 'no_plan';
-
-use Git::SVN::Utils qw(
-	join_paths
-);
-
-# A reference cannot be a hash key, so we use an array.
-my @tests = (
-	[]					=> '',
-	["/x.com", "bar"]			=> '/x.com/bar',
-	["x.com", ""]				=> 'x.com',
-	["/x.com/foo/", undef, "bar"]		=> '/x.com/foo/bar',
-	["x.com/foo/", "/bar/baz/"]		=> 'x.com/foo/bar/baz/',
-	["foo", "bar"]				=> 'foo/bar',
-	["/foo/bar", "baz", "/biff"]		=> '/foo/bar/baz/biff',
-	["", undef, "."]			=> '.',
-	[]					=> '',
-
-);
-
-while(@tests) {
-	my($have, $want) = splice @tests, 0, 2;
-
-	my $args = join ", ", map { qq['$_'] } map { defined($_) ? $_ : 'undef' } @$have;
-	my $name = "join_paths($args) eq '$want'";
-	is join_paths(@$have), $want, $name;
-}