From b43702ac56e602d5163ef662fb9caf382da90b94 Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Thu, 27 Aug 2015 08:18:58 +0100 Subject: git-p4: fix P4 label import for unprocessed commits With --detect-labels enabled, git-p4 will try to create tags using git fast-import by writing a "tag" clause to the fast-import stream. If the commit that the tag references has not yet actually been processed by fast-import, then the tag can't be created and git-p4 fails to import the P4 label. Teach git-p4 to use fast-import "marks" when creating tags which reference commits created during the current run of the program. Commits created before the current run are still referenced in the old way using a normal git commit. Signed-off-by: Luke Diamand Signed-off-by: Junio C Hamano --- t/t9811-git-p4-label-import.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/t9811-git-p4-label-import.sh') diff --git a/t/t9811-git-p4-label-import.sh b/t/t9811-git-p4-label-import.sh index 22d1fd3e3e..decb66ba30 100755 --- a/t/t9811-git-p4-label-import.sh +++ b/t/t9811-git-p4-label-import.sh @@ -222,7 +222,7 @@ p4_head_revision() { # has not been seen. The presence of a label on a commit # we haven't seen should not cause git-p4 to fail. It should # merely skip that label, and still import other labels. -test_expect_failure 'importing labels with missing revisions' ' +test_expect_success 'importing labels with missing revisions' ' test_when_finished cleanup_git && ( rm -fr "$cli" "$git" && -- cgit v1.2.1