diff options
author | Lars Schneider <larsxschneider@gmail.com> | 2016-06-29 09:35:27 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-08 15:28:16 -0700 |
commit | d604176d23a69c7f690f0379b82b789732a4278f (patch) | |
tree | 0a6a714a5c3c3b0296f766c8020e4b3441224d80 | |
parent | cf4c2cfe52be5bd973a4838f73a35d3959ce2f43 (diff) | |
download | git-d604176d23a69c7f690f0379b82b789732a4278f.tar.gz |
git-p4: place temporary refs used for branch import under refs/git-p4-tmpls/p4-tmp-refs
Git-P4 used to place temporary refs under "git-p4-tmp". Since 3da1f37
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: Lars Schneider <larsxschneider@gmail.com>
Reviewed-by: Vitor Antunes <vitor.hda@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-x | git-p4.py | 2 | ||||
-rwxr-xr-x | t/t9801-git-p4-branch.sh | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -2274,7 +2274,7 @@ class P4Sync(Command, P4UserMap): 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'): diff --git a/t/t9801-git-p4-branch.sh b/t/t9801-git-p4-branch.sh index 0aafd03334..6a86d6996b 100755 --- a/t/t9801-git-p4-branch.sh +++ b/t/t9801-git-p4-branch.sh @@ -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 ) ' |