Re: git: how the pack-objects.c find the object's delta

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I can't say from a first glance. Maybe git@vger can help?

On Sun, Mar 17, 2013 at 10:08 PM, 方栋 <fangdong@xxxxxxxxx> wrote:
> hello
>
> i don't understand this:
> src in builtin/pack-objects.c  find_deltas() function, line 1800:
>
>
> static void find_deltas(struct object_entry **list, unsigned *list_size,
>             int window, int depth, unsigned *processed)
> {
>         ......
>
>         /*
>          * Move the best delta base up in the window, after the
>          * currently deltified object, to keep it longer.  It will
>          * be the first base object to be attempted next.
>          */
>         if (entry->delta) {
>             struct unpacked swap = array[best_base];
>             int dist = (window + idx - best_base) % window;
>             int dst = best_base;
>             while (dist--) {
>                 int src = (dst + 1) % window;
>                 array[dst] = array[src];
>                 dst = src;
>             }
>             array[dst] = swap;
>         }
>         ......
> }
>
> what this code block use for?
>
> thx
>
>
>
>
> ------------------
> 祝好
> --方(tyut)
>



-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]