ExGitEngine.Application (ex_git_engine v0.15.0)

Copy Markdown

Starts ExGitEngine.JobLimiter, which ExGitEngine.GitAgent uses for its long operations, and writes the git config that limits a pack build's memory.

libgit2 reads pack.windowMemory and pack.deltaCacheSize only from config, so the pack build adds this file to its own repository handle (ExGitEngine.Git.config_add_file/2). The defaults are overridden with the :pack_window_memory and :pack_delta_cache_size app env, in bytes. pack.deltaCacheSize also sets the size above which libgit2 skips delta compression of an object (pack-objects.c reads that key for both).

It also sets libgit2's process-wide limits on cached objects (:cache_max_size, libgit2's default is 256 MB) and on mapped pack data (:mapped_limit, :mapped_window_size), in bytes.

Summary

Functions

Returns the path of the git config file with the pack memory limits.

Returns the directory for pack temp files.

Functions

pack_config_path()

@spec pack_config_path() :: Path.t()

Returns the path of the git config file with the pack memory limits.

pack_tmp_dir()

@spec pack_tmp_dir() :: Path.t()

Returns the directory for pack temp files.