]> git.ipfire.org Git - thirdparty/git.git/blobdiff - reftable/pq.c
Merge branch 'ps/reftable-iteration-perf'
[thirdparty/git.git] / reftable / pq.c
index 2461daf5ff49c9748031a75041d81b1fa30a3421..e0ccce2b9779a8bfd1acac6d42bc7d0e46e3fe0e 100644 (file)
@@ -14,20 +14,9 @@ https://developers.google.com/open-source/licenses/bsd
 
 int pq_less(struct pq_entry *a, struct pq_entry *b)
 {
-       struct strbuf ak = STRBUF_INIT;
-       struct strbuf bk = STRBUF_INIT;
-       int cmp = 0;
-       reftable_record_key(&a->rec, &ak);
-       reftable_record_key(&b->rec, &bk);
-
-       cmp = strbuf_cmp(&ak, &bk);
-
-       strbuf_release(&ak);
-       strbuf_release(&bk);
-
+       int cmp = reftable_record_cmp(&a->rec, &b->rec);
        if (cmp == 0)
                return a->index > b->index;
-
        return cmp < 0;
 }