Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: list of files that have been added/removed

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:46:36

layer [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help