From 8c9e8b6e756cce90797e19dc64e3b51426546cf3 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Mon, 14 Jan 2013 19:47:06 -0500 Subject: git p4: fix sync --branch when no master branch It is legal to sync a branch with a different name than refs/remotes/p4/master, and to do so even when master does not exist. Signed-off-by: Pete Wyckoff Signed-off-by: Junio C Hamano --- t/t9806-git-p4-options.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 't/t9806-git-p4-options.sh') diff --git a/t/t9806-git-p4-options.sh b/t/t9806-git-p4-options.sh index a51f1221ed..3b0000fab2 100755 --- a/t/t9806-git-p4-options.sh +++ b/t/t9806-git-p4-options.sh @@ -88,14 +88,14 @@ test_expect_success 'sync when two branches but no master should noop' ' ) ' -test_expect_failure 'sync --branch updates specified branch' ' +test_expect_success 'sync --branch updates specific branch, no detection' ' test_when_finished cleanup_git && ( cd "$git" && git init && - git p4 sync --branch=refs/remotes/p4/b1 //depot@2 && - git p4 sync --branch=refs/remotes/p4/b2 //depot@2 && - git p4 sync --branch=refs/remotes/p4/b2 && + git p4 sync --branch=b1 //depot@2 && + git p4 sync --branch=b2 //depot@2 && + git p4 sync --branch=b2 && git show -s --format=%s refs/remotes/p4/b1 >show && grep "Initial import" show && git show -s --format=%s refs/remotes/p4/b2 >show && -- cgit v1.2.3