Skip to content

Commit c6e29c2

Browse files
jeffhostetlerdscho
authored andcommitted
fixup! fsmonitor: use IPC to query the builtin FSMonitor daemon
This reverts commit abc1c46. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent 669c955 commit c6e29c2

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

fsmonitor.c

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -254,37 +254,8 @@ void refresh_fsmonitor(struct index_state *istate)
254254
trace_printf_key(&trace_fsmonitor, "refresh fsmonitor");
255255

256256
if (fsm_mode == FSMONITOR_MODE_IPC) {
257-
query_success = !fsmonitor_ipc__send_query(
258-
istate->fsmonitor_last_update ?
259-
istate->fsmonitor_last_update : "builtin:fake",
260-
&query_result);
261-
if (query_success) {
262-
/*
263-
* The response contains a series of nul terminated
264-
* strings. The first is the new token.
265-
*
266-
* Use `char *buf` as an interlude to trick the CI
267-
* static analysis to let us use `strbuf_addstr()`
268-
* here (and only copy the token) rather than
269-
* `strbuf_addbuf()`.
270-
*/
271-
buf = query_result.buf;
272-
strbuf_addstr(&last_update_token, buf);
273-
bol = last_update_token.len + 1;
274-
} else {
275-
/*
276-
* The builtin daemon is not available on this
277-
* platform -OR- we failed to get a response.
278-
*
279-
* Generate a fake token (rather than a V1
280-
* timestamp) for the index extension. (If
281-
* they switch back to the hook API, we don't
282-
* want ambiguous state.)
283-
*/
284-
strbuf_addstr(&last_update_token, "builtin:fake");
285-
}
286-
287-
goto apply_results;
257+
/* TODO */
258+
return;
288259
}
289260

290261
assert(fsm_mode == FSMONITOR_MODE_HOOK);
@@ -350,7 +321,6 @@ void refresh_fsmonitor(struct index_state *istate)
350321
query_success ? "success" : "failure");
351322
}
352323

353-
apply_results:
354324
/* a fsmonitor process can return '/' to indicate all entries are invalid */
355325
if (query_success && query_result.buf[bol] != '/') {
356326
/* Mark all entries returned by the monitor as dirty */

0 commit comments

Comments
 (0)