MCPcopy Create free account
hub / github.com/git/git / reftable_log_record_equal

Function reftable_log_record_equal

reftable/record.c:997–1023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

995}
996
997int reftable_log_record_equal(const struct reftable_log_record *a,
998 const struct reftable_log_record *b, uint32_t hash_size)
999{
1000 if (!(null_streq(a->refname, b->refname) &&
1001 a->update_index == b->update_index &&
1002 a->value_type == b->value_type))
1003 return 0;
1004
1005 switch (a->value_type) {
1006 case REFTABLE_LOG_DELETION:
1007 return 1;
1008 case REFTABLE_LOG_UPDATE:
1009 return null_streq(a->value.update.name, b->value.update.name) &&
1010 a->value.update.time == b->value.update.time &&
1011 a->value.update.tz_offset == b->value.update.tz_offset &&
1012 null_streq(a->value.update.email,
1013 b->value.update.email) &&
1014 null_streq(a->value.update.message,
1015 b->value.update.message) &&
1016 !memcmp(a->value.update.old_hash,
1017 b->value.update.old_hash, hash_size) &&
1018 !memcmp(a->value.update.new_hash,
1019 b->value.update.new_hash, hash_size);
1020 }
1021
1022 abort();
1023}
1024
1025static int reftable_log_record_is_deletion_void(const void *p)
1026{

Calls 1

null_streqFunction · 0.85