Re: determine if the tree is dirty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 3, 2009 at 13:06, Jeff Epler <jepler@xxxxxxxxxxxxxx> 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@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]