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

Re: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.

From
Johannes Sixt <j6t@kdbg.org>
Date
May 17, 2017, 18:15 UTC
Message-ID
<2e5ea82d-3b8f-f508-e2af-5f193241a573@kdbg.org>
In-Reply-To
<0a3f38b7-788b-b364-3fef-83191e4b9bea@gmail.com>
Am 17.05.2017 um 16:26 schrieb Ben Peart:
Show 14 quoted lines
> On 5/16/2017 3:13 PM, Johannes Sixt wrote:
>> Am 16.05.2017 um 19:17 schrieb Ben Peart:
>>> OK, now I'm confused as to the best path for adding a get_be64.  This
>>> one is trivial:
>>>
>>> #define get_be64(p)    ntohll(*(uint64_t *)(p))
>>
>> I cringe when I see a cast like this. Unless you can guarantee that p is
>> char* (bare or signed or unsigned), you fall pray to strict aliasing
>> violations, aka undefined behavior. And I'm not even mentioning correct
>> alignment, yet.
> 
> Note, this macro is only used where the CPU architecture is OK with 
> unaligned memory access.

I'm not worried about the unaligned memory access: It either works, or we get a SIGBUS. The undefined behavior is more worrisome because the code may work or not, and we can never be sure which it is.

-- Hannes
Previous: Ben PeartNext: Jeff King
Message 21 of 26 in “Fast git status via a file system watcher”
  1. 0/5 Fast git status via a file system watcherBen Peart, May 15, 2017
  2. 1/5 dir: make lookup_untracked() available outside of dir.cBen Peart, May 15, 2017
  3. Junio C HamanoMay 16, 2017
  4. 3/5 fsmonitor: add test cases for fsmonitor extensionBen Peart, May 15, 2017
  5. Junio C HamanoMay 16, 2017
  6. Ben PeartMay 16, 2017
  7. 5/5 Add a sample query-fsmonitor hook script that integrates with the cross platform Watchman file watching service.Ben Peart, May 15, 2017
  8. David TurnerMay 15, 2017
  9. Ben PeartMay 15, 2017
  10. 2/5 Teach git to optionally utilize a file system monitor to speed up detecting new or changed files.Ben Peart, May 15, 2017
  11. David TurnerMay 15, 2017
  12. Ben PeartMay 16, 2017
  13. brian m. carlsonMay 16, 2017
  14. Jeff KingMay 16, 2017
  15. Ben PeartMay 16, 2017
  16. Jeff KingMay 16, 2017
  17. Ben PeartMay 16, 2017
  18. Jeff KingMay 16, 2017
  19. Johannes SixtMay 16, 2017
  20. Ben PeartMay 17, 2017
  21. Johannes SixtMay 17, 2017
  22. Jeff KingMay 18, 2017
  23. Jonathan TanMay 16, 2017
  24. Ben PeartMay 17, 2017
  25. 4/5 Add documentation for the fsmonitor extension. This includes the core.fsmonitor setting, the query-fsmonitor hook, and the fsmonitor index extension.Ben Peart, May 15, 2017
  26. Junio C HamanoMay 16, 2017

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.