aboutsummaryrefslogtreecommitdiff
path: root/t/t9142-git-svn-shallow-clone.sh
blob: 1236accd993d5bc1a80fbda720ce229f8e93940c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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"
	)
'

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 )
'

stop_httpd

test_done