Try consistently to use the name "sha1" for parameters to which a SHA1
will be stored.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Michael Haggerty13 years agocommitted byJunio C Hamano
static int resolve_gitlink_packed_ref(char *name, int pathlen,
const char *refname, unsigned char *result)
const char *refname, unsigned char *sha1)
{
int retval = -1;
struct ref_entry *ref;
@ -415,14 +415,14 @@ static int resolve_gitlink_packed_ref(char *name, int pathlen,
@@ -415,14 +415,14 @@ static int resolve_gitlink_packed_ref(char *name, int pathlen,
array = get_packed_refs(name);
ref = search_ref_array(array, refname);
if (ref != NULL) {
memcpy(result, ref->sha1, 20);
memcpy(sha1, ref->sha1, 20);
retval = 0;
}
return retval;
}
static int resolve_gitlink_ref_recursive(char *name, int pathlen,
const char *refname, unsigned char *result,
const char *refname, unsigned char *sha1,
int recursion)
{
int fd, len = strlen(refname);
@ -433,7 +433,7 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen,
@@ -433,7 +433,7 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen,
@ -444,7 +444,7 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen,
@@ -444,7 +444,7 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen,
buffer[len] = 0;
/* Was it a detached head or an old-fashioned symlink? */
if (!get_sha1_hex(buffer, result))
if (!get_sha1_hex(buffer, sha1))
return 0;
/* Symref? */
@ -454,10 +454,10 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen,
@@ -454,10 +454,10 @@ static int resolve_gitlink_ref_recursive(char *name, int pathlen,