diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-08-12 16:01:59 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-08-12 21:41:09 -0700 |
commit | b186a261b1f7ec1fbda8c5f6d84595f3a7716d92 (patch) | |
tree | 127158a516cf4a8e38bf8e7209eaa5c279f093bb /t/t9145-git-svn-master-branch.sh | |
parent | 6ffd781226f04629eff63a684b47ad7555143312 (diff) | |
download | git-b186a261b1f7ec1fbda8c5f6d84595f3a7716d92.tar.gz git-b186a261b1f7ec1fbda8c5f6d84595f3a7716d92.tar.xz |
svn: initial "master" points to trunk if possible
Since "trunk" is a convention for the main development branch in
the SVN world, try to make that the master branch upon initial
checkout if it exists. This is probably less surprising based
on user requests.
t9135 was the only test which relied on the previous behavior
and thus needed to be modified.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 't/t9145-git-svn-master-branch.sh')
-rwxr-xr-x | t/t9145-git-svn-master-branch.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/t/t9145-git-svn-master-branch.sh b/t/t9145-git-svn-master-branch.sh new file mode 100755 index 000000000..16852d26a --- /dev/null +++ b/t/t9145-git-svn-master-branch.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Copyright (c) 2009 Eric Wong +# +test_description='git svn initial master branch is "trunk" if possible' +. ./lib-git-svn.sh + +test_expect_success 'setup test repository' ' + mkdir i && + > i/a && + svn_cmd import -m trunk i "$svnrepo/trunk" && + svn_cmd import -m b/a i "$svnrepo/branches/a" && + svn_cmd import -m b/b i "$svnrepo/branches/b" +' + +test_expect_success 'git svn clone --stdlayout sets up trunk as master' ' + git svn clone -s "$svnrepo" g && + ( + cd g && + test x`git rev-parse --verify refs/remotes/trunk^0` = \ + x`git rev-parse --verify refs/heads/master^0` + ) +' + +test_done |