Skip to content

Commit 061e420

Browse files
pcloudsgitster
authored andcommitted
revision.c: correct a parameter name
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3a3b9d8 commit 061e420

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

revision.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,13 +1277,14 @@ static int handle_one_reflog_ent(struct object_id *ooid, struct object_id *noid,
12771277
return 0;
12781278
}
12791279

1280-
static int handle_one_reflog(const char *path, const struct object_id *oid,
1280+
static int handle_one_reflog(const char *refname,
1281+
const struct object_id *oid,
12811282
int flag, void *cb_data)
12821283
{
12831284
struct all_refs_cb *cb = cb_data;
12841285
cb->warned_bad_reflog = 0;
1285-
cb->name_for_errormsg = path;
1286-
refs_for_each_reflog_ent(cb->refs, path,
1286+
cb->name_for_errormsg = refname;
1287+
refs_for_each_reflog_ent(cb->refs, refname,
12871288
handle_one_reflog_ent, cb_data);
12881289
return 0;
12891290
}

0 commit comments

Comments
 (0)