Commit d604176d authored by Lars Schneider's avatar Lars Schneider Committed by Junio C Hamano

git-p4: place temporary refs used for branch import under refs/git-p4-tmp

Git-P4 used to place temporary refs under "git-p4-tmp". Since 3da1f37d
Git checks that all refs are placed under "refs". Instruct Git-P4 to
place temporary refs under "refs/git-p4-tmp". There are no backwards
compatibility considerations as these refs are transient.

Use "git show-ref --verify" to check the (non-)existience of the refs
instead of file checks assuming the file-based ref backend.

All refs under "refs" are shared across all worktrees. This is not
desired for temporary Git-P4 refs and will be adressed in a later patch.
Signed-off-by: default avatarLars Schneider <[email protected]>
Reviewed-by: Vitor Antunes's avatarVitor Antunes <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent cf4c2cfe
......@@ -2274,7 +2274,7 @@ def __init__(self):
self.useClientSpec_from_options = False
self.clientSpecDirs = None
self.tempBranches = []
self.tempBranchLocation = "git-p4-tmp"
self.tempBranchLocation = "refs/git-p4-tmp"
self.largeFileSystem = None
if gitConfig('git-p4.largeFileSystem'):
......
......@@ -300,7 +300,7 @@ test_expect_success 'git p4 clone complex branches' '
test_path_is_file file2 &&
test_path_is_file file3 &&
! grep update file2 &&
test_path_is_missing .git/git-p4-tmp
test_must_fail git show-ref --verify refs/git-p4-tmp
)
'
......@@ -352,7 +352,7 @@ test_expect_success 'git p4 sync changes to two branches in the same changelist'
test_path_is_file file2 &&
test_path_is_file file3 &&
! grep update file2 &&
test_path_is_missing .git/git-p4-tmp
test_must_fail git show-ref --verify refs/git-p4-tmp
)
'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment