pack_one_ref(): rename "path" parameter to "refname"

Make this function conform to the naming convention established in 65385ef7d4 for the rest of the refs.c file. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael Haggerty committed Apr 22, 2013 at 21:52 UTC 3b4ae6d5023095114692d1e2e1a213611fec9314
1 file changed +7 -7
refs.c
+7 -7
@@ -2004,7 +2004,7 @@ static int do_not_prune(int flags)
2004 return (flags & (REF_ISSYMREF|REF_ISPACKED));
2005 }
2006
2007 -static int pack_one_ref(const char *path, const unsigned char *sha1,
2007 +static int pack_one_ref(const char *refname, const unsigned char *sha1,
2008 int flags, void *cb_data)
2009 {
2010 struct pack_refs_cb_data *cb = cb_data;
@@ -2014,27 +2014,27 @@ static int pack_one_ref(const char *path, const unsigned char *sha1,
2014 /* Do not pack the symbolic refs */
2015 if ((flags & REF_ISSYMREF))
2016 return 0;
2017 - is_tag_ref = !prefixcmp(path, "refs/tags/");
2017 + is_tag_ref = !prefixcmp(refname, "refs/tags/");
2018
2019 /* ALWAYS pack refs that were already packed or are tags */
2020 if (!(cb->flags & PACK_REFS_ALL) && !is_tag_ref && !(flags & REF_ISPACKED))
2021 return 0;
2022
2023 - fprintf(cb->refs_file, "%s %s\n", sha1_to_hex(sha1), path);
2023 + fprintf(cb->refs_file, "%s %s\n", sha1_to_hex(sha1), refname);
2024
2025 - o = parse_object_or_die(sha1, path);
2025 + o = parse_object_or_die(sha1, refname);
2026 if (o->type == OBJ_TAG) {
2027 - o = deref_tag(o, path, 0);
2027 + o = deref_tag(o, refname, 0);
2028 if (o)
2029 fprintf(cb->refs_file, "^%s\n",
2030 sha1_to_hex(o->sha1));
2031 }
2032
2033 if ((cb->flags & PACK_REFS_PRUNE) && !do_not_prune(flags)) {
2034 - int namelen = strlen(path) + 1;
2034 + int namelen = strlen(refname) + 1;
2035 struct ref_to_prune *n = xcalloc(1, sizeof(*n) + namelen);
2036 hashcpy(n->sha1, sha1);
2037 - strcpy(n->name, path);
2037 + strcpy(n->name, refname);
2038 n->next = cb->ref_to_prune;
2039 cb->ref_to_prune = n;
2040 }