summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-10-21 08:08:55 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-10-22 04:32:29 (GMT)
commit061e420a4d3a87ea331eb51f2b92b6b97f3115da (patch)
treeba5b7997bb1c3bfd5f74c4de24bd9e4492334651
parent3a3b9d8cde4ed647b1c56a8097f6db8e269bbc71 (diff)
downloadgit-061e420a4d3a87ea331eb51f2b92b6b97f3115da.zip
git-061e420a4d3a87ea331eb51f2b92b6b97f3115da.tar.gz
git-061e420a4d3a87ea331eb51f2b92b6b97f3115da.tar.bz2
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 <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--revision.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/revision.c b/revision.c
index e18bd53..63aae72 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;
}