is_refname_available(): avoid shadowing "dir" variable

The function had a "dir" parameter that was shadowed by a local "dir" variable within a code block. Use the former in place of the latter. (This is consistent with "dir"'s use elsewhere in the function.) Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>

Michael Haggerty committed May 11, 2015 at 17:25 UTC 9ef6eaa287b12ff9469c7775507f107b86f9a8c8
1 file changed +2 -2
refs.c
+2 -2
@@ -967,10 +967,10 @@ static int is_refname_available(const char *refname,
967 * "refs/foo/bar/"). It is a problem iff it contains
968 * any ref that is not in "skip".
969 */
970 - struct ref_entry *entry = dir->entries[pos];
971 - struct ref_dir *dir = get_ref_dir(entry);
970 struct nonmatching_ref_data data;
971 + struct ref_entry *entry = dir->entries[pos];
972
973 + dir = get_ref_dir(entry);
974 data.skip = skip;
975 sort_ref_dir(dir);
976 if (!do_for_each_entry_in_dir(dir, 0, nonmatching_ref_fn, &data))