Git development
 help / color / mirror / Atom feed
* bug in read-tree -m on A -> A/A
@ 2007-03-16  4:19 Shawn O. Pearce
  2007-03-16  5:01 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-03-16  4:19 UTC (permalink / raw)
  To: git

dancor on #git just noticed a bug in read-tree -m that prevents
him from switching branches when the type of a path changes
between a directory and a file.  The following test appears to
trigger the same failure, but I likely won't have time to fix
it myself tonight.  So if someone else gets a chance...

diff --git a/t/t9999-typechange.sh b/t/t9999-typechange.sh
new file mode 100755
index 0000000..dc92094
--- /dev/null
+++ b/t/t9999-typechange.sh
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+test_description='switch branches over path typechange'
+
+. ./test-lib.sh
+
+test_expect_success setup '
+	: >A &&
+	git-add A &&
+	tree1=$(git-write-tree) &&
+	comm1=$(echo A | git-commit-tree $tree1) &&
+	git-update-ref refs/heads/comm1 $comm1 &&
+	rm .git/index &&
+	rm -f A &&
+	mkdir A &&
+	echo : >A/A &&
+	git-add A/A &&
+	tree2=$(git-write-tree) &&
+	comm2=$(echo A/A | git-commit-tree $tree2) &&
+	git-update-ref HEAD $comm2
+'
+
+test_expect_success checkout 'git-checkout $comm1'
+
+test_done

-- 
Shawn.

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

end of thread, other threads:[~2007-03-16  6:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16  4:19 bug in read-tree -m on A -> A/A Shawn O. Pearce
2007-03-16  5:01 ` Junio C Hamano
2007-03-16  6:25   ` 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