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

Re: [PATCH v2 0/6] sparse checkout: fix a few bugs and check argument validity for set/add

From
Derrick Stolee <derrickstolee@github.com>
Date
Feb 15, 2022, 15:15 UTC
Message-ID
<367e277c-e26d-94be-7989-e2ddf7010ad0@github.com>
In-Reply-To
<pull.1118.v2.git.1644913943.gitgitgadget@gmail.com>
On 2/15/2022 3:32 AM, Elijah Newren via GitGitGadget wrote:
Show 38 quoted lines
> == Maintainer notes ==
> 
> Note1: This has been rebased on origin/master. v1 wasn't picked up anyway,
> so this shouldn't matter, but just pointing it out.
> 
> Note2: There is a small textual and small semantic conflict with
> ds/sparse-checkout-requires-per-worktree-config in seen. I included the diff
> with the correct resolution near the end of this cover letter.
> 
> == Overview ==
> 
> This series continues attempts to make sparse-checkouts more user friendly.
> A quick overview:
> 
>  * Patches 1-2 fix existing bugs from en/sparse-checkout-set (i.e. in
>    v2.35.0)
>  * Patch 3 fixes sparse-checkout-from-subdirectories-ignores-"prefix" (see
>    https://lore.kernel.org/git/29f0410e-6dfa-2e86-394d-b1fb735e7608@gmail.com/),
>    in cone mode. Since we'll get nasty surprises whether we use or don't use
>    "prefix" for non-cone mode, simply throw an error if set/add subcommands
>    of sparse-checkout are run from a subdirectory.
>  * Patches 4-6 check positional arguments to set/add and provide
>    errors/warnings for very likely mistakes. It also adds a --skip-checks
>    flag for overridding in case you have a very unusual situation.
> 
> == Update history ==
> 
> Changes since v1:
> 
>  * Dropped the commit changing cone-mode to default (patch 7, which will be
>    split into multiple patches and submitted as a separate series)
>  * Removed the RFC label
>  * Decided to error out when running set/add with paths from a subdirectory
>    in non-cone mode, and added tests
>  * Changed the warning for non-cone mode with individual files to point out
>    that the user is likely trying to select an individual file, but should
>    likely add a leading slash to ensure that is what happens
>  * Fixed typos, removed unnecessary condition checks
Thanks for these updates.

We already discussed the changes that are different from my recommendations, and I agree with your new approach in those.

I read the range-diff carefully and found this version to resolve all of my concerns with v1.

Reviewed-by: Derrick Stolee <derrickstolee@github.com>

Thanks, -Stolee

 
Previous: Elijah Newren via GitGitGadgetNext: Elijah Newren via GitGitGadget
Message 37 of 70 in “RFC: sparse checkout: make --cone mode the default, and check add/set argument validity”
  1. 0/7 RFC: sparse checkout: make --cone mode the default, and check add/set argument validityElijah Newren via GitGitGadget, Feb 13, 2022
  2. 1/7 sparse-checkout: correct reapply's handling of optionsElijah Newren via GitGitGadget, Feb 13, 2022
  3. 3/7 sparse-checkout: pay attention to prefix for {set, add}Elijah Newren via GitGitGadget, Feb 13, 2022
  4. Derrick StoleeFeb 14, 2022
  5. Elijah NewrenFeb 15, 2022
  6. Derrick StoleeFeb 15, 2022
  7. 2/7 sparse-checkout: correctly set non-cone mode when expectedElijah Newren via GitGitGadget, Feb 13, 2022
  8. Derrick StoleeFeb 14, 2022
  9. Elijah NewrenFeb 15, 2022
  10. 4/7 sparse-checkout: error or warn when given individual filesElijah Newren via GitGitGadget, Feb 13, 2022
  11. Derrick StoleeFeb 14, 2022
  12. Elijah NewrenFeb 15, 2022
  13. Derrick StoleeFeb 15, 2022
  14. 6/7 sparse-checkout: reject arguments in cone-mode that look like patternsElijah Newren via GitGitGadget, Feb 13, 2022
  15. 5/7 sparse-checkout: reject non-cone-mode patterns starting with a '#'Elijah Newren via GitGitGadget, Feb 13, 2022
  16. Junio C HamanoFeb 14, 2022
  17. Elijah NewrenFeb 15, 2022
  18. Junio C HamanoFeb 16, 2022
  19. Elijah NewrenFeb 16, 2022
  20. Junio C HamanoFeb 16, 2022
  21. 7/7 sparse-checkout: make --cone the default and deprecate --no-coneElijah Newren via GitGitGadget, Feb 13, 2022
  22. Derrick StoleeFeb 14, 2022
  23. Elijah NewrenFeb 15, 2022
  24. Derrick StoleeFeb 14, 2022
  25. Elijah NewrenFeb 15, 2022
  26. Derrick StoleeFeb 15, 2022
  27. 0/6 sparse checkout: fix a few bugs and check argument validity for set/addElijah Newren via GitGitGadget, Feb 15, 2022
  28. 1/6 sparse-checkout: correct reapply's handling of optionsElijah Newren via GitGitGadget, Feb 15, 2022
  29. 2/6 sparse-checkout: correctly set non-cone mode when expectedElijah Newren via GitGitGadget, Feb 15, 2022
  30. 3/6 sparse-checkout: pay attention to prefix for {set, add}Elijah Newren via GitGitGadget, Feb 15, 2022
  31. Ævar Arnfjörð BjarmasonFeb 17, 2022
  32. Elijah NewrenFeb 18, 2022
  33. 4/6 sparse-checkout: error or warn when given individual filesElijah Newren via GitGitGadget, Feb 15, 2022
  34. Ævar Arnfjörð BjarmasonFeb 17, 2022
  35. 5/6 sparse-checkout: reject non-cone-mode patterns starting with a '#'Elijah Newren via GitGitGadget, Feb 15, 2022
  36. 6/6 sparse-checkout: reject arguments in cone-mode that look like patternsElijah Newren via GitGitGadget, Feb 15, 2022
  37. Derrick StoleeFeb 15, 2022
  38. 0/5 sparse checkout: fix a few bugs and check argument validity for set/addElijah Newren via GitGitGadget, Feb 16, 2022
  39. 2/5 sparse-checkout: correctly set non-cone mode when expectedElijah Newren via GitGitGadget, Feb 16, 2022
  40. 1/5 sparse-checkout: correct reapply's handling of optionsElijah Newren via GitGitGadget, Feb 16, 2022
  41. 3/5 sparse-checkout: pay attention to prefix for {set, add}Elijah Newren via GitGitGadget, Feb 16, 2022
  42. 4/5 sparse-checkout: error or warn when given individual filesElijah Newren via GitGitGadget, Feb 16, 2022
  43. 5/5 sparse-checkout: reject arguments in cone-mode that look like patternsElijah Newren via GitGitGadget, Feb 16, 2022
  44. Ævar Arnfjörð BjarmasonFeb 16, 2022
  45. Elijah NewrenFeb 16, 2022
  46. Victoria DyeFeb 16, 2022
  47. Junio C HamanoFeb 16, 2022
  48. Elijah NewrenFeb 17, 2022
  49. Junio C HamanoFeb 17, 2022
  50. Elijah NewrenFeb 17, 2022
  51. Elijah NewrenFeb 17, 2022
  52. Junio C HamanoFeb 16, 2022
  53. 0/5 sparse checkout: fix a few bugs and check argument validity for set/addElijah Newren via GitGitGadget, Feb 17, 2022
  54. 1/5 sparse-checkout: correct reapply's handling of optionsElijah Newren via GitGitGadget, Feb 17, 2022
  55. 2/5 sparse-checkout: correctly set non-cone mode when expectedElijah Newren via GitGitGadget, Feb 17, 2022
  56. 3/5 sparse-checkout: pay attention to prefix for {set, add}Elijah Newren via GitGitGadget, Feb 17, 2022
  57. Junio C HamanoFeb 17, 2022
  58. 5/5 sparse-checkout: reject arguments in cone-mode that look like patternsElijah Newren via GitGitGadget, Feb 17, 2022
  59. 4/5 sparse-checkout: error or warn when given individual filesElijah Newren via GitGitGadget, Feb 17, 2022
  60. Junio C HamanoFeb 17, 2022
  61. Elijah NewrenFeb 18, 2022
  62. Ævar Arnfjörð BjarmasonFeb 17, 2022
  63. 0/5 sparse checkout: fix a few bugs and check argument validity for set/addElijah Newren via GitGitGadget, Feb 19, 2022
  64. 1/5 sparse-checkout: correct reapply's handling of optionsElijah Newren via GitGitGadget, Feb 19, 2022
  65. 2/5 sparse-checkout: correctly set non-cone mode when expectedElijah Newren via GitGitGadget, Feb 19, 2022
  66. 3/5 sparse-checkout: pay attention to prefix for {set, add}Elijah Newren via GitGitGadget, Feb 19, 2022
  67. 4/5 sparse-checkout: error or warn when given individual filesElijah Newren via GitGitGadget, Feb 19, 2022
  68. 5/5 sparse-checkout: reject arguments in cone-mode that look like patternsElijah Newren via GitGitGadget, Feb 19, 2022
  69. Derrick StoleeFeb 20, 2022
  70. Junio C HamanoFeb 20, 2022

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.