| 995 | } |
| 996 | |
| 997 | int 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 | |
| 1025 | static int reftable_log_record_is_deletion_void(const void *p) |
| 1026 | { |