Git-Raw
view release on metacpan or search on metacpan
deps/libgit2/README.md view on Meta::CPAN
Node.js, or Ruby, then there is probably a
"[language binding](#language-bindings)" that you can use to take care
of the messy tasks of calling into native code.
But if you _do_ want to use libgit2 directly - because you're building
an application in C - then you may be able use an existing binary.
There are packages for the
[vcpkg](https://github.com/Microsoft/vcpkg) and
[conan](https://conan.io/center/libgit2)
package managers. And libgit2 is available in
[Homebrew](https://formulae.brew.sh/formula/libgit2) and most Linux
distributions.
However, these versions _may_ be outdated and we recommend using the
latest version if possible. Thankfully libgit2 is not hard to compile.
Quick Start
===========
**Prerequisites** for building libgit2:
deps/libgit2/deps/zlib/adler32.c view on Meta::CPAN
z_off64_t len2;
{
unsigned long sum1;
unsigned long sum2;
unsigned rem;
/* for negative len, return invalid adler32 as a clue for debugging */
if (len2 < 0)
return 0xffffffffUL;
/* the derivation of this formula is left as an exercise for the reader */
MOD63(len2); /* assumes len2 >= 0 */
rem = (unsigned)len2;
sum1 = adler1 & 0xffff;
sum2 = rem * sum1;
MOD(sum2);
sum1 += (adler2 & 0xffff) + BASE - 1;
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
if (sum1 >= BASE) sum1 -= BASE;
if (sum1 >= BASE) sum1 -= BASE;
if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
( run in 0.614 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )