]> git.ipfire.org Git - thirdparty/git.git/commitdiff
fsmonitor: log FSMN token when reading and writing the index
authorJeff Hostetler <jeffhost@microsoft.com>
Wed, 3 Feb 2021 15:34:48 +0000 (15:34 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Feb 2021 01:14:35 +0000 (17:14 -0800)
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsmonitor.c

index 7a2be24cd433130408f9e5d9acdf5aacc920d2f6..3105dc370ab6c2e597bfef8e738642d13bab787e 100644 (file)
@@ -87,7 +87,11 @@ int read_fsmonitor_extension(struct index_state *istate, const void *data,
                BUG("fsmonitor_dirty has more entries than the index (%"PRIuMAX" > %u)",
                    (uintmax_t)istate->fsmonitor_dirty->bit_size, istate->cache_nr);
 
-       trace_printf_key(&trace_fsmonitor, "read fsmonitor extension successful");
+       trace2_data_string("index", NULL, "extension/fsmn/read/token",
+                          istate->fsmonitor_last_update);
+       trace_printf_key(&trace_fsmonitor,
+                        "read fsmonitor extension successful '%s'",
+                        istate->fsmonitor_last_update);
        return 0;
 }
 
@@ -133,7 +137,11 @@ void write_fsmonitor_extension(struct strbuf *sb, struct index_state *istate)
        put_be32(&ewah_size, sb->len - ewah_start);
        memcpy(sb->buf + fixup, &ewah_size, sizeof(uint32_t));
 
-       trace_printf_key(&trace_fsmonitor, "write fsmonitor extension successful");
+       trace2_data_string("index", NULL, "extension/fsmn/write/token",
+                          istate->fsmonitor_last_update);
+       trace_printf_key(&trace_fsmonitor,
+                        "write fsmonitor extension successful '%s'",
+                        istate->fsmonitor_last_update);
 }
 
 /*