]>
Commit | Line | Data |
---|---|---|
95450bbb EW |
1 | #!/bin/sh |
2 | ||
3 | test_description='git svn dcommit CRLF' | |
a881baa2 | 4 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
334afbc7 JS |
5 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
6 | ||
95450bbb EW |
7 | . ./lib-git-svn.sh |
8 | ||
9 | test_expect_success 'setup commit repository' ' | |
10 | svn_cmd mkdir -m "$test_description" "$svnrepo/dir" && | |
11 | git svn clone "$svnrepo" work && | |
12 | ( | |
13 | cd work && | |
14 | echo foo >>foo && | |
15 | git update-index --add foo && | |
16 | printf "a\\r\\n\\r\\nb\\r\\nc\\r\\n" >cmt && | |
17 | p=$(git rev-parse HEAD) && | |
18 | t=$(git write-tree) && | |
19 | cmt=$(git commit-tree -p $p $t <cmt) && | |
a881baa2 | 20 | git update-ref refs/heads/main $cmt && |
95450bbb EW |
21 | git cat-file commit HEAD | tail -n4 >out && |
22 | test_cmp cmt out && | |
23 | git svn dcommit && | |
24 | printf "a\\n\\nb\\nc\\n" >exp && | |
25 | git cat-file commit HEAD | sed -ne 6,9p >out && | |
26 | test_cmp exp out | |
27 | ) | |
28 | ' | |
29 | ||
30 | test_done |