]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9104-git-svn-follow-parent.sh
git-svn: fix --follow-parent to work with Git::SVN
[thirdparty/git.git] / t / t9104-git-svn-follow-parent.sh
CommitLineData
a00439ac
EW
1#!/bin/sh
2#
3# Copyright (c) 2006 Eric Wong
4#
5
6test_description='git-svn --follow-parent fetching'
7. ./lib-git-svn.sh
8
a00439ac
EW
9test_expect_success 'initialize repo' "
10 mkdir import &&
11 cd import &&
12 mkdir -p trunk &&
13 echo hello > trunk/readme &&
14 svn import -m 'initial' . $svnrepo &&
15 cd .. &&
16 svn co $svnrepo wc &&
17 cd wc &&
18 echo world >> trunk/readme &&
7b3fab87 19 poke trunk/readme &&
a00439ac 20 svn commit -m 'another commit' &&
e66191f4 21 svn up &&
a00439ac
EW
22 svn mv -m 'rename to thunk' trunk thunk &&
23 svn up &&
24 echo goodbye >> thunk/readme &&
7b3fab87 25 poke thunk/readme &&
a00439ac
EW
26 svn commit -m 'bye now' &&
27 cd ..
28 "
29
30test_expect_success 'init and fetch --follow-parent a moved directory' "
31 git-svn init -i thunk $svnrepo/thunk &&
32 git-svn fetch --follow-parent -i thunk &&
15710b6f
EW
33 test \"\`git-rev-parse --verify refs/remotes/trunk\`\" \
34 = \"\`git-rev-parse --verify refs/remotes/thunk~1\`\" &&
35 test \"\`git-cat-file blob refs/remotes/thunk:readme |\
36 sed -n -e '3p'\`\" = goodbye
a00439ac
EW
37 "
38
39test_debug 'gitk --all &'
40
41test_done