Skip to content

Commit 7fb84ce

Browse files
committed
SVN 1.7 will truncate "not-a%40{0}" to just "not-a".
Rather than guess what SVN is going to do for each version, make the test use the branch name that was actually created.
1 parent ed6faef commit 7fb84ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

t/t9118-git-svn-funky-branch-names.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ test_expect_success 'setup svnrepo' '
3232
start_httpd
3333
'
3434

35+
# SVN 1.7 will truncate "not-a%40{0]" to just "not-a".
36+
# Look at what SVN wound up naming the branch and use that.
37+
# Be sure to escape the @ if it shows up.
38+
non_reflog=`svn_cmd ls "$svnrepo/pr ject/branches" | grep not-a | sed 's/\///' | sed 's/@/%40/'`
39+
3540
test_expect_success 'test clone with funky branch names' '
3641
git svn clone -s "$svnrepo/pr ject" project &&
3742
(
@@ -42,7 +47,7 @@ test_expect_success 'test clone with funky branch names' '
4247
git rev-parse "refs/remotes/%2Eleading_dot" &&
4348
git rev-parse "refs/remotes/trailing_dot%2E" &&
4449
git rev-parse "refs/remotes/trailing_dotlock%2Elock" &&
45-
git rev-parse "refs/remotes/not-a%40{0}reflog"
50+
git rev-parse "refs/remotes/$non_reflog"
4651
)
4752
'
4853

0 commit comments

Comments
 (0)