{"thread":{"id":"36914","subject":"pre-commit hook question","startedAt":"2014-06-14T17:34:14Z","lastAt":"2014-06-16T18:23:03Z","messageCount":2,"participants":["Nick Dimov","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"244194","messageId":"539C8796.3070709@gmail.com","threadId":"36914","inReplyTo":null,"subject":"pre-commit hook question","fromName":"Nick Dimov","fromEmail":"dimovnike@gmail.com","sentAt":"2014-06-14T17:34:14Z","receivedAt":"2014-06-14T17:34:14Z","isPatch":false,"sender":{"key":"dimovnike@gmail.com","avatar":null},"body":"Hello everyone.\nIm struggling for a couple of hours to make git store metadata of the\nfiles using metastore and I use hooks/pre-commit for this. The problem\nis that the script is invoked correctly, and modifies the file\n\"metadata\" but the file itself is not added into commit. I tried calling\n\"git add metadata\" and \"git add -u metadata\" but there is no effect. The\nfile ends up uncommited and marked as modified or staged BUT not\ncommited, ever.\n\nIs there any way to make this work?\nBasically, I want it to update and commit the file \"metadata\" on each\ncommit.\n(then i want to make the same on checkout, but first i need to make\nstoring work correctly)\n\nThanks!\n\nP.S. If you are wondering why I need this, the answer is I store OS\nfiles for an embedded device which needs permisions/suid flags etc.\n"},{"id":"244326","messageId":"xmqqppi8r9x4.fsf@gitster.dls.corp.google.com","threadId":"36914","inReplyTo":"539C8796.3070709@gmail.com","subject":"Re: pre-commit hook question","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-06-16T18:23:03Z","receivedAt":"2014-06-16T18:23:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nick Dimov <dimovnike@gmail.com> writes:\n\n> Im struggling for a couple of hours to make git store metadata of the\n> files using metastore and I use hooks/pre-commit for this.\n\nThe pre-commit hook is about checking if the commits being created\nis sensible and rejecting otherwise, and it is not designed to allow\nfutzing what is recorded behind the user's back.\n"}]}