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

Re: bug: sparse config interpretation incorrectness in 2.8.0-rc2

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 17, 2016, 13:20 UTC
Message-ID
<CACsJy8DH297aV2pYL7xGNZ5X24rR5PxvrpJQ+15YxpDNvqgS5Q@mail.gmail.com>
In-Reply-To
<alpine.DEB.2.20.1603171402330.4690@virtualbox>

On Thu, Mar 17, 2016 at 8:04 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 13 quoted lines
> Hi Duy,
>
> On Thu, 17 Mar 2016, Duy Nguyen wrote:
>
>> Good news for you is there's "sparse checkout v2" in the work, that
>> would not rely on exclude engine and should be both faster and more
>> elegant. That should reduce "sparse checkout v1" usage to really small
>> cases.
>
> I dabbled myself with speeding up the entire exclude engine (essentially,
> I use a hash map of the non-wildcard prefixes to the corresponding line
> number). So I am interested to see what your approach is. Could you point
> me to it (I did not see any obvious branch in your GitHub space)?

First of all it's not about speeding up exclude engine. I think I did that (sort of) already with untracked cache (have you tried it on Windows?)

It's Junio's idea actually, what I'm implementing. The index contains a list of _files_ yes? What if the index contains also _directories_? Of course we can't "refresh" or check if the whole directory is "dirty" like a file, so those dirs will stay registered in the index, but be entirely missing from worktree. The effect is the same as sparse checkout, except that we keep all "hidden" files of sparse checkout in the index. In fact I plan to reuse CE_SKIP_WORKTREE (from sparse checkout) to mark those dirs.

The advantage is obvious: the index can be much smaller, which leads to faster update and access. Of course now you can only hide either whole directory, or hide nothing. It's less flexible than sparse checkout "v1", but you can use "v1" on top of "v2" for that. Changing checkout regions involves unfolding or folding certain directories, sparse patterns are not used.

If you are still curious, you can check out my 'narrow-checkout' branch on github. The basic is working. Folding/unfolding is not. Be warned that it's even dirtier than your rebase-helper branch (and will not be released any time soon either, lots of other stuff to be finished first).

-- 
Duy
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 7 of 30 in “bug: sparse config interpretation incorrectness in 2.8.0-rc2”
  1. Durham GoodeMar 17, 2016
  2. Duy NguyenMar 17, 2016
  3. Durham GoodeMar 17, 2016
  4. Junio C HamanoMar 17, 2016
  5. Duy NguyenMar 17, 2016
  6. Johannes SchindelinMar 17, 2016
  7. Duy NguyenMar 17, 2016
  8. Johannes SchindelinMar 17, 2016
  9. Duy NguyenMar 17, 2016
  10. Johannes SchindelinMar 18, 2016
  11. Junio C HamanoMar 17, 2016
  12. Durham GoodeMar 17, 2016
  13. 1/2 dir.c: fix bug in 'nd/exclusion-regression-fix' topicNguyễn Thái Ngọc Duy, Mar 17, 2016
  14. 1/2 dir.c: fix bug in 'nd/exclusion-regression-fix' topicNguyễn Thái Ngọc Duy, Mar 17, 2016
  15. 3/2 dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"Nguyễn Thái Ngọc Duy, Mar 17, 2016
  16. Junio C HamanoMar 17, 2016
  17. Duy NguyenMar 18, 2016
  18. Junio C HamanoMar 18, 2016
  19. Duy NguyenMar 18, 2016
  20. Eric SunshineMar 18, 2016
  21. Durham GoodeMar 18, 2016
  22. Duy NguyenMar 18, 2016
  23. Durham GoodeMar 18, 2016
  24. Duy NguyenMar 18, 2016
  25. Junio C HamanoMar 18, 2016
  26. Extending this cycle by a week and reverting !reinclusion topicJunio C Hamano, Mar 18, 2016
  27. Duy NguyenMar 19, 2016
  28. 2/2 dir.c: correct "stuck" logging logicNguyễn Thái Ngọc Duy, Mar 17, 2016
  29. 2/2 dir.c: correct "stuck" logging logicNguyễn Thái Ngọc Duy, Mar 17, 2016
  30. Junio C HamanoMar 18, 2016

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.