summaryrefslogtreecommitdiffstats
path: root/t/t9020-remote-svn.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-06-24 16:46:36 +0200
committerJunio C Hamano <gitster@pobox.com>2020-06-24 18:14:21 +0200
commit0068f2116e67fac511941442cbbf7b0109adf57a (patch)
tree58bce9855ba5bf57faa352e44a54486cdef7b521 /t/t9020-remote-svn.sh
parentremote: use the configured default branch name when appropriate (diff)
downloadgit-0068f2116e67fac511941442cbbf7b0109adf57a.tar.xz
git-0068f2116e67fac511941442cbbf7b0109adf57a.zip
testsvn: respect `init.defaultBranch`
The default name of the initial branch in new repositories can now be configured. The `testsvn` remote helper translates the remote Subversion repository's branch name `trunk` to the hard-coded name `master`. Clearly, the intention was to make the name align with Git's defaults. So while we are not talking about a newly-created repository in the `testsvn` context, it is a newly-created _Git_ repository, si it _still_ makes sense to use the overridden default name for the initial branch whenever users configured it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-xt/t9020-remote-svn.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t9020-remote-svn.sh b/t/t9020-remote-svn.sh
index 6fca08e5e3..0f97bafb00 100755
--- a/t/t9020-remote-svn.sh
+++ b/t/t9020-remote-svn.sh
@@ -84,6 +84,12 @@ test_expect_success REMOTE_SVN 'incremental imports must lead to the same head'
test_cmp master.good .git/refs/remotes/svnsim/master
'
+test_expect_success REMOTE_SVN 'respects configured default initial branch' '
+ git -c init.defaultBranch=trunk remote add -f trunk \
+ "testsvn::file://$TEST_DIRECTORY/t9154/svn.dump" &&
+ git rev-parse --verify refs/remotes/trunk/trunk
+'
+
test_debug 'git branch -a'
test_done