MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / text_snapshot_equal

Function text_snapshot_equal

src/cli/config_text_edit.c:266–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264}
265
266static int text_snapshot_equal(const text_file_snapshot_t *left,
267 const text_file_snapshot_t *right) {
268 if (left->exists != right->exists) {
269 return 0;
270 }
271 if (!left->exists) {
272 return 1;
273 }
274#ifdef _WIN32
275 return left->volume_serial == right->volume_serial &&
276 left->file_index_high == right->file_index_high &&
277 left->file_index_low == right->file_index_low && left->attributes == right->attributes &&
278 left->link_count == right->link_count &&
279 left->creation_time.dwLowDateTime == right->creation_time.dwLowDateTime &&
280 left->creation_time.dwHighDateTime == right->creation_time.dwHighDateTime &&
281 left->write_time.dwLowDateTime == right->write_time.dwLowDateTime &&
282 left->write_time.dwHighDateTime == right->write_time.dwHighDateTime &&
283 left->size == right->size;
284#else
285 return left->device == right->device && left->inode == right->inode &&
286 left->mode == right->mode && left->link_count == right->link_count &&
287 left->owner == right->owner && left->group == right->group &&
288 left->size == right->size && left->modified_sec == right->modified_sec &&
289 left->modified_nsec == right->modified_nsec && left->changed_sec == right->changed_sec &&
290 left->changed_nsec == right->changed_nsec;
291#endif
292}
293
294static int text_snapshot_publication_equal(const text_file_snapshot_t *trusted,
295 const text_file_snapshot_t *reopened) {

Callers 3

text_read_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected