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

Function fill_reftable_log_record

refs/reftable-backend.c:307–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307static void fill_reftable_log_record(struct reftable_log_record *log, const struct ident_split *split)
308{
309 const char *tz_begin;
310 int sign = 1;
311
312 reftable_log_record_release(log);
313 log->value_type = REFTABLE_LOG_UPDATE;
314 log->value.update.name =
315 xstrndup(split->name_begin, split->name_end - split->name_begin);
316 log->value.update.email =
317 xstrndup(split->mail_begin, split->mail_end - split->mail_begin);
318 log->value.update.time = atol(split->date_begin);
319
320 tz_begin = split->tz_begin;
321 if (*tz_begin == '-') {
322 sign = -1;
323 tz_begin++;
324 }
325 if (*tz_begin == '+') {
326 sign = 1;
327 tz_begin++;
328 }
329
330 log->value.update.tz_offset = sign * atoi(tz_begin);
331}
332
333static int reftable_be_config(const char *var, const char *value,
334 const struct config_context *ctx,

Callers 2

write_transaction_tableFunction · 0.85
write_copy_tableFunction · 0.85

Calls 2

xstrndupFunction · 0.85

Tested by

no test coverage detected