{"thread":{"id":"52685","subject":"[PATCH 0/2] sparse-checkout: add completion and --cone to docs","startedAt":"2020-01-23T19:00:25Z","lastAt":"2020-01-24T01:51:45Z","messageCount":6,"participants":["Matheus Tavares","Derrick Stolee","Martin Ågren","Matheus Tavares Bernardino"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"390288","messageId":"cover.1579805218.git.matheus.bernardino@usp.br","threadId":"52685","inReplyTo":null,"subject":"[PATCH 0/2] sparse-checkout: add completion and --cone to docs","fromName":"Matheus Tavares","fromEmail":"matheus.bernardino@usp.br","sentAt":"2020-01-23T19:00:01Z","receivedAt":"2020-01-23T19:00:25Z","isPatch":true,"sender":{"key":"matheus.tavb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701583?v=4"},"body":"This adds completion for the sparse-checkout command and mention the\ninit's --cone option in the doc file. I know this command might change\nin the near future, so I'm not sure whether these changes are worth\nright now; but since they were simple to do, I decided to send them and\nask for your comments.\n\ntravis build: https://travis-ci.org/matheustavares/git/builds/641012914\n\nMatheus Tavares (2):\n  doc: sparse-checkout: mention --cone option\n  completion: add support for sparse-checkout\n\n Documentation/git-sparse-checkout.txt  |  4 ++++\n contrib/completion/git-completion.bash | 21 +++++++++++++++++++++\n 2 files changed, 25 insertions(+)\n\n-- \n2.25.0\n\n"},{"id":"390289","messageId":"6ec39af930871496dd7694ea27eeca69d5d60c96.1579805218.git.matheus.bernardino@usp.br","threadId":"52685","inReplyTo":"cover.1579805218.git.matheus.bernardino@usp.br","subject":"[PATCH 1/2] doc: sparse-checkout: mention --cone option","fromName":"Matheus Tavares","fromEmail":"matheus.bernardino@usp.br","sentAt":"2020-01-23T19:00:02Z","receivedAt":"2020-01-23T19:00:36Z","isPatch":true,"sender":{"key":"matheus.tavb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701583?v=4"},"body":"In af09ce2 (\"sparse-checkout: init and set in cone mode\", 2019-11-21),\nthe '--cone' option was added to 'git sparse-checkout init'. Add this\noption to the respective doc file.\n\nSigned-off-by: Matheus Tavares <matheus.bernardino@usp.br>\n---\n Documentation/git-sparse-checkout.txt | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt\nindex 974ade2238..542af98520 100644\n--- a/Documentation/git-sparse-checkout.txt\n+++ b/Documentation/git-sparse-checkout.txt\n@@ -41,6 +41,10 @@ COMMANDS\n To avoid interfering with other worktrees, it first enables the\n `extensions.worktreeConfig` setting and makes sure to set the\n `core.sparseCheckout` setting in the worktree-specific config file.\n++\n+When `--cone` is provided the `core.sparseCheckoutCone` setting is also\n+set, allowing for better performance with a limited set of patterns\n+(see 'CONE PATTERN SET' bellow).\n \n 'set'::\n \tWrite a set of patterns to the sparse-checkout file, as given as\n-- \n2.25.0\n\n"},{"id":"390290","messageId":"79f6aa1411c1bba3ee2c55a7532e78ffccb1edea.1579805218.git.matheus.bernardino@usp.br","threadId":"52685","inReplyTo":"cover.1579805218.git.matheus.bernardino@usp.br","subject":"[PATCH 2/2] completion: add support for sparse-checkout","fromName":"Matheus Tavares","fromEmail":"matheus.bernardino@usp.br","sentAt":"2020-01-23T19:00:03Z","receivedAt":"2020-01-23T19:00:51Z","isPatch":true,"sender":{"key":"matheus.tavb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701583?v=4"},"body":"Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>\n---\n contrib/completion/git-completion.bash | 21 +++++++++++++++++++++\n 1 file changed, 21 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex e4d9ff4a95..cb1f1b5e20 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2718,6 +2718,27 @@ _git_show_branch ()\n \t__git_complete_revlist\n }\n \n+_git_sparse_checkout ()\n+{\n+\tlocal subcommands=\"list init set disable\"\n+\tlocal subcommand=\"$(__git_find_on_cmdline \"$subcommands\")\"\n+\tif [ -z \"$subcommand\" ]; then\n+\t\t__gitcomp \"$subcommands\"\n+\t\treturn\n+\tfi\n+\n+\tcase \"$subcommand,$cur\" in\n+\tinit,--*)\n+\t\t__gitcomp \"--cone\"\n+\t\t;;\n+\tset,--*)\n+\t\t__gitcomp \"--stdin\"\n+\t\t;;\n+\t*)\n+\t\t;;\n+\tesac\n+}\n+\n _git_stash ()\n {\n \tlocal save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'\n-- \n2.25.0\n\n"},{"id":"390301","messageId":"9fe5920f-1b5f-977c-cfca-33e52771f521@gmail.com","threadId":"52685","inReplyTo":"cover.1579805218.git.matheus.bernardino@usp.br","subject":"Re: [PATCH 0/2] sparse-checkout: add completion and --cone to docs","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-01-23T20:02:44Z","receivedAt":"2020-01-23T20:02:49Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 1/23/2020 2:00 PM, Matheus Tavares wrote:\n> This adds completion for the sparse-checkout command and mention the\n> init's --cone option in the doc file. I know this command might change\n> in the near future, so I'm not sure whether these changes are worth\n> right now; but since they were simple to do, I decided to send them and\n> ask for your comments.\n> \n> travis build: https://travis-ci.org/matheustavares/git/builds/641012914\n> \n> Matheus Tavares (2):\n>   doc: sparse-checkout: mention --cone option\n>   completion: add support for sparse-checkout\n\nThanks for catching these. They are both good patches.\n\n-Stolee\n\n"},{"id":"390304","messageId":"CAN0heSq3gvZeUXnqzbjFY-1axmFXEJDO4oRp9abRO8TuxJQuDw@mail.gmail.com","threadId":"52685","inReplyTo":"6ec39af930871496dd7694ea27eeca69d5d60c96.1579805218.git.matheus.bernardino@usp.br","subject":"Re: [PATCH 1/2] doc: sparse-checkout: mention --cone option","fromName":"Martin Ågren","fromEmail":"martin.agren@gmail.com","sentAt":"2020-01-23T20:28:18Z","receivedAt":"2020-01-23T20:28:31Z","isPatch":true,"sender":{"key":"martin.agren@gmail.com","avatar":null},"body":"Hi Matheus,\n\nOn Thu, 23 Jan 2020 at 20:02, Matheus Tavares <matheus.bernardino@usp.br> wrote:\n> In af09ce2 (\"sparse-checkout: init and set in cone mode\", 2019-11-21),\n> the '--cone' option was added to 'git sparse-checkout init'. Add this\n> option to the respective doc file.\n\nNit: s/respective/corresponding/\n\n\"Respective\" sounds -- to me at least -- like you're tweaking two\ndifferent files. Maybe that's just me.\n\n>  To avoid interfering with other worktrees, it first enables the\n>  `extensions.worktreeConfig` setting and makes sure to set the\n>  `core.sparseCheckout` setting in the worktree-specific config file.\n> ++\n> +When `--cone` is provided the `core.sparseCheckoutCone` setting is also\n\nNit: maybe add a comma after \"provided\". Without it, I could see someone\nfalse-starting the parsing as \"provided with the\" or even \"provided to\nthe\". Those readings obviously don't work out in the end, but with an\nextra comma, I think it's easier to just naturally read this the way\nit's intended.\n\n> +set, allowing for better performance with a limited set of patterns\n> +(see 'CONE PATTERN SET' bellow).\n\ns/bellow/below/\n\nMartin\n"},{"id":"390325","messageId":"CAHd-oW4NM_ZdCeW_HBZxcZrd47v3uMn96t+nHLZt3Pe3R6vfWw@mail.gmail.com","threadId":"52685","inReplyTo":"CAN0heSq3gvZeUXnqzbjFY-1axmFXEJDO4oRp9abRO8TuxJQuDw@mail.gmail.com","subject":"Re: [PATCH 1/2] doc: sparse-checkout: mention --cone option","fromName":"Matheus Tavares Bernardino","fromEmail":"matheus.bernardino@usp.br","sentAt":"2020-01-24T01:51:29Z","receivedAt":"2020-01-24T01:51:45Z","isPatch":true,"sender":{"key":"matheus.tavb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/12701583?v=4"},"body":"Hi, Martin\n\nOn Thu, Jan 23, 2020 at 5:28 PM Martin Ågren <martin.agren@gmail.com> wrote:\n>\n> Hi Matheus,\n>\n> On Thu, 23 Jan 2020 at 20:02, Matheus Tavares <matheus.bernardino@usp.br> wrote:\n> > In af09ce2 (\"sparse-checkout: init and set in cone mode\", 2019-11-21),\n> > the '--cone' option was added to 'git sparse-checkout init'. Add this\n> > option to the respective doc file.\n>\n> Nit: s/respective/corresponding/\n>\n> \"Respective\" sounds -- to me at least -- like you're tweaking two\n> different files. Maybe that's just me.\n>\n> >  To avoid interfering with other worktrees, it first enables the\n> >  `extensions.worktreeConfig` setting and makes sure to set the\n> >  `core.sparseCheckout` setting in the worktree-specific config file.\n> > ++\n> > +When `--cone` is provided the `core.sparseCheckoutCone` setting is also\n>\n> Nit: maybe add a comma after \"provided\". Without it, I could see someone\n> false-starting the parsing as \"provided with the\" or even \"provided to\n> the\". Those readings obviously don't work out in the end, but with an\n> extra comma, I think it's easier to just naturally read this the way\n> it's intended.\n>\n> > +set, allowing for better performance with a limited set of patterns\n> > +(see 'CONE PATTERN SET' bellow).\n>\n> s/bellow/below/\n\nThanks for the comments. Junio has already addressed them[1] when\npicking up the patch :)\n\n[1]: https://github.com/gitster/git/commit/a402723e488c66bd12cf674c332f185fee1d2347\n"}]}