git p4: clone --branch should checkout master

When using the --branch argument to "git p4 clone", one
might specify a destination for p4 changes different from
the default refs/remotes/p4/master.  Both cases should
create a master branch and checkout files.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Pete Wyckoff
2013-01-14 19:47:01 -05:00
committed by Junio C Hamano
parent 695d699894
commit c595956db9
3 changed files with 11 additions and 14 deletions

View File

@ -27,7 +27,7 @@ test_expect_success 'clone no --git-dir' '
test_must_fail git p4 clone --git-dir=xx //depot
'
test_expect_failure 'clone --branch should checkout master' '
test_expect_success 'clone --branch should checkout master' '
git p4 clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
test_when_finished cleanup_git &&
(