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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5/15/2017 5:21 PM, David Turner wrote:

-----Original Message-----
From: Ben Peart [mailto:peartben@xxxxxxxxx]
Sent: Monday, May 15, 2017 3:14 PM
To: git@xxxxxxxxxxxxxxx
Cc: gitster@xxxxxxxxx; benpeart@xxxxxxxxxxxxx; pclouds@xxxxxxxxx;
johannes.schindelin@xxxxxx; David Turner <David.Turner@xxxxxxxxxxxx>;
peff@xxxxxxxx
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.


+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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]