Thread (58 messages) flat view 58 messages, 2 authors, 2016-06-15
STALE3752d

[PATCH v3 42/56] write_refs_to_temp_dir(): convert local variable sha1 to object_id

From: brian m. carlson <hidden>
Date: 2016-06-15 23:04:55
Subsystem: the rest · Maintainer: Linus Torvalds

From: Michael Haggerty <redacted>

Signed-off-by: Michael Haggerty <redacted>
Signed-off-by: brian m. carlson <redacted>
---
 transport.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/transport.c b/transport.c
index 58cb9ed..df87386 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;
 		}
-- 
2.4.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help