mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Adds a new built-in module for Git operations using libgit2 (v1.9.0) statically linked. Initial implementation includes Repository.open(), head(), and Commit properties (id, message, summary, author, committer, time). Designed for local-only operations with lazy initialization to avoid overhead for users who don't need Git functionality. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
815 B
CMake
41 lines
815 B
CMake
register_repository(
|
|
NAME
|
|
libgit2
|
|
REPOSITORY
|
|
libgit2/libgit2
|
|
TAG
|
|
v1.9.0
|
|
)
|
|
|
|
register_cmake_command(
|
|
TARGET
|
|
libgit2
|
|
TARGETS
|
|
libgit2package
|
|
ARGS
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
-DBUILD_SHARED_LIBS=OFF
|
|
-DBUILD_TESTS=OFF
|
|
-DBUILD_CLI=OFF
|
|
-DBUILD_EXAMPLES=OFF
|
|
-DBUILD_FUZZERS=OFF
|
|
# Network disabled - local operations only
|
|
-DUSE_HTTPS=OFF
|
|
-DUSE_SSH=OFF
|
|
# Use bundled dependencies to avoid symbol conflicts with Bun's libraries
|
|
-DUSE_BUNDLED_ZLIB=ON
|
|
-DUSE_HTTP_PARSER=builtin
|
|
-DREGEX_BACKEND=builtin
|
|
-DUSE_SHA1=CollisionDetection
|
|
# Enable threading
|
|
-DUSE_THREADS=ON
|
|
# Disable authentication features (not needed for local operations)
|
|
-DUSE_GSSAPI=OFF
|
|
LIB_PATH
|
|
.
|
|
LIBRARIES
|
|
git2
|
|
INCLUDES
|
|
include
|
|
)
|