MCPcopy Index your code
hub / github.com/git/git / initialize_fsmonitor_last_update

Function initialize_fsmonitor_last_update

fsmonitor.c:751–757  ·  view source on GitHub ↗

* The caller wants to turn on FSMonitor. And when the caller writes * the index to disk, a FSMonitor extension should be included. This * requires that `istate->fsmonitor_last_update` not be NULL. But we * have not actually talked to a FSMonitor process yet, so we don't * have an initial value for this field. * * For a protocol V1 FSMonitor process, this field is a formatted * "nanosecon

Source from the content-addressed store, hash-verified

749 * that V2 processes adapt.
750 */
751static void initialize_fsmonitor_last_update(struct index_state *istate)
752{
753 struct strbuf last_update = STRBUF_INIT;
754
755 strbuf_addf(&last_update, "%"PRIu64"", getnanotime());
756 istate->fsmonitor_last_update = strbuf_detach(&last_update, NULL);
757}
758
759void add_fsmonitor(struct index_state *istate)
760{

Callers 1

add_fsmonitorFunction · 0.85

Calls 3

strbuf_addfFunction · 0.85
getnanotimeFunction · 0.85
strbuf_detachFunction · 0.85

Tested by

no test coverage detected