From: Gelonida <gelonida@gmail.com>
To: git@vger.kernel.org
Subject: Re: create easy to parse list of added / ,odified files
Date: Sun, 05 Sep 2010 23:50:14 +0200 [thread overview]
Message-ID: <i613am$uet$2@dough.gmane.org> (raw)
In-Reply-To: <20100903063917.GA13519@burratino>
Hi Jonathan,
On 09/03/2010 08:39 AM, Jonathan Nieder wrote:
> Gelonida wrote:
>
>> for a pre-commit trigger I would like to retrieve the list of modified
>> files, such, that I could analyze the contents prior to commit.
>>
>> what would be the best command for this
>>
>>
>> I thought about using "git status", but wondered, which other command
>> might return a nicer to parse list.
>
> If you look at the git(1) man page, you will find a number of such
> "low-level (plumbing) interrogation commands" listed. For example:
>
> . git diff-index
> . git diff-files
> . git update-index
> . git status --porcelain
>
Thanks for your answer.
I'm currently using
git diff-index HEAD --cached
This seems to do what I was looking for.
git status --porcelain
doesn't exist on my old cygwin git (I assume it's proably a little too old)
prev parent reply other threads:[~2010-09-05 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-03 6:36 create easy to parse list of added / ,odified files Gelonida
2010-09-03 6:39 ` Jonathan Nieder
2010-09-05 21:50 ` Gelonida [this message]
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='i613am$uet$2@dough.gmane.org' \
--to=gelonida@gmail.com \
--cc=git@vger.kernel.org \
/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).