shortlog: read mailmap from ./.mailmap again
[git/gitweb.git] / t / t9105-git-svn-commit-diff.sh
blob746c8277d06a7d9d147df16d6c16efce65bf34a2
1 #!/bin/sh
3 # Copyright (c) 2006 Eric Wong
4 test_description='git-svn commit-diff'
5 . ./lib-git-svn.sh
7 if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0
8 then
9 echo 'Skipping: commit-diff needs SVN libraries'
10 test_done
11 exit 0
14 test_expect_success 'initialize repo' "
15 mkdir import &&
16 cd import &&
17 echo hello > readme &&
18 svn import -m 'initial' . $svnrepo &&
19 cd .. &&
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 -r1 '$prev' '$head' '$svnrepo' &&
37 svn co $svnrepo wc &&
38 cmp readme wc/readme
41 test_done