git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] completion: add support for sparse-checkout

From
Matheus Tavares <matheus.bernardino@usp.br>
Date
Jan 23, 2020, 19:00 UTC
Message-ID
<79f6aa1411c1bba3ee2c55a7532e78ffccb1edea.1579805218.git.matheus.bernardino@usp.br>
In-Reply-To
<cover.1579805218.git.matheus.bernardino@usp.br>
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
Previous: Matheus Tavares BernardinoNext: Derrick Stolee
Message 5 of 6 in “sparse-checkout: add completion and --cone to docs”
  1. 0/2 sparse-checkout: add completion and --cone to docsMatheus Tavares, Jan 23, 2020
  2. 1/2 doc: sparse-checkout: mention --cone optionMatheus Tavares, Jan 23, 2020
  3. Martin ÅgrenJan 23, 2020
  4. Matheus Tavares BernardinoJan 24, 2020
  5. 2/2 completion: add support for sparse-checkoutMatheus Tavares, Jan 23, 2020
  6. Derrick StoleeJan 23, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.