[BUG?] git checkout $commit -- somedir doesn't drop files
- From
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
- Date
- Sep 17, 2013, 19:06 UTC
- Message-ID
- <20130917190659.GA15588@pengutronix.de>
Hello,
after these commands:
$ git init $ mkdir subdir $ echo a > subdir/a $ git add subdir/a $ git commit -m a $ echo more a >> subdir/a $ echo b > subdir/b $ git add subdir/* $ git commit -m b $ git checkout HEAD^ -- subdir
I'd expect that subdir/b is removed from the index as this file didn't exist in HEAD^ but git-status only reports:
# On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: subdir/a #
Is this intended?
(I'm using git 1.8.4.rc3 as shipped by Debian (package version 1:1.8.4~rc3-1).)
Best regards Uwe
-- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |