]>
git.ipfire.org Git - thirdparty/git.git/blob - contrib/git-svn/t/t0005-commit-diff.sh
3 # Copyright (c) 2006 Eric Wong
4 test_description
='git-svn commit-diff'
7 if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
9 echo 'Skipping: commit-diff needs SVN libraries'
14 test_expect_success
'initialize repo' "
17 echo hello > readme &&
18 svn import -m 'initial' . $svnrepo &&
20 echo hello > readme &&
21 git update-index --add readme &&
22 git commit -a -m 'initial' &&
23 echo world >> readme &&
24 git commit -a -m 'another'
27 head=`git rev-parse --verify HEAD^0`
28 prev
=`git rev-parse --verify HEAD^1`
30 # the internals of the commit-diff command are the same as the regular
31 # commit, so only a basic test of functionality is needed since we've
32 # already tested commit extensively elsewhere
34 test_expect_success
'test the commit-diff command' "
35 test -n '$prev' && test -n '$head' &&
36 git-svn commit-diff '$prev' '$head' '$svnrepo' &&