Skip to content

Commit f31ba7e

Browse files
mhaggergitster
authored andcommitted
write_refs_to_temp_dir(): convert local variable sha1 to object_id
Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: brian m. carlson <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7290ef5 commit f31ba7e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

transport.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,18 +299,18 @@ static int write_one_ref(const char *name, const unsigned char *sha1,
299299
}
300300

301301
static int write_refs_to_temp_dir(struct strbuf *temp_dir,
302-
int refspec_nr, const char **refspec)
302+
int refspec_nr, const char **refspec)
303303
{
304304
int i;
305305

306306
for (i = 0; i < refspec_nr; i++) {
307-
unsigned char sha1[20];
307+
struct object_id oid;
308308
char *ref;
309309

310-
if (dwim_ref(refspec[i], strlen(refspec[i]), sha1, &ref) != 1)
310+
if (dwim_ref(refspec[i], strlen(refspec[i]), oid.hash, &ref) != 1)
311311
return error("Could not get ref %s", refspec[i]);
312312

313-
if (write_one_ref(ref, sha1, 0, temp_dir)) {
313+
if (write_one_ref(ref, oid.hash, 0, temp_dir)) {
314314
free(ref);
315315
return -1;
316316
}

0 commit comments

Comments
 (0)