{"thread":{"id":"38243","subject":"GIT_PUSH_CERT* env vars and update/post-update hooks...","startedAt":"2014-12-24T01:57:30Z","lastAt":"2014-12-29T16:36:46Z","messageCount":2,"participants":["Sitaram Chamarty","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"254061","messageId":"549A1D8A.3020106@gmail.com","threadId":"38243","inReplyTo":null,"subject":"GIT_PUSH_CERT* env vars and update/post-update hooks...","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2014-12-24T01:57:30Z","receivedAt":"2014-12-24T01:57:30Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"Hi git core devs,\n\nAny chance I could persuade you to set the GIT_PUSH_CERT* environment\nvariables for the update (and post-update) hooks also?\n\nBackground: gitolite \"takes over\" the update hook [1] for authorisation\nand enforcement, and I want to avoid taking over the pre-receive hook\nalso in order to do this check.\n\nThe post-update is not so important; gitolite doesn't use it anyway, so\nif I have to take over one of them, I may as well take over\npost-receive.  I just added that for consistency.\n\nthanks\nsitaram\n\n[1]: because it's nice to *selectively* reject refs when more than one\nref is pushed at the same time; pre-receive is \"all or none\".\n"},{"id":"254139","messageId":"xmqqa9261kgx.fsf@gitster.dls.corp.google.com","threadId":"38243","inReplyTo":"549A1D8A.3020106@gmail.com","subject":"Re: GIT_PUSH_CERT* env vars and update/post-update hooks...","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-12-29T16:36:46Z","receivedAt":"2014-12-29T16:36:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sitaram Chamarty <sitaramc@gmail.com> writes:\n\n> Any chance I could persuade you to set the GIT_PUSH_CERT* environment\n> variables for the update (and post-update) hooks also?\n\nI do not think of a fundamental reason why we shouldn't give these\nenvironment variables to update or other hooks.  It should just be\nthe matter of calling prepare_push_cert_sha1() on the child_process\nstruct used to run the hooks you want.\n\n> [1]: because it's nice to *selectively* reject refs when more than one\n> ref is pushed at the same time; pre-receive is \"all or none\".\n\nIt cuts both ways; inside \"update\", your \"selective\" rejection\ncannot make the decision with the whole picture (you only have a\npeephole into individual changes).  \"post-receive\" sees the whole\npicture, but it has to say all-or-none.  Neither is ideal if you\ntruly want a useful \"selective\".\n"}]}