1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-19 23:26:13 +02:00
git/t/t9142-git-svn-shallow-clone.sh
SZEDER Gábor 8c3b9f7faa tests: use 'test_atexit' to stop httpd
Use 'test_atexit' to run cleanup commands to stop httpd at the end of
the test script or upon interrupt or failure, as it is shorter,
simpler, and more robust than registering such cleanup commands in the
trap on EXIT in the test scripts.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-03-14 12:34:39 +09:00

30 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