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

Function text_snapshot_equal

src/cli/config_text_edit.c:265–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

text_read_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected