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

Re: full kernel history, in patchset format

From
Junio C Hamano <junkio@cox.net>
Date
Apr 16, 2005, 19:27 UTC
Message-ID
<7v3btq7c9n.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20050416185751.GJ19099@pasky.ji.cz>
>>>>> "PB" == Petr Baudis <pasky@ucw.cz> writes:

PB> P.S.: It seems that Linus applied a patch to ls-tree which will make it PB> read_sha1_file() on each item when ls-tree is recursive. Junio, why did PB> you do it?

Sorry it was my misunderstanding, before I found out exactly how S_ISDIR is used. Thank you for pointing it out.

I was confused by this comment around the area I changed:
    /* XXX: We do some ugly mode heuristics here.
     * It seems not worth it to read each file just to get this
     * and the file size. -- pasky@ucw.cz

I mistakenly inferred from that comment that S_ISDIR(mode) is not a guarantee. So I mistakenly optimized it for non-recursive case by keeping that "heuristics". The logic was: If recursive we will need to run read_sha1_file() to find out if it is really a tree anyway.

I'll fix it up, now I know S_ISDIR(mode) is a guarantee that it is a tree, I'll do the "heuristics" first, and do read_sha1_file only when it is a tree and I am recursive.

Previous: Petr BaudisNext: Linus Torvalds
Message 25 of 42 in “full kernel history, in patchset format”
  1. Ingo MolnarApr 16, 2005
  2. Ingo MolnarApr 16, 2005
  3. David MansfieldApr 16, 2005
  4. Ingo MolnarApr 16, 2005
  5. Francois RomieuApr 16, 2005
  6. Linus TorvaldsApr 16, 2005
  7. Petr BaudisApr 16, 2005
  8. Christopher LiApr 16, 2005
  9. Junio C HamanoApr 16, 2005
  10. Mike TahtApr 16, 2005
  11. Junio C HamanoApr 16, 2005
  12. Christopher LiApr 16, 2005
  13. Junio C HamanoApr 16, 2005
  14. Mike TahtApr 16, 2005
  15. Daniel BarkalowApr 16, 2005
  16. Junio C HamanoApr 16, 2005
  17. Jan-Benedict GlawApr 16, 2005
  18. Thomas GleixnerApr 16, 2005
  19. Petr BaudisApr 16, 2005
  20. Petr BaudisApr 16, 2005
  21. Thomas GleixnerApr 16, 2005
  22. Linus TorvaldsApr 16, 2005
  23. Thomas GleixnerApr 16, 2005
  24. Petr BaudisApr 16, 2005
  25. Junio C HamanoApr 16, 2005
  26. Linus TorvaldsApr 16, 2005
  27. Thomas GleixnerApr 16, 2005
  28. David LangApr 16, 2005
  29. Ingo MolnarApr 16, 2005
  30. David WoodhouseApr 17, 2005
  31. Petr BaudisApr 17, 2005
  32. David WoodhouseApr 18, 2005
  33. Petr BaudisApr 18, 2005
  34. David WoodhouseApr 18, 2005
  35. Petr BaudisApr 18, 2005
  36. David WoodhouseApr 18, 2005
  37. Petr BaudisApr 18, 2005
  38. Linus TorvaldsApr 18, 2005
  39. David WoodhouseApr 18, 2005
  40. Catalin MarinasApr 18, 2005
  41. David MansfieldApr 18, 2005
  42. Catalin MarinasApr 19, 2005

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.