aboutsummaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2015-05-25 18:39:08 +0000
committerJunio C Hamano <gitster@pobox.com>2015-05-25 12:19:36 -0700
commitf31ba7e11611d17a460ed203ed3aa8142d662ff9 (patch)
tree57bebb4edc8013282758c58a0e42a45edfc9d920 /transport.c
parent7290ef5898ce343006ede558cb5755d35947b585 (diff)
downloadgit-f31ba7e11611d17a460ed203ed3aa8142d662ff9.tar.gz
git-f31ba7e11611d17a460ed203ed3aa8142d662ff9.tar.xz
write_refs_to_temp_dir(): convert local variable sha1 to object_id
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/transport.c b/transport.c
index 58cb9ed03..df87386d7 100644
--- a/transport.c
+++ b/transport.c
@@ -299,18 +299,18 @@ static int write_one_ref(const char *name, const unsigned char *sha1,
}
static int write_refs_to_temp_dir(struct strbuf *temp_dir,
- int refspec_nr, const char **refspec)
+ int refspec_nr, const char **refspec)
{
int i;
for (i = 0; i < refspec_nr; i++) {
- unsigned char sha1[20];
+ struct object_id oid;
char *ref;
- if (dwim_ref(refspec[i], strlen(refspec[i]), sha1, &ref) != 1)
+ if (dwim_ref(refspec[i], strlen(refspec[i]), oid.hash, &ref) != 1)
return error("Could not get ref %s", refspec[i]);
- if (write_one_ref(ref, sha1, 0, temp_dir)) {
+ if (write_one_ref(ref, oid.hash, 0, temp_dir)) {
free(ref);
return -1;
}