tvl-depot/third_party/git/t/t9142-git-svn-shallow-clone.sh
Vincent Ambo 7ef0d62730 merge(third_party/git): Merge squashed git subtree at v2.23.0
Merge commit '1b593e1ea4d2af0f6444d9a7788d5d99abd6fde5' as 'third_party/git'
2020-01-11 23:40:29 +00:00

29 lines
639 B
Bash
Executable file

#!/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