Re: [RFC 2/3] Alternates API: Improve naming
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 30, 2011, 22:31 UTC
- Message-ID
- <7vwrjgkzps.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <a0e5204fe8c03b3b6af2150198bad51f86b126c4.1301521243.git.mfwitten@gmail.com>
Michael Witten <mfwitten@gmail.com> writes:
Show 16 quoted lines
> diff --git a/sha1_file.c b/sha1_file.c
> index e55a496..a6c1f1f 100644
> --- a/sha1_file.c
> +++ b/sha1_file.c
> @@ -390,11 +390,11 @@ void add_to_alternates_file(const char *reference)
>
> void foreach_alt_odb(alt_odb_fn fn)
> {
> - struct alternate_object_database *ent;
> + struct alternate_object_database *d;
>
> prepare_alt_odb();
> - for (ent = alt_odb_list; ent; ent = ent->next)
> + for (d = alt_odb_list; d; d = d->next)
> - if (fn(ent))
> + if (fn(d))I see this as a naming regression; that pointer variable points at an entry in a list, and the callback is very well aware of that too (so the s/e/d/g in an earlier hunk also is a naming regression).