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

Function yield_log_record

refs/reftable-backend.c:2119–2143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2117}
2118
2119static int yield_log_record(struct reftable_ref_store *refs,
2120 struct reftable_log_record *log,
2121 each_reflog_ent_fn fn,
2122 void *cb_data)
2123{
2124 struct object_id old_oid, new_oid;
2125 const char *full_committer;
2126
2127 oidread(&old_oid, log->value.update.old_hash, refs->base.repo->hash_algo);
2128 oidread(&new_oid, log->value.update.new_hash, refs->base.repo->hash_algo);
2129
2130 /*
2131 * When both the old object ID and the new object ID are null
2132 * then this is the reflog existence marker. The caller must
2133 * not be aware of it.
2134 */
2135 if (is_null_oid(&old_oid) && is_null_oid(&new_oid))
2136 return 0;
2137
2138 full_committer = fmt_ident(log->value.update.name, log->value.update.email,
2139 WANT_COMMITTER_IDENT, NULL, IDENT_NO_DATE);
2140 return fn(log->refname, &old_oid, &new_oid, full_committer,
2141 log->value.update.time, log->value.update.tz_offset,
2142 log->value.update.message, cb_data);
2143}
2144
2145static int reftable_be_for_each_reflog_ent_reverse(struct ref_store *ref_store,
2146 const char *refname,

Calls 3

oidreadFunction · 0.85
is_null_oidFunction · 0.85
fmt_identFunction · 0.85

Tested by

no test coverage detected