about summary refs log tree commit diff
path: root/third_party/git/t/t9142-git-svn-shallow-clone.sh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/t/t9142-git-svn-shallow-clone.sh')
-rwxr-xr-xthird_party/git/t/t9142-git-svn-shallow-clone.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/third_party/git/t/t9142-git-svn-shallow-clone.sh b/third_party/git/t/t9142-git-svn-shallow-clone.sh
new file mode 100755
index 000000000000..a30730502d85
--- /dev/null
+++ b/third_party/git/t/t9142-git-svn-shallow-clone.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Copyright (c) 2009 Eric Wong
+#
+
+test_description='git svn shallow clone'
+. ./lib-git-svn.sh
+
+test_expect_success 'setup test repository' '
+	svn_cmd mkdir -m "create standard layout" \
+	  "$svnrepo"/trunk "$svnrepo"/branches "$svnrepo"/tags &&
+	svn_cmd cp -m "branch off trunk" \
+	  "$svnrepo"/trunk "$svnrepo"/branches/a &&
+	svn_cmd co "$svnrepo"/branches/a &&
+	(
+		cd a &&
+		> foo &&
+		svn_cmd add foo &&
+		svn_cmd commit -m "add foo"
+	) &&
+	maybe_start_httpd
+'
+
+test_expect_success 'clone trunk with "-r HEAD"' '
+	git svn clone -r HEAD "$svnrepo/trunk" g &&
+	( cd g && git rev-parse --symbolic --verify HEAD )
+'
+
+test_done