Skip to content

Commit 29fbbf4

Browse files
jeffhostetlergitster
authored andcommitted
fsmonitor: log FSMN token when reading and writing the index
Signed-off-by: Jeff Hostetler <[email protected]> Reviewed-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 940b94f commit 29fbbf4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

fsmonitor.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
8787
BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
8888
(uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
8989

90-
trace_printf_key(&trace_fsmonitor, "read fsmonitor extension successful");
90+
trace2_data_string("index", NULL, "extension/fsmn/read/token",
91+
istate->fsmonitor_last_update);
92+
trace_printf_key(&trace_fsmonitor,
93+
"read fsmonitor extension successful '%s'",
94+
istate->fsmonitor_last_update);
9195
return 0;
9296
}
9397

@@ -133,7 +137,11 @@ void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)
133137
put_be32(&ewah_size, sb->len - ewah_start);
134138
memcpy(sb->buf + fixup, &ewah_size, sizeof(uint32_t));
135139

136-
trace_printf_key(&trace_fsmonitor, "write fsmonitor extension successful");
140+
trace2_data_string("index", NULL, "extension/fsmn/write/token",
141+
istate->fsmonitor_last_update);
142+
trace_printf_key(&trace_fsmonitor,
143+
"write fsmonitor extension successful '%s'",
144+
istate->fsmonitor_last_update);
137145
}
138146

139147
/*

0 commit comments

Comments
 (0)