{"thread":{"id":"45454","subject":"[PATCH v2 1/2] doc/SubmittingPatches: clarify the casing convention for \"area: change...\"","startedAt":"2017-03-21T14:28:27Z","lastAt":"2017-03-21T20:18:19Z","messageCount":8,"participants":["Ævar Arnfjörð Bjarmason","SZEDER Gábor","Junio C Hamano"],"isPatch":true,"patchVersion":2,"patchTotal":2},"messages":[{"id":"314809","messageId":"20170321142154.16993-2-avarab@gmail.com","threadId":"45454","inReplyTo":"20170321142154.16993-1-avarab@gmail.com","subject":"[PATCH v2 1/2] doc/SubmittingPatches: clarify the casing convention for \"area: change...\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-03-21T14:21:53Z","receivedAt":"2017-03-21T14:28:27Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Amend the section which describes how the first line of the subject\nshould look like to say that the \":\" in \"area: \" shouldn't be treated\nlike a full stop for the purposes of letter casing.\n\nChange the two subject examples to make this new paragraph clearer,\ni.e. \"unstar\" is not a common word, and \"git-cherry-pick.txt\" is a\nmuch longer string than \"githooks.txt\". Pick two recent commits from\ngit.git that fit better for the description.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Documentation/SubmittingPatches | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\nindex 3faf7eb884..9ef624ce38 100644\n--- a/Documentation/SubmittingPatches\n+++ b/Documentation/SubmittingPatches\n@@ -98,12 +98,17 @@ should skip the full stop.  It is also conventional in most cases to\n prefix the first line with \"area: \" where the area is a filename or\n identifier for the general area of the code being modified, e.g.\n \n-  . archive: ustar header checksum is computed unsigned\n-  . git-cherry-pick.txt: clarify the use of revision range notation\n+  . doc: clarify distinction between sign-off and pgp-signing\n+  . githooks.txt: improve the intro section\n \n If in doubt which identifier to use, run \"git log --no-merges\" on the\n files you are modifying to see the current conventions.\n \n+It's customary to start the remainder of the first line after \"area: \"\n+with a lower-case letter. E.g. \"doc: clarify...\", not \"doc:\n+Clarify...\", or \"githooks.txt: improve...\", not \"githooks.txt:\n+Improve...\".\n+\n The body should provide a meaningful commit message, which:\n \n   . explains the problem the change tries to solve, iow, what is wrong\n-- \n2.11.0\n\n"},{"id":"314810","messageId":"20170321142154.16993-3-avarab@gmail.com","threadId":"45454","inReplyTo":"20170321142154.16993-1-avarab@gmail.com","subject":"[PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-03-21T14:21:54Z","receivedAt":"2017-03-21T14:29:25Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Amend the section which describes how to get a commit summary to show\nhow do to that with \"git show\", currently the documentation only shows\nhow to do that with gitk.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Documentation/SubmittingPatches | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\nindex 9ef624ce38..d8c88153c1 100644\n--- a/Documentation/SubmittingPatches\n+++ b/Documentation/SubmittingPatches\n@@ -134,8 +134,17 @@ with the subject enclosed in a pair of double-quotes, like this:\n     noticed that ...\n \n The \"Copy commit summary\" command of gitk can be used to obtain this\n-format.\n+format, or this invocation of \"git show\":\n \n+    git show -s --date=short --pretty='format:%h (\"%s\", %ad)' <commit>\n+\n+To turn that into a handy alias:\n+\n+    git config --global alias.git-commit-summary \"show -s --date=short --pretty='format:%h (\\\"%s\\\", %ad)'\"\n+\n+And then to get the commit summary:\n+\n+    git git-commit-summary <commit>\n \n (3) Generate your patch using Git tools out of your commits.\n \n-- \n2.11.0\n\n"},{"id":"314811","messageId":"20170321142154.16993-1-avarab@gmail.com","threadId":"45454","inReplyTo":"xmqq37ea2ykh.fsf@gitster.mtv.corp.google.com","subject":"[PATCH v2 0/2] A couple of minor improvements","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-03-21T14:21:52Z","receivedAt":"2017-03-21T14:31:16Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Unchanged from v1 in my <20170318184203.16890-1-avarab@gmail.com>,\nexcept 2/2 changes the \"show\" command to use --date=short as Junio\nsuggested in <xmqq37ea2ykh.fsf@gitster.mtv.corp.google.com>.\n\nÆvar Arnfjörð Bjarmason (2):\n  doc/SubmittingPatches: clarify the casing convention for \"area:\n    change...\"\n  doc/SubmittingPatches: show how to get a CLI commit summary\n\n Documentation/SubmittingPatches | 20 +++++++++++++++++---\n 1 file changed, 17 insertions(+), 3 deletions(-)\n\n-- \n2.11.0\n\n"},{"id":"314814","messageId":"20170321155153.20753-1-szeder.dev@gmail.com","threadId":"45454","inReplyTo":"20170321142154.16993-3-avarab@gmail.com","subject":"Re: [PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2017-03-21T15:51:53Z","receivedAt":"2017-03-21T15:52:42Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"> Amend the section which describes how to get a commit summary to show\n> how do to that with \"git show\", currently the documentation only shows\n> how to do that with gitk.\n> \n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n>  Documentation/SubmittingPatches | 11 ++++++++++-\n>  1 file changed, 10 insertions(+), 1 deletion(-)\n> \n> diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\n> index 9ef624ce38..d8c88153c1 100644\n> --- a/Documentation/SubmittingPatches\n> +++ b/Documentation/SubmittingPatches\n> @@ -134,8 +134,17 @@ with the subject enclosed in a pair of double-quotes, like this:\n>      noticed that ...\n>  \n>  The \"Copy commit summary\" command of gitk can be used to obtain this\n> -format.\n> +format, or this invocation of \"git show\":\n>  \n> +    git show -s --date=short --pretty='format:%h (\"%s\", %ad)' <commit>\n> +\n> +To turn that into a handy alias:\n> +\n> +    git config --global alias.git-commit-summary \"show -s --date=short --pretty='format:%h (\\\"%s\\\", %ad)'\"\n> +\n> +And then to get the commit summary:\n> +\n> +    git git-commit-summary <commit>\n\n- 'tformat:' is a better fit than 'format:' in this case, because it\n  adds a trailing newline.\n\n- I actually have a pretty format alias exactly for this purpose:\n\n    pretty.commitref=tformat:%h (%s, %as)\n\n  and a shorter 'git log -1 --pretty=commitref <commit>' does the\n  trick.  Perhaps it would be worth to provide this as a builtin\n  pretty format.\n  (Of course this relies on '%as' being interpreted as short author\n  date to make the format work on its own, without the additional\n  '--date=short'.  Alas, git doesn't support this, see [1].\n  If only there were a pretty format specifier for suppressing diff\n  output, then the '-s' could go away as well.)\n\n- I find that the two subsequent 'git's in 'git git-<whatever>' look\n  strange.  However, to make this point moot right away:\n\n- I don't think SubmittingPatches is the right place to show how to\n  create and use a command alias.\n\n\n[1] - http://public-inbox.org/git/1444235305-8718-1-git-send-email-szeder@ira.uka.de/T/#u\n\n"},{"id":"314828","messageId":"xmqqvar2qzof.fsf@gitster.mtv.corp.google.com","threadId":"45454","inReplyTo":"20170321155153.20753-1-szeder.dev@gmail.com","subject":"Re: [PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-21T17:58:56Z","receivedAt":"2017-03-21T18:06:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n>>  The \"Copy commit summary\" command of gitk can be used to obtain this\n>> -format.\n>> +format, or this invocation of \"git show\":\n>>  \n>> +    git show -s --date=short --pretty='format:%h (\"%s\", %ad)' <commit>\n>> +\n>> +To turn that into a handy alias:\n>> +\n>> +    git config --global alias.git-commit-summary \"show -s --date=short --pretty='format:%h (\\\"%s\\\", %ad)'\"\n>> +\n>> +And then to get the commit summary:\n>> +\n>> +    git git-commit-summary <commit>\n>\n> - 'tformat:' is a better fit than 'format:' in this case, because it\n>   adds a trailing newline.\n\nThat depends on what you use it for.  I most often use mine to\ninsert the reference that flows in a sentence, not as a separate\ndisplayed material, e.g.\n\n    1f6b1afe (\"Git 2.12.1\", 2017-03-20)\n\nso for that purpose, not adding a trailing newline is a feature.\n\n> - I find that the two subsequent 'git's in 'git git-<whatever>' look\n>   strange.  However, to make this point moot right away:\n>\n> - I don't think SubmittingPatches is the right place to show how to\n>   create and use a command alias.\n\nThese two I do agree with.\n"},{"id":"314847","messageId":"CACBZZX5ofE-B0AE1gDVwN=N3g-x+m=OW72BYxK8Oz7FUkBNP7Q@mail.gmail.com","threadId":"45454","inReplyTo":"xmqqvar2qzof.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-03-21T18:47:23Z","receivedAt":"2017-03-21T18:55:08Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Mar 21, 2017 at 6:58 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> SZEDER Gábor <szeder.dev@gmail.com> writes:\n>\n>>>  The \"Copy commit summary\" command of gitk can be used to obtain this\n>>> -format.\n>>> +format, or this invocation of \"git show\":\n>>>\n>>> +    git show -s --date=short --pretty='format:%h (\"%s\", %ad)' <commit>\n>>> +\n>>> +To turn that into a handy alias:\n>>> +\n>>> +    git config --global alias.git-commit-summary \"show -s --date=short --pretty='format:%h (\\\"%s\\\", %ad)'\"\n>>> +\n>>> +And then to get the commit summary:\n>>> +\n>>> +    git git-commit-summary <commit>\n>>\n>> - 'tformat:' is a better fit than 'format:' in this case, because it\n>>   adds a trailing newline.\n>\n> That depends on what you use it for.  I most often use mine to\n> insert the reference that flows in a sentence, not as a separate\n> displayed material, e.g.\n>\n>     1f6b1afe (\"Git 2.12.1\", 2017-03-20)\n>\n> so for that purpose, not adding a trailing newline is a feature.\n\nI agree with tformat. I didn't notice this because I've been screwing\naround with my pager settings and my configuration was implicitly\nadding a newline. Do you mind fixing that up Junio, or should I\nre-send it?\n\n>> - I find that the two subsequent 'git's in 'git git-<whatever>' look\n>>   strange.  However, to make this point moot right away:\n>>\n>> - I don't think SubmittingPatches is the right place to show how to\n>>   create and use a command alias.\n>\n> These two I do agree with.\n\nI don't think it disturbs the flow of the document, and since someone\ngoing through SubmittingPatches is likely about to submit a patch,\nproviding that one-liner is handy, not as some \"here's how to add\naliases\" tutorial, but so you don't need to go and copy/paste it, add\n\\'s for the \"'s etc.\n"},{"id":"314861","messageId":"CAM0VKjmZS-mTdtBb1BDhixzWMou7h7VZSo3hpj5pk_C6i_MBnA@mail.gmail.com","threadId":"45454","inReplyTo":"xmqqvar2qzof.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2017-03-21T20:01:39Z","receivedAt":"2017-03-21T20:01:52Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Tue, Mar 21, 2017 at 6:58 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> SZEDER Gábor <szeder.dev@gmail.com> writes:\n>\n>>>  The \"Copy commit summary\" command of gitk can be used to obtain this\n>>> -format.\n>>> +format, or this invocation of \"git show\":\n>>>\n>>> +    git show -s --date=short --pretty='format:%h (\"%s\", %ad)' <commit>\n>>> +\n>>> +To turn that into a handy alias:\n>>> +\n>>> +    git config --global alias.git-commit-summary \"show -s --date=short --pretty='format:%h (\\\"%s\\\", %ad)'\"\n>>> +\n>>> +And then to get the commit summary:\n>>> +\n>>> +    git git-commit-summary <commit>\n>>\n>> - 'tformat:' is a better fit than 'format:' in this case, because it\n>>   adds a trailing newline.\n>\n> That depends on what you use it for.  I most often use mine to\n> insert the reference that flows in a sentence, not as a separate\n> displayed material, e.g.\n>\n>     1f6b1afe (\"Git 2.12.1\", 2017-03-20)\n>\n> so for that purpose, not adding a trailing newline is a feature.\n\nPerhaps we are running it differently.\n\nI use its output that way, too, usually running the command in a\nterminal and copy-pasting its output into an editor.  For this I find\n'tformat:' clearly better, because the reference ends up on its own\nline: it's separate from the next prompt and easy to copy the whole\nthing with a triple-click anywhere on that line.\n\nWith 'format:' the subsequent shell prompt is the direct continuation\nof the reference:\n\n  ~/src/git (master %)$ git show -s --date=short --pretty='format:%h\n(\"%s\", %ad)' master\n  c0f9c7058 (\"Sync with 2.12.1\", 2017-03-20)~/src/git (master %)$\n\nI don't like this, because it looks ugly, is a bit more difficult to\ncopy, and if I press the up key for shell history, then for some\nreason it gets messed up like this:\n\n  c0f9c7058 (\"Sync with 2.12.1\", 2017-03-20)~/src/git (master %)$ git\nshow -s --da\n  masterrt --pretty='format:%h (\"%s\", %ad)' m\n\nwith the cursor blinking on the last line after 'master'.\n"},{"id":"314864","messageId":"xmqqlgryo0bz.fsf@gitster.mtv.corp.google.com","threadId":"45454","inReplyTo":"CAM0VKjmZS-mTdtBb1BDhixzWMou7h7VZSo3hpj5pk_C6i_MBnA@mail.gmail.com","subject":"Re: [PATCH v2 2/2] doc/SubmittingPatches: show how to get a CLI commit summary","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-03-21T20:13:04Z","receivedAt":"2017-03-21T20:18:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"SZEDER Gábor <szeder.dev@gmail.com> writes:\n\n>> That depends on what you use it for.  I most often use mine to\n>> insert the reference that flows in a sentence, not as a separate\n>> displayed material, e.g.\n>>\n>>     1f6b1afe (\"Git 2.12.1\", 2017-03-20)\n>>\n>> so for that purpose, not adding a trailing newline is a feature.\n>\n> Perhaps we are running it differently.\n>\n> I use its output that way, too, usually running the command in a\n> terminal and copy-pasting its output into an editor.\n\nI do \\C-u\\M-!git one<ENTER> from Emacs in the middle of typing a\nsentence (where \"git one\" is aliased to that --format thing), and\nfor this I obviously do not want the terminating newline.\n\nOf course --pretty=format:... has the opposite effect and in a\nterminal to make it easier to cut&paste you do want to have its\noutput separated from the prompt string.\n\nSo as I said, \"That depends on what you use it for.\"\n\nAs this is a mere example, we should just shoot for brevity instead?\nBoth \"--pretty=format:\" and \"--pretty=tformat:\" are much longer than\n\"--format=\", so we can just mention\n\n    git show --date=short -s --format='%h (\"%s\", %ad)'\n\nand let the users to customize it for their needs?\n"}]}