From: Adam Mercer <ramercer@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, jepler@unpythonic.net
Cc: git@vger.kernel.org
Subject: Re: determine if the tree is dirty
Date: Tue, 3 Nov 2009 13:30:02 -0600 [thread overview]
Message-ID: <799406d60911031130u3e37677fi1a8dfd6f7fdfdfe9@mail.gmail.com> (raw)
In-Reply-To: <7v3a4vs9g3.fsf@alter.siamese.dyndns.org>
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:
> 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
next prev parent reply other threads:[~2009-11-03 19:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 18:57 determine if the tree is dirty Adam Mercer
2009-11-03 19:06 ` Jeff Epler
2009-11-03 19:19 ` Junio C Hamano
2009-11-03 19:30 ` Adam Mercer [this message]
2009-11-03 21:07 ` Markus Hitter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=799406d60911031130u3e37677fi1a8dfd6f7fdfdfe9@mail.gmail.com \
--to=ramercer@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jepler@unpythonic.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).