From: "Shawn O. Pearce" <spearce@spearce.org>
To: git@vger.kernel.org
Subject: bug in read-tree -m on A -> A/A
Date: Fri, 16 Mar 2007 00:19:32 -0400 [thread overview]
Message-ID: <20070316041932.GA31606@spearce.org> (raw)
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.
next reply other threads:[~2007-03-16 4:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-16 4:19 Shawn O. Pearce [this message]
2007-03-16 5:01 ` bug in read-tree -m on A -> A/A Junio C Hamano
2007-03-16 6:25 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070316041932.GA31606@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox