Thread (2 messages) flat view 2 messages, 2 authors, 2017-07-07

Re: [PATCH 11/12] sha1_name: convert get_sha1* to get_oid*

From: Junio C Hamano <hidden>
Date: 2017-07-05 18:38:58

Stefan Beller [off-list ref] writes:
quoted
@@ -636,7 +636,7 @@ static int get_sha1_basic(const char *str, int len, unsigned char *sha1,
                int detached;

                if (interpret_nth_prior_checkout(str, len, &buf) > 0) {
-                       detached = (buf.len == 40 && !get_sha1_hex(buf.buf, sha1));
+                       detached = (!get_oid_hex(buf.buf, oid));
omitting the length check here?
Good eyes.  It probably should check with the possible oid lengths.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help