From: Adam Mercer Date: Tue, 03 Nov 2009 19:30:02 GMT Subject: Re: determine if the tree is dirty Message-ID: <799406d60911031130u3e37677fi1a8dfd6f7fdfdfe9@mail.gmail.com> In-Reply-To: <7v3a4vs9g3.fsf@alter.siamese.dyndns.org> On Tue, Nov 3, 2009 at 13:06, Jeff Epler wrote: > GIT-VERSION-GEN uses something like this (shell script): > git update-index -q --refresh > test -z "$(git diff-index --name-only HEAD --)" || VN="$VN-dirty" ;; On Tue, Nov 3, 2009 at 13:19, Junio C Hamano wrote: > Use plumbing commands. > > "git diff-files" will show changes you have in the work tree compared to > the index. > > "git diff-index HEAD" will show changes you have in the work tree compared > to the HEAD. > > "git diff-index --cached HEAD" will show changes you have in the index > compared to the HEAD. Fantastic, this is exactly what I was after! Thanks! Cheers Adam