<commit_before>#!/bin/sh
#
# Copyright (c) 2006 <NAME>
#

test_description='git svn basic tests'
GIT_SVN_LC_ALL=${LC_ALL:-$LANG}

. ./lib-git-svn.sh

say 'define NO_SVN_TESTS to skip git svn tests'

case "$GIT_SVN_LC_ALL" in
*.UTF-8)
	test_set_prereq UTF8
	;;
*)
	say "# UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)"
	;;
esac

test_expect_success \
    'initialize git svn' '
	mkdir import &&
	(
		cd import &&
		echo foo >foo &&
		ln -s foo foo.link
		mkdir -p dir/a/b/c/d/e &&
		echo "deep dir" >dir/a/b/c/d/e/file &&
		mkdir bar &&
		echo "zzz" >bar/zzz &&
		write_script exec.sh </dev/null &&
		svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
	) &&
	rm -rf import &&
	git svn init "$svnrepo"'

test_expect_success \
    'import an SVN revision into git' \
    'git svn fetch'

test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'

name='try a deep --rmdir with a commit'
test_expect_success "$name" '
	git checkout -f -b mybranch ${remotes_git_svn} &&
	mv dir/a/b/c/d/e/file dir/file &&
	cp dir/file file &&
	git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
	git commit -m "$name" &&
	git svn set-tree --find-copies-harder --rmdir \
		${remotes_git_svn}..mybranch &&
	svn_cmd up "$SVN_TREE" &&<commit_msg>t9100: fix breakage when SHELL_PATH is not /bin/sh<commit_after>#!/bin/sh
#
# Copyright (c) 2006 <NAME>
#

test_description='git svn basic tests'
GIT_SVN_LC_ALL=${LC_ALL:-$LANG}

. ./lib-git-svn.sh

say 'define NO_SVN_TESTS to skip git svn tests'

case "$GIT_SVN_LC_ALL" in
*.UTF-8)
	test_set_prereq UTF8
	;;
*)
	say "# UTF-8 locale not set, some tests skipped ($GIT_SVN_LC_ALL)"
	;;
esac

test_expect_success \
    'initialize git svn' '
	mkdir import &&
	(
		cd import &&
		echo foo >foo &&
		ln -s foo foo.link
		mkdir -p dir/a/b/c/d/e &&
		echo "deep dir" >dir/a/b/c/d/e/file &&
		mkdir bar &&
		echo "zzz" >bar/zzz &&
		echo "#!/bin/sh" >exec.sh &&
		chmod +x exec.sh &&
		svn_cmd import -m "import for git svn" . "$svnrepo" >/dev/null
	) &&
	rm -rf import &&
	git svn init "$svnrepo"'

test_expect_success \
    'import an SVN revision into git' \
    'git svn fetch'

test_expect_success "checkout from svn" 'svn co "$svnrepo" "$SVN_TREE"'

name='try a deep --rmdir with a commit'
test_expect_success "$name" '
	git checkout -f -b mybranch ${remotes_git_svn} &&
	mv dir/a/b/c/d/e/file dir/file &&
	cp dir/file file &&
	git update-index --add --remove dir/a/b/c/d/e/file dir/file file &&
	git commit -m "$name" &&
	git svn set-tree --find-copies-harder --rmdir \
		${remotes_git_svn}..mybranch &&
	svn_cmd up "$SVN_TREE" &&
{'fraction_non_alphanumeric': 0.16084452975047986, 'fraction_numerical': 0.00690978886756238, 'mean_word_length': 3.1964573268921095, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1970588', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1104, 'n_words': 290}