| 305 | } |
| 306 | |
| 307 | static 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 | |
| 333 | static int reftable_be_config(const char *var, const char *value, |
| 334 | const struct config_context *ctx, |
no test coverage detected