* [PATCH 0/2] sparse-checkout: add completion and --cone to docs
@ 2020-01-23 19:00 Matheus Tavares
2020-01-23 19:00 ` [PATCH 1/2] doc: sparse-checkout: mention --cone option Matheus Tavares
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Matheus Tavares @ 2020-01-23 19:00 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Derrick Stolee
This adds completion for the sparse-checkout command and mention the
init's --cone option in the doc file. I know this command might change
in the near future, so I'm not sure whether these changes are worth
right now; but since they were simple to do, I decided to send them and
ask for your comments.
travis build: https://travis-ci.org/matheustavares/git/builds/641012914
Matheus Tavares (2):
doc: sparse-checkout: mention --cone option
completion: add support for sparse-checkout
Documentation/git-sparse-checkout.txt | 4 ++++
contrib/completion/git-completion.bash | 21 +++++++++++++++++++++
2 files changed, 25 insertions(+)
--
2.25.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] doc: sparse-checkout: mention --cone option
2020-01-23 19:00 [PATCH 0/2] sparse-checkout: add completion and --cone to docs Matheus Tavares
@ 2020-01-23 19:00 ` Matheus Tavares
2020-01-23 20:28 ` Martin Ågren
2020-01-23 19:00 ` [PATCH 2/2] completion: add support for sparse-checkout Matheus Tavares
2020-01-23 20:02 ` [PATCH 0/2] sparse-checkout: add completion and --cone to docs Derrick Stolee
2 siblings, 1 reply; 6+ messages in thread
From: Matheus Tavares @ 2020-01-23 19:00 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Derrick Stolee
In af09ce2 ("sparse-checkout: init and set in cone mode", 2019-11-21),
the '--cone' option was added to 'git sparse-checkout init'. Add this
option to the respective doc file.
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
---
Documentation/git-sparse-checkout.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/git-sparse-checkout.txt b/Documentation/git-sparse-checkout.txt
index 974ade2238..542af98520 100644
--- a/Documentation/git-sparse-checkout.txt
+++ b/Documentation/git-sparse-checkout.txt
@@ -41,6 +41,10 @@ COMMANDS
To avoid interfering with other worktrees, it first enables the
`extensions.worktreeConfig` setting and makes sure to set the
`core.sparseCheckout` setting in the worktree-specific config file.
++
+When `--cone` is provided the `core.sparseCheckoutCone` setting is also
+set, allowing for better performance with a limited set of patterns
+(see 'CONE PATTERN SET' bellow).
'set'::
Write a set of patterns to the sparse-checkout file, as given as
--
2.25.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] completion: add support for sparse-checkout
2020-01-23 19:00 [PATCH 0/2] sparse-checkout: add completion and --cone to docs Matheus Tavares
2020-01-23 19:00 ` [PATCH 1/2] doc: sparse-checkout: mention --cone option Matheus Tavares
@ 2020-01-23 19:00 ` Matheus Tavares
2020-01-23 20:02 ` [PATCH 0/2] sparse-checkout: add completion and --cone to docs Derrick Stolee
2 siblings, 0 replies; 6+ messages in thread
From: Matheus Tavares @ 2020-01-23 19:00 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Derrick Stolee, Denton Liu, Paul Wagland
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
---
contrib/completion/git-completion.bash | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e4d9ff4a95..cb1f1b5e20 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2718,6 +2718,27 @@ _git_show_branch ()
__git_complete_revlist
}
+_git_sparse_checkout ()
+{
+ local subcommands="list init set disable"
+ local subcommand="$(__git_find_on_cmdline "$subcommands")"
+ if [ -z "$subcommand" ]; then
+ __gitcomp "$subcommands"
+ return
+ fi
+
+ case "$subcommand,$cur" in
+ init,--*)
+ __gitcomp "--cone"
+ ;;
+ set,--*)
+ __gitcomp "--stdin"
+ ;;
+ *)
+ ;;
+ esac
+}
+
_git_stash ()
{
local save_opts='--all --keep-index --no-keep-index --quiet --patch --include-untracked'
--
2.25.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] sparse-checkout: add completion and --cone to docs
2020-01-23 19:00 [PATCH 0/2] sparse-checkout: add completion and --cone to docs Matheus Tavares
2020-01-23 19:00 ` [PATCH 1/2] doc: sparse-checkout: mention --cone option Matheus Tavares
2020-01-23 19:00 ` [PATCH 2/2] completion: add support for sparse-checkout Matheus Tavares
@ 2020-01-23 20:02 ` Derrick Stolee
2 siblings, 0 replies; 6+ messages in thread
From: Derrick Stolee @ 2020-01-23 20:02 UTC (permalink / raw)
To: Matheus Tavares, git; +Cc: Junio C Hamano, Derrick Stolee
On 1/23/2020 2:00 PM, Matheus Tavares wrote:
> This adds completion for the sparse-checkout command and mention the
> init's --cone option in the doc file. I know this command might change
> in the near future, so I'm not sure whether these changes are worth
> right now; but since they were simple to do, I decided to send them and
> ask for your comments.
>
> travis build: https://travis-ci.org/matheustavares/git/builds/641012914
>
> Matheus Tavares (2):
> doc: sparse-checkout: mention --cone option
> completion: add support for sparse-checkout
Thanks for catching these. They are both good patches.
-Stolee
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] doc: sparse-checkout: mention --cone option
2020-01-23 19:00 ` [PATCH 1/2] doc: sparse-checkout: mention --cone option Matheus Tavares
@ 2020-01-23 20:28 ` Martin Ågren
2020-01-24 1:51 ` Matheus Tavares Bernardino
0 siblings, 1 reply; 6+ messages in thread
From: Martin Ågren @ 2020-01-23 20:28 UTC (permalink / raw)
To: Matheus Tavares; +Cc: Git Mailing List, Junio C Hamano, Derrick Stolee
Hi Matheus,
On Thu, 23 Jan 2020 at 20:02, Matheus Tavares <matheus.bernardino@usp.br> wrote:
> In af09ce2 ("sparse-checkout: init and set in cone mode", 2019-11-21),
> the '--cone' option was added to 'git sparse-checkout init'. Add this
> option to the respective doc file.
Nit: s/respective/corresponding/
"Respective" sounds -- to me at least -- like you're tweaking two
different files. Maybe that's just me.
> To avoid interfering with other worktrees, it first enables the
> `extensions.worktreeConfig` setting and makes sure to set the
> `core.sparseCheckout` setting in the worktree-specific config file.
> ++
> +When `--cone` is provided the `core.sparseCheckoutCone` setting is also
Nit: maybe add a comma after "provided". Without it, I could see someone
false-starting the parsing as "provided with the" or even "provided to
the". Those readings obviously don't work out in the end, but with an
extra comma, I think it's easier to just naturally read this the way
it's intended.
> +set, allowing for better performance with a limited set of patterns
> +(see 'CONE PATTERN SET' bellow).
s/bellow/below/
Martin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] doc: sparse-checkout: mention --cone option
2020-01-23 20:28 ` Martin Ågren
@ 2020-01-24 1:51 ` Matheus Tavares Bernardino
0 siblings, 0 replies; 6+ messages in thread
From: Matheus Tavares Bernardino @ 2020-01-24 1:51 UTC (permalink / raw)
To: Martin Ågren; +Cc: Git Mailing List, Junio C Hamano, Derrick Stolee
Hi, Martin
On Thu, Jan 23, 2020 at 5:28 PM Martin Ågren <martin.agren@gmail.com> wrote:
>
> Hi Matheus,
>
> On Thu, 23 Jan 2020 at 20:02, Matheus Tavares <matheus.bernardino@usp.br> wrote:
> > In af09ce2 ("sparse-checkout: init and set in cone mode", 2019-11-21),
> > the '--cone' option was added to 'git sparse-checkout init'. Add this
> > option to the respective doc file.
>
> Nit: s/respective/corresponding/
>
> "Respective" sounds -- to me at least -- like you're tweaking two
> different files. Maybe that's just me.
>
> > To avoid interfering with other worktrees, it first enables the
> > `extensions.worktreeConfig` setting and makes sure to set the
> > `core.sparseCheckout` setting in the worktree-specific config file.
> > ++
> > +When `--cone` is provided the `core.sparseCheckoutCone` setting is also
>
> Nit: maybe add a comma after "provided". Without it, I could see someone
> false-starting the parsing as "provided with the" or even "provided to
> the". Those readings obviously don't work out in the end, but with an
> extra comma, I think it's easier to just naturally read this the way
> it's intended.
>
> > +set, allowing for better performance with a limited set of patterns
> > +(see 'CONE PATTERN SET' bellow).
>
> s/bellow/below/
Thanks for the comments. Junio has already addressed them[1] when
picking up the patch :)
[1]: https://github.com/gitster/git/commit/a402723e488c66bd12cf674c332f185fee1d2347
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-01-24 1:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-23 19:00 [PATCH 0/2] sparse-checkout: add completion and --cone to docs Matheus Tavares
2020-01-23 19:00 ` [PATCH 1/2] doc: sparse-checkout: mention --cone option Matheus Tavares
2020-01-23 20:28 ` Martin Ågren
2020-01-24 1:51 ` Matheus Tavares Bernardino
2020-01-23 19:00 ` [PATCH 2/2] completion: add support for sparse-checkout Matheus Tavares
2020-01-23 20:02 ` [PATCH 0/2] sparse-checkout: add completion and --cone to docs Derrick Stolee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).