Re: [PATCH] git-mv: Keep moved index entries inact
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jul 21, 2008, 01:20 UTC
- Message-ID
- <alpine.DEB.1.00.0807210319410.3305@eeepc-johanness>
- In-Reply-To
- <20080721002354.GK10151@machine.or.cz>
Hi,
On Mon, 21 Jul 2008, Petr Baudis wrote:
Show 14 quoted lines
> On Sat, Jul 19, 2008 at 04:54:20PM -0700, Junio C Hamano wrote: > > Petr Baudis <pasky@suse.cz> writes: > > > > > +test_expect_success 'git mv should not change sha1 of moved cache entry' ' > > > + > > > + rm -fr .git && > > > + git init && > > > + echo 1 >dirty && > > > + git add dirty && > > > + entry="$(git ls-files --stage dirty | cut -f 1)" > > > > "rev-parse :dirty"? > > I want to make sure the whole index entry is intact, not just the sha1.
"rev-parse :dirty" will have to read the index to get at the object name of "dirty". So there you have your index validation for you.
Ciao, Dscho