Thread (26 messages) flat view 26 messages, 4 authors, 2017-10-09

Re: [PATCH v3 5/5] sha1_name: Minimize OID comparisons during disambiguation

From: Stefan Beller <hidden>
Date: 2017-10-03 15:55:23

quoted hunk ↗ jump to hunk
@@ -505,6 +506,65 @@ static int extend_abbrev_len(const struct object_id *oid, void *cb_data)
        return 0;
 }

+static void find_abbrev_len_for_pack(struct packed_git *p,
+                                    struct min_abbrev_data *mad)
+{
+       int match = 0;
+       uint32_t num, last, first = 0;
+       struct object_id oid;
+
+       open_pack_index(p);
coverity complained here with
    Calling "open_pack_index" without checking return value
    (as is done elsewhere 13 out of 15 times).

I think the easiest way out is just a

    if (open_pack_index(p))
        die(_("Cannot open existing pack idx file for '%s'"), p);

or is there another good approach?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help