refs.c: remove the_repo from read_ref_at()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2019-04-06 18:34:30 +07:00
committed by Junio C Hamano
parent 567009033f
commit 7fdff47432
4 changed files with 12 additions and 7 deletions

7
refs.c
View File

@ -967,7 +967,8 @@ static int read_ref_at_ent_oldest(struct object_id *ooid, struct object_id *noid
return 1;
}
int read_ref_at(const char *refname, unsigned int flags, timestamp_t at_time, int cnt,
int read_ref_at(struct ref_store *refs, const char *refname,
unsigned int flags, timestamp_t at_time, int cnt,
struct object_id *oid, char **msg,
timestamp_t *cutoff_time, int *cutoff_tz, int *cutoff_cnt)
{
@ -983,7 +984,7 @@ int read_ref_at(const char *refname, unsigned int flags, timestamp_t at_time, in
cb.cutoff_cnt = cutoff_cnt;
cb.oid = oid;
for_each_reflog_ent_reverse(refname, read_ref_at_ent, &cb);
refs_for_each_reflog_ent_reverse(refs, refname, read_ref_at_ent, &cb);
if (!cb.reccnt) {
if (flags & GET_OID_QUIETLY)
@ -994,7 +995,7 @@ int read_ref_at(const char *refname, unsigned int flags, timestamp_t at_time, in
if (cb.found_it)
return 0;
for_each_reflog_ent(refname, read_ref_at_ent_oldest, &cb);
refs_for_each_reflog_ent(refs, refname, read_ref_at_ent_oldest, &cb);
return 1;
}