Simple check that URL rewriting functionality works as expected.
Signed-off-by: Johan Herland <redacted>
---
t/t1300-repo-config.sh | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 64567fb..dcd04c2 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -741,4 +741,18 @@ test_expect_success 'symlinked configuration' '
'
+test_expect_success '--rewrite-url' '
+
+ git config url.ssh://example.com/foo/.insteadOf http://example.com/ &&
+ git config url.../.insteadOf git://example.com/ &&
+ a=$(git config --rewrite-url http://example.com/baz/xyzzy.git) &&
+ test "zssh://example.com/foo/baz/xyzzy.git" = "z$a" &&
+ b=$(git config --rewrite-url git://example.com/baz/xyzzy.git) &&
+ test "z../baz/xyzzy.git" = "z$b" &&
+ c=$(git config --rewrite-url ssh://example.com/foo/baz/xyzzy.git) &&
+ test "zssh://example.com/foo/baz/xyzzy.git" = "z$c" &&
+ d=$(git config --rewrite-url rsync://example.com/baz/xyzzy.git) &&
+ test "zrsync://example.com/baz/xyzzy.git" = "z$d"
+'
+
test_done
--
1.6.0.rc1.34.g0fe8c