Re: file deletion in index lost after checkout -b
- From
- Jing Xue <jingxue@digizenstudio.com>
- Date
- Sep 6, 2008, 17:11 UTC
- Message-ID
- <20080906171108.GA10924@jabba.hq.digizenstudio.com>
- In-Reply-To
- <7vljy7xgs5.fsf@gitster.siamese.dyndns.org>
On Thu, Sep 04, 2008 at 11:12:26PM -0700, Junio C Hamano wrote:
> [jc: please redirect an answer _meant for you_ off to the list with M-F-T header]
I changed mutt to not use M-F-T with the git list at all. Hope this one turns out better.
Show 11 quoted lines
> > The deletion of 2.txt appears lost during 'checkout -b foo', while the > > modification and addition were both brought over. Is it a bug? > > This behaviour is unchanged since early June 2005. > > http://thread.gmane.org/gmane.comp.version-control.git/4641/focus=4646 > > This is exactly the case marked as *0*, which both Linus and I said "it > feels somewhat wrong but otherwise we cannot start from an empty index". > > We may want to do better this time around, though.
I have since found out that:
1. file deletions in the working directory but not in index would not be forgotten. That makes "file deletions in index" case rather a corner one.
2. "checkout -b -m" would do the right thing.
Cheers.
-- Jing