From 061e420a4d3a87ea331eb51f2b92b6b97f3115da Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 21 Oct 2018 10:08:55 +0200 Subject: [PATCH] revision.c: correct a parameter name MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This function is a callback of for_each_reflog() which will pass a ref name as the first argument, not a path (to a reflog file). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- revision.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/revision.c b/revision.c index e18bd530e4..63aae722c1 100644 --- a/revision.c +++ b/revision.c @@ -1277,13 +1277,14 @@ static int handle_one_reflog_ent(struct object_id *ooid, struct object_id *noid, return 0; } -static int handle_one_reflog(const char *path, const struct object_id *oid, +static int handle_one_reflog(const char *refname, + const struct object_id *oid, int flag, void *cb_data) { struct all_refs_cb *cb = cb_data; cb->warned_bad_reflog = 0; - cb->name_for_errormsg = path; - refs_for_each_reflog_ent(cb->refs, path, + cb->name_for_errormsg = refname; + refs_for_each_reflog_ent(cb->refs, refname, handle_one_reflog_ent, cb_data); return 0; } -- 2.11.4.GIT