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

[PATCH 0/4] Sparse checkout completion fixes

From
Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 23, 2023, 17:44 UTC
Message-ID
<pull.1349.git.1700761448.gitgitgadget@gmail.com>

This fixes a few issues with tab completion for the sparse-checkout command, specifically with the "add" and "set" subcommands.

The 4th patch should probably be considered RFC; it is notable in that we previously discussed a much different proposal and the general problem area[1], though our discussion was from a limited vantage point and none of us (myself included) were aware of the full context at the time. In that thread, Junio gave some helpful general high-level guidelines for completion. I believe the existing completion rules fail Junio's guidelines pretty badly and that we thus need to do something else. See the lengthy commit message. I implement a simple though somewhat suboptimal choice for that something else (while arguing that it's at least much better than our current solution), while also documenting with a code comment a much more involved alternative solution that we could consider in the future. Comments on this choice welcome.

[1] https://lore.kernel.org/git/xmqqv8yjz5us.fsf@gitster.g/
Elijah Newren (4):
  completion: squelch stray errors in sparse-checkout completion
  completion: fix logic for determining whether cone mode is active
  completion: avoid misleading completions in cone mode
  completion: avoid user confusion in non-cone mode
 contrib/completion/git-completion.bash | 95 +++++++++++++++++++++++++-
 1 file changed, 92 insertions(+), 3 deletions(-)
base-commit: 79f2338b3746d23454308648b2491e5beba4beff
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1349%2Fnewren%2Fsparse-checkout-completion-fixes-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1349/newren/sparse-checkout-completion-fixes-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1349
-- 
gitgitgadget
Next: Elijah Newren via GitGitGadget
Message 1 of 22 in “Sparse checkout completion fixes”
  1. 0/4 Sparse checkout completion fixesElijah Newren via GitGitGadget, Nov 23, 2023
  2. 1/4 completion: squelch stray errors in sparse-checkout completionElijah Newren via GitGitGadget, Nov 23, 2023
  3. SZEDER GáborNov 24, 2023
  4. Elijah NewrenNov 24, 2023
  5. 2/4 completion: fix logic for determining whether cone mode is activeElijah Newren via GitGitGadget, Nov 23, 2023
  6. 3/4 completion: avoid misleading completions in cone modeElijah Newren via GitGitGadget, Nov 23, 2023
  7. 4/4 completion: avoid user confusion in non-cone modeElijah Newren via GitGitGadget, Nov 23, 2023
  8. Junio C HamanoNov 24, 2023
  9. Elijah NewrenNov 24, 2023
  10. Junio C HamanoNov 27, 2023
  11. Elijah NewrenDec 3, 2023
  12. 0/4 Sparse checkout completion fixesElijah Newren via GitGitGadget, Nov 26, 2023
  13. 1/4 completion: squelch stray errors in sparse-checkout completionElijah Newren via GitGitGadget, Nov 26, 2023
  14. 2/4 completion: fix logic for determining whether cone mode is activeElijah Newren via GitGitGadget, Nov 26, 2023
  15. 3/4 completion: avoid misleading completions in cone modeElijah Newren via GitGitGadget, Nov 26, 2023
  16. 4/4 completion: avoid user confusion in non-cone modeElijah Newren via GitGitGadget, Nov 26, 2023
  17. 0/4 Sparse checkout completion fixesElijah Newren via GitGitGadget, Dec 3, 2023
  18. 1/4 completion: squelch stray errors in sparse-checkout completionElijah Newren via GitGitGadget, Dec 3, 2023
  19. 2/4 completion: fix logic for determining whether cone mode is activeElijah Newren via GitGitGadget, Dec 3, 2023
  20. 3/4 completion: avoid misleading completions in cone modeElijah Newren via GitGitGadget, Dec 3, 2023
  21. 4/4 completion: avoid user confusion in non-cone modeElijah Newren via GitGitGadget, Dec 3, 2023
  22. Junio C HamanoDec 3, 2023

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.