libgit2

git_reference_packall

Version:

Pack all the loose references in the repository

This method will load into the cache all the loose references on the repository and update the packed-refs file with them.

Once the packed-refs file has been written properly, the loose references will be removed from disk.

WARNING: calling this method may invalidate any existing references previously loaded on the cache.

Signature

int git_reference_packall(git_repository *repo);

Parameters

In
repo

Repository where the loose refs will be packed

Returns

int

0 on success; error code otherwise

Versions