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

Re: [PATCH 3/2] dir.c: fix dir re-inclusion rules with "NODIR" and "MUSTBEDIR"

From
Duy Nguyen <pclouds@gmail.com>
Date
Mar 18, 2016, 06:28 UTC
Message-ID
<CACsJy8CrXFUPqJz4kt6fsvFhGDavOfZBQtHD98FuEW14UMmMtg@mail.gmail.com>
In-Reply-To
<56EB9E67.1000306@fb.com>
On Fri, Mar 18, 2016 at 1:21 PM, Durham Goode <durham@fb.com> wrote:
Show 14 quoted lines
>> Skipping that tricky pair, the pairs "/*" and "!/dir1/dir2/" means
>> "exclude everything except dir1/dir2" (in .gitignore sense) or
>> "include everything except dir1/dir2" in sparse checkout sense. Which
>> results in empty worktree. 1+2 trips when the trailing slash in the
>> last rule exists and includes both files in show/hide. Patch 3/2 fixes
>> the tripping and exclude both. If the last rule is "!/dir1/dir2" then
>> 1+2 results in empty worktree as well.
>>
> I'm not sure I fully understand.  Here's what I'm seeing, with patch 1, 2,
> and 3 applied:  with patterns "/*', "!/dir1/dir2", "/dir1/dir2/show", I see
> the contents of dir1/dir2/show/ (good). If I add a trailing slash to the
> last pattern (so it becomes "/dir1/dir2/show/"), it now results in an empty
> working copy. That seems funky, given that the last rule is to include that
> directory. Am I misunderstanding the trailing slash?

Ah.. I meant the last slash in !dir1/dir2/, not in dir1/dir2/show. But that's interesting, will need to run some more tests.

> We're pretty far beyond my ability to understand ignore patterns now.

I'm right there with you. I'm starting to fear that I don't (and probably won't) understand this thing.

-- 
Duy
Previous: Durham GoodeNext: Junio C Hamano
Message 24 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.