From: Johannes Schindelin Date: Mon, 21 Jul 2008 01:20:46 GMT Subject: Re: [PATCH] git-mv: Keep moved index entries inact Message-ID: In-Reply-To: <20080721002354.GK10151@machine.or.cz> Hi, On Mon, 21 Jul 2008, Petr Baudis wrote: > On Sat, Jul 19, 2008 at 04:54:20PM -0700, Junio C Hamano wrote: > > Petr Baudis 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