Update upstream source from tag 'upstream/1.1.0+dfsg.1'

Update to upstream version '1.1.0+dfsg.1'
with Debian dir 55ab4a7303
This commit is contained in:
Utkarsh Gupta 2020-12-07 04:06:46 +05:30
commit 07f2212cf5
690 changed files with 4700 additions and 1879 deletions

244
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,244 @@
# Continuous integration and pull request validation builds for the
# master and maintenance branches.
name: CI Build
on:
push:
branches: [ master, maint/* ]
pull_request:
branches: [ master, maint/* ]
env:
docker-registry: docker.pkg.github.com
docker-config-path: azure-pipelines/docker
jobs:
# Build the docker container images that we will use for our Linux
# builds. This will identify the last commit to the repository that
# updated the docker images, and try to download the image tagged with
# that sha. If it does not exist, we'll do a docker build and push
# the image up to GitHub Packages for the actual CI/CD runs. We tag
# with both the sha and "latest" so that the subsequent runs need not
# know the sha. Only do this on CI builds (when the event is a "push")
# because PR builds from forks lack permission to write packages.
build_containers:
name: Create docker image
strategy:
matrix:
container:
- xenial
- bionic
- focal
- docurium
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
if: github.event_name == 'push'
- name: Download existing container
run: azure-pipelines/getcontainer.sh ${{ env.docker-config-path }}/${{ matrix.container }}
env:
DOCKER_REGISTRY: ${{ env.docker-registry }}
GITHUB_TOKEN: ${{ secrets.github_token }}
if: github.event_name == 'push'
- name: Build and publish image
run: |
docker build -t ${{ env.docker-registry-container-sha }} --build-arg BASE=${{ matrix.container.base }} -f ${{ matrix.container }} .
docker push ${{ env.docker-registry-container-sha }}
working-directory: ${{ env.docker-config-path }}
if: github.event_name == 'push' && env.docker-container-exists != 'true'
# Run our CI/CD builds. We build a matrix with the various build targets
# and their details. Then we build either in a docker container (Linux)
# or on the actual hosts (macOS, Windows).
build:
name: Build
needs: [build_containers]
strategy:
matrix:
platform:
- # Xenial, GCC, OpenSSL
image: xenial
env:
CC: gcc
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
os: ubuntu-latest
- # Xenial, GCC, mbedTLS
image: xenial
env:
CC: gcc
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
os: ubuntu-latest
- # Xenial, Clang, OpenSSL
image: xenial
env:
CC: clang
CMAKE_GENERATOR: Ninja
CMAKE_OPTIONS: -DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
os: ubuntu-latest
- # Xenial, Clang, mbedTLS
image: xenial
env:
CC: clang
CMAKE_OPTIONS: -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind -DUSE_GSSAPI=ON
CMAKE_GENERATOR: Ninja
os: ubuntu-latest
- # Focal, Clang 10, mbedTLS, MemorySanitizer
image: focal
env:
CC: clang-10
CFLAGS: -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer
CMAKE_OPTIONS: -DCMAKE_PREFIX_PATH=/usr/local/msan -DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
CMAKE_GENERATOR: Ninja
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
os: ubuntu-latest
- # Focal, Clang 10, OpenSSL, UndefinedBehaviorSanitizer
image: focal
env:
CC: clang-10
CFLAGS: -fsanitize=undefined,nullability -fno-sanitize-recover=undefined,nullability -fsanitize-blacklist=/home/libgit2/source/script/sanitizers.supp -fno-optimize-sibling-calls -fno-omit-frame-pointer
CMAKE_OPTIONS: -DCMAKE_PREFIX_PATH=/usr/local -DUSE_HTTPS=OpenSSL -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
CMAKE_GENERATOR: Ninja
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
ASAN_SYMBOLIZER_PATH: /usr/bin/llvm-symbolizer-10
os: ubuntu-latest
- # macOS
os: macos-10.15
env:
CC: clang
CMAKE_OPTIONS: -DREGEX_BACKEND=regcomp_l -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=leaks -DUSE_GSSAPI=ON
CMAKE_GENERATOR: Ninja
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
setup-script: osx
- # Windows amd64 Visual Studio
os: windows-2019
env:
ARCH: amd64
CMAKE_GENERATOR: Visual Studio 16 2019
CMAKE_OPTIONS: -A x64 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- # Windows x86 Visual Studio
os: windows-2019
env:
ARCH: x86
CMAKE_GENERATOR: Visual Studio 16 2019
CMAKE_OPTIONS: -A Win32 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- # Windows amd64 mingw
os: windows-2019
setup-script: mingw
env:
ARCH: amd64
CMAKE_GENERATOR: MinGW Makefiles
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
BUILD_TEMP: D:\Temp
BUILD_PATH: D:\Temp\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- # Windows x86 mingw
os: windows-2019
setup-script: mingw
env:
ARCH: x86
CMAKE_GENERATOR: MinGW Makefiles
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
BUILD_TEMP: D:\Temp
BUILD_PATH: D:\Temp\mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\CMake\bin
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
fail-fast: false
env: ${{ matrix.platform.env }}
runs-on: ${{ matrix.platform.os }}
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up build environment
run: azure-pipelines/setup-${{ matrix.platform.setup-script }}.sh
shell: bash
if: matrix.platform.setup-script != ''
- name: Download container
run: azure-pipelines/getcontainer.sh ${{ env.docker-config-path }}/${{ matrix.platform.image }}
env:
DOCKER_REGISTRY: ${{ env.docker-registry }}
GITHUB_TOKEN: ${{ secrets.github_token }}
if: matrix.platform.image != ''
- name: Create container
run: docker build -t ${{ env.docker-registry-container-sha }} -f ${{ matrix.platform.image }} .
working-directory: ${{ env.docker-config-path }}
if: matrix.platform.image != '' && env.docker-container-exists != 'true'
- name: Build and test
run: |
export GITTEST_NEGOTIATE_PASSWORD="${{ secrets.GITTEST_NEGOTIATE_PASSWORD }}"
if [ -n "${{ matrix.platform.image }}" ]; then
docker run \
--rm \
-v "$(pwd):/home/libgit2/source" \
-w /home/libgit2/source \
-e ASAN_SYMBOLIZER_PATH \
-e CC \
-e CFLAGS \
-e CMAKE_GENERATOR \
-e CMAKE_OPTIONS \
-e GITTEST_NEGOTIATE_PASSWORD \
-e PKG_CONFIG_PATH \
-e SKIP_NEGOTIATE_TESTS \
-e SKIP_SSH_TESTS \
${{ env.docker-registry-container-sha }} \
/bin/bash -c "mkdir build && cd build && ../azure-pipelines/build.sh && ../azure-pipelines/test.sh"
else
mkdir build && cd build
../azure-pipelines/build.sh
../azure-pipelines/test.sh
fi
shell: bash
# Generate documentation using docurium. We'll upload the documentation
# as a build artifact so that it can be reviewed as part of a pull
# request or in a forked build. For CI builds in the main repository's
# master branch, we'll push the gh-pages branch back up so that it is
# published to our documentation site.
documentation:
name: Generate documentation
needs: [build_containers]
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate documentation
run: |
git config user.name 'Documentation Generation'
git config user.email 'libgit2@users.noreply.github.com'
git branch gh-pages origin/gh-pages
docker login https://${{ env.docker-registry }} -u ${{ github.actor }} -p ${{ github.token }}
docker run \
--rm \
-v "$(pwd):/home/libgit2/source" \
-w /home/libgit2/source \
${{ env.docker-registry }}/${{ github.repository }}/docurium:latest \
cm doc api.docurium
git checkout gh-pages
zip --exclude .git/\* --exclude .gitignore --exclude .gitattributes -r api-documentation.zip .
- uses: actions/upload-artifact@v2
name: Upload artifact
with:
name: api-documentation
path: api-documentation.zip
- name: Push documentation branch
run: git push origin gh-pages
if: github.event_name == 'push' && github.repository == 'libgit2/libgit2'

30
.gitignore vendored
View File

@ -1,37 +1,7 @@
/tests/clar.suite
/tests/clar.suite.rule
/tests/.clarcache
/apidocs
/trash-*.exe
/libgit2.pc
/config.mak
*.o
*.a
*.exe
*.gcda
*.gcno
*.gcov
.lock-wafbuild
.waf*
build/
build-amiga/
tests/tmp/
msvc/Debug/
msvc/Release/
*.sln
*.suo
*.vc*proj*
*.sdf
*.opensdf
*.aps
*.cmake
!cmake/Modules/*.cmake
.DS_Store
*~
.*.swp
tags
mkmf.log
*.profdata
*.profraw
CMakeSettings.json
.vs

View File

@ -11,21 +11,12 @@
# Install:
# > cmake --build . --target install
PROJECT(libgit2 C)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5.1)
CMAKE_POLICY(SET CMP0015 NEW)
IF(POLICY CMP0051)
CMAKE_POLICY(SET CMP0051 NEW)
ENDIF()
IF(POLICY CMP0042)
CMAKE_POLICY(SET CMP0042 NEW)
ENDIF()
IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 NEW)
ENDIF()
project(libgit2 VERSION "1.1.0" LANGUAGES C)
# Add find modules to the path
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${libgit2_SOURCE_DIR}/cmake/")
INCLUDE(CheckLibraryExists)
INCLUDE(CheckFunctionExists)
@ -49,8 +40,6 @@ OPTION(THREADSAFE "Build libgit2 as threadsafe" ON)
OPTION(BUILD_CLAR "Build Tests using the Clar suite" ON)
OPTION(BUILD_EXAMPLES "Build library usage example apps" OFF)
OPTION(BUILD_FUZZERS "Build the fuzz targets" OFF)
OPTION(TAGS "Generate tags" OFF)
OPTION(PROFILE "Generate profiling information" OFF)
OPTION(ENABLE_TRACE "Enables tracing support" ON)
OPTION(LIBGIT2_FILENAME "Name of the produced binary" OFF)
OPTION(USE_SSH "Link with libssh2 to enable SSH support" ON)
@ -104,16 +93,6 @@ IF(MSVC)
OPTION(MSVC_CRTDBG "Enable CRTDBG memory leak reporting" OFF)
ENDIF()
FILE(STRINGS "${libgit2_SOURCE_DIR}/include/git2/version.h" GIT2_HEADER REGEX "^#define LIBGIT2_VERSION \"[^\"]*\"$")
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"([0-9]+).*$" "\\1" LIBGIT2_VERSION_MAJOR "${GIT2_HEADER}")
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_MINOR "${GIT2_HEADER}")
STRING(REGEX REPLACE "^.*LIBGIT2_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" LIBGIT2_VERSION_REV "${GIT2_HEADER}")
SET(LIBGIT2_VERSION_STRING "${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}.${LIBGIT2_VERSION_REV}")
FILE(STRINGS "${libgit2_SOURCE_DIR}/include/git2/version.h" GIT2_HEADER_SOVERSION REGEX "^#define LIBGIT2_SOVERSION \"([0-9.]+)\"$")
STRING(REGEX REPLACE "^.*LIBGIT2_SOVERSION \"([0-9.]+)\"$" "\\1" LIBGIT2_SOVERSION "${GIT2_HEADER_SOVERSION}")
IF (DEPRECATE_HARD)
ADD_DEFINITIONS(-DGIT_DEPRECATE_HARD)
ENDIF()
@ -137,6 +116,11 @@ IF (MSVC)
# /Gd - explicitly set cdecl calling convention
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gd")
IF (NOT (MSVC_VERSION LESS 1900))
# /guard:cf - Enable Control Flow Guard
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /guard:cf")
ENDIF()
IF (STATIC_CRT)
SET(CRT_FLAG_DEBUG "/MTd")
SET(CRT_FLAG_RELEASE "/MT")
@ -181,7 +165,12 @@ IF (MSVC)
# /NXCOMPAT - Data execution prevention (DEP)
# /LARGEADDRESSAWARE - >2GB user address space on x86
# /VERSION - Embed version information in PE header
SET(CMAKE_EXE_LINKER_FLAGS "/DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /VERSION:${LIBGIT2_VERSION_MAJOR}.${LIBGIT2_VERSION_MINOR}")
SET(CMAKE_EXE_LINKER_FLAGS "/DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /VERSION:${libgit2_VERSION_MAJOR}.${libgit2_VERSION_MINOR}")
IF (NOT (MSVC_VERSION LESS 1900))
# /GUARD:CF - Enable Control Flow Guard
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /GUARD:CF")
ENDIF()
# /DEBUG - Create a PDB
# /LTCG - Link time code generation (whole program optimization)
@ -232,35 +221,27 @@ ELSE ()
ADD_DEFINITIONS(-D__USE_MINGW_ANSI_STDIO=1)
ENDIF ()
ENABLE_WARNINGS(documentation)
DISABLE_WARNINGS(missing-field-initializers)
ENABLE_WARNINGS(strict-aliasing)
ENABLE_WARNINGS(strict-prototypes)
ENABLE_WARNINGS(declaration-after-statement)
ENABLE_WARNINGS(shift-count-overflow)
ENABLE_WARNINGS(unused-const-variable)
ENABLE_WARNINGS(unused-function)
ENABLE_WARNINGS(int-conversion)
enable_warnings(documentation)
disable_warnings(documentation-deprecated-sync)
disable_warnings(missing-field-initializers)
enable_warnings(strict-aliasing)
enable_warnings(strict-prototypes)
enable_warnings(declaration-after-statement)
enable_warnings(shift-count-overflow)
enable_warnings(unused-const-variable)
enable_warnings(unused-function)
enable_warnings(int-conversion)
# MinGW uses gcc, which expects POSIX formatting for printf, but
# uses the Windows C library, which uses its own format specifiers.
# Disable format specifier warnings.
IF(MINGW)
DISABLE_WARNINGS(format)
DISABLE_WARNINGS(format-security)
ELSE()
ENABLE_WARNINGS(format)
ENABLE_WARNINGS(format-security)
ENDIF()
IF("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
DISABLE_WARNINGS(documentation-deprecated-sync)
ENDIF()
IF (PROFILE)
SET(CMAKE_C_FLAGS "-pg ${CMAKE_C_FLAGS}")
SET(CMAKE_EXE_LINKER_FLAGS "-pg ${CMAKE_EXE_LINKER_FLAGS}")
ENDIF ()
if(MINGW)
disable_warnings(format)
disable_warnings(format-security)
else()
enable_warnings(format)
enable_warnings(format-security)
endif()
ENDIF()
# Ensure that MinGW provides the correct header files.
@ -300,25 +281,6 @@ IF (BUILD_CLAR)
ADD_SUBDIRECTORY(tests)
ENDIF ()
IF (TAGS)
FIND_PROGRAM(CTAGS ctags)
IF (NOT CTAGS)
MESSAGE(FATAL_ERROR "Could not find ctags command")
ENDIF ()
FILE(GLOB_RECURSE SRC_ALL *.[ch])
ADD_CUSTOM_COMMAND(
OUTPUT tags
COMMAND ${CTAGS} -a ${SRC_ALL}
DEPENDS ${SRC_ALL}
)
ADD_CUSTOM_TARGET(
do_tags ALL
DEPENDS tags
)
ENDIF ()
IF (BUILD_EXAMPLES)
ADD_SUBDIRECTORY(examples)
ENDIF ()

View File

@ -4,7 +4,7 @@ libgit2 - the Git linkable library
| Build Status | |
| ------------ | - |
| **master** branch CI builds | [![Azure Pipelines Build Status](https://dev.azure.com/libgit2/libgit2/_apis/build/status/libgit2?branchName=master)](https://dev.azure.com/libgit2/libgit2/_build/latest?definitionId=7&branchName=master) |
| **v0.99 branch** CI builds | [![Azure Pipelines Build Status](https://dev.azure.com/libgit2/libgit2/_apis/build/status/libgit2?branchName=maint/v0.99)](https://dev.azure.com/libgit2/libgit2/_build/latest?definitionId=7&branchName=maint/v0.99) |
| **v1.0 branch** CI builds | [![Azure Pipelines Build Status](https://dev.azure.com/libgit2/libgit2/_apis/build/status/libgit2?branchName=maint/v1.0)](https://dev.azure.com/libgit2/libgit2/_build/latest?definitionId=7&branchName=maint/v1.0) |
| **v0.28 branch** CI builds | [![Azure Pipelines Build Status](https://dev.azure.com/libgit2/libgit2/_apis/build/status/libgit2?branchName=maint/v0.28)](https://dev.azure.com/libgit2/libgit2/_build/latest?definitionId=7&branchName=maint/v0.28) |
| **Nightly** builds | [![Azure Pipelines Build Status](https://libgit2.visualstudio.com/libgit2/_apis/build/status/nightly?branchName=master&label=Full+Build)](https://libgit2.visualstudio.com/libgit2/_build/latest?definitionId=9&branchName=master) [![Coverity Build Status](https://dev.azure.com/libgit2/libgit2/_apis/build/status/coverity?branchName=master&label=Coverity+Build)](https://dev.azure.com/libgit2/libgit2/_build/latest?definitionId=21?branchName=master) [![Coverity Scan Build Status](https://scan.coverity.com/projects/639/badge.svg)](https://scan.coverity.com/projects/639) |
@ -47,6 +47,7 @@ Table of Contents
* [Compiler and linker options](#compiler-and-linker-options)
* [MacOS X](#macos-x)
* [Android](#android)
* [MinGW](#mingw)
* [Language Bindings](#language-bindings)
* [How Can I Contribute?](#how-can-i-contribute)
* [License](#license)
@ -304,6 +305,20 @@ with full path to the toolchain):
Add `-DCMAKE_TOOLCHAIN_FILE={pathToToolchainFile}` to cmake command
when configuring.
MinGW
-----
If you want to build the library in MinGW environment with SSH support enabled,
you may need to pass `-DCMAKE_LIBRARY_PATH="${MINGW_PREFIX}/${MINGW_CHOST}/lib/"` flag
to CMake when configuring. This is because CMake cannot find the Win32 libraries in
MinGW folders by default and you might see an error message stating that CMake
could not resolve `ws2_32` library during configuration.
Another option would be to install `msys2-w32api-runtime` package before configuring.
This package installs the Win32 libraries into `/usr/lib` folder which is by default
recognized as the library path by CMake. Please note though that this package is meant
for MSYS subsystem which is different from MinGW.
Language Bindings
==================================

View File

@ -96,7 +96,7 @@ jobs:
parameters:
environmentVariables:
CMAKE_GENERATOR: Visual Studio 15 2017
CMAKE_OPTIONS: -A x64 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON
CMAKE_OPTIONS: -A x64 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_BUNDLED_ZLIB=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
@ -109,7 +109,7 @@ jobs:
parameters:
environmentVariables:
CMAKE_GENERATOR: Visual Studio 15 2017
CMAKE_OPTIONS: -A Win32 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS
CMAKE_OPTIONS: -A Win32 -DMSVC_CRTDBG=ON -DDEPRECATE_HARD=ON -DUSE_SHA1=HTTPS -DUSE_BUNDLED_ZLIB=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
@ -151,40 +151,3 @@ jobs:
CMAKE_OPTIONS: -DDEPRECATE_HARD=ON
SKIP_SSH_TESTS: true
SKIP_NEGOTIATE_TESTS: true
- job: documentation
displayName: 'Generate Documentation'
pool:
vmImage: 'ubuntu-18.04'
steps:
- script: |
cd $(Build.SourcesDirectory)/azure-pipelines/docker
docker build -t libgit2/docurium --build-arg BASE=ubuntu:trusty -f docurium .
displayName: 'Build Docker image'
- script: |
git config user.name 'Documentation Generation'
git config user.email 'libgit2@users.noreply.github.com'
git branch gh-pages origin/gh-pages
docker run --rm -v $(Build.SourcesDirectory):/home/libgit2/source -w /home/libgit2/source libgit2/docurium:latest cm doc api.docurium
git checkout gh-pages
cp -R * '$(Build.BinariesDirectory)'
displayName: 'Generate Documentation'
- task: archivefiles@2
displayName: 'Archive Documentation'
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)'
includeRootFolder: false
archiveFile: '$(Build.ArtifactStagingDirectory)/api-documentation.zip'
- task: publishbuildartifacts@1
displayName: 'Upload Documentation Artifact'
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'docs'
- script: |
git remote -v
echo 'machine github.com' > ~/.netrc
echo 'login $(GITHUB_USERNAME)' >> ~/.netrc
echo 'password $(GITHUB_PAT)' >> ~/.netrc
git push origin gh-pages
displayName: 'Publish Documentation'
condition: and(eq(variables['Build.Repository.Name'], 'libgit2/libgit2'), eq(variables['Build.Reason'], 'IndividualCI'))

View File

@ -13,6 +13,10 @@ BUILD_PATH=${BUILD_PATH:=$PATH}
CMAKE=$(which cmake)
CMAKE_GENERATOR=${CMAKE_GENERATOR:-Unix Makefiles}
if [[ "$(uname -s)" == MINGW* ]]; then
BUILD_PATH=$(cygpath "$BUILD_PATH")
fi
indent() { sed "s/^/ /"; }
echo "Source directory: ${SOURCE_DIR}"
@ -33,11 +37,18 @@ echo "Kernel version:"
uname -a 2>&1 | indent
echo "CMake version:"
env PATH="$BUILD_PATH" "$CMAKE" --version 2>&1 | indent
env PATH="${BUILD_PATH}" "${CMAKE}" --version 2>&1 | indent
if test -n "$CC"; then
if test -n "${CC}"; then
echo "Compiler version:"
"$CC" --version 2>&1 | indent
"${CC}" --version 2>&1 | indent
fi
echo "Environment:"
if test -n "${CC}"; then
echo "CC=${CC}" | indent
fi
if test -n "${CFLAGS}"; then
echo "CFLAGS=${CFLAGS}" | indent
fi
echo ""
@ -45,12 +56,12 @@ echo "##########################################################################
echo "## Configuring build environment"
echo "##############################################################################"
echo cmake ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS}
env PATH="$BUILD_PATH" "$CMAKE" ${SOURCE_DIR} -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_OPTIONS}
echo cmake -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G \"${CMAKE_GENERATOR}\" ${CMAKE_OPTIONS} -S \"${SOURCE_DIR}\"
env PATH="${BUILD_PATH}" "${CMAKE}" -DENABLE_WERROR=ON -DBUILD_EXAMPLES=ON -DBUILD_FUZZERS=ON -DUSE_STANDALONE_FUZZERS=ON -G "${CMAKE_GENERATOR}" ${CMAKE_OPTIONS} -S "${SOURCE_DIR}"
echo ""
echo "##############################################################################"
echo "## Building libgit2"
echo "##############################################################################"
env PATH="$BUILD_PATH" "$CMAKE" --build .
env PATH="${BUILD_PATH}" "${CMAKE}" --build .

View File

@ -1,5 +1,4 @@
ARG BASE
FROM $BASE AS apt
FROM ubuntu:bionic AS apt
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
clang \

View File

@ -0,0 +1,79 @@
FROM ubuntu:focal AS apt
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bzip2 \
clang-10 \
cmake \
curl \
gcc-10 \
git \
krb5-user \
libcurl4-gnutls-dev \
libgcrypt20-dev \
libkrb5-dev \
libpcre3-dev \
libssl-dev \
libz-dev \
llvm-10 \
make \
ninja-build \
openjdk-8-jre-headless \
openssh-server \
openssl \
pkgconf \
python \
sudo \
valgrind \
&& \
rm -rf /var/lib/apt/lists/* && \
mkdir /usr/local/msan
FROM apt AS mbedtls
RUN cd /tmp && \
curl --location --silent --show-error https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz | \
tar -xz && \
cd mbedtls-2.16.2 && \
scripts/config.pl unset MBEDTLS_AESNI_C && \
scripts/config.pl set MBEDTLS_MD4_C 1 && \
mkdir build build-msan && \
cd build && \
CC=clang-10 CFLAGS="-fPIC" cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
ninja install && \
cd ../build-msan && \
CC=clang-10 CFLAGS="-fPIC" cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF -DCMAKE_BUILD_TYPE=MemSanDbg -DCMAKE_INSTALL_PREFIX=/usr/local/msan .. && \
ninja install && \
cd .. && \
rm -rf mbedtls-2.16.2
FROM mbedtls AS libssh2
RUN cd /tmp && \
curl --insecure --location --silent --show-error https://www.libssh2.org/download/libssh2-1.8.2.tar.gz | \
tar -xz && \
cd libssh2-1.8.2 && \
mkdir build build-msan && \
cd build && \
CC=clang-10 CFLAGS="-fPIC" cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=Libgcrypt -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local .. && \
ninja install && \
cd ../build-msan && \
CC=clang-10 CFLAGS="-fPIC -fsanitize=memory -fno-optimize-sibling-calls -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer" LDFLAGS="-fsanitize=memory" cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=mbedTLS -DCMAKE_PREFIX_PATH=/usr/local/msan -DCMAKE_INSTALL_PREFIX=/usr/local/msan .. && \
ninja install && \
cd .. && \
rm -rf libssh2-1.8.2
FROM libssh2 AS valgrind
RUN cd /tmp && \
curl --insecure --location --silent --show-error https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2 | \
tar -xj && \
cd valgrind-3.15.0 && \
CC=clang-10 ./configure && \
make MAKEFLAGS="-j -l$(grep -c ^processor /proc/cpuinfo)" && \
make install && \
cd .. && \
rm -rf valgrind-3.15.0
FROM valgrind AS configure
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod a+x /usr/local/bin/entrypoint.sh
RUN mkdir /var/run/sshd
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@ -1,5 +1,4 @@
ARG BASE
FROM $BASE AS apt
FROM ubuntu:xenial AS apt
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bzip2 \

45
azure-pipelines/getcontainer.sh Executable file
View File

@ -0,0 +1,45 @@
#!/bin/bash
set -e
DOCKERFILE_PATH=$1
if [ "${DOCKERFILE_PATH}" = "" ]; then
echo "usage: $0 dockerfile"
exit 1
fi
if [ "${DOCKER_REGISTRY}" = "" ]; then
echo "DOCKER_REGISTRY environment variable is unset."
echo "Not running inside GitHub Actions or misconfigured?"
exit 1
fi
DOCKER_CONTAINER="${GITHUB_REPOSITORY}/$(basename ${DOCKERFILE_PATH})"
DOCKER_REGISTRY_CONTAINER="${DOCKER_REGISTRY}/${DOCKER_CONTAINER}"
echo "::set-env name=docker-container::${DOCKER_CONTAINER}"
echo "::set-env name=docker-registry-container::${DOCKER_REGISTRY_CONTAINER}"
# Identify the last git commit that touched the Dockerfiles
# Use this as a hash to identify the resulting docker containers
DOCKER_SHA=$(git log -1 --pretty=format:"%h" -- "${DOCKERFILE_PATH}")
echo "::set-env name=docker-sha::${DOCKER_SHA}"
DOCKER_REGISTRY_CONTAINER_SHA="${DOCKER_REGISTRY_CONTAINER}:${DOCKER_SHA}"
echo "::set-env name=docker-registry-container-sha::${DOCKER_REGISTRY_CONTAINER_SHA}"
echo "::set-env name=docker-registry-container-latest::${DOCKER_REGISTRY_CONTAINER}:latest"
exists="true"
docker login https://${DOCKER_REGISTRY} -u ${GITHUB_ACTOR} -p ${GITHUB_TOKEN} || exists="false"
if [ "${exists}" != "false" ]; then
docker pull ${DOCKER_REGISTRY_CONTAINER_SHA} || exists="false"
fi
if [ "${exists}" = "true" ]; then
echo "::set-env name=docker-container-exists::true"
else
echo "::set-env name=docker-container-exists::false"
fi

View File

@ -4,6 +4,9 @@ echo "##########################################################################
echo "## Downloading mingw"
echo "##############################################################################"
BUILD_TEMP=${BUILD_TEMP:=$TEMP}
BUILD_TEMP=$(cygpath $BUILD_TEMP)
case "$ARCH" in
amd64)
MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-x86_64-8.1.0-release-win32-seh-rt_v6-rev0.zip";;
@ -11,5 +14,12 @@ case "$ARCH" in
MINGW_URI="https://bintray.com/libgit2/build-dependencies/download_file?file_path=mingw-w64-i686-8.1.0-release-win32-sjlj-rt_v6-rev0.zip";;
esac
curl -s -L "$MINGW_URI" -o "$TEMP"/mingw-"$ARCH".zip
unzip -q "$TEMP"/mingw-"$ARCH".zip -d "$TEMP"
if [ -z "$MINGW_URI" ]; then
echo "No URL"
exit 1
fi
mkdir -p "$BUILD_TEMP"
curl -s -L "$MINGW_URI" -o "$BUILD_TEMP"/mingw-"$ARCH".zip
unzip -q "$BUILD_TEMP"/mingw-"$ARCH".zip -d "$BUILD_TEMP"

View File

@ -1,29 +0,0 @@
@CHECK_PROTOTYPE_DEFINITION_HEADER@
static void cmakeRequireSymbol(int dummy, ...) {
(void) dummy;
}
static void checkSymbol(void) {
#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
#endif
}
@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
}
#ifdef __CLASSIC_C__
int main() {
int ac;
char*av[];
#else
int main(int ac, char *av[]) {
#endif
checkSymbol();
if (ac > 1000) {
return *av[0];
}
return 0;
}

View File

@ -1,96 +0,0 @@
# - Check if the protoype we expect is correct.
# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
# FUNCTION - The name of the function (used to check if prototype exists)
# PROTOTYPE- The prototype to check.
# RETURN - The return value of the function.
# HEADER - The header files required.
# VARIABLE - The variable to store the result.
# Example:
# check_prototype_definition(getpwent_r
# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
# "NULL"
# "unistd.h;pwd.h"
# SOLARIS_GETPWENT_R)
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
if (CMAKE_REQUIRED_LIBRARIES)
set(CHECK_PROTOTYPE_DEFINITION_LIBS
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
else(CMAKE_REQUIRED_LIBRARIES)
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
endif(CMAKE_REQUIRED_LIBRARIES)
if (CMAKE_REQUIRED_INCLUDES)
set(CMAKE_SYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else(CMAKE_REQUIRED_INCLUDES)
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
endif(CMAKE_REQUIRED_INCLUDES)
foreach(_FILE ${_HEADER})
set(CHECK_PROTOTYPE_DEFINITION_HEADER
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
endforeach(_FILE)
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
try_compile(${_VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
"${CHECK_PROTOTYPE_DEFINITION_LIBS}"
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
if (${_VARIABLE})
set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
"${OUTPUT}\n\n")
else (${_VARIABLE})
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
"${OUTPUT}\n\n${_SOURCE}\n\n")
endif (${_VARIABLE})
endif("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
endfunction(CHECK_PROTOTYPE_DEFINITION)

View File

@ -1,35 +1,27 @@
# Select the backend to use
# We try to find any packages our backends might use
INCLUDE(SanitizeBool)
# We try to find any packages our backends might use
FIND_PACKAGE(GSSAPI)
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
INCLUDE(FindGSSFramework)
ENDIF()
# Auto-select GSS backend
SanitizeBool(USE_GSSAPI)
IF (USE_GSSAPI STREQUAL ON)
IF(USE_GSSAPI)
# Auto-select GSS backend
SanitizeBool(USE_GSSAPI)
IF (USE_GSSAPI STREQUAL ON)
IF (GSSFRAMEWORK_FOUND)
SET(GSS_BACKEND "GSS.framework")
SET(USE_GSSAPI "GSS.framework")
ELSEIF(GSSAPI_FOUND)
SET(GSS_BACKEND "gssapi")
SET(USE_GSSAPI "gssapi")
ELSE()
MESSAGE(FATAL_ERROR "Unable to autodetect a usable GSS backend."
"Please pass the backend name explicitly (-DUSE_GSS=backend)")
ENDIF()
ELSEIF(USE_GSSAPI)
# Backend was explicitly set
SET(GSS_BACKEND ${USE_GSSAPI})
ELSE()
SET(GSS_BACKEND NO)
ENDIF()
ENDIF()
IF(GSS_BACKEND)
# Check that we can find what's required for the selected backend
IF (GSS_BACKEND STREQUAL "GSS.framework")
IF (USE_GSSAPI STREQUAL "GSS.framework")
IF (NOT GSSFRAMEWORK_FOUND)
MESSAGE(FATAL_ERROR "Asked for GSS.framework backend, but it wasn't found")
ENDIF()
@ -37,8 +29,8 @@ IF(GSS_BACKEND)
LIST(APPEND LIBGIT2_LIBS ${GSSFRAMEWORK_LIBRARIES})
SET(GIT_GSSFRAMEWORK 1)
ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${GSS_BACKEND})")
ELSEIF (GSS_BACKEND STREQUAL "gssapi")
ADD_FEATURE_INFO(SPNEGO GIT_GSSFRAMEWORK "SPNEGO authentication support (${USE_GSSAPI})")
ELSEIF (USE_GSSAPI STREQUAL "gssapi")
IF (NOT GSSAPI_FOUND)
MESSAGE(FATAL_ERROR "Asked for gssapi GSS backend, but it wasn't found")
ENDIF()
@ -46,9 +38,9 @@ IF(GSS_BACKEND)
LIST(APPEND LIBGIT2_LIBS ${GSSAPI_LIBRARIES})
SET(GIT_GSSAPI 1)
ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${GSS_BACKEND})")
ADD_FEATURE_INFO(SPNEGO GIT_GSSAPI "SPNEGO authentication support (${USE_GSSAPI})")
ELSE()
MESSAGE(FATAL_ERROR "Asked for backend ${GSS_BACKEND} but it wasn't found")
MESSAGE(FATAL_ERROR "Asked for backend ${USE_GSSAPI} but it wasn't found")
ENDIF()
ELSE()
SET(GIT_GSSAPI 0)

View File

@ -1,5 +1,3 @@
# Select the backend to use
INCLUDE(SanitizeBool)
# We try to find any packages our backends might use
@ -10,36 +8,31 @@ IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
FIND_PACKAGE(CoreFoundation)
ENDIF()
# Auto-select TLS backend
SanitizeBool(USE_HTTPS)
IF (USE_HTTPS STREQUAL ON)
IF(USE_HTTPS)
# Auto-select TLS backend
SanitizeBool(USE_HTTPS)
IF (USE_HTTPS STREQUAL ON)
IF (SECURITY_FOUND)
IF (SECURITY_HAS_SSLCREATECONTEXT)
SET(HTTPS_BACKEND "SecureTransport")
SET(USE_HTTPS "SecureTransport")
ELSE()
MESSAGE(STATUS "Security framework is too old, falling back to OpenSSL")
SET(HTTPS_BACKEND "OpenSSL")
SET(USE_HTTPS "OpenSSL")
ENDIF()
ELSEIF (WINHTTP)
SET(HTTPS_BACKEND "WinHTTP")
SET(USE_HTTPS "WinHTTP")
ELSEIF(OPENSSL_FOUND)
SET(HTTPS_BACKEND "OpenSSL")
SET(USE_HTTPS "OpenSSL")
ELSEIF(MBEDTLS_FOUND)
SET(HTTPS_BACKEND "mbedTLS")
SET(USE_HTTPS "mbedTLS")
ELSE()
MESSAGE(FATAL_ERROR "Unable to autodetect a usable HTTPS backend."
"Please pass the backend name explicitly (-DUSE_HTTPS=backend)")
ENDIF()
ELSEIF(USE_HTTPS)
# HTTPS backend was explicitly set
SET(HTTPS_BACKEND ${USE_HTTPS})
ELSE()
SET(HTTPS_BACKEND NO)
ENDIF()
ENDIF()
IF(HTTPS_BACKEND)
# Check that we can find what's required for the selected backend
IF (HTTPS_BACKEND STREQUAL "SecureTransport")
IF (USE_HTTPS STREQUAL "SecureTransport")
IF (NOT COREFOUNDATION_FOUND)
MESSAGE(FATAL_ERROR "Cannot use SecureTransport backend, CoreFoundation.framework not found")
ENDIF()
@ -54,7 +47,7 @@ IF(HTTPS_BACKEND)
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${SECURITY_INCLUDE_DIR})
LIST(APPEND LIBGIT2_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
LIST(APPEND LIBGIT2_PC_LIBS ${COREFOUNDATION_LDFLAGS} ${SECURITY_LDFLAGS})
ELSEIF (HTTPS_BACKEND STREQUAL "OpenSSL")
ELSEIF (USE_HTTPS STREQUAL "OpenSSL")
IF (NOT OPENSSL_FOUND)
MESSAGE(FATAL_ERROR "Asked for OpenSSL TLS backend, but it wasn't found")
ENDIF()
@ -64,7 +57,7 @@ IF(HTTPS_BACKEND)
LIST(APPEND LIBGIT2_LIBS ${OPENSSL_LIBRARIES})
LIST(APPEND LIBGIT2_PC_LIBS ${OPENSSL_LDFLAGS})
LIST(APPEND LIBGIT2_PC_REQUIRES "openssl")
ELSEIF(HTTPS_BACKEND STREQUAL "mbedTLS")
ELSEIF(USE_HTTPS STREQUAL "mbedTLS")
IF (NOT MBEDTLS_FOUND)
MESSAGE(FATAL_ERROR "Asked for mbedTLS backend, but it wasn't found")
ENDIF()
@ -113,14 +106,14 @@ IF(HTTPS_BACKEND)
# https://github.com/ARMmbed/mbedtls/issues/228
# For now, pass its link flags as our own
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
ELSEIF (HTTPS_BACKEND STREQUAL "WinHTTP")
ELSEIF (USE_HTTPS STREQUAL "WinHTTP")
# WinHTTP setup was handled in the WinHTTP-specific block above
ELSE()
MESSAGE(FATAL_ERROR "Asked for backend ${HTTPS_BACKEND} but it wasn't found")
MESSAGE(FATAL_ERROR "Asked for backend ${USE_HTTPS} but it wasn't found")
ENDIF()
SET(GIT_HTTPS 1)
ADD_FEATURE_INFO(HTTPS GIT_HTTPS "using ${HTTPS_BACKEND}")
ADD_FEATURE_INFO(HTTPS GIT_HTTPS "using ${USE_HTTPS}")
ELSE()
SET(GIT_HTTPS 0)
ADD_FEATURE_INFO(HTTPS NO "")

View File

@ -5,37 +5,28 @@ INCLUDE(SanitizeBool)
# USE_SHA1=CollisionDetection(ON)/HTTPS/Generic/OFF
SanitizeBool(USE_SHA1)
IF(USE_SHA1 STREQUAL ON OR USE_SHA1 STREQUAL "CollisionDetection")
SET(SHA1_BACKEND "CollisionDetection")
IF(USE_SHA1 STREQUAL ON)
SET(USE_SHA1 "CollisionDetection")
ELSEIF(USE_SHA1 STREQUAL "HTTPS")
message(STATUS "Checking HTTPS backend… ${HTTPS_BACKEND}")
IF(HTTPS_BACKEND STREQUAL "SecureTransport")
SET(SHA1_BACKEND "CommonCrypto")
ELSEIF(HTTPS_BACKEND STREQUAL "WinHTTP")
SET(SHA1_BACKEND "Win32")
ELSEIF(HTTPS_BACKEND)
SET(SHA1_BACKEND ${HTTPS_BACKEND})
IF(USE_HTTPS STREQUAL "SecureTransport")
SET(USE_SHA1 "CommonCrypto")
ELSEIF(USE_HTTPS STREQUAL "WinHTTP")
SET(USE_SHA1 "Win32")
ELSEIF(USE_HTTPS)
SET(USE_SHA1 ${USE_HTTPS})
ELSE()
SET(USE_SHA1 "CollisionDetection")
ENDIF()
IF(NOT HTTPS_BACKEND)
SET(SHA1_BACKEND "CollisionDetection")
ENDIF()
message(STATUS "Using SHA1 backend ${SHA1_BACKEND}")
ELSEIF(USE_SHA1 STREQUAL "Generic")
SET(SHA1_BACKEND "Generic")
# ELSEIF(NOT USE_SHA1)
ELSE()
MESSAGE(FATAL_ERROR "Invalid value for USE_SHA1: ${USE_SHA1}")
ENDIF()
IF(SHA1_BACKEND STREQUAL "CollisionDetection")
IF(USE_SHA1 STREQUAL "CollisionDetection")
SET(GIT_SHA1_COLLISIONDETECT 1)
ADD_DEFINITIONS(-DSHA1DC_NO_STANDARD_INCLUDES=1)
ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_SHA1_C=\"common.h\")
ADD_DEFINITIONS(-DSHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C=\"common.h\")
FILE(GLOB SRC_SHA1 hash/sha1/collisiondetect.* hash/sha1/sha1dc/*)
ELSEIF(SHA1_BACKEND STREQUAL "OpenSSL")
# OPENSSL_FOUND should already be set, we're checking HTTPS_BACKEND
ELSEIF(USE_SHA1 STREQUAL "OpenSSL")
# OPENSSL_FOUND should already be set, we're checking USE_HTTPS
SET(GIT_SHA1_OPENSSL 1)
IF(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
@ -44,10 +35,10 @@ ELSEIF(SHA1_BACKEND STREQUAL "OpenSSL")
LIST(APPEND LIBGIT2_PC_REQUIRES "openssl")
ENDIF()
FILE(GLOB SRC_SHA1 hash/sha1/openssl.*)
ELSEIF(SHA1_BACKEND STREQUAL "CommonCrypto")
ELSEIF(USE_SHA1 STREQUAL "CommonCrypto")
SET(GIT_SHA1_COMMON_CRYPTO 1)
FILE(GLOB SRC_SHA1 hash/sha1/common_crypto.*)
ELSEIF(SHA1_BACKEND STREQUAL "mbedTLS")
ELSEIF(USE_SHA1 STREQUAL "mbedTLS")
SET(GIT_SHA1_MBEDTLS 1)
FILE(GLOB SRC_SHA1 hash/sha1/mbedtls.*)
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${MBEDTLS_INCLUDE_DIR})
@ -56,14 +47,15 @@ ELSEIF(SHA1_BACKEND STREQUAL "mbedTLS")
# https://github.com/ARMmbed/mbedtls/issues/228
# For now, pass its link flags as our own
LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES})
ELSEIF(SHA1_BACKEND STREQUAL "Win32")
ELSEIF(USE_SHA1 STREQUAL "Win32")
SET(GIT_SHA1_WIN32 1)
FILE(GLOB SRC_SHA1 hash/sha1/win32.*)
ELSEIF(SHA1_BACKEND STREQUAL "Generic")
ELSEIF(USE_SHA1 STREQUAL "Generic")
FILE(GLOB SRC_SHA1 hash/sha1/generic.*)
# ELSEIF(NOT USE_SHA1)
ELSE()
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend: ${SHA1_BACKEND}")
MESSAGE(FATAL_ERROR "Asked for unknown SHA1 backend: ${USE_SHA1}")
ENDIF()
ADD_FEATURE_INFO(SHA ON "using ${SHA1_BACKEND}")
list(SORT SRC_SHA1)
ADD_FEATURE_INFO(SHA ON "using ${USE_SHA1}")

View File

@ -1,3 +1,62 @@
v1.1
----
This is release v1.1, "Fernweh".
### Changes or improvements
* Our bundled PCRE dependency has been updated to 8.44.
* The `refs/remotes/origin/HEAD` file will be created at clone time to
point to the origin's default branch.
* libgit2 now uses the `__atomic_` intrinsics instead of `__sync_`
intrinsics on supported gcc and clang versions.
* The `init.defaultBranch` setting is now respected and `master` is
no longer the hardcoded as the default branch name.
* Patch files that do not contain an `index` line can now be parsed.
* Configuration files with multi-line values can now contain quotes
split across multiple lines.
* Windows clients now attempt to use TLS1.3 when available.
* Servers that request an upgrade to a newer HTTP version are
silently ignored instead of erroneously failing.
* Users can pass `NULL` to the options argument to
`git_describe_commit`.
* Clones and fetches of very large packfiles now succeeds on 32-bit
platforms.
* Custom reference database backends can now handle the repository's
`HEAD` correctly.
* Repositories with a large number of packfiles no longer exhaust the
number of file descriptors.
* The test framework now supports TAP output when the `-t` flag is
specified.
* The test framework can now specify an exact match to a test
function using a trailing `$`.
* All checkout types support `GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH`.
* `git_blame` now can ignore whitespace changes using the option
`GIT_BLAME_IGNORE_WHITESPACE`.
* Several new examples have been created, including an examples for
commit, add and push.
* Mode changes during rename are now supported in patch application.
* `git_checkout_head` now correctly removes untracked files in a
subdirectory when the `FORCE | REMOVE_UNTRACKED` options are specified.
v1.0.1
------

364
docs/coding-style.md Normal file
View File

@ -0,0 +1,364 @@
# libgit2 Coding Style
This documentation describes the preferred coding style for the libgit2 project.
While not all parts of our code base conform to this coding style, the outlined
rules are what we aim for.
Note that in no case do we accept changes that convert huge parts of the code
base to use our coding style. Instead, it is encouraged to modernize small parts
of code you're going to modify anyway for a given change you want to introduce.
A good rule to follow is the Boy Scout Rule: "Leave the campground cleaner than
you found it."
## C Coding Style
The following sections define the coding style for all code files and headers.
### Indentation and Alignment
Code is indented by tabs, where a tab is 8 spaces. Each opening scope increases
the indentation level.
```c
int foobar(int void)
{
if (condition)
doit();
/* Body */
}
```
Switch statements have their `case`s aligned with the `switch` keyword. Case
bodies are indented by an additional level. Case bodies should not open their
own scope to declare variables.
```c
switch (c) {
case 'a':
case 'b':
return 0;
default:
return -1;
}
```
Multi-line conditions should be aligned with the opening brace of the current
statement:
```c
if (one_very_long_condition(c) &&
another_very_long_condition(c))
doit();
```
### Spaces
There must be no space between the function and its arguments, arguments must be
separated by a space:
```c
int doit(int first_arg, int second_arg);
doit(1, 2);
```
For any binary or ternary operators, the arguments and separator must be
separated by a space:
```c
1 + 2;
x ? x : NULL;
```
Unary operators do not have a space between them and the argument they refer to:
```c
*c
&c
```
The `sizeof` operator always must not have a space and must use braces around
the type:
```
sizeof(int)
```
There must be a space after the keywords `if`, `switch`, `case`, `do` and
`while`.
### Braces
Functions must have their opening brace on the following line:
```c
void foobar(void)
{
doit();
}
```
For conditions, braces should be placed on the same line as the condition:
```c
if (condition(c)) {
doit();
dothat();
}
while (true) {
doit();
}
```
In case a condition's body has a single line, only, it's allowed to omit braces,
except if any of its `else if` or `else` branches has more than one line:
```c
if (condition(c))
doit();
if (condition(c))
doit();
else if (other_condition(c))
doit();
/* This example must use braces as the `else if` requires them. */
if (condition(c)) {
doit();
} else if (other_condition(c)) {
doit();
dothat();
} else {
abort();
}
```
### Comments
Comments must use C-style `/* */` comments. C++-style `// `comments are not
allowed in our codebase. This is a strict requirement as libgit2 tries to be
compliant with the ISO C90 standard, which only allows C-style comments.
Single-line comments may have their opening and closing tag on the same line:
```c
/* This is a short comment. */
```
For multi-line comments, the opening and closing tag should be empty:
```c
/*
* This is a rather long and potentially really unwiedly but informative
* multiline comment that helps quite a lot.
*/
```
Public functions must have documentation that explain their usage, internal
functions should have a comment. We use Docurium to generate documentation
derived from these comments, which uses syntax similar to Doxygen. The first
line should be a short summary of what the function does. More in-depth
explanation should be separated from that first line by an empty line.
Parameters and return values should be documented via `@return` and `@param`
tags:
```c
/*
* Froznicate the string.
*
* Froznicate the string by foobaring its internal structure into a more obvious
* translation. Note that the returned string is a newly allocated string that
* shall be `free`d by the caller.
*
* @param s String to froznicate
* @return A newly allocated string or `NULL` in case an error occurred.
* /
char *froznicate(const char *s);
```
### Variables
Variables must be declared at the beginning of their scope. This is a strict
requirement as libgit2 tries to be compliant with the ISO C90 standard, which
forbids mixed declarations and code:
```c
void foobar(void)
{
char *c = NULL;
int a, b;
a = 0;
b = 1;
return c;
}
```
### Naming
Variables must have all-lowercase names. In case a variable name has multiple
words, words should be separated by an underscore `_` character. While
recommended to use descriptive naming, common variable names like `i` for
indices are allowed.
All public functions must have a `git` prefix as well as a prefix indicating
their respective subsystem. E.g. a function that opens a repository should be
called `git_repository_open()`. Functions that are not public but declared in
an internal header file for use by other subsystems should follow the same
naming pattern. File-local static functions must not have a `git` prefix, but
should have a prefix indicating their respective subsystem.
All structures declared in the libgit2 project must have a `typedef`, we do not
use `struct type` variables. Type names follow the same schema as functions.
### Error Handling
The libgit2 project mostly uses error codes to indicate errors. Error codes are
always of type `int`, where `0` indicates success and a negative error code
indicates an error case. In some cases, positive error codes may be used to
indicate special cases. Returned values that are not an error code should be
returned via an out parameter. Out parameters must always come first in the list
of arguments.
```c
int doit(const char **out, int arg)
{
if (!arg)
return -1;
*out = "Got an argument";
return 0;
}
```
To avoid repetitive and fragile error handling in case a function has resources
that need to be free'd, we use `goto out`s:
```c
int doit(char **out, int arg)
{
int error = 0;
char *c;
c = malloc(strlen("Got an argument") + 1);
if (!c) {
error = -1;
goto out;
}
if (!arg) {
error = -1;
goto out;
}
strcpy(c, "Got an argument")
*out = c;
out:
if (error)
free(c);
return error;
}
```
When calling functions that return an error code, you should assign the error
code to an `error` variable and, in case an error case is indicated and no
custom error handling is required, return that error code:
```c
int foobar(void)
{
int error;
if ((error = doit()) < 0)
return error;
return 0;
}
```
When doing multiple function calls where all of the functions return an error
code, it's common practice to chain these calls together:
```c
int doit(void)
{
int error;
if ((error = dothis()) < 0 ||
(error = dothat()) < 0)
return error;
return 0;
}
```
## CMake Coding Style
The following section defines the coding style for our CMake build system.
### Indentation
Code is indented by tabs, where a tab is 8 spaces. Each opening scope increases
the indentation level.
```cmake
if(CONDITION)
doit()
endif()
```
### Spaces
There must be no space between keywords and their opening brace. While this is
the same as in our C codebase for function calls, this also applies to
conditional keywords. This is done to avoid the awkward-looking `else ()`
statement.
```cmake
if(CONDITION)
doit()
else()
dothat()
endif()
```
### Case
While CMake is completely case-insensitive when it comes to function calls, we
want to agree on a common coding style for this. To reduce the danger of
repetitive strain injuries, all function calls should be lower-case (NB: this is
not currently the case yet, but introduced as a new coding style by this
document).
Variables are written all-uppercase. In contrast to functions, variables are
case-sensitive in CMake. As CMake itself uses upper-case variables in all
places, we should follow suit and do the same.
Control flow keywords must be all lowercase. In contrast to that, test keywords
must be all uppercase:
```cmake
if(NOT CONDITION)
doit()
elseif(FOO AND BAR)
dothat()
endif()
```
### Targets
CMake code should not use functions that modify the global scope but prefer
their targeted equivalents, instead. E.g. instead of using
`include_directories()`, you must use `target_include_directories()`. An
exception to this rule is setting up global compiler flags like warnings or
flags required to set up the build type.
### Dependencies
Dependencies should not be discovered or set up in the main "CMakeLists.txt"
module. Instead, they should either have their own module in our top-level
"cmake/" directory or have a "CMakeLists.txt" in their respective "deps/"
directory in case it is a vendored library. All dependencies should expose
interface library targets that can be linked against with
`target_link_libraries()`.

View File

@ -48,9 +48,11 @@ int lg2_add(git_repository *repo, int argc, char **argv)
git_index_matched_path_cb matched_cb = NULL;
git_index *index;
git_strarray array = {0};
struct index_options options;
struct index_options options = {0};
struct args_info args = ARGS_INFO_INIT;
options.mode = INDEX_ADD;
/* Parse the options & arguments. */
parse_opts(NULL, &options, &args);
strarray_from_args(&array, &args);

View File

@ -239,7 +239,7 @@ next:
out:
git_reference_free(remote_ref);
git_strarray_free(&remotes);
git_strarray_dispose(&remotes);
return error;
}

84
examples/commit.c Normal file
View File

@ -0,0 +1,84 @@
/*
* libgit2 "commit" example - shows how to create a git commit
*
* Written by the libgit2 contributors
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication along
* with this software. If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
#include "common.h"
/**
* This example demonstrates the libgit2 commit APIs to roughly
* simulate `git commit` with the commit message argument.
*
* This does not have:
*
* - Robust error handling
* - Most of the `git commit` options
*
* This does have:
*
* - Example of performing a git commit with a comment
*
*/
int lg2_commit(git_repository *repo, int argc, char **argv)
{
const char *opt = argv[1];
const char *comment = argv[2];
int error;
git_oid commit_oid,tree_oid;
git_tree *tree;
git_index *index;
git_object *parent = NULL;
git_reference *ref = NULL;
git_signature *signature;
/* Validate args */
if (argc < 3 || strcmp(opt, "-m") != 0) {
printf ("USAGE: %s -m <comment>\n", argv[0]);
return -1;
}
error = git_revparse_ext(&parent, &ref, repo, "HEAD");
if (error == GIT_ENOTFOUND) {
printf("HEAD not found. Creating first commit\n");
error = 0;
} else if (error != 0) {
const git_error *err = git_error_last();
if (err) printf("ERROR %d: %s\n", err->klass, err->message);
else printf("ERROR %d: no detailed info\n", error);
}
check_lg2(git_repository_index(&index, repo), "Could not open repository index", NULL);
check_lg2(git_index_write_tree(&tree_oid, index), "Could not write tree", NULL);;
check_lg2(git_index_write(index), "Could not write index", NULL);;
check_lg2(git_tree_lookup(&tree, repo, &tree_oid), "Error looking up tree", NULL);
check_lg2(git_signature_default(&signature, repo), "Error creating signature", NULL);
check_lg2(git_commit_create_v(
&commit_oid,
repo,
"HEAD",
signature,
signature,
NULL,
comment,
tree,
parent ? 1 : 0, parent), "Error creating commit", NULL);
git_index_free(index);
git_signature_free(signature);
git_tree_free(tree);
return error;
}

View File

@ -59,6 +59,7 @@ extern int lg2_blame(git_repository *repo, int argc, char **argv);
extern int lg2_cat_file(git_repository *repo, int argc, char **argv);
extern int lg2_checkout(git_repository *repo, int argc, char **argv);
extern int lg2_clone(git_repository *repo, int argc, char **argv);
extern int lg2_commit(git_repository *repo, int argc, char **argv);
extern int lg2_config(git_repository *repo, int argc, char **argv);
extern int lg2_describe(git_repository *repo, int argc, char **argv);
extern int lg2_diff(git_repository *repo, int argc, char **argv);
@ -71,6 +72,7 @@ extern int lg2_log(git_repository *repo, int argc, char **argv);
extern int lg2_ls_files(git_repository *repo, int argc, char **argv);
extern int lg2_ls_remote(git_repository *repo, int argc, char **argv);
extern int lg2_merge(git_repository *repo, int argc, char **argv);
extern int lg2_push(git_repository *repo, int argc, char **argv);
extern int lg2_remote(git_repository *repo, int argc, char **argv);
extern int lg2_rev_list(git_repository *repo, int argc, char **argv);
extern int lg2_rev_parse(git_repository *repo, int argc, char **argv);

View File

@ -707,7 +707,7 @@ static void reference_listing(git_repository *repo)
git_reference_free(ref);
}
git_strarray_free(&ref_list);
git_strarray_dispose(&ref_list);
}
/**

View File

@ -15,6 +15,7 @@ struct {
{ "cat-file", lg2_cat_file, 1 },
{ "checkout", lg2_checkout, 1 },
{ "clone", lg2_clone, 0 },
{ "commit", lg2_commit, 1 },
{ "config", lg2_config, 1 },
{ "describe", lg2_describe, 1 },
{ "diff", lg2_diff, 1 },
@ -27,6 +28,7 @@ struct {
{ "ls-files", lg2_ls_files, 1 },
{ "ls-remote", lg2_ls_remote, 1 },
{ "merge", lg2_merge, 1 },
{ "push", lg2_push, 1 },
{ "remote", lg2_remote, 1 },
{ "rev-list", lg2_rev_list, 1 },
{ "rev-parse", lg2_rev_parse, 1 },

View File

@ -434,21 +434,28 @@ static int parse_options(
else if (!strcmp(a, "--reverse"))
set_sorting(s, GIT_SORT_REVERSE);
else if (match_str_arg(&opt->author, &args, "--author"))
/** Found valid --author */;
/** Found valid --author */
;
else if (match_str_arg(&opt->committer, &args, "--committer"))
/** Found valid --committer */;
/** Found valid --committer */
;
else if (match_str_arg(&opt->grep, &args, "--grep"))
/** Found valid --grep */;
/** Found valid --grep */
;
else if (match_str_arg(&s->repodir, &args, "--git-dir"))
/** Found git-dir. */;
/** Found git-dir. */
;
else if (match_int_arg(&opt->skip, &args, "--skip", 0))
/** Found valid --skip. */;
/** Found valid --skip. */
;
else if (match_int_arg(&opt->limit, &args, "--max-count", 0))
/** Found valid --max-count. */;
/** Found valid --max-count. */
;
else if (a[1] >= '0' && a[1] <= '9')
is_integer(&opt->limit, a + 1, 0);
else if (match_int_arg(&opt->limit, &args, "-n", 0))
/** Found valid -n. */;
/** Found valid -n. */
;
else if (!strcmp(a, "--merges"))
opt->min_parents = 2;
else if (!strcmp(a, "--no-merges"))
@ -458,9 +465,11 @@ static int parse_options(
else if (!strcmp(a, "--no-max-parents"))
opt->max_parents = -1;
else if (match_int_arg(&opt->max_parents, &args, "--max-parents=", 1))
/** Found valid --max-parents. */;
/** Found valid --max-parents. */
;
else if (match_int_arg(&opt->min_parents, &args, "--min-parents=", 0))
/** Found valid --min_parents. */;
/** Found valid --min_parents. */
;
else if (!strcmp(a, "-p") || !strcmp(a, "-u") || !strcmp(a, "--patch"))
opt->show_diff = 1;
else if (!strcmp(a, "--log-size"))

56
examples/push.c Normal file
View File

@ -0,0 +1,56 @@
/*
* libgit2 "push" example - shows how to push to remote
*
* Written by the libgit2 contributors
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
* worldwide. This software is distributed without any warranty.
*
* You should have received a copy of the CC0 Public Domain Dedication along
* with this software. If not, see
* <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
#include "common.h"
/**
* This example demonstrates the libgit2 push API to roughly
* simulate `git push`.
*
* This does not have:
*
* - Robust error handling
* - Any of the `git push` options
*
* This does have:
*
* - Example of push to origin/master
*
*/
/** Entry point for this command */
int lg2_push(git_repository *repo, int argc, char **argv) {
git_push_options options;
git_remote* remote = NULL;
char *refspec = "refs/heads/master";
const git_strarray refspecs = {
&refspec,
1
};
/* Validate args */
if (argc > 1) {
printf ("USAGE: %s\n\nsorry, no arguments supported yet\n", argv[0]);
return -1;
}
check_lg2(git_remote_lookup(&remote, repo, "origin" ), "Unable to lookup remote", NULL);
check_lg2(git_push_options_init(&options, GIT_PUSH_OPTIONS_VERSION ), "Error initializing push", NULL);
check_lg2(git_remote_push(remote, &refspecs, &options), "Error pushing", NULL);
printf("pushed\n");
return 0;
}

View File

@ -129,7 +129,7 @@ static int cmd_rename(git_repository *repo, struct remote_opts *o)
puts(problems.strings[0]);
}
git_strarray_free(&problems);
git_strarray_dispose(&problems);
return retval;
}
@ -207,7 +207,7 @@ static int cmd_show(git_repository *repo, struct remote_opts *o)
git_remote_free(remote);
}
git_strarray_free(&remotes);
git_strarray_dispose(&remotes);
return 0;
}

View File

@ -162,7 +162,7 @@ static void action_list_tags(tag_state *state)
each_tag(tag_names.strings[i], state);
}
git_strarray_free(&tag_names);
git_strarray_dispose(&tag_names);
}
static void action_delete_tag(tag_state *state)

View File

@ -0,0 +1 @@
<02>

View File

@ -0,0 +1 @@
腋7

View File

@ -0,0 +1 @@
ÃØseed

View File

@ -0,0 +1 @@
<EFBFBD>H

View File

@ -0,0 +1 @@
<EFBFBD>*

View File

@ -0,0 +1 @@
聟ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ丸ロロロロロロロロロヒロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロヒロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ

View File

@ -0,0 +1 @@
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>蕨蕨蕨蕨蕨蕨蕨蕨蕨蕨蕨蕨蕨蕨<EFBFBD>

Some files were not shown because too many files have changed in this diff Show More