diff mbox series

[v3,4/8] revision.c: correct a parameter name

Message ID 20181021080859.3203-5-pclouds@gmail.com
State New, archived
Headers show
Series fix per-worktree ref iteration in fsck/reflog expire | expand

Commit Message

Duy Nguyen Oct. 21, 2018, 8:08 a.m. UTC
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 <pclouds@gmail.com>
---
 revision.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/revision.c b/revision.c
index b5108b75ab..ea1d695e23 100644
--- a/revision.c
+++ b/revision.c
@@ -1278,13 +1278,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;
 }