git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] git-p4: place temporary refs used for branch import under ref/git-p4-tmp
@ 2016-06-27  7:26 larsxschneider
  2016-06-28 10:26 ` Michael Haggerty
  2016-06-28 18:21 ` Johannes Sixt
  0 siblings, 2 replies; 7+ messages in thread
From: larsxschneider @ 2016-06-27  7:26 UTC (permalink / raw)
  To: git; +Cc: mhagger, luke, vitor.hda, Lars Schneider

From: Lars Schneider <larsxschneider@gmail.com>

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

All refs under "ref" 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>
---

Please note: As mentioned in $gmane/297703 I am no expert for the Git-P4
branch import. I post this patch to make the Git-P4 unit tests working,
again. Critical review highly appreciated :-)

Thanks,
Lars


 git-p4.py                | 2 +-
 t/t9801-git-p4-branch.sh | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/git-p4.py b/git-p4.py
index b6593cf..6b252df 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -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 0aafd03..8f28ed2 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_path_is_missing .git/ref/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_path_is_missing .git/ref/git-p4-tmp
 	)
 '

--
2.5.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-01 20:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-27  7:26 [PATCH v1] git-p4: place temporary refs used for branch import under ref/git-p4-tmp larsxschneider
2016-06-28 10:26 ` Michael Haggerty
2016-06-28 18:21 ` Johannes Sixt
2016-06-28 18:49   ` Junio C Hamano
2016-06-29  7:35     ` [PATCH v2] git-p4: place temporary refs used for branch import under refs/git-p4-tmp larsxschneider
2016-07-01 13:45       ` Vitor Antunes
2016-07-01 20:10         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).