Merge branch 'ls/p4-tmp-refs'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 Jul 2016 20:22:24 +0000 (13:22 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Jul 2016 20:22:24 +0000 (13:22 -0700)
"git p4" used a location outside $GIT_DIR/refs/ to place its
temporary branches, which has been moved to refs/git-p4-tmp/.

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

git-p4.py
t/t9801-git-p4-branch.sh
index b123aa2726490403efef7d1aa32161ad05c42a4b..ac6f4c14fba8e459318d9e038327fbb34bea2361 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -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'):
index 0aafd03334125d1af23acdff3f396b1bdabaf6c1..6a86d6996b97de0bed0503021b76b33db8441029 100755 (executable)
@@ -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
        )
 '