{"thread":{"id":"47093","subject":"Git Open Source Weekend London 11th/12th November","startedAt":"2017-11-01T16:36:30Z","lastAt":"2017-11-07T20:46:58Z","messageCount":11,"participants":["Thomas Gummerer","Jeff King","Philip Oakley","Martin Ågren","Patrick Steinhardt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"331572","messageId":"CALgYhfO=6WfdzfGYwgw+cp2Tb58Yzx6YYvBtMCPNcJto5rMUCg@mail.gmail.com","threadId":"47093","inReplyTo":null,"subject":"Git Open Source Weekend London 11th/12th November","fromName":"Thomas Gummerer","fromEmail":"t.gummerer@gmail.com","sentAt":"2017-11-01T16:36:24Z","receivedAt":"2017-11-01T16:36:30Z","isPatch":false,"sender":{"key":"t.gummerer@gmail.com","avatar":"https://avatars.githubusercontent.com/u/191004?v=4"},"body":"Hi,\n\nBloomberg is hosting an Open Source Weekend in London on the 11th\n& 12th November 2017 to contribute to the Git project.  We have\nalso confirmed that Peff will be amongst the mentors on hand to\nguide attendees through their efforts!\n\nSome of you may notice that we tried to organize this earlier in the\nyear, but unfortunately had to postpone it.  For this time around we\nare further along in planning, and it's definitely happening :)\n\nFor those unfamiliar with Bloomberg Open Source weekends: These\nevents provide a great way for those who love working on code to\ngive back to the community. Come and help make difference to a\ngreat project!\n\nThere will be tasks provided by the mentors, or bring your own if\nyou already have a great idea.  Also if you can't attend the weekend\nand can think of a project which you would like tackled at this\nevent please let me know.  Obviously the projects should be\ncompletable inside a weekend.\n\nNormally attendees work in small groups on a specific task to\nprevent anyone from getting stuck. Per usual, Bloomberg will\nprovide the venue, mentors, snacks and drinks.  Bring your\nenthusiasm (and your laptop!) and come share in the fun!  The\nevent is also open to everyone, so feel free to pass on the\ninvite!\n\nThe event is free of charge, but please ensure that you are able\nto attend the event before registering.  That will greatly help\nus with accurate numbers for catering so that we don't create\nunwanted waste!\n\nYou can register for the event here:\n\nhttps://go.bloomberg.com/attend/invite/git-sprint-hosted-bloomberg/\n\nWhether you already are a contributor (as probably most people on\nthis list are) or interested in starting to contribute to git or\nhave some friends that you'd like to get to contribute to git, it\nwould be great to see you at the event.\n\nIf you have any further questions feel free to get in touch.\n\n- Thomas\n"},{"id":"331820","messageId":"20171104092850.5fthdgvnihd3y4fm@sigill.intra.peff.net","threadId":"47093","inReplyTo":"CALgYhfO=6WfdzfGYwgw+cp2Tb58Yzx6YYvBtMCPNcJto5rMUCg@mail.gmail.com","subject":"Re: Git Open Source Weekend London 11th/12th November","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-11-04T09:28:50Z","receivedAt":"2017-11-04T09:28:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Nov 01, 2017 at 04:36:24PM +0000, Thomas Gummerer wrote:\n\n> Normally attendees work in small groups on a specific task to\n> prevent anyone from getting stuck. Per usual, Bloomberg will\n> provide the venue, mentors, snacks and drinks.  Bring your\n> enthusiasm (and your laptop!) and come share in the fun!  The\n> event is also open to everyone, so feel free to pass on the\n> invite!\n\nI think it will help if the experienced members of the community (both\nthose who will be at the event and not) can come up with some possible\ntopics to work on (though of course I'd be glad for participants to come\nwith their own itch to scratch).\n\nWe've started using the #leftoverbits tag to allow searching in the\narchive:\n\n  https://public-inbox.org/git/?q=leftoverbits\n\nSome of those have since been completed, but others are left open.\nThere's not really a master list, but it's a potential source for\ndigging for gold (well, if you want to call leftover bugs gold :) ).\n\nI started a list over the summer of larger items that people might want\nto pick up. Here it is in no particular order:\n\n - the pager.<cmd> config is mis-designed, because our config keys\n   cannot represent all possible command names (e.g., case folding and\n   illegal characters). This should be pager.<cmd>.enable or similar.\n   Some discussion in (this message and the surrounding thread):\n\n     https://public-inbox.org/git/20170711101942.h2uwxtgzvgguzivu@sigill.intra.peff.net/\n\n   But I think you could find more by searching the archive.\n\n - ditto for alias.* config, which has the same syntax problems.\n\n - auto-gc is sometimes over-anxious to run if you have a lot of\n   unreachable loose objects. We should pack unreachables into a single\n   pack. That solves the --auto problem, and is also way more efficient.\n   The catch is expiration. Some discussion here (and especially\n   down-thread):\n\n     https://public-inbox.org/git/20170711101942.h2uwxtgzvgguzivu@sigill.intra.peff.net/\n\n - git-config's \"--get-color\" is unlike all the other types in that it\n   takes a \"default\" value if the config key isn't set. This makes it annoyingly\n   inconsistent, but there's also no way to ask Git to interpret other\n   values (e.g., you might want it to expand \"--path\" or an \"--int\"). It\n   would be nice to have a general \"--default\" option so you could do:\n\n     # same as git config --get-color color.diff.old red\n     git config --default red --color color.diff.old\n\n   or\n\n     # not currently possible to ask git to interpret \"10k\"\n     git config --default 10k --int some.integer.key\n\n - git's internal config can parse expiration dates (see\n   parse_expiry_date()), but you can't do so from git-config. It should\n   probably have a type for \"--expiry-date\" (which would of course be\n   more useful with the --default option above).\n\n - there's no efficient way to ask git-config for several keys with a\n   specific type (or even multiple different types).  You can use\n   \"--list\" to get their strings, but you can't get any interpretation\n   (like colors, integers, etc). Invoking git-config many times can have\n   a noticeable speed impact for a script. There should probably be a\n   \"--stdin\" mode (or maybe \"--get-stdin\" if we would one day want to\n   have a \"--set-stdin\") that takes a list of keys, optional types, and\n   optional defaults (that \"--default\" again!) and outputs them to\n   stdout.\n\n\nThose were just sitting on my ideas list. I'm happy to go into more\ndetail if anybody's interested in discussing any of them. Some of them\nmay be half-baked.\n\nAnd of course I'd be happy if people wanted to contribute more items to\nthe list.\n\n-Peff\n"},{"id":"331826","messageId":"F8E398C660874CFEA872CDB6F841376B@PhilipOakley","threadId":"47093","inReplyTo":"20171104092850.5fthdgvnihd3y4fm@sigill.intra.peff.net","subject":"Re: Git Open Source Weekend London 11th/12th November","fromName":"Philip Oakley","fromEmail":"philipoakley@iee.org","sentAt":null,"receivedAt":"2017-11-04T17:15:23Z","isPatch":false,"sender":{"key":"philipoakley@iee.email","avatar":"https://avatars.githubusercontent.com/u/914343?v=4"},"body":"From: \"Jeff King\" <peff@peff.net>\n> On Wed, Nov 01, 2017 at 04:36:24PM +0000, Thomas Gummerer wrote:\n>\n>> Normally attendees work in small groups on a specific task to\n>> prevent anyone from getting stuck. Per usual, Bloomberg will\n>> provide the venue, mentors, snacks and drinks.  Bring your\n>> enthusiasm (and your laptop!) and come share in the fun!  The\n>> event is also open to everyone, so feel free to pass on the\n>> invite!\n>\n> I think it will help if the experienced members of the community (both\n> those who will be at the event and not) can come up with some possible\n> topics to work on (though of course I'd be glad for participants to come\n> with their own itch to scratch).\n>\n> We've started using the #leftoverbits tag to allow searching in the\n> archive:\n>\n>  https://public-inbox.org/git/?q=leftoverbits\n>\n> Some of those have since been completed, but others are left open.\n> There's not really a master list, but it's a potential source for\n> digging for gold (well, if you want to call leftover bugs gold :) ).\n>\n> I started a list over the summer of larger items that people might want\n> to pick up. Here it is in no particular order:\n>\n> - the pager.<cmd> config is mis-designed, because our config keys\n>   cannot represent all possible command names (e.g., case folding and\n>   illegal characters). This should be pager.<cmd>.enable or similar.\n>   Some discussion in (this message and the surrounding thread):\n>\n>\n> https://public-inbox.org/git/20170711101942.h2uwxtgzvgguzivu@sigill.intra.peff.net/\n>\n>   But I think you could find more by searching the archive.\n>\n> - ditto for alias.* config, which has the same syntax problems.\n>\n> - auto-gc is sometimes over-anxious to run if you have a lot of\n>   unreachable loose objects. We should pack unreachables into a single\n>   pack. That solves the --auto problem, and is also way more efficient.\n>   The catch is expiration. Some discussion here (and especially\n>   down-thread):\n>\n>\n> https://public-inbox.org/git/20170711101942.h2uwxtgzvgguzivu@sigill.intra.peff.net/\n>\n> - git-config's \"--get-color\" is unlike all the other types in that it\n>   takes a \"default\" value if the config key isn't set. This makes it\n> annoyingly\n>   inconsistent, but there's also no way to ask Git to interpret other\n>   values (e.g., you might want it to expand \"--path\" or an \"--int\"). It\n>   would be nice to have a general \"--default\" option so you could do:\n>\n>     # same as git config --get-color color.diff.old red\n>     git config --default red --color color.diff.old\n>\n>   or\n>\n>     # not currently possible to ask git to interpret \"10k\"\n>     git config --default 10k --int some.integer.key\n>\n> - git's internal config can parse expiration dates (see\n>   parse_expiry_date()), but you can't do so from git-config. It should\n>   probably have a type for \"--expiry-date\" (which would of course be\n>   more useful with the --default option above).\n>\n> - there's no efficient way to ask git-config for several keys with a\n>   specific type (or even multiple different types).  You can use\n>   \"--list\" to get their strings, but you can't get any interpretation\n>   (like colors, integers, etc). Invoking git-config many times can have\n>   a noticeable speed impact for a script. There should probably be a\n>   \"--stdin\" mode (or maybe \"--get-stdin\" if we would one day want to\n>   have a \"--set-stdin\") that takes a list of keys, optional types, and\n>   optional defaults (that \"--default\" again!) and outputs them to\n>   stdout.\n>\n>\n> Those were just sitting on my ideas list. I'm happy to go into more\n> detail if anybody's interested in discussing any of them. Some of them\n> may be half-baked.\n>\n> And of course I'd be happy if people wanted to contribute more items to\n> the list.\n>\n\nA few I've seen recently are:\n\n* The provison of a `git resolve -X <ours|theirs> -- <pathspec>` command to\nsimplify the manual resolution of remaining conflicts.\nhttps://public-inbox.org/git/8737615iu5.fsf@javad.com/  Sergey Organov: How\nto re-merge paths differently?\n\n* (Git for Windows/HFS): Detect directory capitalisation changes when\nswitching branches, and rename them correctly on case preserving, case\ninsensitive file systems. Optimisation: If the underlying tree is identical\nthen do not update the modified dates.\nhttps://github.com/git-for-windows/git/issues/1333 Chuck Lu: Folder name\nshould be case sensitive when switch branches.\n\n* (Git for Windows/HFS) (long standing):\ndetect branch name capitalisation issues\n- may need a struct to carry both the filename and pathname down the\ndifferent parts of the code base so that the FS name of the requested\nref/heads/ can be checked and warned.\ne.g. https://github.com/git-for-windows/git/issues/852 \"`git checkout head`\ninconsistent behavior\"\n- ('head' finds 'HEAD', but also 'branch' finds 'Branch');\nhttps://github.com/git-for-windows/git/issues/852#issuecomment-239675187 ->\n\"rambling notes\" for partial analysis.\n\nhttps://github.com/git-for-windows/git/issues/752 \"git checkout creating\ntracking branch using case-insensitive match?\"\n- Is this part of the same problem?\n\n* Documentation:\n\nThere's always the newby role at the hackathon of collating\nall the \"what does this command do/mean?\" questions that could be resolved\nby simple updates, or capturing locally written explanations to improve the\nmanual pages. (easy patch practice)\n\nPerhaps see how `git rerere` could be better explained and integrated onto\nthe other man pages so that more folk naturally know of it and use it. (see\nalso the `git resolve` question above)\n\nAlso for case sensitivity documentation\nhttps://github.com/git-for-windows/git/issues/908#issuecomment-325116189\n\n--\nPhilip\n\n"},{"id":"331860","messageId":"cover.1509879269.git.martin.agren@gmail.com","threadId":"47093","inReplyTo":"20171104092850.5fthdgvnihd3y4fm@sigill.intra.peff.net","subject":"[PATCH/DONOTAPPLY 0/4] first steps towards pager.foo.{command,enable}","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-11-05T11:58:18Z","receivedAt":"2017-11-05T11:58:39Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"I'm not posting this for inclusion (yet), but because I read this:\n\nOn 4 November 2017 at 10:28, Jeff King <peff@peff.net> wrote:\n>  - the pager.<cmd> config is mis-designed, because our config keys\n>    cannot represent all possible command names (e.g., case folding and\n>    illegal characters). This should be pager.<cmd>.enable or similar.\n>    Some discussion in (this message and the surrounding thread):\n>\n>      https://public-inbox.org/git/20170711101942.h2uwxtgzvgguzivu@sigill.intra.peff.net/\n>\n>    But I think you could find more by searching the archive.\n\nI'm posting four patches I have on this to save others from redoing my\nwork and findings. These patches feel a bit incomplete, which is why I\nput them to the side some time ago (and eventually forgot about them).\n\nIn particular, they do not teach `--paginate` to use the pager\nconfigured by `pager.foo.command`. It is already now possible to use\n`pager.foo` to say \"I don't want you to page, but if I later give you\n`pager.foo=true`, this is the pager I want you to use\". That does not\nwork with `--paginate`, but this can all be explained -- indeed, we\ndocument that `--paginate` overrules `pager.foo`.\n\nIf we teach `--paginate` to respect `pager.foo.command`, it seems that\nwe would either 1) introduce a small (and possibly hard to understand\nand explain) difference between the old-style and the new-style\npager-configuration or 2) knowingly change the behavior of `--paginate`\nwith `pager.foo` or 3) knowingly change the behavior of\n`pager.foo=false` as documented in the first patch.\n\nI think there's great value to being able to say \"this is the same as\nthis, and that is the same as that\", but that might get muddied by \"oh,\nexcept if you use `--paginate`\".\n\nIf someone wants to pick these up and bring them to completion, great!\nIf not and if I or someone else feels confident about which way to go,\nthen I can revisit these.\n\nMartin\n\nMartin Ågren (4):\n  t7006: document that `pager.foo` can be partially preserved\n  pager: refactor `pager_command_config()`\n  pager: introduce `pager.*.command` and `.enable`\n  pager: make `pager.foo.command` imply `.enable=true`\n\n Documentation/config.txt  | 19 +++++++++\n Documentation/git-tag.txt |  3 +-\n Documentation/git.txt     |  2 +-\n t/t7006-pager.sh          | 98 +++++++++++++++++++++++++++++++++++++++++++++++\n pager.c                   | 16 +++++++-\n 5 files changed, 134 insertions(+), 4 deletions(-)\n\n-- \n2.15.0.415.gac1375d7e\n\n"},{"id":"331861","messageId":"a785966f0ffa966661e4022c077f81c46db3bb98.1509879269.git.martin.agren@gmail.com","threadId":"47093","inReplyTo":"cover.1509879269.git.martin.agren@gmail.com","subject":"[PATCH 1/4] t7006: document that `pager.foo` can be partially preserved","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-11-05T11:58:19Z","receivedAt":"2017-11-05T11:58:43Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Assuming a blank slate, consider the following configuration:\n\n[pager]\n\tfoo = some-command\n\tfoo = false\n\nNow `git -c pager.foo=true foo` will page using `some-command`. This\nmight have been intended, or is perhaps just a side-effect of the\nimplementation. In any case, it could be useful and someone might rely\non it, either knowingly (as above) or not (if these lines are spread out\nacross the configuration).\n\nHowever, `git --paginate foo` will *not* use `some-command`. That\nmatches the documentation (Documentation/git.txt).\n\nUpcoming commits will expand on how paging for `git foo` can be\nconfigured. Those commits mustn't change how `pager.foo` behaves, so add\ntests for these two cases.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n t/t7006-pager.sh | 18 ++++++++++++++++++\n 1 file changed, 18 insertions(+)\n\ndiff --git a/t/t7006-pager.sh b/t/t7006-pager.sh\nindex f0f1abd1c..e890b2f64 100755\n--- a/t/t7006-pager.sh\n+++ b/t/t7006-pager.sh\n@@ -117,6 +117,24 @@ test_expect_success TTY 'git config uses a pager if configured to' '\n \ttest -e paginated.out\n '\n \n+test_expect_success TTY 'configuration remembers pager across boolean changes' '\n+\techo paging >expected &&\n+\ttest_unconfig pager.config &&\n+\ttest_terminal git -c pager.config=\"echo paging\" \\\n+\t\t\t  -c pager.config=false \\\n+\t\t\t  -c pager.config \\\n+\t\t\t  config --list >actual &&\n+\ttest_cmp expected actual\n+'\n+\n+test_expect_success TTY '--paginate does not respect inactivated pager' '\n+\trm -f paginated.out &&\n+\ttest_terminal git -c pager.config=bad \\\n+\t\t\t  -c pager.config=false \\\n+\t\t\t  --paginate config --list &&\n+\ttest -e paginated.out\n+'\n+\n test_expect_success TTY 'configuration can enable pager (from subdir)' '\n \trm -f paginated.out &&\n \tmkdir -p subdir &&\n-- \n2.15.0.415.gac1375d7e\n\n"},{"id":"331862","messageId":"2b0f8f5c1f42f7a85d8017ca378de8acde2688a3.1509879269.git.martin.agren@gmail.com","threadId":"47093","inReplyTo":"cover.1509879269.git.martin.agren@gmail.com","subject":"[PATCH 2/4] pager: refactor `pager_command_config()`","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-11-05T11:58:20Z","receivedAt":"2017-11-05T11:58:47Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"`pager_command_config()` checks for the config `pager.<cmd>`. In the\nnext commit, we will want to also look for some strings on the form\n`pager.<cmd>.foo`.\n\nRefactor the code to verify upfront that the string starts with\n\"pager.<cmd>\" and then check that the remainder is the empty string.\nThis makes it easy to look for other remainders in the next patch.\n\nWhile at it, before assigning to `value`, free any old value we might\nalready have picked up.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n pager.c | 9 +++++++--\n 1 file changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/pager.c b/pager.c\nindex 92b23e6cd..8968f26f1 100644\n--- a/pager.c\n+++ b/pager.c\n@@ -191,14 +191,19 @@ struct pager_command_config_data {\n static int pager_command_config(const char *var, const char *value, void *vdata)\n {\n \tstruct pager_command_config_data *data = vdata;\n-\tconst char *cmd;\n+\tconst char *cmd, *remainder;\n+\n+\tif (!skip_prefix(var, \"pager.\", &cmd) ||\n+\t    !skip_prefix(cmd, data->cmd, &remainder))\n+\t\treturn 0;\n \n-\tif (skip_prefix(var, \"pager.\", &cmd) && !strcmp(cmd, data->cmd)) {\n+\tif (!*remainder) {\n \t\tint b = git_parse_maybe_bool(value);\n \t\tif (b >= 0)\n \t\t\tdata->want = b;\n \t\telse {\n \t\t\tdata->want = 1;\n+\t\t\tfree(data->value);\n \t\t\tdata->value = xstrdup(value);\n \t\t}\n \t}\n-- \n2.15.0.415.gac1375d7e\n\n"},{"id":"331863","messageId":"a49ddb791a5a716a340660a57d01138d5aff84ce.1509879269.git.martin.agren@gmail.com","threadId":"47093","inReplyTo":"cover.1509879269.git.martin.agren@gmail.com","subject":"[PATCH 3/4] pager: introduce `pager.*.command` and `.enable`","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-11-05T11:58:21Z","receivedAt":"2017-11-05T11:58:51Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"`pager.foo` conflates two concepts: how and whether `git foo` should\npage. In particular, it can not be used to change *how* to page without\npossibly also affecting *whether*.\n\nTeach Git about two new config items, `pager.foo.command` and\n`pager.foo.enable`.\n\nMake this interact sanely with the existing `pager.foo`. For example,\nmake sure that `pager.foo=false` does not cause us to forget about a\ncommand already configured through `pager.foo.command`, so that the\ngiven pager command can be \"re-activated\" using\n`pager.foo[.enable]=true`.\n\nWhere Documentation/ refers to `pager.tag`, write \"the `pager.tag[.*]`\nconfiguration options\". In config.txt, `pager.blame` is mentioned more\nas an example and it describes precisely the situation where one will\nwant to use the old mechanism, so leave that instance unchanged.\n\nFor symmetry with how `--paginate` disrespects any pager that might have\nbeen configured with `pager.foo`, do the same for `pager.foo.command`.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/config.txt  | 17 +++++++++++\n Documentation/git-tag.txt |  3 +-\n Documentation/git.txt     |  2 +-\n t/t7006-pager.sh          | 73 +++++++++++++++++++++++++++++++++++++++++++++++\n pager.c                   |  5 ++++\n 5 files changed, 98 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 1ac0ae6ad..72558cc74 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2460,6 +2460,23 @@ pager.<cmd>::\n \tor `--no-pager` is specified on the command line, it takes\n \tprecedence over this option.  To disable pagination for all\n \tcommands, set `core.pager` or `GIT_PAGER` to `cat`.\n++\n+This is a less flexible alternative to `pager.<cmd>.command` and\n+`pager.<cmd>.enable`. Using it with a boolean does the same as using\n+`pager.<cmd>.enable`. Using it with a command does the same as using\n+`pager.<cmd>.command` and `pager.<cmd>.enable=true`.\n+\n+pager.<cmd>.command::\n+\tSpecifies the pager to use for the subcommand.\n+\tWhether the pager should be used is configured using\n+\t`pager.<cmd>.enable` or `pager.<cmd>=<boolean>`.\n+\n+pager.<cmd>.enable::\n+\tA boolean which turns on or off pagination of the output of a\n+\tparticular Git subcommand when writing to a tty. If `--paginate`\n+\tor `--no-pager` is specified on the command line, it takes\n+\tprecedence over this option.  To disable pagination for all\n+\tcommands, set `core.pager` or `GIT_PAGER` to `cat`.\n \n pretty.<name>::\n \tAlias for a --pretty= format string, as specified in\ndiff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt\nindex 956fc019f..9f9f33409 100644\n--- a/Documentation/git-tag.txt\n+++ b/Documentation/git-tag.txt\n@@ -210,7 +210,8 @@ it in the repository configuration as follows:\n     signingKey = <gpg-keyid>\n -------------------------------------\n \n-`pager.tag` is only respected when listing tags, i.e., when `-l` is\n+The `pager.tag[.*]` configuration options are only\n+respected when listing tags, i.e., when `-l` is\n used or implied. The default is to use a pager.\n See linkgit:git-config[1].\n \ndiff --git a/Documentation/git.txt b/Documentation/git.txt\nindex 7a1d629ca..0a2eff7a6 100644\n--- a/Documentation/git.txt\n+++ b/Documentation/git.txt\n@@ -99,7 +99,7 @@ foo.bar= ...`) sets `foo.bar` to the empty string which `git config\n -p::\n --paginate::\n \tPipe all output into 'less' (or if set, $PAGER) if standard\n-\toutput is a terminal.  This overrides the `pager.<cmd>`\n+\toutput is a terminal.  This overrides the `pager.<cmd>[.*]`\n \tconfiguration options (see the \"Configuration Mechanism\" section\n \tbelow).\n \ndiff --git a/t/t7006-pager.sh b/t/t7006-pager.sh\nindex e890b2f64..6966627dd 100755\n--- a/t/t7006-pager.sh\n+++ b/t/t7006-pager.sh\n@@ -588,4 +588,77 @@ test_expect_success 'command with underscores does not complain' '\n \ttest_cmp expect actual\n '\n \n+test_expect_success 'setup' '\n+\tsane_unset PAGER GIT_PAGER GIT_PAGER_IN_USE &&\n+\ttest_unconfig core.pager &&\n+\n+\tgit rev-list HEAD >rev-list &&\n+\tsed \"s/^/foo:/\" rev-list >expect &&\n+\n+\tPAGER=\"cat >paginated.out\" &&\n+\texport PAGER &&\n+\n+\ttest_unconfig pager.log &&\n+\ttest_unconfig pager.rev-list\n+'\n+\n+test_expect_success TTY 'configuration with .enable works' '\n+\trm -f paginated.out &&\n+\ttest_terminal git -c pager.log.enable=false log &&\n+\t! test -e paginated.out\n+'\n+\n+test_expect_success TTY '--paginate overrides .enable+.command' '\n+\trm -f paginated.out &&\n+\ttest_terminal git -c pager.log.command=bad -c pager.log.enable=false \\\n+\t\t\t  --paginate log &&\n+\ttest -e paginated.out\n+'\n+\n+test_expect_success TTY '--no-pager overrides .enable' '\n+\trm -f paginated.out &&\n+\ttest_terminal git -c pager.rev-list.enable --no-pager rev-list HEAD &&\n+\t! test -e paginated.out\n+'\n+\n+test_expect_success TTY '.enable discards non-boolean' '\n+\ttest_must_fail git -c pager.log.enable=bad log\n+'\n+\n+test_expect_success TTY 'configuration remembers .command as .enable flips' '\n+\t>actual &&\n+\ttest_terminal git -c pager.rev-list.command=\"sed s/^/foo:/ >actual\" \\\n+\t\t\t  -c pager.rev-list.enable=false \\\n+\t\t\t  -c pager.rev-list.enable \\\n+\t\t\t  rev-list HEAD &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success TTY 'configuration remembers old-style command as .enable flips' '\n+\t>actual &&\n+\ttest_terminal git -c pager.rev-list=\"sed s/^/foo:/ >actual\" \\\n+\t\t\t  -c pager.rev-list.enable=false \\\n+\t\t\t  -c pager.rev-list.enable \\\n+\t\t\t  rev-list HEAD &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success TTY 'old-style config can override .enable' '\n+\t>actual &&\n+\ttest_terminal git -c pager.rev-list.command=\"sed s/^/foo:/ >actual\" \\\n+\t\t\t  -c pager.rev-list.enable=false \\\n+\t\t\t  -c pager.rev-list \\\n+\t\t\t  rev-list HEAD &&\n+\ttest_cmp expect actual\n+'\n+\n+test_expect_success TTY 'old style config can override .command+.enable' '\n+\t>actual &&\n+\ttest_terminal git -c pager.rev-list.command=bad \\\n+\t\t\t  -c pager.rev-list.enable=false \\\n+\t\t\t  -c pager.rev-list=\"sed s/^/foo:/ >actual\" \\\n+\t\t\t  rev-list HEAD &&\n+\ttest_cmp expect actual\n+'\n+\n test_done\ndiff --git a/pager.c b/pager.c\nindex 8968f26f1..c8a6a01d8 100644\n--- a/pager.c\n+++ b/pager.c\n@@ -206,6 +206,11 @@ static int pager_command_config(const char *var, const char *value, void *vdata)\n \t\t\tfree(data->value);\n \t\t\tdata->value = xstrdup(value);\n \t\t}\n+\t} else if (!strcmp(remainder, \".command\")) {\n+\t\tfree(data->value);\n+\t\tdata->value = xstrdup(value);\n+\t} else if (!strcmp(remainder, \".enable\")) {\n+\t\tdata->want = git_config_bool(var, value);\n \t}\n \n \treturn 0;\n-- \n2.15.0.415.gac1375d7e\n\n"},{"id":"331864","messageId":"d8e25efe07e72eeef887d7af06f23b69f9b227ec.1509879269.git.martin.agren@gmail.com","threadId":"47093","inReplyTo":"cover.1509879269.git.martin.agren@gmail.com","subject":"[PATCH 4/4] pager: make `pager.foo.command` imply `.enable=true`","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-11-05T11:58:22Z","receivedAt":"2017-11-05T11:58:54Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"If `pager.foo.command` gets configured and there is no configuration\n(yet) saying whether we should page, act as if `pager.foo.enable=true`.\n\nThis means that a lone `pager.foo` can always be written as a lone\n`pager.foo.command` or `pager.foo.enable`.\n\nSigned-off-by: Martin Ågren <martin.agren@gmail.com>\n---\n Documentation/config.txt | 2 ++\n t/t7006-pager.sh         | 7 +++++++\n pager.c                  | 2 ++\n 3 files changed, 11 insertions(+)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 72558cc74..91cc8b110 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -2470,6 +2470,8 @@ pager.<cmd>.command::\n \tSpecifies the pager to use for the subcommand.\n \tWhether the pager should be used is configured using\n \t`pager.<cmd>.enable` or `pager.<cmd>=<boolean>`.\n+\tImplies `pager.<cmd>.enable=true` unless `pager.<cmd>.enable`\n+\tor `pager.<cmd>` have already been given.\n \n pager.<cmd>.enable::\n \tA boolean which turns on or off pagination of the output of a\ndiff --git a/t/t7006-pager.sh b/t/t7006-pager.sh\nindex 6966627dd..c5246a57d 100755\n--- a/t/t7006-pager.sh\n+++ b/t/t7006-pager.sh\n@@ -625,6 +625,13 @@ test_expect_success TTY '.enable discards non-boolean' '\n \ttest_must_fail git -c pager.log.enable=bad log\n '\n \n+test_expect_success TTY 'configuration with .command turns on paging' '\n+\t>actual &&\n+\ttest_terminal git -c pager.rev-list.command=\"sed s/^/foo:/ >actual\" \\\n+\t\t\t  rev-list HEAD &&\n+\ttest_cmp expect actual\n+'\n+\n test_expect_success TTY 'configuration remembers .command as .enable flips' '\n \t>actual &&\n \ttest_terminal git -c pager.rev-list.command=\"sed s/^/foo:/ >actual\" \\\ndiff --git a/pager.c b/pager.c\nindex c8a6a01d8..0e037abf4 100644\n--- a/pager.c\n+++ b/pager.c\n@@ -209,6 +209,8 @@ static int pager_command_config(const char *var, const char *value, void *vdata)\n \t} else if (!strcmp(remainder, \".command\")) {\n \t\tfree(data->value);\n \t\tdata->value = xstrdup(value);\n+\t\tif (data->want == -1)\n+\t\t\tdata->want = 1;\n \t} else if (!strcmp(remainder, \".enable\")) {\n \t\tdata->want = git_config_bool(var, value);\n \t}\n-- \n2.15.0.415.gac1375d7e\n\n"},{"id":"331865","messageId":"20171105124249.GA1494@pks-xps","threadId":"47093","inReplyTo":"CALgYhfO=6WfdzfGYwgw+cp2Tb58Yzx6YYvBtMCPNcJto5rMUCg@mail.gmail.com","subject":"Re: Git Open Source Weekend London 11th/12th November","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2017-11-05T12:42:49Z","receivedAt":"2017-11-05T12:42:58Z","isPatch":false,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Nov 01, 2017 at 04:36:24PM +0000, Thomas Gummerer wrote:\n> Hi,\n> \n> Bloomberg is hosting an Open Source Weekend in London on the 11th\n> & 12th November 2017 to contribute to the Git project.  We have\n> also confirmed that Peff will be amongst the mentors on hand to\n> guide attendees through their efforts!\n> \n> Some of you may notice that we tried to organize this earlier in the\n> year, but unfortunately had to postpone it.  For this time around we\n> are further along in planning, and it's definitely happening :)\n> \n> For those unfamiliar with Bloomberg Open Source weekends: These\n> events provide a great way for those who love working on code to\n> give back to the community. Come and help make difference to a\n> great project!\n> \n> There will be tasks provided by the mentors, or bring your own if\n> you already have a great idea.  Also if you can't attend the weekend\n> and can think of a project which you would like tackled at this\n> event please let me know.  Obviously the projects should be\n> completable inside a weekend.\n> \n> Normally attendees work in small groups on a specific task to\n> prevent anyone from getting stuck. Per usual, Bloomberg will\n> provide the venue, mentors, snacks and drinks.  Bring your\n> enthusiasm (and your laptop!) and come share in the fun!  The\n> event is also open to everyone, so feel free to pass on the\n> invite!\n> \n> The event is free of charge, but please ensure that you are able\n> to attend the event before registering.  That will greatly help\n> us with accurate numbers for catering so that we don't create\n> unwanted waste!\n> \n> You can register for the event here:\n> \n> https://go.bloomberg.com/attend/invite/git-sprint-hosted-bloomberg/\n> \n> Whether you already are a contributor (as probably most people on\n> this list are) or interested in starting to contribute to git or\n> have some friends that you'd like to get to contribute to git, it\n> would be great to see you at the event.\n> \n> If you have any further questions feel free to get in touch.\n> \n> - Thomas\n\nHi,\n\nnice to hear, thanks for organizing. Due to having moved to\nLondon just that week I'd love to take part.\n\nAs I'm a core contributor of libgit2, I am interested in bringing\nforward libgit2 at that occasion. Would that be welcome or should\nparticipants keep strictly to the core git project? Just asking\nas I'd like to take part but have a rather long list of topics\nfor libgit2 on my backlog which I'd like to tackle myself.\n\nRegards\nPatrick\n"},{"id":"331914","messageId":"20171106104801.73n27fgmn43y6m3v@sigill.intra.peff.net","threadId":"47093","inReplyTo":"cover.1509879269.git.martin.agren@gmail.com","subject":"Re: [PATCH/DONOTAPPLY 0/4] first steps towards pager.foo.{command,enable}","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-11-06T10:48:01Z","receivedAt":"2017-11-06T10:48:08Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sun, Nov 05, 2017 at 12:58:18PM +0100, Martin Ågren wrote:\n\n> On 4 November 2017 at 10:28, Jeff King <peff@peff.net> wrote:\n> >  - the pager.<cmd> config is mis-designed, because our config keys\n> >    cannot represent all possible command names (e.g., case folding and\n> >    illegal characters). This should be pager.<cmd>.enable or similar.\n> >    Some discussion in (this message and the surrounding thread):\n> >\n> >      https://public-inbox.org/git/20170711101942.h2uwxtgzvgguzivu@sigill.intra.peff.net/\n> >\n> >    But I think you could find more by searching the archive.\n> \n> I'm posting four patches I have on this to save others from redoing my\n> work and findings. These patches feel a bit incomplete, which is why I\n> put them to the side some time ago (and eventually forgot about them).\n\nThanks for sharing these; it's nice if we can avoid duplicating work.\nWe'll see if somebody at the event wants to pick up this topic.\n\n> In particular, they do not teach `--paginate` to use the pager\n> configured by `pager.foo.command`. It is already now possible to use\n> `pager.foo` to say \"I don't want you to page, but if I later give you\n> `pager.foo=true`, this is the pager I want you to use\". That does not\n> work with `--paginate`, but this can all be explained -- indeed, we\n> document that `--paginate` overrules `pager.foo`.\n\nHmm. I think the current behavior is actually buggy. I assume the\ndocumentation you mean is from git.txt:\n\n  --paginate::\n          Pipe all output into 'less' (or if set, $PAGER) if standard\n          output is a terminal.  This overrides the `pager.<cmd>`\n          configuration options (see the \"Configuration Mechanism\" section\n          below).\n\nThat comes from 06300d9753 (git.1: Clarify the behavior of the\n--paginate option, 2010-02-14). But I think that commit was just trying\nto clarify that \"--paginate\" overrides the defaults and config, but not\ndoes say \"always paginate\".\n\nI suspect nobody really noticed it in practice because once you've\nconfigured \"pager.foo\", there's basically no need to ever use\n\"--paginate\".\n\n> If we teach `--paginate` to respect `pager.foo.command`, it seems that\n> we would either 1) introduce a small (and possibly hard to understand\n> and explain) difference between the old-style and the new-style\n> pager-configuration or 2) knowingly change the behavior of `--paginate`\n> with `pager.foo` or 3) knowingly change the behavior of\n> `pager.foo=false` as documented in the first patch.\n\nI think I'm suggesting (2), then.\n\n-Peff\n"},{"id":"332034","messageId":"CAN0heSrgkjpt5MfMbc15L0z3M6ch3F3qBgCqEf7i6VOe73fWtg@mail.gmail.com","threadId":"47093","inReplyTo":"20171106104801.73n27fgmn43y6m3v@sigill.intra.peff.net","subject":"Re: [PATCH/DONOTAPPLY 0/4] first steps towards pager.foo.{command,enable}","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2017-11-07T20:46:52Z","receivedAt":"2017-11-07T20:46:58Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"On 6 November 2017 at 11:48, Jeff King <peff@peff.net> wrote:\n> On Sun, Nov 05, 2017 at 12:58:18PM +0100, Martin Ågren wrote:\n>> In particular, they do not teach `--paginate` to use the pager\n>> configured by `pager.foo.command`. It is already now possible to use\n>> `pager.foo` to say \"I don't want you to page, but if I later give you\n>> `pager.foo=true`, this is the pager I want you to use\". That does not\n>> work with `--paginate`, but this can all be explained -- indeed, we\n>> document that `--paginate` overrules `pager.foo`.\n>\n> Hmm. I think the current behavior is actually buggy. I assume the\n> documentation you mean is from git.txt:\n>\n>   --paginate::\n>           Pipe all output into 'less' (or if set, $PAGER) if standard\n>           output is a terminal.  This overrides the `pager.<cmd>`\n>           configuration options (see the \"Configuration Mechanism\" section\n>           below).\n\nYes, that's what I meant.\n\n> That comes from 06300d9753 (git.1: Clarify the behavior of the\n> --paginate option, 2010-02-14). But I think that commit was just trying\n> to clarify that \"--paginate\" overrides the defaults and config, but not\n> does say \"always paginate\".\n\nThanks for digging.\n\nYou're probably right that this was not intended. I think I put way too\nmuch weight on the \"s\" in \"options\". I understood it as \"both ways\npager.foo can be used\". From the commit message you point to, it seems\nthat only the boolean-ness was intended. (The \"s\" probably refers to\npager.foo, pager.bar, ...)\n\n>> If we teach `--paginate` to respect `pager.foo.command`, it seems that\n>> we would either 1) introduce a small (and possibly hard to understand\n>> and explain) difference between the old-style and the new-style\n>> pager-configuration or 2) knowingly change the behavior of\n>> `--paginate`\n>> with `pager.foo` or 3) knowingly change the behavior of\n>> `pager.foo=false` as documented in the first patch.\n\n> I think I'm suggesting (2), then.\n\nI think you're right. If this topic doesn't get picked up in the near\nfuture (in London or elsewhere), I'll get back to this.\n\nA final thought for whoever tackles this: Playing with something like\n`git -c pager.log=$foo --paginate log` vs `git -c core.pager=$foo\n--paginate log` might be helpful. Possibly $foo=cat could be\nparticularly interesting, I haven't thought hard about it.\n\nMartin\n"}]}