]> git.ipfire.org Git - thirdparty/git.git/blame - t/t9118-git-svn-funky-branch-names.sh
correct type of EMPTY_TREE_SHA1_BIN
[thirdparty/git.git] / t / t9118-git-svn-funky-branch-names.sh
CommitLineData
cfbe7ab3
EW
1#!/bin/sh
2#
3# Copyright (c) 2007 Eric Wong
4#
5
1364ff27 6test_description='git svn funky branch names'
cfbe7ab3
EW
7. ./lib-git-svn.sh
8
f4392df4
EW
9# Abo-Uebernahme (Bug #994)
10scary_uri='Abo-Uebernahme%20%28Bug%20%23994%29'
11scary_ref='Abo-Uebernahme%20(Bug%20#994)'
12
f69e836f 13test_expect_success 'setup svnrepo' '
cfbe7ab3
EW
14 mkdir project project/trunk project/branches project/tags &&
15 echo foo > project/trunk/foo &&
da083d68 16 svn_cmd import -m "$test_description" project "$svnrepo/pr ject" &&
cfbe7ab3 17 rm -rf project &&
da083d68 18 svn_cmd cp -m "fun" "$svnrepo/pr ject/trunk" \
f69e836f 19 "$svnrepo/pr ject/branches/fun plugin" &&
da083d68 20 svn_cmd cp -m "more fun!" "$svnrepo/pr ject/branches/fun plugin" \
f69e836f 21 "$svnrepo/pr ject/branches/more fun plugin!" &&
da083d68 22 svn_cmd cp -m "scary" "$svnrepo/pr ject/branches/fun plugin" \
f4392df4 23 "$svnrepo/pr ject/branches/$scary_uri" &&
73d41955
TS
24 svn_cmd cp -m "leading dot" "$svnrepo/pr ject/trunk" \
25 "$svnrepo/pr ject/branches/.leading_dot" &&
26 svn_cmd cp -m "trailing dot" "$svnrepo/pr ject/trunk" \
27 "$svnrepo/pr ject/branches/trailing_dot." &&
28 svn_cmd cp -m "trailing .lock" "$svnrepo/pr ject/trunk" \
29 "$svnrepo/pr ject/branches/trailing_dotlock.lock" &&
30 svn_cmd cp -m "reflog" "$svnrepo/pr ject/trunk" \
08fd28bb 31 "$svnrepo/pr ject/branches/not-a%40{0}reflog" &&
cfbe7ab3 32 start_httpd
f69e836f 33 '
cfbe7ab3 34
f69e836f
BD
35test_expect_success 'test clone with funky branch names' '
36 git svn clone -s "$svnrepo/pr ject" project &&
4ecb7938
JN
37 (
38 cd project &&
f69e836f
BD
39 git rev-parse "refs/remotes/fun%20plugin" &&
40 git rev-parse "refs/remotes/more%20fun%20plugin!" &&
f4392df4 41 git rev-parse "refs/remotes/$scary_ref" &&
73d41955
TS
42 git rev-parse "refs/remotes/%2Eleading_dot" &&
43 git rev-parse "refs/remotes/trailing_dot%2E" &&
44 git rev-parse "refs/remotes/trailing_dotlock%2Elock" &&
4ecb7938
JN
45 git rev-parse "refs/remotes/not-a%40{0}reflog"
46 )
f69e836f 47 '
cfbe7ab3
EW
48
49test_expect_success 'test dcommit to funky branch' "
4ecb7938
JN
50 (
51 cd project &&
52 git reset --hard 'refs/remotes/more%20fun%20plugin!' &&
53 echo hello >> foo &&
54 git commit -m 'hello' -- foo &&
55 git svn dcommit
56 )
cfbe7ab3
EW
57 "
58
f4392df4 59test_expect_success 'test dcommit to scary branch' '
4ecb7938
JN
60 (
61 cd project &&
62 git reset --hard "refs/remotes/$scary_ref" &&
63 echo urls are scary >> foo &&
64 git commit -m "eep" -- foo &&
65 git svn dcommit
66 )
f4392df4
EW
67 '
68
73d41955 69test_expect_success 'test dcommit to trailing_dotlock branch' '
4ecb7938
JN
70 (
71 cd project &&
72 git reset --hard "refs/remotes/trailing_dotlock%2Elock" &&
73 echo who names branches like this anyway? >> foo &&
74 git commit -m "bar" -- foo &&
75 git svn dcommit
76 )
73d41955
TS
77 '
78
cfbe7ab3
EW
79stop_httpd
80
81test_done