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

Re: [PATCH 1/2] builtin/sparse-checkout: remove NEED_WORK_TREE flag

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 8, 2023, 18:14 UTC
Message-ID
<xmqqmt4nt8k3.fsf@gitster.g>
In-Reply-To
<4b231e9beb43e4fac6457b9bf86e4c1db39c4238.1678283349.git.gitgitgadget@gmail.com>
"William Sprent via GitGitGadget" <gitgitgadget@gmail.com> writes:
> In preparation for adding a sub-command to 'sparse-checkout' that can be
> run in a bare repository, remove the 'NEED_WORK_TREE' flag from its
> entry in the 'commands' array of 'git.c'.

Given that "sparse-checkout" is about affecting which part of the directory hierarchies are to be materialized in the working tree, the idea to add a subcommand that does not require a working tree to the command by itself smells very iffy, and the changes necessary to protect the existing commands from the breakage caused by the decision to drop NEED_WORK_TREE bit, i.e. sprinkling many setup_work_tree() calls, somehow looks like they are solving a problem that did not have to get created in the first place.

But you did not find a place the feature you wanted to add with [2/2] would fit better, perhaps, in which case, somebody else may be able to suggest an alternative in their reviews of that step, hopefully.

Previous: William Sprent via GitGitGadgetNext: Junio C Hamano
Message 3 of 18 in “builtin/sparse-checkout: add check-rules command”
  1. 0/2 builtin/sparse-checkout: add check-rules commandWilliam Sprent via GitGitGadget, Mar 8, 2023
  2. 1/2 builtin/sparse-checkout: remove NEED_WORK_TREE flagWilliam Sprent via GitGitGadget, Mar 8, 2023
  3. Junio C HamanoMar 8, 2023
  4. Junio C HamanoMar 8, 2023
  5. Elijah NewrenMar 9, 2023
  6. Junio C HamanoMar 9, 2023
  7. 2/2 builtin/sparse-checkout: add check-rules commandWilliam Sprent via GitGitGadget, Mar 8, 2023
  8. Elijah NewrenMar 19, 2023
  9. William SprentMar 20, 2023
  10. Elijah NewrenMar 19, 2023
  11. 0/2 builtin/sparse-checkout: add check-rules commandWilliam Sprent via GitGitGadget, Mar 27, 2023
  12. 1/2 builtin/sparse-checkout: remove NEED_WORK_TREE flagWilliam Sprent via GitGitGadget, Mar 27, 2023
  13. Junio C HamanoMar 27, 2023
  14. SZEDER GáborApr 7, 2023
  15. Junio C HamanoApr 7, 2023
  16. 2/2 builtin/sparse-checkout: add check-rules commandWilliam Sprent via GitGitGadget, Mar 27, 2023
  17. Elijah NewrenApr 1, 2023
  18. Junio C HamanoApr 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.