{"thread":{"id":"24956","subject":"create easy to parse list of added / ,odified files","startedAt":"2010-09-03T06:36:52Z","lastAt":"2010-09-05T21:50:14Z","messageCount":3,"participants":["Gelonida","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"149749","messageId":"i5q524$9fc$1@dough.gmane.org","threadId":"24956","inReplyTo":null,"subject":"create easy to parse list of added / ,odified files","fromName":"Gelonida","fromEmail":"gelonida@gmail.com","sentAt":"2010-09-03T06:36:52Z","receivedAt":"2010-09-03T06:36:52Z","isPatch":false,"sender":{"key":"gelonida@gmail.com","avatar":null},"body":"Hi,\n\n\nfor a pre-commit trigger I would like to retrieve the list of modified\nfiles, such, that I could analyze the contents prior to commit.\n\nwhat would be the best command for this\n\n\nI thought about using \"git status\", but wondered, which other command\nmight return a nicer to parse list.\n\nTIA\n"},{"id":"149750","messageId":"20100903063917.GA13519@burratino","threadId":"24956","inReplyTo":"i5q524$9fc$1@dough.gmane.org","subject":"Re: create easy to parse list of added / ,odified files","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-03T06:39:17Z","receivedAt":"2010-09-03T06:39:17Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nGelonida wrote:\n\n> for a pre-commit trigger I would like to retrieve the list of modified\n> files, such, that I could analyze the contents prior to commit.\n> \n> what would be the best command for this\n> \n> \n> I thought about using \"git status\", but wondered, which other command\n> might return a nicer to parse list.\n\nIf you look at the git(1) man page, you will find a number of such\n\"low-level (plumbing) interrogation commands\" listed.  For example:\n\n . git diff-index\n . git diff-files\n . git update-index\n . git status --porcelain\n\nHope that helps.\n"},{"id":"150006","messageId":"i613am$uet$2@dough.gmane.org","threadId":"24956","inReplyTo":"20100903063917.GA13519@burratino","subject":"Re: create easy to parse list of added / ,odified files","fromName":"Gelonida","fromEmail":"gelonida@gmail.com","sentAt":"2010-09-05T21:50:14Z","receivedAt":"2010-09-05T21:50:14Z","isPatch":false,"sender":{"key":"gelonida@gmail.com","avatar":null},"body":"Hi Jonathan,\n\nOn 09/03/2010 08:39 AM, Jonathan Nieder wrote:\n> Gelonida wrote:\n> \n>> for a pre-commit trigger I would like to retrieve the list of modified\n>> files, such, that I could analyze the contents prior to commit.\n>>\n>> what would be the best command for this\n>>\n>>\n>> I thought about using \"git status\", but wondered, which other command\n>> might return a nicer to parse list.\n> \n> If you look at the git(1) man page, you will find a number of such\n> \"low-level (plumbing) interrogation commands\" listed.  For example:\n> \n>  . git diff-index\n>  . git diff-files\n>  . git update-index\n>  . git status --porcelain\n> \n\nThanks for your answer.\n\nI'm currently using\ngit diff-index HEAD --cached\n\nThis seems to do what I was looking for.\n\ngit status --porcelain\ndoesn't exist on my old cygwin git (I assume it's proably a little too old)\n"}]}