summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJoachim Kuebart <joachim.kuebart@gmail.com>2021-05-05 11:56:25 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-06 03:51:31 (GMT)
commitc3ab08844c30f85342622fef1e4cf1ef1bb2bcd0 (patch)
tree5998814333f486b364fedc78aa29477b6bbc7c1f /t
parent48bf2fa8bad054d66bd79c6ba903c89c704201f7 (diff)
downloadgit-c3ab08844c30f85342622fef1e4cf1ef1bb2bcd0.zip
git-c3ab08844c30f85342622fef1e4cf1ef1bb2bcd0.tar.gz
git-c3ab08844c30f85342622fef1e4cf1ef1bb2bcd0.tar.bz2
git-p4: ensure complex branches are cloned correctly
When importing a branch from p4, git-p4 searches the history of the parent branch for the branch point. The test for the complex branch structure ensures all files have the expected contents, but doesn't examine the branch structure. Check for the correct branch structure by making sure that the initial commit on each branch is empty. This ensures that the initial commit's parent is indeed the correct branch-off point. Signed-off-by: Joachim Kuebart <joachim.kuebart@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t9801-git-p4-branch.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh
index 56e6469..0d3520f 100755
--- a/t/t9801-git-p4-branch.sh
+++ b/t/t9801-git-p4-branch.sh
@@ -294,11 +294,13 @@ test_expect_success 'git p4 clone complex branches' '
test_path_is_file file3 &&
grep update file2 &&
git reset --hard p4/depot/branch4 &&
+ git diff-tree --quiet HEAD &&
test_path_is_file file1 &&
test_path_is_file file2 &&
test_path_is_missing file3 &&
! grep update file2 &&
git reset --hard p4/depot/branch5 &&
+ git diff-tree --quiet HEAD &&
test_path_is_file file1 &&
test_path_is_file file2 &&
test_path_is_file file3 &&