{"thread":{"id":"2919","subject":"\"p4 revert -a\" equivalent in git?","startedAt":"2005-12-24T00:13:08Z","lastAt":"2005-12-24T00:36:15Z","messageCount":3,"participants":["Luben Tuikov","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13989","messageId":"20051224001308.7078.qmail@web31805.mail.mud.yahoo.com","threadId":"2919","inReplyTo":null,"subject":"\"p4 revert -a\" equivalent in git?","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-24T00:13:08Z","receivedAt":"2005-12-24T00:13:08Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"Hi,\n\nIs there a \"p4 revert -a\" equivalent in git or should I\nwhip up a script using git-diff-index and git-update-index?\n\nThat is I want to git-update-index --refresh for all\nfiles whose inode may have changed but the actual file\ndata has not (i.e. git-diff-index is empty).\n\nThanks,\n   Luben\n"},{"id":"13990","messageId":"7vd5jn4a36.fsf@assigned-by-dhcp.cox.net","threadId":"2919","inReplyTo":"20051224001308.7078.qmail@web31805.mail.mud.yahoo.com","subject":"Re: \"p4 revert -a\" equivalent in git?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-24T00:23:09Z","receivedAt":"2005-12-24T00:23:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Luben Tuikov <ltuikov@yahoo.com> writes:\n\n> That is I want to git-update-index --refresh for all\n> files whose inode may have changed but the actual file\n> data has not.\n\nThat's what \"git-update-index --refresh\" does, unless I am\nmisreading what you say you want.\n\n\t$ git checkout master\n        $ touch *.c\n\t$ git diff-index HEAD ;# tons of changes\n        $ git update-index --refresh\n\t$ git diff-index HEAD ;# no changes\n"},{"id":"13991","messageId":"20051224003615.47349.qmail@web31807.mail.mud.yahoo.com","threadId":"2919","inReplyTo":"7vd5jn4a36.fsf@assigned-by-dhcp.cox.net","subject":"Re: \"p4 revert -a\" equivalent in git?","fromName":"Luben Tuikov","fromEmail":"ltuikov@yahoo.com","sentAt":"2005-12-24T00:36:15Z","receivedAt":"2005-12-24T00:36:15Z","isPatch":false,"sender":{"key":"ltuikov@yahoo.com","avatar":null},"body":"--- Junio C Hamano <junkio@cox.net> wrote:\n> That's what \"git-update-index --refresh\" does, unless I am\n> misreading what you say you want.\n> \n> \t$ git checkout master\n>         $ touch *.c\n> \t$ git diff-index HEAD ;# tons of changes\n>         $ git update-index --refresh\n> \t$ git diff-index HEAD ;# no changes\n\nOk, thanks.  I wasn't sure if I had to specify the file\nnames on the command line of \"git-update-index --refresh\".\nIt looks like I don't have to, so this is a perfect\nequivalent.\n\nThanks,\n   Luben\n"}]}