Re: determine if the tree is dirty
On Tue, Nov 3, 2009 at 13:06, Jeff Epler <jepler@unpythonic.net> 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 <gitster@pobox.com> wrote:
Show 10 quoted lines
> 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