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
Ben Peart <peartben@gmail.com>
Date
May 16, 2017, 01:15 UTC
Message-ID
<00db0fd9-e873-79f4-0497-0fec6c98d937@gmail.com>
In-Reply-To
<d195af80f27e4fea85a96d6435b36139@exmbdft7.ad.twosigma.com>
On 5/15/2017 5:21 PM, David Turner wrote:
Show 24 quoted lines
>
>> -----Original Message-----
>> From: Ben Peart [mailto:peartben@gmail.com]
>> Sent: Monday, May 15, 2017 3:14 PM
>> To: git@vger.kernel.org
>> Cc: gitster@pobox.com; benpeart@microsoft.com; pclouds@gmail.com;
>> johannes.schindelin@gmx.de; David Turner <David.Turner@twosigma.com>;
>> peff@peff.net
>> Subject: [PATCH v1 2/5] Teach git to optionally utilize a file system monitor to
>> speed up detecting new or changed files.
>
>> @@ -342,6 +344,8 @@ struct index_state {
>>  	struct hashmap dir_hash;
>>  	unsigned char sha1[20];
>>  	struct untracked_cache *untracked;
>> +	time_t last_update;
>> +	struct ewah_bitmap *bitmap;
>
> The name 'bitmap' doesn't tell the reader much about what it used for.
>
>> +static int update_istate(const char *name, void *is) {
>
> Rename to mark_file_dirty?  Also why does it take a void pointer?  Or return int (rather than void)?
>
Thanks for the feedback.  I'll do some renaming and change the types passed.
Show 6 quoted lines
>> +void refresh_by_fsmonitor(struct index_state *istate) {
>> +	static has_run_once = FALSE;
>> +	struct strbuf buffer = STRBUF_INIT;
>
> Rename to query_result? Also I think you're leaking it.
>
Good catch!  I missed the leak there.  Fixed for the next roll.
Previous: David TurnerNext: brian m. carlson
Message 12 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.