git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: layer <layer@known.net>
Cc: git@vger.kernel.org
Subject: Re: list of files that have been added/removed
Date: Wed, 15 Apr 2009 14:43:54 -0700	[thread overview]
Message-ID: <7vvdp5r3s5.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <31043.1239831470@relay.known.net> (layer@known.net's message of "Wed, 15 Apr 2009 14:37:50 -0700")

layer <layer@known.net> writes:

>   I see the changes in the index with "git status" as "deleted" or
>   "added".  
>
> I meant "new file" here.  Of course I can process the output of "git
> status", but I was looking for a cleaner method, if there is one.

"Process" as in "Read in a script and have it act on the information"?

git diff-index --name-status HEAD

would be one Kosher way for the scripts, and if your scripting language
can handle NUL terminated string, giving -z option would make your script
more robust against funny pathnames.

git diff-index --name-only --diff-filter=A HEAD

if you only care about "new file" and nothing else.

  parent reply	other threads:[~2009-04-15 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-15 21:37 list of files that have been added/removed layer
2009-04-15 21:42 ` Eric Raible
2009-04-15 21:43 ` Junio C Hamano [this message]
2009-04-15 21:57   ` layer
  -- strict thread matches above, loose matches on Subject: below --
2009-04-15 21:21 layer

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=7vvdp5r3s5.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=layer@known.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).