Rewrite the Pack backend

The new pack backend is an adaptation of the original git.git code in
`sha1_file.c`. It's slightly faster than the previous version and
severely less memory-hungry.

The call-stack of a normal pack backend query has been properly
documented in the top of the header for future reference. And by
properly I mean with ASCII diagrams 'n shit.
This commit is contained in:
Vicent Marti 2011-03-10 01:06:24 +02:00
parent 71db842fac
commit 58d06cf120
2 changed files with 1246 additions and 1046 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,8 @@
#define INCLUDE_util_h__
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define bitsizeof(x) (CHAR_BIT * sizeof(x))
#define MSB(x, bits) ((x) & (~0ULL << (bitsizeof(x) - (bits))))
/*
* Don't wrap malloc/calloc.