{"thread":{"id":"18888","subject":"Re: list of files that have been added/removed","startedAt":"2009-04-15T21:37:50Z","lastAt":"2009-04-15T21:57:59Z","messageCount":4,"participants":["layer","Eric Raible","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"111399","messageId":"31043.1239831470@relay.known.net","threadId":"18888","inReplyTo":null,"subject":"Re: list of files that have been added/removed","fromName":"layer","fromEmail":"layer@known.net","sentAt":"2009-04-15T21:37:50Z","receivedAt":"2009-04-15T21:37:50Z","isPatch":false,"sender":{"key":"layer@known.net","avatar":null},"body":"  I see the changes in the index with \"git status\" as \"deleted\" or\n  \"added\".  \n\nI meant \"new file\" here.  Of course I can process the output of \"git\nstatus\", but I was looking for a cleaner method, if there is one.\n\nThanks.\n\nKevin\n"},{"id":"111400","messageId":"loom.20090415T214225-489@post.gmane.org","threadId":"18888","inReplyTo":"31043.1239831470@relay.known.net","subject":"Re: list of files that have been added/removed","fromName":"Eric Raible","fromEmail":"raible@gmail.com","sentAt":"2009-04-15T21:42:41Z","receivedAt":"2009-04-15T21:42:41Z","isPatch":false,"sender":{"key":"raible@gmail.com","avatar":null},"body":"layer <layer <at> known.net> writes:\n\n> \n>   I see the changes in the index with \"git status\" as \"deleted\" or\n>   \"added\".  \n> \n> I meant \"new file\" here.  Of course I can process the output of \"git\n> status\", but I was looking for a cleaner method, if there is one.\n> \n> Thanks.\n> \n> Kevin\n> \n\nPerhaps:\ngit diff --name-only\n"},{"id":"111401","messageId":"7vvdp5r3s5.fsf@gitster.siamese.dyndns.org","threadId":"18888","inReplyTo":"31043.1239831470@relay.known.net","subject":"Re: list of files that have been added/removed","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-04-15T21:43:54Z","receivedAt":"2009-04-15T21:43:54Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"layer <layer@known.net> writes:\n\n>   I see the changes in the index with \"git status\" as \"deleted\" or\n>   \"added\".  \n>\n> I meant \"new file\" here.  Of course I can process the output of \"git\n> status\", but I was looking for a cleaner method, if there is one.\n\n\"Process\" as in \"Read in a script and have it act on the information\"?\n\ngit diff-index --name-status HEAD\n\nwould be one Kosher way for the scripts, and if your scripting language\ncan handle NUL terminated string, giving -z option would make your script\nmore robust against funny pathnames.\n\ngit diff-index --name-only --diff-filter=A HEAD\n\nif you only care about \"new file\" and nothing else.\n"},{"id":"111402","messageId":"31319.1239832679@relay.known.net","threadId":"18888","inReplyTo":"7vvdp5r3s5.fsf@gitster.siamese.dyndns.org","subject":"Re: list of files that have been added/removed","fromName":"layer","fromEmail":"layer@known.net","sentAt":"2009-04-15T21:57:59Z","receivedAt":"2009-04-15T21:57:59Z","isPatch":false,"sender":{"key":"layer@known.net","avatar":null},"body":"Junio C Hamano <gitster@pobox.com> wrote:\n\n>> layer <layer@known.net> writes:\n>> \n>> >   I see the changes in the index with \"git status\" as \"deleted\" or\n>> >   \"added\".  \n>> >\n>> > I meant \"new file\" here.  Of course I can process the output of \"git\n>> > status\", but I was looking for a cleaner method, if there is one.\n>> \n>> \"Process\" as in \"Read in a script and have it act on the\n>> information\"?\n\nYes.  Junio, your answer was perfect.  Thanks.\n\n>> \n>> git diff-index --name-status HEAD\n>> \n>> would be one Kosher way for the scripts, and if your scripting language\n>> can handle NUL terminated string, giving -z option would make your script\n>> more robust against funny pathnames.\n>> \n>> git diff-index --name-only --diff-filter=A HEAD\n>> \n>> if you only care about \"new file\" and nothing else.\n>> \n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}