mirror of
https://github.com/git/git.git
synced 2024-11-13 20:53:02 +01:00
18a8269242
Format the subshells introduced by the previous patch (Several tests: cd inside subshell instead of around, 2010-09-06) like so: ( cd subdir && ... ) && This is generally easier to read and has the nice side-effect that this patch will show what commands are used in the subshell, making it easier to check for lost environment variables and similar behavior changes. Cc: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
31 lines
800 B
Bash
Executable file
31 lines
800 B
Bash
Executable file
#!/bin/sh
|
|
test_description='git svn rmdir'
|
|
. ./lib-git-svn.sh
|
|
|
|
test_expect_success 'initialize repo' '
|
|
mkdir import &&
|
|
(
|
|
cd import &&
|
|
mkdir -p deeply/nested/directory/number/1 &&
|
|
mkdir -p deeply/nested/directory/number/2 &&
|
|
echo foo >deeply/nested/directory/number/1/file &&
|
|
echo foo >deeply/nested/directory/number/2/another &&
|
|
svn_cmd import -m "import for git svn" . "$svnrepo"
|
|
)
|
|
'
|
|
|
|
test_expect_success 'mirror via git svn' '
|
|
git svn init "$svnrepo" &&
|
|
git svn fetch &&
|
|
git checkout -f -b test-rmdir ${remotes_git_svn}
|
|
'
|
|
|
|
test_expect_success 'Try a commit on rmdir' '
|
|
git rm -f deeply/nested/directory/number/2/another &&
|
|
git commit -a -m "remove another" &&
|
|
git svn set-tree --rmdir HEAD &&
|
|
svn_cmd ls -R "$svnrepo" | grep ^deeply/nested/directory/number/1
|
|
'
|
|
|
|
|
|
test_done
|