diff options
| author | Junio C Hamano <junkio@cox.net> | 2006-08-07 17:02:07 -0700 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-08-07 17:02:07 -0700 |
| commit | 9673198ee867cea4ed70d2cf54c1a2eb8f27bb46 (patch) | |
| tree | f06a5be02102b0a78f56e18beffa8fa5c3e70b6e /t/t9105-git-svn-commit-diff.sh | |
| parent | 96bc4de85cf810db5c7cd94bf0688a98a64a0bc7 (diff) | |
| parent | 7c49cb288173ab5264b3b9e4257aeeb13388334c (diff) | |
| download | git-9673198ee867cea4ed70d2cf54c1a2eb8f27bb46.tar.xz | |
Merge branch 'master' into pb/gitpm
This is to resolve the conflicts with Ryan's annotate updates early.
Diffstat (limited to 't/t9105-git-svn-commit-diff.sh')
| -rwxr-xr-x | t/t9105-git-svn-commit-diff.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/t/t9105-git-svn-commit-diff.sh b/t/t9105-git-svn-commit-diff.sh new file mode 100755 index 0000000000..f994b72f80 --- /dev/null +++ b/t/t9105-git-svn-commit-diff.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Copyright (c) 2006 Eric Wong +test_description='git-svn commit-diff' +. ./lib-git-svn.sh + +if test -n "$GIT_SVN_NO_LIB" && test "$GIT_SVN_NO_LIB" -ne 0 +then + echo 'Skipping: commit-diff needs SVN libraries' + test_done + exit 0 +fi + +test_expect_success 'initialize repo' " + mkdir import && + cd import && + echo hello > readme && + svn import -m 'initial' . $svnrepo && + cd .. && + echo hello > readme && + git update-index --add readme && + git commit -a -m 'initial' && + echo world >> readme && + git commit -a -m 'another' + " + +head=`git rev-parse --verify HEAD^0` +prev=`git rev-parse --verify HEAD^1` + +# the internals of the commit-diff command are the same as the regular +# commit, so only a basic test of functionality is needed since we've +# already tested commit extensively elsewhere + +test_expect_success 'test the commit-diff command' " + test -n '$prev' && test -n '$head' && + git-svn commit-diff '$prev' '$head' '$svnrepo' && + svn co $svnrepo wc && + cmp readme wc/readme + " + +test_done |
