{"thread":{"id":"40207","subject":"Running interpret-trailers automatically on each commit?","startedAt":"2015-08-28T15:22:25Z","lastAt":"2015-08-31T17:48:35Z","messageCount":6,"participants":["Jeremy Morton","Junio C Hamano","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"268839","messageId":"55E07CB1.0@game-point.net","threadId":"40207","inReplyTo":null,"subject":"Running interpret-trailers automatically on each commit?","fromName":"Jeremy Morton","fromEmail":"admin@game-point.net","sentAt":"2015-08-28T15:22:25Z","receivedAt":"2015-08-28T15:22:25Z","isPatch":false,"sender":{"key":"admin@game-point.net","avatar":null},"body":"I see that interpret-trailers has been added by default in git 2.5.0. \n  However the documentation isn't that great and I can't tell whether \nit gets run automatically when I do a \"git commit\".  My guess is that \nit doesn't - that you have to set up a hook to get it to run each commit.\n\nAs far as I can tell, there is no way to configure global git hooks. \nSure, you can set init.templatedir but that only applies for \nnewly-init'ed or cloned repos.  So if I have 50 repos on my hard drive \nI still have to go through every one of them and set up a hook for it.\n\nBasically, am I right in thinking that there is *still* no way for me \nto configure git (on a global, not per-repo basis) to automatically \ntack a trailer onto every commit message?  For the record, I want that \ntrailer to be the current branch name.\n\n-- \nBest regards,\nJeremy Morton (Jez)\n"},{"id":"268849","messageId":"xmqqk2sf2vic.fsf@gitster.mtv.corp.google.com","threadId":"40207","inReplyTo":"55E07CB1.0@game-point.net","subject":"Re: Running interpret-trailers automatically on each commit?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-28T17:06:03Z","receivedAt":"2015-08-28T17:06:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeremy Morton <admin@game-point.net> writes:\n\n> I see that interpret-trailers has been added by default in git\n> 2.5.0. However the documentation isn't that great and I can't tell\n> whether it gets run automatically when I do a \"git commit\".  My guess\n> is that it doesn't - that you have to set up a hook to get it to run\n> each commit.\n\nAll correct, except that it happend in 2.2 timeframe.\n\nA new experimental feature is shipped, so that people can gain\nexperience with it and come up with the best practice in their\nhooks, and then laster we may fold the best practice into somewhere\ndeeper in the system.\n\nWe are still in the early \"ship an experimental feature to let\npeople play with it\" stage.\n\nThanks.\n"},{"id":"268851","messageId":"55E09540.60805@game-point.net","threadId":"40207","inReplyTo":"xmqqk2sf2vic.fsf@gitster.mtv.corp.google.com","subject":"Re: Running interpret-trailers automatically on each commit?","fromName":"Jeremy Morton","fromEmail":"admin@game-point.net","sentAt":"2015-08-28T17:07:12Z","receivedAt":"2015-08-28T17:07:12Z","isPatch":false,"sender":{"key":"admin@game-point.net","avatar":null},"body":"Yeah but it's kind of useless to me having it on each commit on a \nper-repo basis (and even then, only with hooks).\n\n-- \nBest regards,\nJeremy Morton (Jez)\n\nOn 28/08/2015 18:06, Junio C Hamano wrote:\n> Jeremy Morton<admin@game-point.net>  writes:\n>\n>> I see that interpret-trailers has been added by default in git\n>> 2.5.0. However the documentation isn't that great and I can't tell\n>> whether it gets run automatically when I do a \"git commit\".  My guess\n>> is that it doesn't - that you have to set up a hook to get it to run\n>> each commit.\n>\n> All correct, except that it happend in 2.2 timeframe.\n>\n> A new experimental feature is shipped, so that people can gain\n> experience with it and come up with the best practice in their\n> hooks, and then laster we may fold the best practice into somewhere\n> deeper in the system.\n>\n> We are still in the early \"ship an experimental feature to let\n> people play with it\" stage.\n>\n> Thanks.\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"268966","messageId":"vpqmvx7ho5r.fsf@anie.imag.fr","threadId":"40207","inReplyTo":"55E09540.60805@game-point.net","subject":"Re: Running interpret-trailers automatically on each commit?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2015-08-31T08:12:32Z","receivedAt":"2015-08-31T08:12:32Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jeremy Morton <admin@game-point.net> writes:\n\n> Yeah but it's kind of useless to me having it on each commit on a\n> per-repo basis (and even then, only with hooks).\n\nPlease, don't top-post on this list.\n\nActually, it seems strange to me to activate it on a per-user basis.\nWhether you add a trailer is usually a per-project policy. If you add a\nbranch trailer in each of your repository, it seems likely that some\nprojects you contribute to will be bothered by this.\n\nThat said, I agree it would be nice to allow a configuration-based\nmechanism in addition to the current hook-based one we currently have.\nBut no one stepped in to implement it until now ...\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"269009","messageId":"xmqqio7vwdqv.fsf@gitster.mtv.corp.google.com","threadId":"40207","inReplyTo":"vpqmvx7ho5r.fsf@anie.imag.fr","subject":"Re: Running interpret-trailers automatically on each commit?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-31T17:48:24Z","receivedAt":"2015-08-31T17:48:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Jeremy Morton <admin@game-point.net> writes:\n>\n>> Yeah but it's kind of useless to me having it on each commit on a\n>> per-repo basis (and even then, only with hooks).\n>\n> Please, don't top-post on this list.\n>\n> Actually, it seems strange to me to activate it on a per-user basis.\n> Whether you add a trailer is usually a per-project policy. If you add a\n> branch trailer in each of your repository, it seems likely that some\n> projects you contribute to will be bothered by this.\n>\n> That said, I agree it would be nice to allow a configuration-based\n> mechanism in addition to the current hook-based one we currently have.\n> But no one stepped in to implement it until now ...\n\nCertanly.  A new experimental feature is shipped in 2.2 timeframe,\nso that people can gain experience with it and come up with the best\npractice in their hooks, and then laster we may fold the best\npractice into somewhere deeper in the system.\n\nWe are still in the early \"ship an experimental feature to let\npeople play with it\" stage.  It is not \"no one stepped in to\nimplement until now\", but more like \"no one designed what to\nimplement\".\n\nAnd we still do not have a concrete design on what to implement on\nthe table.  \"At various points in the codebase, interpret-trailers\nis invoked with some magic parameters, depending on settings of\nunspecified set of configuration variables\" is not a design.\n"},{"id":"269010","messageId":"xmqqh9nfwdqk.fsf@gitster.mtv.corp.google.com","threadId":"40207","inReplyTo":"vpqmvx7ho5r.fsf@anie.imag.fr","subject":"Re: Running interpret-trailers automatically on each commit?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-08-31T17:48:35Z","receivedAt":"2015-08-31T17:48:35Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:\n\n> Jeremy Morton <admin@game-point.net> writes:\n>\n>> Yeah but it's kind of useless to me having it on each commit on a\n>> per-repo basis (and even then, only with hooks).\n>\n> Please, don't top-post on this list.\n>\n> Actually, it seems strange to me to activate it on a per-user basis.\n> Whether you add a trailer is usually a per-project policy. If you add a\n> branch trailer in each of your repository, it seems likely that some\n> projects you contribute to will be bothered by this.\n>\n> That said, I agree it would be nice to allow a configuration-based\n> mechanism in addition to the current hook-based one we currently have.\n> But no one stepped in to implement it until now ...\n\nCertainly.  A new experimental feature is shipped in 2.2 timeframe,\nso that people can gain experience with it and come up with the best\npractice in their hooks, and then laster we may fold the best\npractice into somewhere deeper in the system.\n\nWe are still in the early \"ship an experimental feature to let\npeople play with it\" stage.  It is not \"no one stepped in to\nimplement until now\", but more like \"no one designed what to\nimplement\".\n\nAnd we still do not have a concrete design on what to implement on\nthe table.  \"At various points in the codebase, interpret-trailers\nis invoked with some magic parameters, depending on settings of\nunspecified set of configuration variables\" is not a design.\n"}]}