{"thread":{"id":"54388","subject":"Git hooks and stdin/stderr/stdout.","startedAt":"2020-10-11T09:25:53Z","lastAt":"2020-10-11T09:25:53Z","messageCount":1,"participants":["Gabriel Nützi"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"407294","messageId":"CAA9rTuf4gP5hy2GNubxGmDy_N2R+WoNX99sDUOo-QNym3pB=dQ@mail.gmail.com","threadId":"54388","inReplyTo":null,"subject":"Git hooks and stdin/stderr/stdout.","fromName":"Gabriel Nützi","fromEmail":"gnuetzi@gmail.com","sentAt":"2020-10-11T09:25:38Z","receivedAt":"2020-10-11T09:25:53Z","isPatch":false,"sender":{"key":"gnuetzi@gmail.com","avatar":"https://gravatar.com/avatar/eda99c30173930819ae1c26c3dff249edd4b3c735c3886d268c0d6a71c6307c9?d=mp&s=160"},"body":"Dear all,\n\nI have a question regarding git hooks and would have liked to get some\nbetter understanding of how internally a hook is run. Especially I\nwant to know  what happens under the hood because the behavior kind of\npuzzles me. So what I've understood:\n\nWhen git runs the hook, git does\n- connects stdin of the hook process to it (is that always the case?)\n- redirects stdout of  the hook process to the stderr of the hook\nprocess. So anything you write to stdout/stderr in the hook process\nends up in the stderr of the git process.\n\nIs that understanding correct? Is there a doc describing this?\n\nThanks for the help.\n\nBR Gabriel\n"}]}