Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3 08/28] shallow.c: add mark_new_shallow_refs()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:59:20

Duy Nguyen [off-list ref] writes:
On Tue, Nov 26, 2013 at 5:20 AM, Junio C Hamano [off-list ref] wrote:
quoted
Hmph.  the use of ->util field in this patch feels that it was
something commit-slab data structure was invented to solve.
Good stuff! Thanks.
quoted
quoted
+             if (c->util == NULL)
+                     c->util = bitmap;
+             else {
+                     /*
+                      * Deliberately leak a lot in commit->util
+                      * because there can be many pointers to the
+                      * same bitmap. Probably should allocate in a
+                      * pool and free the whole pool at the end.
+                      */
... or perhaps make the bitmap into

        struct {
                int refcnt;
                uint32_t bits[FLEX_ARRAY];
        }

and refcnt them?
I still prefer memory pools so I just need to do a few free() than
walking through all the commits again and refcnt-- or free() them.
Fair enough.
Sorry to break the patches this way and lose the overall call flow.
It's just too big to put all into one patch. 13/28 is the one that put
the pieces together but basically

 1. receive the remote's .git/shallow
 2. call remote_reachable_shallow_points() to exclude our shallow commits
 3. get the pack and install it (or unpack it)
 4. call this function to determine what new ref needs new shallow
commits from the result of #2
Thanks for a roadmap.  Will find time to re-read the thing with it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help