{"thread":{"id":"53662","subject":"git sparse-checkout set not working in git 2.27.0","startedAt":"2020-06-11T16:50:03Z","lastAt":"2020-06-11T18:30:20Z","messageCount":2,"participants":["Alasdair Hurst","Elijah Newren"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"399552","messageId":"000801d64010$565b0b70$03112250$@gmail.com","threadId":"53662","inReplyTo":null,"subject":"git sparse-checkout set not working in git 2.27.0","fromName":"Alasdair Hurst","fromEmail":"alasdairhurst@gmail.com","sentAt":"2020-06-11T16:49:55Z","receivedAt":"2020-06-11T16:50:03Z","isPatch":false,"sender":{"key":"alasdairhurst@gmail.com","avatar":null},"body":"In git 2.27.0 sparse-checkout doesn't seem to work the same as it did in\n2.25.0:\n\n \n\nVersion: git version 2.27.0.windows.1 (the same behavior occurs on 2.27.0 on\nlinux too)\n\nCommands:\n-git clone git@repo.com:user/repo <mailto:git@repo.com:user/repo>\n--no-checkout --depth 1 sparse-repo\n\n-cd sparse-repo\n\n-git sparse-checkout init\n\n-git sparse-checkout add packages\n\n \n\nExpected behavior (as seen in 0.25):\n\n-ls\npackages\n\nThe packages directory is checked out and available the repo root.\n\n\nCurrent behavior\n\n-ls\n\n \n\nNo packages directory is checked out and the root is empty.\n\n \n\n"},{"id":"399562","messageId":"CABPp-BFRX3MPn=jw+Ezdx1pmxVF9SJw7Mxhk5cS5KUrXFJmM=w@mail.gmail.com","threadId":"53662","inReplyTo":"000801d64010$565b0b70$03112250$@gmail.com","subject":"Re: git sparse-checkout set not working in git 2.27.0","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-06-11T18:30:07Z","receivedAt":"2020-06-11T18:30:20Z","isPatch":false,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Thu, Jun 11, 2020 at 9:52 AM Alasdair Hurst <alasdairhurst@gmail.com> wrote:\n>\n> In git 2.27.0 sparse-checkout doesn't seem to work the same as it did in\n> 2.25.0:\n>\n>\n>\n> Version: git version 2.27.0.windows.1 (the same behavior occurs on 2.27.0 on\n> linux too)\n>\n> Commands:\n> -git clone git@repo.com:user/repo <mailto:git@repo.com:user/repo>\n> --no-checkout --depth 1 sparse-repo\n>\n> -cd sparse-repo\n>\n> -git sparse-checkout init\n>\n> -git sparse-checkout add packages\n>\n>\n>\n> Expected behavior (as seen in 0.25):\n>\n> -ls\n> packages\n>\n> The packages directory is checked out and available the repo root.\n>\n>\n> Current behavior\n>\n> -ls\n>\n>\n>\n> No packages directory is checked out and the root is empty.\n\nThanks for the report; this was fixed by commit b5bfc08a97\n(\"sparse-checkout: avoid staging deletions of all files\", 2020-06-05),\ncurrently cooking in the 'next' branch of git.git.  See the thread at\nhttps://lore.kernel.org/git/pull.801.v2.git.git.1591324899170.gitgitgadget@gmail.com/\nif you want to read up on it.\n"}]}