The wrong value was substracted from delta_cache_size when replacing a cached delta, as trg_entry->delta_size was used after the old size had been replaced by the new size. Noticed by Linus. Signed-off-by: Nicolas Pitre <nico@cam.org> --- On Fri, 7 Dec 2007, Linus Torvalds wrote:Doh! Mea culpa. diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 4f44658..350ece4 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1422,10 +1422,6 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, } } - trg_entry->delta = src_entry; - trg_entry->delta_size = delta_size; - trg->depth = src->depth + 1; - /* * Handle memory allocation outside of the cache * accounting lock. Compiler will optimize the strangeness @@ -1439,7 +1435,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, trg_entry->delta_data = NULL; } if (delta_cacheable(src_size, trg_size, delta_size)) { - delta_cache_size += trg_entry->delta_size; + delta_cache_size += delta_size; cache_unlock(); trg_entry->delta_data = xrealloc(delta_buf, delta_size); } else { @@ -1447,6 +1443,10 @@ static int try_delta(struct unpacked *trg, struct unpacked *src, free(delta_buf); } + trg_entry->delta = src_entry; + trg_entry->delta_size = delta_size; + trg->depth = src->depth + 1; + return 1; } - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Rafael J. Wysocki | [Bug #11207] VolanoMark regression with 2.6.27-rc1 |
| David Miller | [GIT]: Networking |
| Larry Finger | Regression in 2.6.27 caused by commit bfc0f59 |
| Chuck Ebbert | Why do so many machines need "noapic"? |
git: | |
| Alex Riesen | Re: Git Cygwin - unable to create any repository - help! |
| Johan Herland | [PATCH 0/5] Fix 'url.*.insteadOf' for submodule URLs |
| Mike | I don't want the .git directory next to my code. |
| Josh England | cloning/pulling hooks |
| Linux Kernel Mailing List | powerpc/mpc5121: Update device tree for MPC5121ADS evaluation board |
| Linux Kernel Mailing List | powerpc/virtex: Fix booting of Xilinx FPGAs with 16550 for 405 and 440 |
| Linux Kernel Mailing List | x86: add MAP_STACK mmap flag |
| Linux Kernel Mailing List | atmel_lcdfb: don't initialize a pre-allocated framebuffer |
| Alexey Suslikov | OpenBSD 4.2 on Intel Board S3000AHLX + QuadNic EXPI9404PT => couldn't map interrupt |
| Nick Guenther | Re: Real men don't attack straw men |
| Richard Daemon | Nfsen and php problems...? |
| David B. | find -exec {} help |
