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

Re: [PATCH 2/9] fsck_tree(): fix shadowed variable

From
Jeff King <peff@peff.net>
Date
May 3, 2021, 20:13 UTC
Message-ID
<YJBZYt8ivlTDHpRM@coredump.intra.peff.net>
In-Reply-To
<87y2cwvz9e.fsf@evledraar.gmail.com>
On Mon, May 03, 2021 at 01:15:03PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> > Commit b2f2039c2b (fsck: accept an oid instead of a "struct tree" for
> > fsck_tree(), 2019-10-18) introduced a new "oid" parameter to
> > fsck_tree(), and we pass it to the report() function when we find
> [...]
> 
> Have you considered just passing down the "obj" instead of the "oid"?
> It's a bit of a bigger change, but seems to be worth it in this case as
> the below diff (on top of master) shows. We spend quite a bit of effort
> peeling an "obj" just to pass oid/type further down the stack.

That would be undoing the point of the referenced commit above. More discussion in this thread:

  https://lore.kernel.org/git/20191018044103.GA17625@sigill.intra.peff.net/
but the gist is:
  - there were bugs caused by looking at the object structs; not having
    it make sure we can't introduce similar bugs
  - using oids and buffers makes it possible for code to avoid having
    object structs at all. index-pack could take advantage of this (to
    reduce memory usage), but nobody has yet written that patch.
-Peff
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 7 of 35 in “leftover bits from symlinked gitattributes, etc topics”
  1. 0/9 leftover bits from symlinked gitattributes, etc topicsJeff King, May 1, 2021
  2. 1/9 t7415: remove out-dated comment about translationJeff King, May 1, 2021
  3. Ævar Arnfjörð BjarmasonMay 3, 2021
  4. Jeff KingMay 3, 2021
  5. 2/9 fsck_tree(): fix shadowed variableJeff King, May 1, 2021
  6. Ævar Arnfjörð BjarmasonMay 3, 2021
  7. Jeff KingMay 3, 2021
  8. Ævar Arnfjörð BjarmasonMay 4, 2021
  9. 3/9 fsck_tree(): wrap some long linesJeff King, May 1, 2021
  10. Ævar Arnfjörð BjarmasonMay 3, 2021
  11. Jeff KingMay 3, 2021
  12. 4/9 t7415: rename to expand scopeJeff King, May 1, 2021
  13. 5/9 t7450: test verify_path() handling of gitmodulesJeff King, May 1, 2021
  14. Eric SunshineMay 1, 2021
  15. Eric SunshineMay 1, 2021
  16. Jeff KingMay 3, 2021
  17. Ævar Arnfjörð BjarmasonMay 3, 2021
  18. Jeff KingMay 3, 2021
  19. 6/9 t7450: test .gitmodules symlink matching against obscured namesJeff King, May 1, 2021
  20. 7/9 t0060: test ntfs/hfs-obscured dotfilesJeff King, May 1, 2021
  21. 8/9 fsck: warn about symlinked dotfiles we'll open with O_NOFOLLOWJeff King, May 1, 2021
  22. 9/9 docs: document symlink restrictions for dot-filesJeff King, May 1, 2021
  23. Eric SunshineMay 1, 2021
  24. Jeff KingMay 3, 2021
  25. Junio C HamanoMay 3, 2021
  26. 0/9 leftover bits from symlinked gitattributes, etc topicsJeff King, May 3, 2021
  27. 1/9 t7415: remove out-dated comment about translationJeff King, May 3, 2021
  28. 2/9 fsck_tree(): fix shadowed variableJeff King, May 3, 2021
  29. 3/9 fsck_tree(): wrap some long linesJeff King, May 3, 2021
  30. 4/9 t7415: rename to expand scopeJeff King, May 3, 2021
  31. 5/9 t7450: test verify_path() handling of gitmodulesJeff King, May 3, 2021
  32. 6/9 t7450: test .gitmodules symlink matching against obscured namesJeff King, May 3, 2021
  33. 7/9 t0060: test ntfs/hfs-obscured dotfilesJeff King, May 3, 2021
  34. 8/9 fsck: warn about symlinked dotfiles we'll open with O_NOFOLLOWJeff King, May 3, 2021
  35. 9/9 docs: document symlink restrictions for dot-filesJeff King, May 3, 2021

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.