]> git.ipfire.org Git - thirdparty/git.git/blobdiff - packfile.c
Merge branch 'ea/blame-use-oideq'
[thirdparty/git.git] / packfile.c
index 6ab5233613e2417f8ee9ce0991ae532726b59b20..9ef27508f2ed6d2685e5d85cd92667ac735140d5 100644 (file)
@@ -1027,6 +1027,17 @@ struct multi_pack_index *get_multi_pack_index(struct repository *r)
        return r->objects->multi_pack_index;
 }
 
+struct multi_pack_index *get_local_multi_pack_index(struct repository *r)
+{
+       struct multi_pack_index *m = get_multi_pack_index(r);
+
+       /* no need to iterate; we always put the local one first (if any) */
+       if (m && m->local)
+               return m;
+
+       return NULL;
+}
+
 struct packed_git *get_all_packs(struct repository *r)
 {
        struct multi_pack_index *m;