{"thread":{"id":"36221","subject":"Configuring a third-party git hook","startedAt":"2014-03-19T11:16:51Z","lastAt":"2014-03-21T18:54:58Z","messageCount":14,"participants":["Chris Angelico","Kevin","Junio C Hamano","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"237060","messageId":"CAPTjJmomAnrjjyfSvDJijBP2pUN_kqVCRr+UbZkQHQy295A85A@mail.gmail.com","threadId":"36221","inReplyTo":null,"subject":"Configuring a third-party git hook","fromName":"Chris Angelico","fromEmail":"rosuav@gmail.com","sentAt":"2014-03-19T11:16:51Z","receivedAt":"2014-03-19T11:16:51Z","isPatch":false,"sender":{"key":"rosuav@gmail.com","avatar":"https://avatars.githubusercontent.com/u/640535?v=4"},"body":"I have a bit of a weird question. Poking around with Google searches\nhasn't come up with any results, so I'm asking here :)\n\nShort version: What's the most appropriate way to configure a git hook?\n\nLong version: I have a git hook (handles prepare-commit-msg and\ncommit-msg) and part of what it does can search 'git log' for a single\nfile. It doesn't really care about the full history, and wants to be\nreasonably fast (as the user is waiting for it). It's just a\nconvenience, so correctness isn't a huge issue. The easiest way to\nkeep it moving through quickly is to limit the search:\n\n$ git log ...other options... HEAD~100 some-file.pike\n\nThe problem with this is that it doesn't work if HEAD doesn't have 100\ngreat-great-...-grandparents - plus, it's way too specific a number to\nhard-code. I might want it different on different repos (and the\nscript is shared, and is available for other people to use).\n\nNow, if this were something in git core, I'd expect to set that value\nof 100 with 'git config', but this is my own script. Is it right to\nuse 'git config' for something that isn't controlled by the core code\nof git? I've tentatively used \"git config rosuav.log-search.limit\"\n(with 0 or absence meaning \"omit the argument\" ie search the whole\nhistory), and am wondering if that's a really really bad idea.\n\nHere's the script in question:\nhttps://github.com/Rosuav/shed/blob/master/githook.pike#L36\n\nTwo parts to the question, then. Firstly, is it acceptable to use 'git\nconfig' for a hook like this? And secondly, either: Is there a naming\nconvention to follow? or, what alternative would you recommend?\n\nThanks in advance for any ideas/tips!\n\nChrisA\n"},{"id":"237171","messageId":"CAO54GHC1B6hj-OvibHn2=-B25Xd5EmfWsphJ1S7vE4bgUUX3Bw@mail.gmail.com","threadId":"36221","inReplyTo":"CAPTjJmomAnrjjyfSvDJijBP2pUN_kqVCRr+UbZkQHQy295A85A@mail.gmail.com","subject":"Re: Configuring a third-party git hook","fromName":"Kevin","fromEmail":"ikke@ikke.info","sentAt":"2014-03-20T12:53:44Z","receivedAt":"2014-03-20T12:53:44Z","isPatch":false,"sender":{"key":"ikke@ikke.info","avatar":"https://gravatar.com/avatar/60a0d08eeccb16914fdbfc7f3441548dc827dc436d5c6900ec6600e274e53c5b?d=mp&s=160"},"body":"On Wed, Mar 19, 2014 at 12:16 PM, Chris Angelico <rosuav@gmail.com> wrote:\n> Two parts to the question, then. Firstly, is it acceptable to use 'git\n> config' for a hook like this? And secondly, either: Is there a naming\n> convention to follow? or, what alternative would you recommend?\n\n1. I would say yes. git config is made to be extended and doesn't\nrequire a config item to be known.\n2. Namespacing the config items like you did is a good thing to do so\nit won't interfere with other options.\n"},{"id":"237179","messageId":"CAPTjJmpAcmVGgJK8iUvFuXJq_ZukisRZ6OD9TM=feuxDYm5iPQ@mail.gmail.com","threadId":"36221","inReplyTo":"CAO54GHC1B6hj-OvibHn2=-B25Xd5EmfWsphJ1S7vE4bgUUX3Bw@mail.gmail.com","subject":"Re: Configuring a third-party git hook","fromName":"Chris Angelico","fromEmail":"rosuav@gmail.com","sentAt":"2014-03-20T16:51:16Z","receivedAt":"2014-03-20T16:51:16Z","isPatch":false,"sender":{"key":"rosuav@gmail.com","avatar":"https://avatars.githubusercontent.com/u/640535?v=4"},"body":"On Thu, Mar 20, 2014 at 11:53 PM, Kevin <ikke@ikke.info> wrote:\n> On Wed, Mar 19, 2014 at 12:16 PM, Chris Angelico <rosuav@gmail.com> wrote:\n>> Two parts to the question, then. Firstly, is it acceptable to use 'git\n>> config' for a hook like this? And secondly, either: Is there a naming\n>> convention to follow? or, what alternative would you recommend?\n>\n> 1. I would say yes. git config is made to be extended and doesn't\n> require a config item to be known.\n> 2. Namespacing the config items like you did is a good thing to do so\n> it won't interfere with other options.\n\nExcellent! Thank you.\n\nIs this documented anywhere? The git config man page says to look to\nother git man pages:\n\nhttps://www.kernel.org/pub/software/scm/git/docs/git-config.html#_variables\n\nA comment there to the effect that \"Third party tools may also define\ntheir own variables\" or something would make it clear that this is the\nintention.\n\nChrisA\n"},{"id":"237180","messageId":"xmqqwqfozu9t.fsf@gitster.dls.corp.google.com","threadId":"36221","inReplyTo":"CAPTjJmomAnrjjyfSvDJijBP2pUN_kqVCRr+UbZkQHQy295A85A@mail.gmail.com","subject":"Re: Configuring a third-party git hook","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-03-20T16:53:18Z","receivedAt":"2014-03-20T16:53:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Angelico <rosuav@gmail.com> writes:\n\n> file. It doesn't really care about the full history, and wants to be\n> reasonably fast (as the user is waiting for it). It's just a\n> convenience, so correctness isn't a huge issue. The easiest way to\n> keep it moving through quickly is to limit the search:\n>\n> $ git log ...other options... HEAD~100 some-file.pike\n>\n> The problem with this is that it doesn't work if HEAD doesn't have 100\n> great-great-...-grandparents\n\nDid you really mean that you are *not* interested in what happened\nto the most recent 100 commits?  Or is it a typo of \"HEAD~100..\"?\n\n\"git log -100\" should traverse from the HEAD and stop after showing\nat most 100 items, even if you only had 20 in the history.\n"},{"id":"237183","messageId":"CAPTjJmoDZRmFVnNmn_865Tcv6=GJucuKEo_Y-ezQ4s5vsHmguA@mail.gmail.com","threadId":"36221","inReplyTo":"xmqqwqfozu9t.fsf@gitster.dls.corp.google.com","subject":"Re: Configuring a third-party git hook","fromName":"Chris Angelico","fromEmail":"rosuav@gmail.com","sentAt":"2014-03-20T17:10:35Z","receivedAt":"2014-03-20T17:10:35Z","isPatch":false,"sender":{"key":"rosuav@gmail.com","avatar":"https://avatars.githubusercontent.com/u/640535?v=4"},"body":"On Fri, Mar 21, 2014 at 3:53 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Chris Angelico <rosuav@gmail.com> writes:\n>\n>> file. It doesn't really care about the full history, and wants to be\n>> reasonably fast (as the user is waiting for it). It's just a\n>> convenience, so correctness isn't a huge issue. The easiest way to\n>> keep it moving through quickly is to limit the search:\n>>\n>> $ git log ...other options... HEAD~100 some-file.pike\n>>\n>> The problem with this is that it doesn't work if HEAD doesn't have 100\n>> great-great-...-grandparents\n>\n> Did you really mean that you are *not* interested in what happened\n> to the most recent 100 commits?  Or is it a typo of \"HEAD~100..\"?\n\nOops, yes, HEAD~100.. is what I actually use in the source code. Same\ndifference; it doesn't work if there aren't that many commits.\n\n> \"git log -100\" should traverse from the HEAD and stop after showing\n> at most 100 items, even if you only had 20 in the history.\n\nYes, and I use that to limit the results (to 10, actually); but\nthere's one degenerate case left, and that's a new or moved/renamed\nfile in a long-standing repository. Let's say the repo has 760 commits\n(which is currently the case for Gypsum; I'd say this is fairly small\nas repos go), and a file was moved a little while ago and then not\nedited much.\n\n$ git log plugins-more/threshtime.pike\n\nFour results, the oldest being \"Move three plugins into -more\" which\nmoved the file without any edits at all. If I edit that file now, the\nprepare-commit-msg hook will execute the following (or would, if I\nhadn't set the config option):\n\n$ git log --shortstat --full-diff -10 --oneline plugins-more/threshtime.pike\nfca89fe Threshtime: Drop a comment from the old C++ plugin\n 1 file changed, 1 insertion(+), 1 deletion(-)\ndf8bcf0 Threshtime: Make use of statusevent\n 1 file changed, 2 insertions(+), 11 deletions(-)\n1207213 Threshtime: Use the tooltip to hint at the converter\n 1 file changed, 1 insertion(+)\nc22dfbc Move three plugins into -more so they're loaded by default but\nunloadable\n 6 files changed, 426 insertions(+), 426 deletions(-)\n\nSince it says \"-10\" and hasn't found ten results yet, git log will\nkeep on searching back in history. I don't know of a way to say \"give\nup searching once you find the commit that creates this file\",\nalthough that would also do what I want. The end result is the same,\nbut it's very slow if the git log isn't in the OS/disk cache. On my\nmain development box, it is cached, but I just tried it on my Windows\nbox and it took about fifteen seconds to finish; and 760 commits is\nnot huge as repositories go - the Pike repo has over 30,000 commits,\nand git's own repo is of similar size.\n\nBounding the search is potentially a huge improvement here, since the\nuser's waiting. But the exact limit depends on the repo itself, and\nit'd be nice to be able to disable it (\"huh, didn't find any\nresults... I'll de-limit the search and try again\"). Hence the config\noption, which I'm very happy to hear *is* a viable technique.\n\nChrisA\n"},{"id":"237241","messageId":"20140320233816.GC7774@sigill.intra.peff.net","threadId":"36221","inReplyTo":"CAPTjJmpAcmVGgJK8iUvFuXJq_ZukisRZ6OD9TM=feuxDYm5iPQ@mail.gmail.com","subject":"Re: Configuring a third-party git hook","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-03-20T23:38:16Z","receivedAt":"2014-03-20T23:38:16Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Mar 21, 2014 at 03:51:16AM +1100, Chris Angelico wrote:\n\n> > 1. I would say yes. git config is made to be extended and doesn't\n> > require a config item to be known.\n> > 2. Namespacing the config items like you did is a good thing to do so\n> > it won't interfere with other options.\n> \n> Excellent! Thank you.\n> \n> Is this documented anywhere? The git config man page says to look to\n> other git man pages:\n> \n> https://www.kernel.org/pub/software/scm/git/docs/git-config.html#_variables\n> \n> A comment there to the effect that \"Third party tools may also define\n> their own variables\" or something would make it clear that this is the\n> intention.\n\nI think this sentence from the section you linked is meant to express\nthat:\n\n  You will find a description of non-core porcelain configuration\n  variables in the respective porcelain documentation.\n\nbut it is rather opaque, isn't it? You did not know it, but your hook is\na non-core porcelain. :)\n\nI think it could probably be re-worded, and possibly even indicate to\nauthors of other programs that they are free to make up their own\nvariables (but should take care with namespacing them appropriately).\n\nWould you like to try your hand at writing a patch?\n\n-Peff\n"},{"id":"237242","messageId":"CAPTjJmpYREHy1cufZMuyOoXrO1Oy7QwXR+wBvm9cbgkT7SqC4Q@mail.gmail.com","threadId":"36221","inReplyTo":"20140320233816.GC7774@sigill.intra.peff.net","subject":"Re: Configuring a third-party git hook","fromName":"Chris Angelico","fromEmail":"rosuav@gmail.com","sentAt":"2014-03-20T23:46:15Z","receivedAt":"2014-03-20T23:46:15Z","isPatch":false,"sender":{"key":"rosuav@gmail.com","avatar":"https://avatars.githubusercontent.com/u/640535?v=4"},"body":"On Fri, Mar 21, 2014 at 10:38 AM, Jeff King <peff@peff.net> wrote:\n>> A comment there to the effect that \"Third party tools may also define\n>> their own variables\" or something would make it clear that this is the\n>> intention.\n>\n> I think this sentence from the section you linked is meant to express\n> that:\n>\n>   You will find a description of non-core porcelain configuration\n>   variables in the respective porcelain documentation.\n>\n> but it is rather opaque, isn't it? You did not know it, but your hook is\n> a non-core porcelain. :)\n>\n> I think it could probably be re-worded, and possibly even indicate to\n> authors of other programs that they are free to make up their own\n> variables (but should take care with namespacing them appropriately).\n>\n> Would you like to try your hand at writing a patch?\n\n.... oohhhhhh. Heh. I thought the \"porcelain\" sections of git were the\nlower-level or machine-readable versions of other tools, and didn't\nreally think of mine as fitting into that.\n\nHow does the attached patch look?\n\nChrisA\n\n\nFrom 1be7b0920510b9f45ca6d3879289753fdc5b5435 Mon Sep 17 00:00:00 2001\nFrom: Chris Angelico <rosuav@gmail.com>\nDate: Fri, 21 Mar 2014 10:45:08 +1100\nSubject: [PATCH] Explain that third-party tools may create 'git config'\n variables\n\n---\n Documentation/config.txt |    5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 73c8973..23f0466 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -131,8 +131,9 @@ Variables\n \n Note that this list is non-comprehensive and not necessarily complete.\n For command-specific variables, you will find a more detailed description\n-in the appropriate manual page. You will find a description of non-core\n-porcelain configuration variables in the respective porcelain documentation.\n+in the appropriate manual page. Other git-related tools may define their own\n+variables, which will be defined on their respective manual pages; ideally,\n+these will be named in some way to indicate the project or creator.\n \n advice.*::\n \tThese variables control various optional help messages designed to\n-- \n1.7.10.4\n\n"},{"id":"237257","messageId":"20140321034334.GA29683@sigill.intra.peff.net","threadId":"36221","inReplyTo":"CAPTjJmpYREHy1cufZMuyOoXrO1Oy7QwXR+wBvm9cbgkT7SqC4Q@mail.gmail.com","subject":"Re: Configuring a third-party git hook","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-03-21T03:43:34Z","receivedAt":"2014-03-21T03:43:34Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Mar 21, 2014 at 10:46:15AM +1100, Chris Angelico wrote:\n\n> .... oohhhhhh. Heh. I thought the \"porcelain\" sections of git were the\n> lower-level or machine-readable versions of other tools, and didn't\n> really think of mine as fitting into that.\n\nThe term sometimes gets used confusingly. The \"plumbing\" is the\nlow-level stuff that supports the \"porcelain\", that users interact with.\nBut sometimes options to produce low-level scriptable output get called\n\"--porcelain\", as in \"this is the output to be used when building a\nporcelain on top\".\n\nCalling a hook script \"porcelain\" is kind of stretching it, I think, but\nit is filling the same role (it is software built on top of git, and\nusing git to store config options).\n\n> diff --git a/Documentation/config.txt b/Documentation/config.txt\n> index 73c8973..23f0466 100644\n> --- a/Documentation/config.txt\n> +++ b/Documentation/config.txt\n> @@ -131,8 +131,9 @@ Variables\n>  \n>  Note that this list is non-comprehensive and not necessarily complete.\n>  For command-specific variables, you will find a more detailed description\n> -in the appropriate manual page. You will find a description of non-core\n> -porcelain configuration variables in the respective porcelain documentation.\n> +in the appropriate manual page. Other git-related tools may define their own\n> +variables, which will be defined on their respective manual pages; ideally,\n> +these will be named in some way to indicate the project or creator.\n\nThanks, the new text looks good to me. Please follow SubmittingPatches\n(notably, you need to sign-off your work, and please send patches inline\nrather than as attachments).\n\n-Peff\n"},{"id":"237259","messageId":"CAPTjJmqRFbKxe8MODtBDDC0SUYGoaFmQj2724YmKnMmdbrgOUA@mail.gmail.com","threadId":"36221","inReplyTo":"20140321034334.GA29683@sigill.intra.peff.net","subject":"Re: Configuring a third-party git hook","fromName":"Chris Angelico","fromEmail":"rosuav@gmail.com","sentAt":"2014-03-21T04:07:08Z","receivedAt":"2014-03-21T04:07:08Z","isPatch":false,"sender":{"key":"rosuav@gmail.com","avatar":"https://avatars.githubusercontent.com/u/640535?v=4"},"body":"On Fri, Mar 21, 2014 at 2:43 PM, Jeff King <peff@peff.net> wrote:\n> Thanks, the new text looks good to me. Please follow SubmittingPatches\n> (notably, you need to sign-off your work, and please send patches inline\n> rather than as attachments).\n\nAh, didn't see that file.\n\n>From 6e1fc126ece37c6201d0c16b76c6c87781f7b02b Mon Sep 17 00:00:00 2001\nFrom: Chris Angelico <rosuav@gmail.com>\nDate: Fri, 21 Mar 2014 10:45:08 +1100\nSubject: [PATCH] Explain that third-party tools may create 'git config'\n variables\n\nSigned-off-by: Chris Angelico <rosuav@gmail.com>\n---\n Documentation/config.txt |    5 +++--\n 1 file changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 73c8973..23f0466 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -131,8 +131,9 @@ Variables\n\n Note that this list is non-comprehensive and not necessarily complete.\n For command-specific variables, you will find a more detailed description\n-in the appropriate manual page. You will find a description of non-core\n-porcelain configuration variables in the respective porcelain documentation.\n+in the appropriate manual page. Other git-related tools may define their own\n+variables, which will be defined on their respective manual pages; ideally,\n+these will be named in some way to indicate the project or creator.\n\n advice.*::\n  These variables control various optional help messages designed to\n-- \n1.7.10.4\n\n\nMade that patch off master, which is currently basically the same as\nmaint anyway.\n\nChrisA\n"},{"id":"237328","messageId":"xmqqha6rv4og.fsf@gitster.dls.corp.google.com","threadId":"36221","inReplyTo":"CAPTjJmqRFbKxe8MODtBDDC0SUYGoaFmQj2724YmKnMmdbrgOUA@mail.gmail.com","subject":"Re: Configuring a third-party git hook","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-03-21T17:31:59Z","receivedAt":"2014-03-21T17:31:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Chris Angelico <rosuav@gmail.com> writes:\n\n> On Fri, Mar 21, 2014 at 2:43 PM, Jeff King <peff@peff.net> wrote:\n>> Thanks, the new text looks good to me. Please follow SubmittingPatches\n>> (notably, you need to sign-off your work, and please send patches inline\n>> rather than as attachments).\n>\n> Ah, didn't see that file.\n\nIt appears that we might need to be more explicit in that file,\nthough.\n\n>\n> From 6e1fc126ece37c6201d0c16b76c6c87781f7b02b Mon Sep 17 00:00:00 2001\n\nNever paste the above line to your e-mail message.  It is only used\nto separate individual messages/patches in the format-patch output.\n\n> From: Chris Angelico <rosuav@gmail.com>\n> Date: Fri, 21 Mar 2014 10:45:08 +1100\n> Subject: [PATCH] Explain that third-party tools may create 'git config'\n>  variables\n\nYou _may_ paste these in-body pseudo-header lines at the beginning of your\ne-mail but (1) then these must be the first lines of your message,\nnot after doing random discussions at the beginning of the message\n(you may separate that with scissors marker \"-- >8 --\", though),\nand (2) do so only they are used to correct what appears in the real\nheader lines in your e-mail message.\n\n * \"From: \" is useful only when you are forwarding a patch written\n   by somebody else; otherwise your authorship can be taken from the\n   e-mail \"From: \" header.\n\n * \"Date: \" is the same way; \"Date :\" header in your e-mail is\n   closer to the time wider world saw the change for the first time\n   than when you made the commit, so it is usually not desired to\n   see in-body pseudo-header.\n\n * \"Subject: \" is used a lot more often than the above two,\n   especially when you send a patch to an on-going discussion thread\n   as a \"how about doing it this way?\" patch and do not want to\n   change the e-mail Subject: (which may break the discussion\n   thread).\n\nAlso I'd title the commit with the area it touches, i.e. starting it\nwith \"Explain blah\" is suboptimal.\n\nWill queue with a minor tweak, with retitling the change and\nrephrasing the \"ideally\" part, which invites people to say \"well it\nmay be so in the ideal world but the rule does not apply to me\".\n\nThanks.\n\n-- >8 --\nFrom: Chris Angelico <rosuav@gmail.com>\nDate: Fri, 21 Mar 2014 15:07:08 +1100\nSubject: [PATCH] config.txt: third-party tools may and do use their own variables\n\nSigned-off-by: Chris Angelico <rosuav@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n Documentation/config.txt | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex ab26963..a1ea605 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -131,8 +131,13 @@ Variables\n \n Note that this list is non-comprehensive and not necessarily complete.\n For command-specific variables, you will find a more detailed description\n-in the appropriate manual page. You will find a description of non-core\n-porcelain configuration variables in the respective porcelain documentation.\n+in the appropriate manual page.\n+\n+Other git-related tools may and do use their own variables.  When\n+inventing new variables for use in your own tool, make sure their\n+names do not conflict with what are used by Git itself and other\n+popular tools, and describe them in your documentation.\n+\n \n advice.*::\n \tThese variables control various optional help messages designed to\n-- \n1.9.1-443-g8f4a3d9\n"},{"id":"237332","messageId":"CAPTjJmodV0djvYJ9MWqdH4MvkrmauTJoWZFu0+RrR9ATdZBepQ@mail.gmail.com","threadId":"36221","inReplyTo":"xmqqha6rv4og.fsf@gitster.dls.corp.google.com","subject":"Re: Configuring a third-party git hook","fromName":"Chris Angelico","fromEmail":"rosuav@gmail.com","sentAt":"2014-03-21T17:48:00Z","receivedAt":"2014-03-21T17:48:00Z","isPatch":false,"sender":{"key":"rosuav@gmail.com","avatar":"https://avatars.githubusercontent.com/u/640535?v=4"},"body":"On Sat, Mar 22, 2014 at 4:31 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Chris Angelico <rosuav@gmail.com> writes:\n>\n>> On Fri, Mar 21, 2014 at 2:43 PM, Jeff King <peff@peff.net> wrote:\n>>> Thanks, the new text looks good to me. Please follow SubmittingPatches\n>>> (notably, you need to sign-off your work, and please send patches inline\n>>> rather than as attachments).\n>>\n>> Ah, didn't see that file.\n>\n> It appears that we might need to be more explicit in that file,\n> though.\n> [chomp specifics]\n\nPlease do. I read through the file as a set of instructions, and would\nhave followed them if they'd been there. Fitting into a project like\nthat is what those sorts of guides are for.\n\n> Also I'd title the commit with the area it touches, i.e. starting it\n> with \"Explain blah\" is suboptimal.\n\nInterestingly, this is exactly what my hook is for! It searches for\nprevious commits touching that file, looks for something separated off\nby a colon, and pre-fills the commit message with that. (If there are\nmultiple options, they're all listed, commented out. Otherwise, it's\nput in without a leading hash, so I just hit the End key - I use nano\nfor commit messages - and start typing.)\n\n> Will queue with a minor tweak, with retitling the change and\n> rephrasing the \"ideally\" part, which invites people to say \"well it\n> may be so in the ideal world but the rule does not apply to me\".\n\nAwesome. I tried to keep it brief (and the \"ideally\" was from the\npoint of view of someone trying to configure someone else's tool), but\nexplicitly talking about creating new variables makes that even\nclearer. Thanks.\n\nChrisA\n"},{"id":"237339","messageId":"20140321181532.GC15508@sigill.intra.peff.net","threadId":"36221","inReplyTo":"xmqqha6rv4og.fsf@gitster.dls.corp.google.com","subject":"Re: Configuring a third-party git hook","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2014-03-21T18:15:32Z","receivedAt":"2014-03-21T18:15:32Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Mar 21, 2014 at 10:31:59AM -0700, Junio C Hamano wrote:\n\n> -- >8 --\n> From: Chris Angelico <rosuav@gmail.com>\n> Date: Fri, 21 Mar 2014 15:07:08 +1100\n> Subject: [PATCH] config.txt: third-party tools may and do use their own variables\n> [...]\n> +Other git-related tools may and do use their own variables.  When\n> +inventing new variables for use in your own tool, make sure their\n> +names do not conflict with what are used by Git itself and other\n> +popular tools, and describe them in your documentation.\n\nI think this third line should be \"with what _is_ used\" to match the\nverb and noun pluralness[1]. Or to keep better parallel structure with\nthe first clause, something like \"...their names do not conflict with\nthose that are used by Git...\".\n\n-Peff\n\n[1] Is there a word to mean the \"pluralness\" of a noun or verb (similar\n    to \"tense\" for a verb). Surely there is, but I could not think of\n    it. I wanted to say here that the pluralness of \"what\" and \"are\"\n    does not match (it seems like \"what\" is a mass noun, which usually\n    matches a singular verb).\n"},{"id":"237345","messageId":"xmqqior7tmbp.fsf@gitster.dls.corp.google.com","threadId":"36221","inReplyTo":"20140321181532.GC15508@sigill.intra.peff.net","subject":"Re: Configuring a third-party git hook","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-03-21T18:53:46Z","receivedAt":"2014-03-21T18:53:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> [1] Is there a word to mean the \"pluralness\" of a noun or verb (similar\n>     to \"tense\" for a verb).\n\nI've seen \"plural vs singular\" often mentioned in the context of\nsubject and verb agreement.\n\nen.wiktionary.org/wiki/concord talks about agreement \"in gender,\nnumber, person, or case\", so \"number\" may be the word you are\nlooking for.\n\nhttp://en.wikipedia.org/wiki/Grammatical_number\n\n> Surely there is, but I could not think of\n>     it. I wanted to say here that the pluralness of \"what\" and \"are\"\n>     does not match (it seems like \"what\" is a mass noun, which usually\n>     matches a singular verb).\n"},{"id":"237346","messageId":"xmqqeh1vtm9p.fsf@gitster.dls.corp.google.com","threadId":"36221","inReplyTo":"20140321181532.GC15508@sigill.intra.peff.net","subject":"Re: Configuring a third-party git hook","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-03-21T18:54:58Z","receivedAt":"2014-03-21T18:54:58Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> On Fri, Mar 21, 2014 at 10:31:59AM -0700, Junio C Hamano wrote:\n>\n>> -- >8 --\n>> From: Chris Angelico <rosuav@gmail.com>\n>> Date: Fri, 21 Mar 2014 15:07:08 +1100\n>> Subject: [PATCH] config.txt: third-party tools may and do use their own variables\n>> [...]\n>> +Other git-related tools may and do use their own variables.  When\n>> +inventing new variables for use in your own tool, make sure their\n>> +names do not conflict with what are used by Git itself and other\n>> +popular tools, and describe them in your documentation.\n>\n> I think this third line should be \"with what _is_ used\" to match the\n> verb and noun pluralness[1]. Or to keep better parallel structure with\n> the first clause, something like \"...their names do not conflict with\n> those that are used by Git...\".\n\nThanks. I'll amend to do the \"those that are\".\n"}]}