diff --git a/.github/issue_template.md b/.github/issue_template.md index b396dbc73f..60318f794c 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -9,5 +9,5 @@ node -v npm -v # (or yarn -v) node -e "console.log(process.platform)" node -e "console.log(require('os').release())" -node -e "console.log(console.log(process.arch))" +node -e "console.log(process.arch)" ``` diff --git a/.github/workflows/build-openssl-packages.yml b/.github/workflows/build-openssl-packages.yml new file mode 100644 index 0000000000..7b7a5dea3e --- /dev/null +++ b/.github/workflows/build-openssl-packages.yml @@ -0,0 +1,48 @@ +name: Build and Publish OpenSSL Packages + +on: + workflow_dispatch: + +jobs: + build-openssl: + name: Build OpenSSL package for (${{ matrix.os }} ${{ matrix.arch }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: windows-latest + arch: arm64 + - os: windows-latest + arch: x64 + - os: macos-15 + arch: arm64 + - os: macos-15-intel + arch: x64 + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install dependencies + run: npm install + + - name: Build OpenSSL packages + env: + npm_config_arch: ${{ matrix.arch }} + NODEGIT_OPENSSL_BUILD_PACKAGE: 1 + OPENSSL_MACOS_DEPLOYMENT_TARGET: "11.0" + run: node utils/acquireOpenSSL.mjs + + - name: Push OpenSSL package to S3 + env: + npm_config_arch: ${{ matrix.arch }} + node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }} + AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} + run: node utils/uploadOpenSSL.mjs diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000000..3cd6aae10c --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,196 @@ +on: + push: + branches: + - master + - backport/* + tags: + - v*.*.* + pull_request: + +name: Testing + +jobs: + linux-tests: + name: "Linux Tests" + strategy: + matrix: + node: [20, 22, 24] + fail-fast: false + runs-on: ubuntu-22.04 + steps: + - name: Install Dependencies for Ubuntu + run: sudo apt-get update && sudo apt-get install -y software-properties-common git build-essential clang libssl-dev libkrb5-dev libc++-dev wget zlib1g-dev + + - uses: actions/checkout@v4 + + - name: Setup Environment + run: | + set -e + mkdir ~/.ssh_tests + chmod 700 ~/.ssh_tests + printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config + cat test/id_rsa.pub > ~/.ssh_tests/id_rsa.pub + cat test/id_rsa.enc | base64 -d > ~/.ssh_tests/id_rsa + chmod 600 ~/.ssh_tests/id_rsa* + git config --global user.name "John Doe" + git config --global user.email johndoe@example.com + + - uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + check-latest: true + + - name: Install + run: npm install + + - name: Test + run: | + set -e + eval `ssh-agent -s` + ssh-add ~/.ssh_tests/id_rsa + node utils/retry npm test + + - name: Deploy + if: startsWith(github.ref, 'refs/tags/v') + env: + node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }} + AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} + run: | + npm install -g @mapbox/node-pre-gyp aws-sdk + node lifecycleScripts/clean + node-pre-gyp package + node-pre-gyp publish + + macos-tests: + name: "macOS Tests" + strategy: + matrix: + node: [20, 22, 24] + arch: [x64, arm64] + fail-fast: false + runs-on: ${{ matrix.arch == 'x64' && 'macos-15-intel' || 'macos-15' }} + steps: + - uses: actions/checkout@v4 + + - name: Setup Environment + run: | + mkdir ~/.ssh_tests + chmod 700 ~/.ssh_tests + printf "%b" "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh_tests/config + cat test/id_rsa.pub > ~/.ssh_tests/id_rsa.pub + cat test/id_rsa.enc | base64 -d > ~/.ssh_tests/id_rsa + chmod 600 ~/.ssh_tests/id_rsa* + git config --global user.name "John Doe" + git config --global user.email johndoe@example.com + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + check-latest: true + + - name: Install + run: npm install + + - name: Test + run: | + set -e + eval `ssh-agent -s` + ssh-add ~/.ssh_tests/id_rsa + node utils/retry npm test + + - name: Deploy + if: startsWith(github.ref, 'refs/tags/v') + env: + node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }} + AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} + run: | + npm install -g @mapbox/node-pre-gyp aws-sdk + node lifecycleScripts/clean + node-pre-gyp package + node-pre-gyp publish + + windows-tests: + name: Windows Tests + strategy: + matrix: + node: [20, 22, 24] + arch: [x86, x64, arm64] + exclude: + - node: 24 + arch: x86 + fail-fast: false + runs-on: windows-2022 + steps: + - name: Setup Environment + run: | + git config --file C:\ProgramData\Git\config core.autocrlf input + git config --system core.autocrlf input + git config --global core.autocrlf input + git config --global user.name "John Doe" + git config --global user.email johndoe@example.com + + - uses: actions/checkout@v4 + + - name: Use Node.js + if: matrix.arch == 'x86' + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + check-latest: true + architecture: x86 + + - name: Use Node.js + uses: actions/setup-node@v4 + if: matrix.arch != 'x86' + with: + node-version: ${{ matrix.node }} + check-latest: true + + - name: Install + env: + npm_config_arch: ${{ matrix.arch == 'x86' && 'ia32' || matrix.arch }} + run: npm install + + - name: Test + # need arm64 runners or an emulator to run tests + if: matrix.arch != 'arm64' + env: + GIT_SSH: ${{ github.workspace }}\vendor\plink.exe + run: | + $encodedKey = Get-Content -Path test\private.ppk.enc + $finalPath = Join-Path -Path $HOME -ChildPath .ssh_tests\private.ppk + mkdir ~\.ssh_tests + Set-Content -Value $([System.Convert]::FromBase64String($encodedKey)) -Path $finalPath -AsByteStream + powershell -command "Start-Process .\vendor\pageant\pageant_${{ matrix.arch }}.exe $finalPath" + node utils/retry npm test + + # You're probably wondering why this isn't a single `run: |` step, it certainly is for *nix, + # but it's not, because the CI runner for windows doesn't wait for each step as listed here + # and it treats each additional step past the first as an orphaned process. + - name: Deploy (Dependencies) + if: startsWith(github.ref, 'refs/tags/v') + run: npm install -g @mapbox/node-pre-gyp aws-sdk + + - name: Deploy (Clean) + if: startsWith(github.ref, 'refs/tags/v') + run: node lifecycleScripts\clean + + - name: Deploy (Package) + if: startsWith(github.ref, 'refs/tags/v') + run: node-pre-gyp package --target_arch=${{ matrix.arch }} + + - name: Deploy (Publish) + if: startsWith(github.ref, 'refs/tags/v') + env: + node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }} + AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} + run: node-pre-gyp publish --target_arch=${{ matrix.arch }} diff --git a/.gitignore b/.gitignore index 3d571d1c78..7d1f15f049 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /build/ /coverage/ -/dist/ /include/ /lib/enums.js /lib/nodegit.js @@ -35,13 +34,18 @@ /vendor/libssh2/src/stamp-h1 /vendor/libssh2/tests/.deps/ /vendor/libssh2/tests/Makefile +/vendor/libssh2/tests/ossfuzz/.deps +/vendor/libssh2/tests/ossfuzz/Makefile *.log .DS_STORE .idea +.clangd +.nyc_output/ .vscode jsconfig.json test/id_rsa test/nodegit-test-rsa +test/private.ppk diff --git a/.jshintrc b/.jshintrc index 0fd02f29b6..437878c8ce 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,8 +1,8 @@ { + "esversion": 9, "boss": true, "curly": true, "eqnull": true, - "esnext": true, "evil": true, "futurehostile": true, "globals": { @@ -16,7 +16,7 @@ "it": true }, "immed": false, - "maxlen": 80, + "maxlen": 120, "node": true, "predef": [ "Promise", diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2b2add2f6d..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,124 +0,0 @@ -sudo: false -# update to Xenial in April 2019; Trusty will be EOL, Xenial new minimum supported OS version -dist: trusty - -branches: - only: - - master - - /^v\d+\.\d+\.\d+(-alpha\.\d+)?$/ - -compiler: clang -language: node_js - -# Stage order; the default stage is "test", which in our case is actually building and deploying -stages: - - "Extended testing" - - test - - "Deploy documentation" - -env: - - TARGET_ARCH="x64" - - TARGET_ARCH="ia32" - -node_js: - - "10" - - "8" - - "6" - -os: - - linux - - osx - -jobs: - exclude: - - os: osx - env: TARGET_ARCH="ia32" - include: - - stage: "Extended testing" - os: linux - dist: xenial - node_js: "8" - env: TARGET_ARCH="x64" EXTENDED_TESTING="false" SKIP_DEPLOY="true" - - stage: "Deploy documentation" - os: linux - dist: xenial - node_js: "8" - env: TARGET_ARCH="x64" DEPLOY_DOCUMENTATION="true" - - -git: - depth: 5 - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - build-essential - - libssl-dev - - gcc-4.9-multilib - - g++-4.9-multilib - - lcov - -before_install: - - export CC=clang - - export CXX=clang++ - - export npm_config_clang=1 - - export JOBS=4 - - - if [ -z "$TRAVIS_TAG" ] && [ "$EXTENDED_TESTING" == "true" ]; then - export GYP_DEFINES="coverage=1 use_obsolete_asm=true"; - export CC=/usr/bin/gcc-4.9; - export CXX=/usr/bin/g++-4.9; - export npm_config_clang=0; - wget http://downloads.sourceforge.net/ltp/lcov-1.10.tar.gz; - tar xvfz lcov-1.10.tar.gz; - else - export GYP_DEFINES="use_obsolete_asm=true"; - fi - -install: - - set -e; - - travis_retry npm install; - -# This is a random private key used purely for testing. -before_script: - - echo -e "Host *\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config - - echo -e "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDBkHMoNRRkHYNE7EnQLdFxMgVcqGgNPYDhrWiLMlYuzpmEcUnhwW3zNaIa4J2JlGkRNgYZVia1Ic1V3koJPE3YO2+exAfJBIPeb6O1qDADc2hFFHzd28wmHKUkO61yzo2ZjDQfaEVtjN39Yiy19AbddN3bzNrgvuQT574fa6Rghl2RfecKYO77iHA1RGXIFc8heXVIUuUV/jHjb56WqoHH8vyt1DqUz89oyiHq8Cku0qzKN80COheZPseA1EvT0zlIgbXBxwijN4xRmvInK0fB5Kc9r3kddH2tT7V09bOFJsvGQaQmQ1WFTCqjpBFw1CHKcbfPLOxbLpVIR9gyx03R" > ~/.ssh/id_rsa.pub - - echo -e "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEAwZBzKDUUZB2DROxJ0C3RcTIFXKhoDT2A4a1oizJWLs6ZhHFJ\n4cFt8zWiGuCdiZRpETYGGVYmtSHNVd5KCTxN2DtvnsQHyQSD3m+jtagwA3NoRRR8\n3dvMJhylJDutcs6NmYw0H2hFbYzd/WIstfQG3XTd28za4L7kE+e+H2ukYIZdkX3n\nCmDu+4hwNURlyBXPIXl1SFLlFf4x42+elqqBx/L8rdQ6lM/PaMoh6vApLtKsyjfN\nAjoXmT7HgNRL09M5SIG1wccIozeMUZryJytHweSnPa95HXR9rU+1dPWzhSbLxkGk\nJkNVhUwqo6QRcNQhynG3zyzsWy6VSEfYMsdN0QIDAQABAoIBABsZNPYBEFy/wPvq\nNJ8/et3lCdkh/oc0ABIYK9Wo82XUKKvhDF3drZ3p+UrX/VYgf+EX9hyf8gVTuSJ3\nX1gRqDhIgeTxPsHGrwt6B6pL5ITnKEbbimuo9Ni1E+2RqUO0ZSCE/1sSRv4CRaXO\nk8HZawif7ttxv4bNUrLys6xEbpvQlOMzgs4s/OBB/XMEqnFRGPJeeTy8bkOWyTwl\nLj06nq2brs4qK4eijI/MoGy1CD8JCpL4gG39GPTXd8GpudXmdelDn1E0t9nhL6Se\naOMaiPhy7kBJD4wZ//WZTSR1XyjNBH3DGkNZxPIWcX+wJFyNoLbSbVSda/7Dtvp3\nCPfiNhECgYEA/+3JswSzcVEANNF5OLZ76x+TODkZ9T6YF4SR8/uJjNViWgUpX7vw\nmyXF+2AwzNaotbBKmNG619BcUeMmQB76c+UiMLeJuJcT/Jj0xmEUopHonGqEIcvg\nHg6cafE1is7d+l669bfjitlx+3muF2CYnylSN1LWHxIITVUj3BmcWqUCgYEAwZ45\nWdaHfK7G6GjI7liDQT4ZlslA8dmLv2Jl2ExBBMoY3m3Sre428z2ZFa4O/nsBYP0a\nDxgYmX20fQGcbPugKdCYHc7HkKbMU1GwiVCGpDYZCm2gJKTvam3dYNaiAfq5DyhP\nzDCZNJ5rrSMprXsuRv2O4c5u8qtJ5ByaOJBjOr0CgYBMlkAxzkpUssS5CaaZDiLv\nLbfEr3HRLjYdc5KpzLBQ8NpJzhmfiIJsK1Wf8B0qb2J1XJg2Oy0KwFOgPbWIoryY\nSg19Pq98Cdn1UWCOrSabr8ZIaKe55WTgGcc8/O3k6BsNfaO9PJZfSssNUlCCtml1\n18u+uo9RJPhPDBd7Gj7r8QKBgFraxWy7t24xkZMDgK4fiM/3tQhFvhz/CY2wPbxG\n5Ae8UfkmLcOCUfTIReqfd9fAnsAFZNIKa5izHRu/wsh9NwYIJSlvm8PsEVtTrPRy\nfgvWet+i24/2eYZGsag8b19gaLCNKQzXDT1czYg8RNVsRSX427BoLzXeXNkW9uNu\nFbI9AoGAV2kxcdcKS4BtNHKPeGgV87dM0DWhQaAtEXEIcQquFtba0lAXioGHg8U4\nzeiugl4Qzchwk5qd3wnZ4SOhx0s16/5gQDlnkbjFR6EREUnvLRwV92zBXUTOGIkh\nZ7Z4rcgUKlVAaHT3OHN/lTyqJG/ib+K4wZhbztl/ox+JUFsvD98=\n-----END RSA PRIVATE KEY-----" > ~/.ssh/id_rsa - - chmod 600 ~/.ssh/id_rsa* - - eval `ssh-agent -s` - - ssh-add ~/.ssh/id_rsa - - git config --global user.name "John Doe" - - git config --global user.email johndoe@example.com - -script: - if [ -z "$TRAVIS_TAG" ] && [ "$EXTENDED_TESTING" == "true" ]; then - travis_retry npm test && npm run cov && npm run coveralls; - else - travis_retry npm test; - fi - -after_success: - - if [ -n "$TRAVIS_TAG" ] && [ "$EXTENDED_TESTING" != "true" ] && [ "$DEPLOY_DOCUMENTATION" != "true" ] && [ "$SKIP_DEPLOY" != "true" ]; then - npm install -g node-pre-gyp; - npm install -g aws-sdk; - node lifecycleScripts/clean; - node-pre-gyp package --target_arch=$TARGET_ARCH; - node-pre-gyp publish --target_arch=$TARGET_ARCH; - fi - - - if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ -n "$TRAVIS_TAG" ] && [ "$DEPLOY_DOCUMENTATION" == "true" ]; then - .travis/deploy-docs.sh; - fi - -notifications: - slack: - secure: KglNSqZiid9YudCwkPFDh+sZfW5BwFlM70y67E4peHwwlbbV1sSBPHcs74ZHP/lqgEZ4hMv4N2NI58oYFD5/1a+tKIQP1TkdIMuq4j2LXheuirA2HDcydOVrsC8kRx5XFGKdVRg/uyX2dlRHcOWFhxrS6yc6IxtxYWlRTD2SmEc= - - webhooks: - urls: - - https://webhooks.gitter.im/e/cbafdb27ad32ba746a73 - on_success: always # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: false # default: false diff --git a/CHANGELOG.md b/CHANGELOG.md index b57446911d..d7c020aac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,1816 @@ # Change Log +## v0.28.0-alpha.36 [(2025-11-21)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.36) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.35...v0.28.0-alpha.36) + +#### Summary of Changes + - Use openssl unconditionally for linux electron builds + - Fix cross-compiling libssh2 + - Fix Windows SSH keys, tests, documentation + - Add CI tests and Prebuilts for MacOS arm64 + - Bump tar-fsa to fix security vulnerabilities + +#### Merged PRs into NodeGit +- [Bump tar-fs from 3.0.9 to 3.1.1](https://github.com/nodegit/nodegit/pull/2034) +- [Use custom electron for non-static builds on linux and fix cross-compilation](https://github.com/nodegit/nodegit/pull/2033) +- [add macos arm64 tests and prebuilts](https://github.com/nodegit/nodegit/pull/2030) + +## v0.28.0-alpha.35 [(2025-11-14)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.35) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.34...v0.28.0-alpha.35) + +#### Summary of Changes + - Bump libgit2 to 1.9.1 + - Bump OpenSSL to 3.0 + - Move OpenSSL Packaging to Github Actions + - Add arm64 build Support + +#### Merged PRs into NodeGit +- [Bump libgit2 to 1.9.1](https://github.com/nodegit/nodegit/pull/2025) +- [Bump OpenSSL to 3.0, Move OpenSSL package generation to Github Actions](https://github.com/nodegit/nodegit/pull/2026) +- [fix: correct macos arch labels](github.com/nodegit/nodegit/pull/2027) +- [Add Ability to compile for arm64](https://github.com/nodegit/nodegit/pull/2028) + +## v0.28.0-alpha.34 [(2025-07-23)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.34) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.33...v0.28.0-alpha.34) + +#### Summary of Changes + - Empty release to fix downstream issues + +#### Merged PRs into NodeGit +- None + +## v0.28.0-alpha.33 [(2025-06-03)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.33) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.32...v0.28.0-alpha.33) + +#### Summary of Changes + - fix non-standard import assertion + - update tar-fs + +#### Merged PRs into NodeGit +- [Fix Invalid Import Assertion, Bump tar-fs](https://github.com/nodegit/nodegit/pull/2022) + +## v0.28.0-alpha.32 [(2025-05-28)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.32) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.31...v0.28.0-alpha.32) + +#### Summary of Changes + - fix windows build on electron + +#### Merged PRs into NodeGit +- [fix electron dependencies again](https://github.com/nodegit/nodegit/pull/2020) + +## v0.28.0-alpha.31 [(2025-05-27)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.31) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.30...v0.28.0-alpha.31) + +#### Summary of Changes +- bump libgit2 from v1.7.2 to v1.8.4 +- update several npm dependencies for deprecations and vulnerabilities + +#### Merged PRs into NodeGit +- [Dependency/Process Updates](https://github.com/nodegit/nodegit/pull/2019) +- [Bump libgit2 to 1.8.4, CI Updates](https://github.com/nodegit/nodegit/pull/2018) + +## v0.28.0-alpha.30 [(2025-02-13)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.30) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.29...v0.28.0-alpha.30) + +#### Summary of Changes +- Fix windows build + +#### Merged PRs into NodeGit +- [define NOMINMAX on windows](https://github.com/nodegit/nodegit/pull/2016) + +## v0.28.0-alpha.29 [(2025-02-11)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.29) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.28...v0.28.0-alpha.29) + +#### Summary of Changes +- Build on Electron 34+ +- fix use-after-free in Repository::statistics() + +#### Merged PRs into NodeGit +- [Bump @axosoft/nan and add ability to compile for c++20](https://github.com/nodegit/nodegit/pull/2012) +- [Fix Github Action workflow](https://github.com/nodegit/nodegit/pull/2014) + + +## v0.28.0-alpha.28 [(2024-07-01)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.28) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.27...v0.28.0-alpha.28) + +#### Summary of changes +- Build on Electron 31+ + +#### Merged PRs into NodeGit +- [Bump nan again for electron 31](https://github.com/nodegit/nodegit/pull/2000) + +## v0.28.0-alpha.27 [(2024-06-06)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.27) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.26...v0.28.0-alpha.27) + +#### Summary of changes +- Build on Electron 29+ + +#### Merged PRs into NodeGit +- [Fix build failure on electron 29+](https://github.com/nodegit/nodegit/pull/1998) + +## v0.28.0-alpha.26 [(2024-04-19)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.26) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.25...v0.28.0-alpha.26) + +#### Summary of changes +- Fix use-after-free in getRemotes + +#### Merged PRs into NodeGit +- [Fix double-free introduced trying to fix other double-free](https://github.com/nodegit/nodegit/pull/1996) + +## v0.28.0-alpha.25 [(2024-04-15)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.25) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.24...v0.28.0-alpha.25) + +#### Summary of changes +- Fix use-after-free in getReferences + +#### Merged PRs into NodeGit +- [Don't free the given repo on error in getReferences and getRemotes](https://github.com/nodegit/nodegit/pull/1995) + +## v0.28.0-alpha.24 [(2024-02-20)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.24) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.23...v0.28.0-alpha.24) + +#### Summary of changes +- Use Collision Detection SHA1 implementation +- Fix win32 Electron build due to incorrect OpenSSL include path + +#### Merged PRs into NodeGit +- [Use builtin SHA1 for libgit compilation](https://github.com/nodegit/nodegit/pull/1992) +- [Ensure OpenSSL root included in win32 Electron builds](https://github.com/nodegit/nodegit/pull/1991) + +## v0.28.0-alpha.23 [(2024-02-14)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.23) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.22...v0.28.0-alpha.23) + +#### Summary of changes +- Bump libgit2 to 1.7.2 + +#### Merged PRs into NodeGit +- [Bump libgit2 to 1.7.2](https://github.com/nodegit/nodegit/pull/1990) + +## v0.28.0-alpha.22 [(2024-02-05)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.22) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.21...v0.28.0-alpha.22) + +#### Summary of changes +- Compatibility with Electron 28 +- NodeGit now requires Node 16+ + +#### Merged PRs into NodeGit +- [Fix electron 28 build failure](https://github.com/nodegit/nodegit/pull/1988) +- [Bump node-gyp to 10.0.1](https://github.com/nodegit/nodegit/pull/1989) + +## v0.28.0-alpha.21 [(2023-02-10)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.21) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.20...v0.28.0-alpha.21) + +#### Summary of changes +- Update OpenSSL to 1.1.1t +- Update got + other packages with security vulnerabilities +- Fix tag.createWithSignature function definition + +#### Merged PRs into NodeGit +- [Bump OpenSSL to 1.1.1t](https://github.com/nodegit/nodegit/pull/1971) +- [Update got + other locked package versions](https://github.com/nodegit/nodegit/pull/1969) +- [Fix tag createWithSignature function](https://github.com/nodegit/nodegit/pull/1945) + +## v0.28.0-alpha.20 [(2022-11-11)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.20) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.19...v0.28.0-alpha.20) + +#### Summary of changes +- Fix electron build issues + +#### Merged PRs into NodeGit +- [Fix electron build issues](https://github.com/nodegit/nodegit/pull/1955) + +## v0.28.0-alpha.19 [(2022-11-08)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.19) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.18...v0.28.0-alpha.19) + +#### Summary of changes +- OpenSSL bump +- OpenSSL binaries will be automatically downloaded when building for Electron on Windows and macOS +- Crash fix on Electron 18+ due to Nan bug +- Partial stash support + +#### Merged PRs into NodeGit +- [Allow overriding C++ standard](https://github.com/nodegit/nodegit/pull/1953) +- [Bump OpenSSL to 1.1.1s](https://github.com/nodegit/nodegit/pull/1952) +- [Fix intermittent crash on Electron 18+](https://github.com/nodegit/nodegit/pull/1951) +- [type is a call](https://github.com/nodegit/nodegit/pull/1942) +- [Fix leak in agent](https://github.com/nodegit/nodegit/pull/1947) +- [Default to using precompiled OpenSSL for Electron](https://github.com/nodegit/nodegit/pull/1949) +- [Partial stash support](https://github.com/nodegit/nodegit/pull/1948) +- [Switch CI to macOS-11](https://github.com/nodegit/nodegit/pull/1950) +- [Preemptively Patch OpenSSL 1.1.1q](https://github.com/nodegit/nodegit/pull/1928) +- [Add getAllFilepaths function in tree object](https://github.com/nodegit/nodegit/pull/1919) + +## v0.28.0-alpha.18 [(2022-05-27)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.18) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.17...v0.28.0-alpha.18) + +#### Summary of changes +- Allow fetching partial patches from diff +- Fix nanosecond comparison typo + +#### Merged PRs into NodeGit +- [Improve Diff.patches to allow an index array](https://github.com/nodegit/nodegit/pull/1916) +- [Bring in GIT_USE_NSEC fix](https://github.com/nodegit/nodegit/pull/1917) + +## v0.28.0-alpha.17 [(2022-05-24)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.17) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.16...v0.28.0-alpha.17) + +#### Summary of changes +- Enable nanosecond precision for file operations + +#### Merged PRs into NodeGit +- [Enable GIT_USE_NSEC](https://github.com/nodegit/nodegit/pull/1912) + +## v0.28.0-alpha.16 [(2022-05-09)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.16) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.15...v0.28.0-alpha.16) + +#### Summary of changes +- Allow disabling specific filters during checkout + +#### Merged PRs into NodeGit +- [Allow disabling specific filters during checkout](https://github.com/nodegit/nodegit/pull/1911) + +## v0.28.0-alpha.15 [(2022-05-05)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.15) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.14...v0.28.0-alpha.15) + +#### Summary of changes +- Expose `GIT_OPT_GET_OWNER_VALIDATION` and `GIT_OPT_SET_OWNER_VALIDATION` + +#### Merged PRs into NodeGit +- [Expose get/set owner validation opts](https://github.com/nodegit/nodegit/pull/1910) + +## v0.28.0-alpha.14 [(2022-05-02)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.14) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.13...v0.28.0-alpha.14) + +#### Summary of changes +- Allow statically linking OpenSSL on Linux +- Update libgit2 to 1.3.1 + +#### Merged PRs into NodeGit +- [Statically compile OpenSSL on linux for electron](https://github.com/nodegit/nodegit/pull/1905) +- [Upgrade libgit2 to 1.3.1](https://github.com/nodegit/nodegit/pull/1894) + +## v0.28.0-alpha.13 [(2022-03-22)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.13) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.12...v0.28.0-alpha.13) + +#### Summary of changes +- Partially fix issue with building for Electron + +#### Merged PRs into NodeGit +- [Fix electron build](https://github.com/nodegit/nodegit/pull/1901) + +## v0.28.0-alpha.12 [(2022-03-18)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.12) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.11...v0.28.0-alpha.12) + +#### Summary of changes +- Updated CI because of GitHub deprecations +- Added workaround for LFS performance regression + +#### Merged PRs into NodeGit +- [Update windows 2016 CI to 2019](https://github.com/nodegit/nodegit/pull/1897) +- [Skip "can clone with git" test, unauthenticated git protocol is no longer supported in Github](https://github.com/nodegit/nodegit/pull/1899) +- [UNSAFE Temporary workaround for LFS checkout performance regression](https://github.com/nodegit/nodegit/pull/1883) +- [Update Github Actions for node 16](https://github.com/nodegit/nodegit/pull/1896) + +## v0.28.0-alpha.11 [(2022-02-08)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.11) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.10...v0.28.0-alpha.11) + +#### Summary of changes +- Updated libssh2 to add RSA SHA2 256/512 SSH key support + +#### Merged PRs into NodeGit +- [RSA SHA2 256/512 key upgrade support RFC 8332 #536 (#626)](https://github.com/nodegit/nodegit/pull/1888) +- [Fix typos in examples](https://github.com/nodegit/nodegit/pull/1884) +- [Don't build shared OpenSSL libs](https://github.com/nodegit/nodegit/pull/1877) + +## v0.28.0-alpha.10 [(2021-11-11)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.10) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.9...v0.28.0-alpha.10) + +#### Summary of changes +- Reworked CI due to GitHub dropping Ubuntu 16.04 support +- When building for Electron on Windows/macOS and prebuilts are unavailable: NodeGit will attempt to build OpenSSL locally by default. This is due to Conan changing their API/provided OpenSSL binaries. There are options for pointing to an installed OpenSSL location or URL for downloading prebuilt binaries, see [Building from source](http://www.nodegit.org/guides/install/from-source/). +- Updated OpenSSL to 1.1.1l +- Updated libssh2 to 1.10.0 +- Added `Repo.prototype.statistics` method for calculating repository statistics +- More progress towards becoming context-aware + +#### Merged PRs into NodeGit +- [Allow download of prebuilt OpenSSL](https://github.com/nodegit/nodegit/pull/1875) +- [Update libssh2 to 1.10.0](https://github.com/nodegit/nodegit/pull/1874) +- [Statistics with same output as "git-sizer -j"](https://github.com/nodegit/nodegit/pull/1846) +- [Fix memory leak on context shutdown](https://github.com/nodegit/nodegit/pull/1856) +- [Build OpenSSL locally for Electron](https://github.com/nodegit/nodegit/pull/1870) +- [Fix a reference error when compiling with VC2019](https://github.com/nodegit/nodegit/pull/1859) +- [Use containers for Linux CI](https://github.com/nodegit/nodegit/pull/1860) + + +## v0.28.0-alpha.9 [(2021-06-04)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.9) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.8...v0.28.0-alpha.9) + +#### Summary of changes +- Fixes an issue where rebase.init and rebase.open were ignoring callbacks in some situations + +#### Merged PRs into NodeGit +- [Shallow clone rebase options before modifying #1845](https://github.com/nodegit/nodegit/pull/1845) + + +## v0.28.0-alpha.8 [(2021-05-10)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.8) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.7...v0.28.0-alpha.8) + +#### Summary of changes +- Fixes another issue where Kerberos proxy authentication causes network failures + +#### Merged PRs into NodeGit +- [Bump libgit2 to include libgit2#5852 #1844](https://github.com/nodegit/nodegit/pull/1844) + +#### Merged PRs into Libgit2 +- [Fix issues with Proxy Authentication after httpclient refactor #5852](https://github.com/libgit2/libgit2/pull/5852) + + +## v0.28.0-alpha.7 [(2021-04-30)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.7) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.6...v0.28.0-alpha.7) + +#### Summary of changes +- Fixes issue with where proxy authentication fails on linux/osx with assertion error. + +#### Merged PRs into NodeGit +- [Bump Libgit2 to fix proxy auth on linux / osx #1841](https://github.com/nodegit/nodegit/pull/1841) + +#### Merged PRs into Libgit2 +- [https://github.com/libgit2/libgit2/pull/5852](https://github.com/libgit2/libgit2/pull/5852) + + +## v0.28.0-alpha.6 [(2021-04-23)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.6) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.5...v0.28.0-alpha.6) + +#### Summary of changes +- Rewrote options normalization such that it is done in C++. Provided deprecated classes for backwards compatibility. These will be removed in a later version of Nodegit. +- Deprecated construction of these objects, in the future, please pass plain objects with just the fields you wish to override to NodeGit, and the library will take care of the rest. + - NodeGit.ApplyOptions + - NodeGit.BlameOptions + - NodeGit.BlobFilterOptions + - NodeGit.CheckoutOptions + - NodeGit.CherrypickOptions + - NodeGit.CloneOptions + - NodeGit.DescribeFormatOptions + - NodeGit.DiffFindOptions + - NodeGit.FetchOptions + - NodeGit.MergeFileInput + - NodeGit.MergeFileOptions + - NodeGit.MergeOptions + - NodeGit.ProxyOptions + - NodeGit.PushOptions + - NodeGit.RebaseOptions + - NodeGit.RemoteCreatOptions + - NodeGit.RepositoryInitOptions + - NodeGit.RevertOptions + - NodeGit.StashApplyOptions + - NodeGit.StatusOptions + - NodeGit.SubmoduleUpdateOptions +- Ensured the following functions have their optional arguments labeled/working as optional: + - NodeGit.Apply + - NodeGit.Checkout.index + - NodeGit.Cherrypick + - NodeGit.Cherrypick.commit + - NodeGit.Merge + - NodeGit.PatchBlobs + - NodeGit.Rebase.open + - NodeGit.Remote.prototype.connect + - NodeGit.Remote.prototype.download + - NodeGit.Remote.prototype.fetch + - NodeGit.Remote.prototype.prune + - NodeGit.Remote.prototype.push + - NodeGit.Remote.prototype.upload + - NodeGit.Stash.apply + - NodeGit.Stash.pop + - NodeGit.Worktree.isPrunable + - NodeGit.Worktree.prune +- Updated the following functions to be async: + - NodeGit.Apply + - NodeGit.Remote.prototype.prune + - NodeGit.Worktree.isPrunable + - NodeGit.Worktree.prune +- Addressed issue where GitWorktreePruneOptions and GitWorktreeAddOptions were impossible to instantiate, thus making working with worktress possible now. +- Addressed issue where GitIndexTime was not configurable +- Addressed issue where the following functions did not return errors from libgit2: + - NodeGit.Merge.analysis + - NodeGit.Note.commitRemove + +#### Merged PRs into NodeGit +- [Eliminate need for normalize options #1837](https://github.com/nodegit/nodegit/pull/1837) +- [Define optional arguments for Patch.fromBlobs() #1835](https://github.com/nodegit/nodegit/pull/1835) + + +## v0.28.0-alpha.5 [(2021-04-09)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.5) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.4...v0.28.0-alpha.5) + +#### Summary of changes +- Fixes crash in multithreaded checkout in fork of libgit2 + +#### Merged PRs into NodeGit +- [Update multithreaded checkout in libgit2 #1834](https://github.com/nodegit/nodegit/pull/1834) + +#### Merged PRs into Libgit2 +- [Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string](https://github.com/libgit2/libgit2/pull/5832) +- [Remove duplicate line, in example code](https://github.com/libgit2/libgit2/pull/5821) + + +## v0.28.0-alpha.4 [(2021-04-07)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.4) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.3...v0.28.0-alpha.4) + +#### Summary of changes +- Introduces harder safeguards on persistent references to prevent garbage collection during async work + +#### Merged PRs into NodeGit +- [Workaround: Prevent objectwrap from being cleaned up during async work #1833](https://github.com/nodegit/nodegit/pull/1833) + + +## v0.28.0-alpha.3 [(2021-04-02)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.3) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.2...v0.28.0-alpha.3) + +#### Summary of changes +- Addresses failure to open repo with empty default branch name + +#### Merged PRs into NodeGit +- [Bring in changes from libgit2 #5832 #1832](https://github.com/nodegit/nodegit/pull/1832) + +#### Cherrypicked PRs into Libgit2 +- [Default to GIT_BRANCH_DEFAULT if init.defaultBranch is empty string #5832](https://github.com/libgit2/libgit2/pull/5832) + + +## v0.28.0-alpha.2 [(2021-03-31)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.2) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.28.0-alpha.1...v0.28.0-alpha.2) + +#### Summary of changes +- Addresses crash in mwindow from libgit2 +- Bumps libgit2 to bring in bug fixes + +#### Merged PRs into NodeGit +- [Bump Libgit2 to 1.1.0 (on current head of libgit2) #1831](https://github.com/nodegit/nodegit/pull/1831) + +#### Merged PRs into Libgit2 +- [tree: deprecate `git_treebuilder_write_with_buffer`](https://github.com/libgit2/libgit2/pull/5815) +- [winhttp: skip certificate check if unable to send request](https://github.com/libgit2/libgit2/pull/5814) +- [commit-graph: Introduce `git_commit_graph_needs_refresh()`](https://github.com/libgit2/libgit2/pull/5764) +- [commit-graph: Support lookups of entries in a commit-graph](https://github.com/libgit2/libgit2/pull/5763) +- [merge: Check insert_head_ids error in create_virtual_base](https://github.com/libgit2/libgit2/pull/5818) +- [Check git_signature_dup failure](https://github.com/libgit2/libgit2/pull/5817) +- [Fix some typos](https://github.com/libgit2/libgit2/pull/5797) +- [include: fix typos in comments](https://github.com/libgit2/libgit2/pull/5805) +- [Fix documentation formating on repository.h](https://github.com/libgit2/libgit2/pull/5806) +- [index: Check git_vector_dup error in write_entries](https://github.com/libgit2/libgit2/pull/5801) +- [refdb_fs: Check git_sortedcache wlock/rlock errors](https://github.com/libgit2/libgit2/pull/5800) +- [Add new bindings for the R language](https://github.com/libgit2/libgit2/pull/5795) +- [Update .gitignore](https://github.com/libgit2/libgit2/pull/5787) +- [patch: add owner accessor](https://github.com/libgit2/libgit2/pull/5731) +- [commit-graph: Introduce a parser for commit-graph files](https://github.com/libgit2/libgit2/pull/5762) +- [revspec: rename git_revparse_mode_t to git_revspec_t](https://github.com/libgit2/libgit2/pull/5786) +- [mwindow: Fix a bug in the LRU window finding code](https://github.com/libgit2/libgit2/pull/5783) +- [ci: don't use ninja on macOS](https://github.com/libgit2/libgit2/pull/5780) +- [midx: Fix a bug in `git_midx_needs_refresh()`](https://github.com/libgit2/libgit2/pull/5768) +- [clone: set refs/remotes/origin/HEAD when branch is specified](https://github.com/libgit2/libgit2/pull/5775) +- [Use `p_pwrite`/`p_pread` consistently throughout the codebase](https://github.com/libgit2/libgit2/pull/5769) +- [README: instructions for using libgit2 without compiling](https://github.com/libgit2/libgit2/pull/5772) +- [Cope with empty default branch](https://github.com/libgit2/libgit2/pull/5770) +- [github-actions: Also rename the main branch here](https://github.com/libgit2/libgit2/pull/5771) +- [blob: fix name of `GIT_BLOB_FILTER_ATTRIBUTES_FROM_HEAD`](https://github.com/libgit2/libgit2/pull/5760) +- [Add documentation for git_blob_filter_options.version](https://github.com/libgit2/libgit2/pull/5759) +- [Build with NO_MMAP](https://github.com/libgit2/libgit2/pull/5583) +- [zlib: Add support for building with Chromium's zlib implementation](https://github.com/libgit2/libgit2/pull/5748) +- [Handle ipv6 addresses](https://github.com/libgit2/libgit2/pull/5741) +- [Add support for additional SSH hostkey types.](https://github.com/libgit2/libgit2/pull/5750) +- [Fix the `-DENABLE_WERROR=ON` build for gcc 10.2](https://github.com/libgit2/libgit2/pull/5749) +- [repository: use intptr_t's in the config map cache](https://github.com/libgit2/libgit2/pull/5746) +- [Add tests for `git__multiply_int64_overflow`](https://github.com/libgit2/libgit2/pull/5744) +- [Third attempt to fix the 32-bit version of `git__multiply_int64_overf…](https://github.com/libgit2/libgit2/pull/5743) +- [Avoid using `__builtin_mul_overflow` with the clang+32-bit combo](https://github.com/libgit2/libgit2/pull/5742) +- [ci: run codeql](https://github.com/libgit2/libgit2/pull/5709) +- [pack: continue zlib while we can make progress](https://github.com/libgit2/libgit2/pull/5740) +- [Re-enable the RC4 test](https://github.com/libgit2/libgit2/pull/4418) +- [Cache the parsed submodule config when diffing](https://github.com/libgit2/libgit2/pull/5727) +- [Make git__strntol64() ~70%* faster](https://github.com/libgit2/libgit2/pull/5735) +- [winhttp: support optional client cert](https://github.com/libgit2/libgit2/pull/5384) +- [git.git-authors: Replacing his/her with their](https://github.com/libgit2/libgit2/pull/5724) +- [Friendlier getting started in the lack of git_libgit2_init](https://github.com/libgit2/libgit2/pull/5578) +- [Thread-local storage: a generic internal library (with no allocations)](https://github.com/libgit2/libgit2/pull/5720) +- [Thread-free implementation](https://github.com/libgit2/libgit2/pull/5719) +- [Make the pack and mwindow implementations data-race-free](https://github.com/libgit2/libgit2/pull/5593) +- [Make the odb race-free](https://github.com/libgit2/libgit2/pull/5595) +- [Also add the raw hostkey to `git_cert_hostkey`](https://github.com/libgit2/libgit2/pull/5704) +- [Fix the `ENABLE_WERROR=ON` build in Groovy Gorilla (gcc 10.2)](https://github.com/libgit2/libgit2/pull/5715) +- [odb: Add git_odb_options](https://github.com/libgit2/libgit2/pull/5447) +- [Introduce GIT_ASSERT macros](https://github.com/libgit2/libgit2/pull/5327) +- [ci: only report main branch in README status](https://github.com/libgit2/libgit2/pull/5708) +- [ci: run coverity in the nightly builds](https://github.com/libgit2/libgit2/pull/5707) +- [ci: more GitHub Actions](https://github.com/libgit2/libgit2/pull/5706) +- [Add a ThreadSanitizer build](https://github.com/libgit2/libgit2/pull/5597) +- [msvc crtdbg -> win32 leakcheck](https://github.com/libgit2/libgit2/pull/5580) +- [Add missing worktree_dir check and test case](https://github.com/libgit2/libgit2/pull/5692) +- [Fix the `-DTHREADSAFE=OFF` build](https://github.com/libgit2/libgit2/pull/5690) +- [ci: propagate environment variables](https://github.com/libgit2/libgit2/pull/5703) +- [ci: supply a token for self-hosted runners](https://github.com/libgit2/libgit2/pull/5702) +- [ci: supply a token for self-hosted runners](https://github.com/libgit2/libgit2/pull/5701) +- [ci: GitHub Actions for arm64](https://github.com/libgit2/libgit2/pull/5700) +- [ci: stop using deprecated set-env in GitHub Actions](https://github.com/libgit2/libgit2/pull/5697) +- [Deprecate `is_valid_name` functions; replace with `name_is_valid` functions](https://github.com/libgit2/libgit2/pull/5659) +- [Include `${MBEDTLS_INCLUDE_DIR}` when compiling `crypt_mbedtls.c`](https://github.com/libgit2/libgit2/pull/5685) +- [threadstate: rename tlsdata when building w/o threads](https://github.com/libgit2/libgit2/pull/5668) +- [Refactor "global" state](https://github.com/libgit2/libgit2/pull/5546) +- [Make the Windows leak detection more robust](https://github.com/libgit2/libgit2/pull/5661) +- [Define `git___load` when building with `-DTHREADSAFE=OFF`](https://github.com/libgit2/libgit2/pull/5664) +- [ntlm: update ntlm dependency for htonll](https://github.com/libgit2/libgit2/pull/5658) +- [libgit2 v1.1.0](https://github.com/libgit2/libgit2/pull/5660) +- [Update PCRE to 8.44](https://github.com/libgit2/libgit2/pull/5649) +- [clone: update origin's HEAD](https://github.com/libgit2/libgit2/pull/5651) +- [Improve the support of atomics](https://github.com/libgit2/libgit2/pull/5594) +- [Fix error return for invalid extensions.](https://github.com/libgit2/libgit2/pull/5656) +- [Change bare free to allocator free (fixes #5653)](https://github.com/libgit2/libgit2/pull/5654) +- [midx: Introduce a parser for multi-pack-index files](https://github.com/libgit2/libgit2/pull/5401) +- [Fixed typo in comment](https://github.com/libgit2/libgit2/pull/5648) +- [Fix binary diff showing /dev/null](https://github.com/libgit2/libgit2/pull/5494) +- [httpclient: only free challenges for current_server type](https://github.com/libgit2/libgit2/pull/5576) +- [Respect `init.defaultBranch` setting](https://github.com/libgit2/libgit2/pull/5581) +- [patch_parse: handle absence of "index" header for new/deleted cases](https://github.com/libgit2/libgit2/pull/5620) +- [boolean config parsing fails in some cases with mapped values](https://github.com/libgit2/libgit2/pull/5626) +- [Fix config file parsing with multi line values containing quoted parts](https://github.com/libgit2/libgit2/pull/5629) +- [Fix release build warnings](https://github.com/libgit2/libgit2/pull/5636) +- [Fix deprecation links inside of documentation not working](https://github.com/libgit2/libgit2/pull/5631) +- [Fix typo: Make ifndef macroname the same as the define name](https://github.com/libgit2/libgit2/pull/5632) +- [diff stats: fix segfaults with new files](https://github.com/libgit2/libgit2/pull/5619) +- [WinHTTP: Try to use TLS1.3](https://github.com/libgit2/libgit2/pull/5633) +- [Fixed includes for FreeBSD](https://github.com/libgit2/libgit2/pull/5628) +- [Don't fail if a HTTP server announces he supports a protocol upgrade](https://github.com/libgit2/libgit2/pull/5624) +- [Return false instead of segfaulting when checking for default port](https://github.com/libgit2/libgit2/pull/5621) +- [deps: ntlmclient: fix htonll for Haiku](https://github.com/libgit2/libgit2/pull/5612) +- [azure: Remove job generating documentation](https://github.com/libgit2/libgit2/pull/5615) +- [Fix crash in git_describe_commit when opts are NULL.](https://github.com/libgit2/libgit2/pull/5617) +- [Fix `git_mwindow_scan_recently_used` spuriously returning true](https://github.com/libgit2/libgit2/pull/5600) +- [zstream: handle Z_BUF_ERROR appropriately in get_output_chunk](https://github.com/libgit2/libgit2/pull/5599) +- [docs: fix typo](https://github.com/libgit2/libgit2/pull/5610) + + +## v0.28.0-alpha.1 [(2021-03-12)](https://github.com/nodegit/nodegit/releases/tag/v0.28.0-alpha.1) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.27.0...v0.28.0-alpha.1) + +#### Summary of changes +- *Notice* We planned to fix / address Electron 11 compatibility, but ran into some roadblocks. Fix is coming soon, follow [#114](https://github.com/nodegit/nodegit/issues/1774) for details +- Drops support for Node 10.x.y, < 12.19.x, < 14.10.0 +- Brings in LibGit2 1.0.0 +- NodeGit.Config.prototype.setBool handles truthiness, and NodeGit.Config.prototype.getBool returns true or false +- Fix GC ownership memory issue +- Exposes sidebandProgress callback in GitRemoteCallbacks +- Fixes issue with winhttp and optional client certificates +- Addresses proxy issue with certification validation in Windows +- Fix crash in NodeGit.Repository.prototype.refreshReferences +- Deprecations + - NodeGit.Cred is deprecated in favor of NodeGit.Credential + +#### Merged PRs into NodeGit +- [Include libgit2 winhttp proxy fix #1824](https://github.com/nodegit/nodegit/pull/1824) +- [Return/accept boolean for Config#get/setBool #1827](https://github.com/nodegit/nodegit/pull/1827) +- [First stab at #1800 (async/await in examples) #1802](https://github.com/nodegit/nodegit/pull/1802) +- [returns_info: fix ownedByIndices #1823](https://github.com/nodegit/nodegit/pull/1823) +- [Remove block for sideband_progress in remote_callbacks #1801](https://github.com/nodegit/nodegit/pull/1801) +- [Use key to grab credential type #1828](https://github.com/nodegit/nodegit/pull/1828) +- [Don't strdup nullptr from git_tag_message #1822](https://github.com/nodegit/nodegit/pull/1822) +- [Refactor for context-awareness #1795](https://github.com/nodegit/nodegit/pull/1795) +- [Update longpath enums to match libgit2 #1797](https://github.com/nodegit/nodegit/pull/1797) +- [Bump libgit2 to fork of v1.0.0 #1788](https://github.com/nodegit/nodegit/pull/1788) + +#### Merged PRs into Libgit2 +- [winhttp: skip certificate check if unable to send request #5814](https://github.com/libgit2/libgit2/pull/5814) +- [sanitizer ci: skip negotiate tests](https://github.com/libgit2/libgit2/pull/5596) +- [Add CI support for Memory and UndefinedBehavior Sanitizers](https://github.com/libgit2/libgit2/pull/5569) +- [Access HEAD via the refdb backends](https://github.com/libgit2/libgit2/pull/5563) +- [config_entries: Avoid excessive map operations](https://github.com/libgit2/libgit2/pull/5582) +- [mwindow: set limit on number of open files](https://github.com/libgit2/libgit2/pull/5396) +- [refdb: a set of preliminary refactorings for the reftable backend](https://github.com/libgit2/libgit2/pull/5570) +- [CMake modernization pt2](https://github.com/libgit2/libgit2/pull/5547) +- [Make the tests run cleanly under UndefinedBehaviorSanitizer](https://github.com/libgit2/libgit2/pull/5568) +- [Make the tests pass cleanly with MemorySanitizer](https://github.com/libgit2/libgit2/pull/5567) +- [Enable building git2.rc resource script with GCC](https://github.com/libgit2/libgit2/pull/5561) +- [Make NTLMClient Memory and UndefinedBehavior Sanitizer-clean](https://github.com/libgit2/libgit2/pull/5571) +- [Random fixes for diff-printing](https://github.com/libgit2/libgit2/pull/5559) +- [index: Update the documentation for git_index_add_from_buffer()](https://github.com/libgit2/libgit2/pull/5419) +- [Introduce CI with GitHub Actions](https://github.com/libgit2/libgit2/pull/5550) +- [Random code cleanups and fixes](https://github.com/libgit2/libgit2/pull/5552) +- [examples: log: fix documentation generation](https://github.com/libgit2/libgit2/pull/5553) +- [Missing declarations](https://github.com/libgit2/libgit2/pull/5551) +- [clar: add tap output option](https://github.com/libgit2/libgit2/pull/5541) +- [diff::parse: don't include `diff.h`](https://github.com/libgit2/libgit2/pull/5545) +- [release script: fix typo](https://github.com/libgit2/libgit2/pull/5543) +- [tests: offer exact name matching with a `$` suffix](https://github.com/libgit2/libgit2/pull/5537) +- [httpclient: support googlesource](https://github.com/libgit2/libgit2/pull/5536) +- [git_packbuilder_write: Allow setting path to NULL to use the default path](https://github.com/libgit2/libgit2/pull/5532) +- [mempack: Use threads when building the pack](https://github.com/libgit2/libgit2/pull/5531) +- [clar: use internal functions instead of /bin/cp and /bin/rm](https://github.com/libgit2/libgit2/pull/5528) +- [strarray refactoring](https://github.com/libgit2/libgit2/pull/5535) +- [CMake cleanups](https://github.com/libgit2/libgit2/pull/5481) +- [git_pool_init: allow the function to fail](https://github.com/libgit2/libgit2/pull/5526) +- [diff::workdir: actually test the buffers](https://github.com/libgit2/libgit2/pull/5529) +- [Handle unreadable configuration files](https://github.com/libgit2/libgit2/pull/5527) +- [Make git_index_write() generate valid v4 index](https://github.com/libgit2/libgit2/pull/5533) +- [OpenSSL certificate memory leak](https://github.com/libgit2/libgit2/pull/5522) +- [tests: checkout: fix flaky test due to mtime race](https://github.com/libgit2/libgit2/pull/5515) +- [cmake: Sort source files for reproducible builds](https://github.com/libgit2/libgit2/pull/5523) +- [futils: fix order of declared parameters for `git_futils_fake_symlink`](https://github.com/libgit2/libgit2/pull/5517) +- [Check the version in package.json](https://github.com/libgit2/libgit2/pull/5516) +- [tests: merge: fix printf formatter on 32 bit arches](https://github.com/libgit2/libgit2/pull/5513) +- [Update package.json](https://github.com/libgit2/libgit2/pull/5511) +- [Introduce GIT_ASSERT macros](https://github.com/libgit2/libgit2/pull/5509) +- [README.md: Add instructions for building in MinGW environment](https://github.com/libgit2/libgit2/pull/5512) +- [Fix uninitialized stack memory and NULL ptr dereference in stash_to_index](https://github.com/libgit2/libgit2/pull/5510) +- [Honor GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH for all checkout types ](https://github.com/libgit2/libgit2/pull/5378) +- [docs: add documentation for our coding style](https://github.com/libgit2/libgit2/pull/5482) +- [MSVC: Enable Control Flow Guard (CFG)](https://github.com/libgit2/libgit2/pull/5500) +- [git__hexdump: better mimic `hexdump -C`](https://github.com/libgit2/libgit2/pull/5431) +- [Feature: Allow blame to ignore whitespace change](https://github.com/libgit2/libgit2/pull/5383) +- [deps: ntlmclient: use htobe64 on NetBSD too](https://github.com/libgit2/libgit2/pull/5487) +- [sysdir: remove unused git_sysdir_get_str](https://github.com/libgit2/libgit2/pull/5485) +- [Fix typo causing removal of symbol 'git_worktree_prune_init_options'](https://github.com/libgit2/libgit2/pull/5483) +- [pack: Improve error handling for get_delta_base()](https://github.com/libgit2/libgit2/pull/5425) +- [repo::open: ensure we can open the repository](https://github.com/libgit2/libgit2/pull/5480) +- [examples: additions and fixes](https://github.com/libgit2/libgit2/pull/5421) +- [merge: cache negative cache results for similarity metrics](https://github.com/libgit2/libgit2/pull/5477) +- [Handle repository format v1](https://github.com/libgit2/libgit2/pull/5388) +- [CMake: backend selection streamlining](https://github.com/libgit2/libgit2/pull/5440) +- [refdb_fs: remove unused header file](https://github.com/libgit2/libgit2/pull/5461) +- [patch: correctly handle mode changes for renames](https://github.com/libgit2/libgit2/pull/5466) +- [gitignore: clean up patterns from old times](https://github.com/libgit2/libgit2/pull/5474) +- [README.md: update build matrix to reflect our latest releases](https://github.com/libgit2/libgit2/pull/5478) +- [Release v1.0](https://github.com/libgit2/libgit2/pull/5471) +- [refdb_backend: improve callback documentation](https://github.com/libgit2/libgit2/pull/5464) +- [credentials: provide backcompat for opaque structs](https://github.com/libgit2/libgit2/pull/5465) +- [Fix segfault when calling git_blame_buffer()](https://github.com/libgit2/libgit2/pull/5445) +- [Fix spelling error](https://github.com/libgit2/libgit2/pull/5463) +- [refdb_fs: initialize backend version](https://github.com/libgit2/libgit2/pull/5456) +- [repository: improve commondir docs](https://github.com/libgit2/libgit2/pull/5444) +- [cmake: use install directories provided via GNUInstallDirs](https://github.com/libgit2/libgit2/pull/5455) +- [azure: fix errors due to curl and removal of old VM images](https://github.com/libgit2/libgit2/pull/5451) +- [win32: don't canonicalize relative paths](https://github.com/libgit2/libgit2/pull/5435) +- [CMake booleans](https://github.com/libgit2/libgit2/pull/5422) +- [Set proper pkg-config dependency for pcre2](https://github.com/libgit2/libgit2/pull/5439) +- [httpclient: use a 16kb read buffer for macOS](https://github.com/libgit2/libgit2/pull/5432) +- [ci: provide globalsign certs for bionic](https://github.com/libgit2/libgit2/pull/5437) +- [deps: ntlmclient: fix htonll on big endian FreeBSD](https://github.com/libgit2/libgit2/pull/5426) +- [azure-pipelines: download GlobalSign's certificate manually](https://github.com/libgit2/libgit2/pull/5433) +- [deps: ntlmclient: fix missing htonll symbols on FreeBSD and SunOS](https://github.com/libgit2/libgit2/pull/5417) +- [README: add language binding link to wasm-git](https://github.com/libgit2/libgit2/pull/5420) +- [Fix #5410: fix installing libgit2.pc in wrong location](https://github.com/libgit2/libgit2/pull/5412) +- [Fix typo on GIT_USE_NEC](https://github.com/libgit2/libgit2/pull/5413) +- [tests: diff: verify that we are able to diff with empty subtrees](https://github.com/libgit2/libgit2/pull/5374) +- [README: update our build matrix to reflect current releases](https://github.com/libgit2/libgit2/pull/5408) +- [azure: docker: set up HOME variable to fix Coverity builds](https://github.com/libgit2/libgit2/pull/5409) +- [sha1_lookup: inline its only function into "pack.c"](https://github.com/libgit2/libgit2/pull/5390) +- [Coverity fixes](https://github.com/libgit2/libgit2/pull/5391) +- [Release 0.99](https://github.com/libgit2/libgit2/pull/5291) +- [Release script](https://github.com/libgit2/libgit2/pull/5372) +- [azure: fix ARM32 builds by replacing gosu(1)](https://github.com/libgit2/libgit2/pull/5406) +- [openssl: fix Valgrind issues in nightly builds](https://github.com/libgit2/libgit2/pull/5398) +- [fuzzers: Fix the documentation](https://github.com/libgit2/libgit2/pull/5400) +- [azure: fix misleading messages printed to stderr being](https://github.com/libgit2/libgit2/pull/5392) +- [tests: iterator: fix iterator expecting too few items](https://github.com/libgit2/libgit2/pull/5393) +- [transports: http: fix custom headers not being applied](https://github.com/libgit2/libgit2/pull/5387) +- [azure: fix Coverity pipeline](https://github.com/libgit2/libgit2/pull/5382) +- [azure: tests: re-run flaky proxy tests](https://github.com/libgit2/libgit2/pull/5381) +- [fetchhead: strip credentials from remote URL](https://github.com/libgit2/libgit2/pull/5373) +- [azure-pipelines: properly expand negotiate passwords](https://github.com/libgit2/libgit2/pull/5375) +- [cred: change enum to git_credential_t and GIT_CREDENTIAL_*](https://github.com/libgit2/libgit2/pull/5336) +- [Update link to libgit2 Julia language binding](https://github.com/libgit2/libgit2/pull/5371) +- [Return int from non-free functions](https://github.com/libgit2/libgit2/pull/5365) +- [HTTP: Support Apache-based servers with Negotiate](https://github.com/libgit2/libgit2/pull/5286) +- [internal types: change enums from `type_t` to `_t`](https://github.com/libgit2/libgit2/pull/5364) +- [merge: Return non-const git_repository from accessor method](https://github.com/libgit2/libgit2/pull/5358) +- [Do not return free'd git_repository object on error](https://github.com/libgit2/libgit2/pull/5361) +- [refs: refuse to delete HEAD](https://github.com/libgit2/libgit2/pull/5360) +- [index: replace map macros with inline functions](https://github.com/libgit2/libgit2/pull/5351) +- [Make type mismatch errors consistent](https://github.com/libgit2/libgit2/pull/5359) +- [win32: fix relative symlinks pointing into dirs](https://github.com/libgit2/libgit2/pull/5355) +- [ntlm: prevent (spurious) compiler warnings](https://github.com/libgit2/libgit2/pull/5354) +- [Adds support for multiple SSH auth mechanisms being used sequentially](https://github.com/libgit2/libgit2/pull/5305) +- [netops: handle intact query parameters in service_suffix removal](https://github.com/libgit2/libgit2/pull/5339) +- [Refactor packfile code to use zstream abstraction](https://github.com/libgit2/libgit2/pull/5340) +- [Fix git_submodule_sync with relative url](https://github.com/libgit2/libgit2/pull/5322) +- [http: avoid generating double slashes in url](https://github.com/libgit2/libgit2/pull/5325) +- [Correct typo in name of referenced parameter](https://github.com/libgit2/libgit2/pull/5348) +- [patch_parse: fix undefined behaviour due to arithmetic on NULL pointers](https://github.com/libgit2/libgit2/pull/5338) +- [smart_pkt: fix overflow resulting in OOB read/write of one byte](https://github.com/libgit2/libgit2/pull/5337) +- [branch: clarify documentation around branches](https://github.com/libgit2/libgit2/pull/5300) +- [examples: checkout: implement guess heuristic for remote branches](https://github.com/libgit2/libgit2/pull/5283) +- [Minor doc improvements](https://github.com/libgit2/libgit2/pull/5320) +- [attr: Update definition of binary macro](https://github.com/libgit2/libgit2/pull/5333) +- [Security fixes for master](https://github.com/libgit2/libgit2/pull/5331) +- [release.md: note that we do two security releases](https://github.com/libgit2/libgit2/pull/5318) +- [MSVC: Fix warning C4133 on x64: "function": Incompatible types - from "unsigned long *" to "size_t *"](https://github.com/libgit2/libgit2/pull/5317) +- [ci: only push docs from the libgit2/libgit2 repo](https://github.com/libgit2/libgit2/pull/5316) +- [global: convert to fiber-local storage to fix exit races](https://github.com/libgit2/libgit2/pull/5314) +- [Fix copy&paste in git_cherrypick_commit docstring](https://github.com/libgit2/libgit2/pull/5315) +- [patch_parse: fix out-of-bounds reads caused by integer underflow](https://github.com/libgit2/libgit2/pull/5312) +- [tests: fix compiler warning if tracing is disabled](https://github.com/libgit2/libgit2/pull/5311) +- [tests: config: only test parsing huge file with GITTEST_INVASIVE_SPEED](https://github.com/libgit2/libgit2/pull/5313) +- [diff: complete support for git patchid](https://github.com/libgit2/libgit2/pull/5306) +- [Memory optimizations for config entries](https://github.com/libgit2/libgit2/pull/5243) +- [ssh: include sha256 host key hash when supported](https://github.com/libgit2/libgit2/pull/5307) +- [Various examples shape-ups](https://github.com/libgit2/libgit2/pull/5272) +- [Improve trace support in tests](https://github.com/libgit2/libgit2/pull/5309) +- [Move `git_off_t` to `git_object_size_t`](https://github.com/libgit2/libgit2/pull/5123) +- [Add compat typdef for git_attr_t](https://github.com/libgit2/libgit2/pull/5310) +- [CI Build Updates](https://github.com/libgit2/libgit2/pull/5308) +- [patch_parse: use paths from "---"/"+++" lines for binary patches](https://github.com/libgit2/libgit2/pull/5303) +- [Follow 308 redirect in WinHTTP transport](https://github.com/libgit2/libgit2/pull/5285) +- [fileops: correct error return on p_lstat failures when mkdir](https://github.com/libgit2/libgit2/pull/5302) +- [config_mem: implement support for snapshots](https://github.com/libgit2/libgit2/pull/5299) +- [patch_parse: fix segfault when header path contains whitespace only](https://github.com/libgit2/libgit2/pull/5298) +- [config_file: fix race when creating an iterator](https://github.com/libgit2/libgit2/pull/5282) +- [Fix crash if snapshotting a config_snapshot](https://github.com/libgit2/libgit2/pull/5293) +- [fix a bug introduced in 8a23597b](https://github.com/libgit2/libgit2/pull/5295) +- [reflogs: fix behaviour around reflogs with newlines](https://github.com/libgit2/libgit2/pull/5275) +- [commit: verify objects exist in git_commit_with_signature](https://github.com/libgit2/libgit2/pull/5289) +- [patch_parse: fixes for fuzzing errors](https://github.com/libgit2/libgit2/pull/5276) +- [apply: add GIT_APPLY_CHECK](https://github.com/libgit2/libgit2/pull/5227) +- [refs: unlock unmodified refs on transaction commit](https://github.com/libgit2/libgit2/pull/5264) +- [fuzzers: add a new fuzzer for patch parsing](https://github.com/libgit2/libgit2/pull/5269) +- [patch_parse: handle patches without extended headers](https://github.com/libgit2/libgit2/pull/5273) +- [Provide a wrapper for simple submodule clone steps](https://github.com/libgit2/libgit2/pull/4637) +- [macOS GSS Support](https://github.com/libgit2/libgit2/pull/5238) +- [cmake: correct the link stanza for CoreFoundation](https://github.com/libgit2/libgit2/pull/5265) +- [Fix file locking on POSIX OS](https://github.com/libgit2/libgit2/pull/5257) +- [cmake: update minimum CMake version to v3.5.1](https://github.com/libgit2/libgit2/pull/5260) +- [patch_parse: handle patches with new empty files](https://github.com/libgit2/libgit2/pull/5248) +- [DRY commit parsing](https://github.com/libgit2/libgit2/pull/4445) +- [azure: avoid building and testing in Docker as root](https://github.com/libgit2/libgit2/pull/5239) +- [regexp: implement a new regular expression API](https://github.com/libgit2/libgit2/pull/5226) +- [git_refdb API fixes](https://github.com/libgit2/libgit2/pull/5106) +- [Don't use enum for flags](https://github.com/libgit2/libgit2/pull/5242) +- [valgrind: suppress memory leaks in libssh2_session_handshake](https://github.com/libgit2/libgit2/pull/5240) +- [buffer: fix writes into out-of-memory buffers](https://github.com/libgit2/libgit2/pull/5232) +- [cred: add missing private header in GSSAPI block](https://github.com/libgit2/libgit2/pull/5237) +- [CMake pkg-config modulification](https://github.com/libgit2/libgit2/pull/5206) +- [Update chat resources in README.md](https://github.com/libgit2/libgit2/pull/5229) +- [Circular header splitting](https://github.com/libgit2/libgit2/pull/5223) + +## v0.27.0 [(2020-07-28)](https://github.com/nodegit/nodegit/releases/tag/v0.27.0) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.5...v0.27.0) + +#### Summary of changes +- Expose git_remote_rename +- Bump OpenSSL from 1.1.0i -> 1.1.1c in Windows/Mac OS Electron builds +- Replace unmaintained request library with got +- Remove promisify-node and use vanilla promises for all NodeGit promises +- Prebuilds for Node 14, deprecate Node 8 +- Persist RemoteCallbacks and ProxyOptions on the remote if using Remote.prototype.connect. This fixes a segfault when using any routines on a connected remote. + +####Merged PRs into NodeGit +- [Upgrade build environments #1785](https://github.com/nodegit/nodegit/pull/1785) +- [Remote needs to persist the callback/proxyOpts/headers #1784](https://github.com/nodegit/nodegit/pull/1784) +- [Remove promisify-node and remove old callback api remnants](https://github.com/nodegit/nodegit/pull/1772) +- [Replace deprecated package request with got](https://github.com/nodegit/nodegit/pull/1771) +- [Bump OpenSSL prebuilt to 1.1.1c](https://github.com/nodegit/nodegit/pull/1770) +- [Expose git_remote_rename](https://github.com/nodegit/nodegit/pull/1767) +- [Dedupe Remote.prototype.fetch](https://github.com/nodegit/nodegit/pull/1766) + +## v0.27.0-alpha.1 [(2020-03-26)](https://github.com/nodegit/nodegit/releases/tag/v0.27.0-alpha.1) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.5...v0.27.0-alpha.1) + +#### Summary of changes +- Expose git_remote_rename +- Bump OpenSSL from 1.1.0i -> 1.1.1c in Windows/Mac OS Electron builds +- Replace unmaintained request library with got +- Remove promisify-node and use vanilla promises for all NodeGit promises + +#### Merged PRs into NodeGit +- [Remove promisify-node and remove old callback api remnants](https://github.com/nodegit/nodegit/pull/1772) +- [Replace deprecated package request with got](https://github.com/nodegit/nodegit/pull/1771) +- [Bump OpenSSL prebuilt to 1.1.1c](https://github.com/nodegit/nodegit/pull/1770) +- [Expose git_remote_rename](https://github.com/nodegit/nodegit/pull/1767) +- [Dedupe Remote.prototype.fetch](https://github.com/nodegit/nodegit/pull/1766) + + +## v0.26.5 [(2020-02-27)](https://github.com/nodegit/nodegit/releases/tag/v0.26.5) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.4...v0.26.5) + +#### Summary of changes +- Bring in improvement to client certificate handling on Windows from [winhttp: support optional client cert #5384](https://github.com/libgit2/libgit2/pull/5384) +- `Commit.prototype.parent()` now correctly assigns the repo property on the retrieved commit. This should solve certain bugs when working with a commit retrieved from `parent`. + +#### Merged PRs into NodeGit +- [Bring in Libgit2 #5384 to NodeGit](https://github.com/nodegit/nodegit/pull/1758) +- [Fix behavior of Commit#parent](https://github.com/nodegit/nodegit/pull/1509) +- [Remove DiffList](https://github.com/nodegit/nodegit/pull/1733) +- [Remove unnecessary assignment of Commit#repo](https://github.com/nodegit/nodegit/pull/1508) + +#### Merged PRs into LibGit2 +- [winhttp: support optional client cert #5384](https://github.com/libgit2/libgit2/pull/5384) +- [Support `core.longpaths` on Windows #5347](https://github.com/libgit2/libgit2/pull/5347) +- [Parallelize checkout_create_the_new for perf #4205](https://github.com/libgit2/libgit2/pull/4205) + + +## v0.26.4 [(2020-01-14)](https://github.com/nodegit/nodegit/releases/tag/v0.26.4) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.3...v0.26.4) + +#### Summary of changes +- Bumped LibGit2 + - Now can be configured to support longpaths on Windows. Does not respect the config value, but is configured through `NodeGit.Libgit2.opts`. See [#1748](https://github.com/nodegit/nodegit/pull/1748) for details. + - Support for complex SSH auth creds handshakes +- Pulled in patch for Libssh2 that covers an integer overflow, see [Libssh2#402](https://github.com/libssh2/libssh2/pull/402) + +#### Merged PRs into NodeGit +- [Fix some issues from the libgit2 bump](https://github.com/nodegit/nodegit/pull/1751) +- [Add option to support longpaths on Windows](https://github.com/nodegit/nodegit/pull/1748) +- [Bring in libssh2#402](https://github.com/nodegit/nodegit/pull/1749) +- [Wait for copy and remove promises to finish](https://github.com/nodegit/nodegit/pull/1730) + +#### Merged PRs into LibGit2 +- [Support `core.longpaths` on Windows #5347](https://github.com/libgit2/libgit2/pull/5347) +- [Parallelize checkout_create_the_new for perf #4205](https://github.com/libgit2/libgit2/pull/4205) +- [win32: fix relative symlinks pointing into dirs](https://github.com/libgit2/libgit2/pull/5355) +- [ntlm: prevent (spurious) compiler warnings](https://github.com/libgit2/libgit2/pull/5354) +- [Adds support for multiple SSH auth mechanisms being used sequentially](https://github.com/libgit2/libgit2/pull/5305) +- [netops: handle intact query parameters in service_suffix removal](https://github.com/libgit2/libgit2/pull/5339) +- [Refactor packfile code to use zstream abstraction](https://github.com/libgit2/libgit2/pull/5340) +- [Fix git_submodule_sync with relative url](https://github.com/libgit2/libgit2/pull/5322) +- [http: avoid generating double slashes in url](https://github.com/libgit2/libgit2/pull/5325) +- [Correct typo in name of referenced parameter](https://github.com/libgit2/libgit2/pull/5348) +- [patch_parse: fix undefined behaviour due to arithmetic on NULL pointers](https://github.com/libgit2/libgit2/pull/5338) +- [smart_pkt: fix overflow resulting in OOB read/write of one byte](https://github.com/libgit2/libgit2/pull/5337) +- [branch: clarify documentation around branches](https://github.com/libgit2/libgit2/pull/5300) +- [examples: checkout: implement guess heuristic for remote branches](https://github.com/libgit2/libgit2/pull/5283) +- [Minor doc improvements](https://github.com/libgit2/libgit2/pull/5320) +- [attr: Update definition of binary macro](https://github.com/libgit2/libgit2/pull/5333) +- [Security fixes for master](https://github.com/libgit2/libgit2/pull/5331) +- [release.md: note that we do two security releases](https://github.com/libgit2/libgit2/pull/5318) +- [MSVC: Fix warning C4133 on x64: "function": Incompatible types - from "unsigned long *" to "size_t *"](https://github.com/libgit2/libgit2/pull/5317) +- [ci: only push docs from the libgit2/libgit2 repo](https://github.com/libgit2/libgit2/pull/5316) +- [global: convert to fiber-local storage to fix exit races](https://github.com/libgit2/libgit2/pull/5314) +- [Fix copy&paste in git_cherrypick_commit docstring](https://github.com/libgit2/libgit2/pull/5315) +- [patch_parse: fix out-of-bounds reads caused by integer underflow](https://github.com/libgit2/libgit2/pull/5312) +- [tests: fix compiler warning if tracing is disabled](https://github.com/libgit2/libgit2/pull/5311) +- [tests: config: only test parsing huge file with GITTEST_INVASIVE_SPEED](https://github.com/libgit2/libgit2/pull/5313) +- [diff: complete support for git patchid](https://github.com/libgit2/libgit2/pull/5306) +- [Memory optimizations for config entries](https://github.com/libgit2/libgit2/pull/5243) +- [ssh: include sha256 host key hash when supported](https://github.com/libgit2/libgit2/pull/5307) +- [Various examples shape-ups](https://github.com/libgit2/libgit2/pull/5272) +- [Improve trace support in tests](https://github.com/libgit2/libgit2/pull/5309) +- [Move `git_off_t` to `git_object_size_t`](https://github.com/libgit2/libgit2/pull/5123) +- [Add compat typdef for git_attr_t](https://github.com/libgit2/libgit2/pull/5310) +- [CI Build Updates](https://github.com/libgit2/libgit2/pull/5308) +- [patch_parse: use paths from "---"/"+++" lines for binary patches](https://github.com/libgit2/libgit2/pull/5303) +- [Follow 308 redirect in WinHTTP transport](https://github.com/libgit2/libgit2/pull/5285) +- [fileops: correct error return on p_lstat failures when mkdir](https://github.com/libgit2/libgit2/pull/5302) +- [config_mem: implement support for snapshots](https://github.com/libgit2/libgit2/pull/5299) +- [patch_parse: fix segfault when header path contains whitespace only](https://github.com/libgit2/libgit2/pull/5298) +- [config_file: fix race when creating an iterator](https://github.com/libgit2/libgit2/pull/5282) +- [Fix crash if snapshotting a config_snapshot](https://github.com/libgit2/libgit2/pull/5293) +- [fix a bug introduced in 8a23597b](https://github.com/libgit2/libgit2/pull/5295) +- [reflogs: fix behaviour around reflogs with newlines](https://github.com/libgit2/libgit2/pull/5275) +- [commit: verify objects exist in git_commit_with_signature](https://github.com/libgit2/libgit2/pull/5289) +- [patch_parse: fixes for fuzzing errors](https://github.com/libgit2/libgit2/pull/5276) +- [apply: add GIT_APPLY_CHECK](https://github.com/libgit2/libgit2/pull/5227) +- [refs: unlock unmodified refs on transaction commit](https://github.com/libgit2/libgit2/pull/5264) +- [fuzzers: add a new fuzzer for patch parsing](https://github.com/libgit2/libgit2/pull/5269) +- [patch_parse: handle patches without extended headers](https://github.com/libgit2/libgit2/pull/5273) +- [Provide a wrapper for simple submodule clone steps](https://github.com/libgit2/libgit2/pull/4637) +- [macOS GSS Support](https://github.com/libgit2/libgit2/pull/5238) +- [cmake: correct the link stanza for CoreFoundation](https://github.com/libgit2/libgit2/pull/5265) +- [Fix file locking on POSIX OS](https://github.com/libgit2/libgit2/pull/5257) +- [cmake: update minimum CMake version to v3.5.1](https://github.com/libgit2/libgit2/pull/5260) +- [patch_parse: handle patches with new empty files](https://github.com/libgit2/libgit2/pull/5248) +- [DRY commit parsing](https://github.com/libgit2/libgit2/pull/4445) +- [azure: avoid building and testing in Docker as root](https://github.com/libgit2/libgit2/pull/5239) +- [regexp: implement a new regular expression API](https://github.com/libgit2/libgit2/pull/5226) +- [git_refdb API fixes](https://github.com/libgit2/libgit2/pull/5106) +- [Don't use enum for flags](https://github.com/libgit2/libgit2/pull/5242) +- [valgrind: suppress memory leaks in libssh2_session_handshake](https://github.com/libgit2/libgit2/pull/5240) +- [buffer: fix writes into out-of-memory buffers](https://github.com/libgit2/libgit2/pull/5232) +- [cred: add missing private header in GSSAPI block](https://github.com/libgit2/libgit2/pull/5237) +- [CMake pkg-config modulification](https://github.com/libgit2/libgit2/pull/5206) +- [Update chat resources in README.md](https://github.com/libgit2/libgit2/pull/5229) +- [Circular header splitting](https://github.com/libgit2/libgit2/pull/5223) + + +## v0.26.3 [(2019-12-10)](https://github.com/nodegit/nodegit/releases/tag/v0.26.3) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.2...v0.26.3) + +#### Summary of changes +- Include LibGit2 security patch: https://github.com/libgit2/libgit2/releases/tag/v0.28.4 + +#### Merged PRs into NodeGit +- [Bring in security patches from libgit2 #1743](https://github.com/nodegit/nodegit/pull/1743) + + +## v0.26.2 [(2019-09-26)](https://github.com/nodegit/nodegit/releases/tag/v0.26.2) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.1...v0.26.2) + +#### Summary of changes +- Added options to fetch additional data (gpg signature) from LibGit2 in revWalk.prototype.commitWalk and return plain objects + - _revWalk.prototype.commitWalk(numCommits: number, { returnPlainObjects: boolean })_ + +#### Merged PRs into NodeGit +- [Optionally retrieve more data on commit walk #1728](https://github.com/nodegit/nodegit/pull/1728) + + +## v0.26.1 [(2019-09-16)](https://github.com/nodegit/nodegit/releases/tag/v0.26.1) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.26.0...v0.26.1) + +#### Summary of changes +- Bumped LibGit2 + - Additional git ignore fixes + - Allow credentials callback to return any credential type from list of supported types + - Memory leak and allocation fixes +- updateTips has optional parameters and should convert plain objects into options structs correctly now +- Added Nodegit.Blob.prototype.filter, this should be used instead of NodeGit.Blob.filteredContent as it is not deprecated. + +#### Merged PRs into NodeGit +- [Bump libgit2 to latest fork of master #1723](https://github.com/nodegit/nodegit/pull/1723) +- [updateTips: optional param and normalizeOptions #1722](https://github.com/nodegit/nodegit/pull/1722) + +#### Merged PRs into LibGit2 +- [Parallelize checkout_create_the_new for perf #4205](https://github.com/libgit2/libgit2/pull/4205) +- [azure: build Docker images as part of the pipeline](https://github.com/libgit2/libgit2/pull/5198) +- [smart: use push_glob instead of manual filtering](https://github.com/libgit2/libgit2/pull/5195) +- [ntlm: fix failure to find openssl headers](https://github.com/libgit2/libgit2/pull/5216) +- [cmake: remove extraneous logging](https://github.com/libgit2/libgit2/pull/5222) +- [open:fix memory leak when passing NULL to git_repository_open_ext](https://github.com/libgit2/libgit2/pull/5224) +- [apply: Fix a patch corruption related to EOFNL handling](https://github.com/libgit2/libgit2/pull/5209) +- [ignore: correct handling of nested rules overriding wild card unignore](https://github.com/libgit2/libgit2/pull/5210) +- [Memory allocation fixes for diff generator](https://github.com/libgit2/libgit2/pull/5214) +- [Use an HTTP scheme that supports the given credentials](https://github.com/libgit2/libgit2/pull/5212) +- [apply: git_apply_to_tree fails to apply patches that add new files](https://github.com/libgit2/libgit2/pull/5208) +- [Optionally read `.gitattributes` from HEAD](https://github.com/libgit2/libgit2/pull/5189) +- [config: implement "onbranch" conditional](https://github.com/libgit2/libgit2/pull/5196) +- [Fix include casing for case-sensitive filesystems.](https://github.com/libgit2/libgit2/pull/5213) +- [util: use 64 bit timer on Windows](https://github.com/libgit2/libgit2/pull/5054) +- [Memory allocation audit](https://github.com/libgit2/libgit2/pull/5200) +- [clone: don't decode URL percent encodings](https://github.com/libgit2/libgit2/pull/5187) +- [Security updates from 0.28.3](https://github.com/libgit2/libgit2/pull/5202) + + +## v0.26.0 [(2019-09-09)](https://github.com/nodegit/nodegit/releases/tag/v0.26.0) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.1...v0.26.0) + +#### Summary of changes +- Bumped libssh2 to 1.9 for security patch +- Remote.prototype.upload and Remote.prototype.updateTips should be async now + +#### Merged PRs into NodeGit +- [GitRemote upload and updateTips are async #1720](https://github.com/nodegit/nodegit/pull/1720) +- [Update libssh2 to 1.9 #1719](https://github.com/nodegit/nodegit/pull/1719) + + +## v0.25.1 [(2019-08-13)](https://github.com/nodegit/nodegit/releases/tag/v0.25.1) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0...v0.25.1) + +#### Summary of changes +Security patch for LibGit2: +- A carefully constructed commit object with a very large number + of parents may lead to potential out-of-bounds writes or + potential denial of service. + +- The ProgramData configuration file is always read for compatibility + with Git for Windows and Portable Git installations. The ProgramData + location is not necessarily writable only by administrators, so we + now ensure that the configuration file is owned by the administrator + or the current user. + +Additionally: +- Stash should run much faster now. + +#### Merged PRs into LibGit2 +- [Parallelize checkout_create_the_new for perf #4205](https://github.com/libgit2/libgit2/pull/4205) +- [stash: avoid recomputing tree when committing worktree](https://github.com/libgit2/libgit2/pull/5113) +- [Variadic macros](https://github.com/libgit2/libgit2/pull/5121) +- [Add sign capability to git_rebase_commit](https://github.com/libgit2/libgit2/pull/4913) +- [remote: remove unused block of code](https://github.com/libgit2/libgit2/pull/5197) +- [Adjust printf specifiers in examples code](https://github.com/libgit2/libgit2/pull/5146) +- [config: check if we are running in a sandboxed environment](https://github.com/libgit2/libgit2/pull/5191) +- [Fix example checkout to forbid rather than require --](https://github.com/libgit2/libgit2/pull/5184) +- [editorconfig: update to match our coding style](https://github.com/libgit2/libgit2/pull/5183) +- [Compare buffers in diff example](https://github.com/libgit2/libgit2/pull/5125) +- [Include ahead_behind in the test suite](https://github.com/libgit2/libgit2/pull/5135) +- [config: separate file and snapshot backends](https://github.com/libgit2/libgit2/pull/5186) +- [object: deprecate git_object__size for removal](https://github.com/libgit2/libgit2/pull/5192) + + +## v0.25.0 [(2019-08-09)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.24.3...v0.25.0) + +#### Summary of changes +##### BREAKING +- `getRemotes` no longer returns remote names, it now returns remote objects directly. Use `getRemoteNames` to get a list of remote names. +- Converted Buf.prototype.set and Buf.prototype.grow from async to sync +- `Repository.prototype.continueRebase` will now throw on any error except for EAPPLIED on the first call to `Rebase.prototype.next` +- Drops support for Ubuntu 14 after EOL +- Removed access to the `diff_so_far` param in `git_diff_notify_cb` and `git_diff_progress_cb` +- Changed `FilterSource.prototype.repo` to async to prevent segfaults on filters that run during `Submodule.status` +- Changed `NodeGit.Signature.default` to async, because it actually ends up reading the config. +- Fixed bug where templates were not reporting errors for synchronous methods. It's a bit of a wide net, but in general, + it is now possible certain sync methods in NodeGit will begin failing that did not fail before. This is the correct + behavior. + +##### Deprecations +- Support signing commits in `Repository.prototype.mergeBranches`. The last parameter `processMergeMessageCallback` is now deprecated, but will continue to work. Use the options object instead, which will contain the `processMergeMessageCallback`, as well as the `signingCb`. + +##### New +- Support for Node 12 +- Add signing support for commits and annotated tags + - Enforced consistent use of signing callbacks within the application. Any object that implements the signingCallback + pattern for signing commits or tags should use the exact same callback type and with the same meaning. + `type SigningCallback = (content: string) => {| code: number, field?: string, signedData?: string |};` + If the code is `NodeGit.Error.CODE.OK` or 0, the operation will succeed and _at least_ signedData is expected to be filled out. + If the code is a negative number, except for `NodeGit.Error.CODE.PASSTHROUGH`, the signing operation will fail. + If the code is `NodeGit.Error.CODE.PASSTHROUGH`, the operation will continue without signing the object. +- Exposed `AnnotatedCommit` methods: + - `AnnotatedCommit.prototype.ref` +- Exposed `Apply` methods: + - `Apply.apply` applies a diff to the repository + - `Apply.toTree` applies a diff to a tree +- Exposed `Config` methods: + - `Config.prototype.deleteEntry` + - `Config.prototype.deleteMultivar` + - `Config.prototype.getBool` + - `Config.prototype.getInt32` + - `Config.prototype.getInt64` + - `Config.prototype.setMultivar` + - `Config.prototype.snapshot` +- Exposed `ConfigIterator` with methods: + - `ConfigIterator.create` + - `ConfigIterator.createGlob` + - `ConfigIterator.createMultivar` + - `ConfigIterator.prototype.next` +- Exposed `IndexNameEntry`: + - `IndexNameEntry.add` + - `IndexNameEntry.clear` + - `IndexNameEntry.entryCount` + - `IndexNameEntry.getByIndex` + - `IndexNameEntry.prototype.ancestor` + - `IndexNameEntry.prototype.ours` + - `IndexNameEntry.prototype.theirs` +- Exposed `IndexReucEntry`: + - `IndexReucEntry.add` + - `IndexReucEntry.clear` + - `IndexReucEntry.entryCount` + - `IndexReucEntry.find` + - `IndexReucEntry.getByIndex` + - `IndexReucEntry.getByPath` + - `IndexReucEntry.remove` + - `IndexReucEntry.prototype.mode` + - `IndexReucEntry.prototype.oid` + - `IndexReucEntry.prototype.path` +- Exposed `Mailmap`: + - `Mailmap.prototype.addEntry` + - `Mailmap.fromBuffer` + - `Mailmap.fromRepository` + - `Mailmap.create` + - `Mailmap.prototype.resolve` + - `Mailmap.prototype.resolveSignature` +- Exposed `Merge` methods: + - `Merge.analysis` + - `Merge.analysisForRef` +- Exposed `Path.isGitfile` +- Added `RebaseOptions` to `Repository.prototype.rebaseContinue` +- Added `NodeGit.Reference.updateTerminal` +- Exposed `Remote` methods: + - `Remote.createWithOpts` +- Exposed `Tag.createFromBuffer` +- Expose `Tree.prototype.createUpdated(repo, numUpdates, updates)` + +##### Fixed +- Updates lodash dependency to address security notice +- Fixed a prototype problem with cherrypick, merge, and other collections that have a function at their root. call, apply, and bind should now be on NodeGit.Cherrypick. +- Bumped libssh2 to resolve security notice. +- Improve speed and correctness of fileHistoryWalk. The API should not have changed; however, when the end of the walk has been reached, `reachedEndOfHistory` will be specified on the resulting array. +- Fixes openssl prebuilt downloads for electron builds +- Fixes commits retrieved from `Commit.prototype.parent` +- Bump Node-Gyp to 4.0.0 to fix tar security vulnerability +- Optimized a set of routines in NodeGit. These methods as written in Javascript require hundreds or thousands of requests to async workers to retrieve data. We've batched these requests and performed them on a single async worker. There are now native implementations of the following: + - `Repository.prototype.getReferences`: Retrieves all references on async worker. + - `Repository.prototype.getRemotes`: Retrieves all remotes on async worker. + - `Repository.prototype.getSubmodules`: Retrieves all submodules on async worker. + - `Repository.prototype.refreshReferences`: Open sourced function from GitKraken. Grabs a lot of information about references on an async worker. + - `Revwalk.prototype.commitWalk`: Retrieves up to N commits from a revwalk on an async worker. +- When installing on a machine that has yarn and does not have npm, the preinstall script should succeed now +- `ceiling_dirs` is now an optional parameter to `Repository.discover` +- Added support for building on IBM i (PASE) machines +- Fixed leak where struct/option types were leaking libgit2 pointers +- Switched `NodeGit.Oid.fromString`'s internal implementation from `git_oid_fromstr` to `git_oid_fromstrp` +- Fixed builds for Electron 4 +- Updated `Signature.prototype.toString` to optionally include timestamps + +##### LibGit2 Bump +- Fixes gitignore issue with pattern negation +- `Remote.list` now gets the correct list of remotes if remotes are changed by external process +- Always use builtin regex for linux for portability +- Use Iconv on OSX for better internationalization support. +- Removed LibCurl from LibGit2: + - Now with built-in NTLM proxy support + - Now with built-in Negotiate/Kerberos proxy support + - Working with proxy URLs may be different as curl could auto detect scheme for proxies +- Various git config fixes +- Various git ignore fixes +- Various libgit2 performance improvements +- Windows/Linux now use PCRE for regex, OSX uses regcomp_l, this should address collation issues in diffing + +#### Merged PRs into NodeGit +- [Add deprecation warnings for enums that need them. #1711](https://github.com/nodegit/nodegit/pull/1711) +- [https://github.com/nodegit/nodegit/pull/1706](https://github.com/nodegit/nodegit/pull/1706) +- [Reintroduce Odb.prototype.addDiskAlternate #1695](https://github.com/nodegit/nodegit/pull/1695) +- [Fix behaviour of Repository#getReferences #1708](https://github.com/nodegit/nodegit/pull/1708) +- [Bump libgit2 #1705](https://github.com/nodegit/nodegit/pull/1705) +- [Fix Tree#createUpdated #1704](https://github.com/nodegit/nodegit/pull/1704) +- [Fix failing tests on CI #1703](https://github.com/nodegit/nodegit/pull/1703) +- [Audit lodash and fix package-lock.json #1702](https://github.com/nodegit/nodegit/pull/1702) +- [Implement support for Node 12 #1696](https://github.com/nodegit/nodegit/pull/1696) +- [Remove NSEC #1699](https://github.com/nodegit/nodegit/pull/1699) +- [Use builtin regex library for linux for better portability #1693](https://github.com/nodegit/nodegit/pull/1693) +- [Remove pcre-config from binding.gyp #1694](https://github.com/nodegit/nodegit/pull/1694) +- [refresh_references.cc: skip refs that can't be directly resolved #1689](https://github.com/nodegit/nodegit/pull/1689) +- [Bump libgit2 to fork of latest master #1690](https://github.com/nodegit/nodegit/pull/1690) +- [Bump libssh2 to 1.8.2 and fix some npm audit warnings #1678](https://github.com/nodegit/nodegit/pull/1678) +- [Root functions should keep their function prototypes correctly #1681](https://github.com/nodegit/nodegit/pull/1681) +- [refresh_references.cc: bust LibGit2 remote list cache by reading config #1685](https://github.com/nodegit/nodegit/pull/1685) +- [Implement faster file history walk #1676](https://github.com/nodegit/nodegit/pull/1676) +- [EOL for Node 6 and Ubuntu 14.04 #1649](https://github.com/nodegit/nodegit/pull/1649) +- [Ensures that commits from parent(*) has a repository #1658](https://github.com/nodegit/nodegit/pull/1658) +- [Update openssl conan distributions #1663](https://github.com/nodegit/nodegit/pull/1663) +- [Support signing in Repository#mergeBranches #1664](https://github.com/nodegit/nodegit/pull/1664) +- [Dependency upgrade node-gyp upgraded to 4.0.0 #1672](https://github.com/nodegit/nodegit/pull/1672) +- [Add additional getters to streamline information gathering (breaking change) #1671](https://github.com/nodegit/nodegit/pull/1671) +- [Clean up some dangerous memory accesses in callbacks #1642](https://github.com/nodegit/nodegit/pull/1642) +- [Output the item that was deprecated when giving deprecation notice #1643](https://github.com/nodegit/nodegit/pull/1643) +- [Don't fail yarn installs when we can't find npm #1644](https://github.com/nodegit/nodegit/pull/1644) +- [`ceiling_dirs` parameter in `Repository.discover` is optional #1245](https://github.com/nodegit/nodegit/pull/1245) +- [Add missing `shouldAlloc` declarations for git_merge_analysis* functions #1641](https://github.com/nodegit/nodegit/pull/1641) +- [Fix regex state causing subsequent runs of Tag.extractSignature to fail #1630](https://github.com/nodegit/nodegit/pull/1630) +- [Update LibGit2 docs to v0.28.0 #1631](https://github.com/nodegit/nodegit/pull/1631) +- [Add support for building on IBM i (PASE) #1634](https://github.com/nodegit/nodegit/pull/1634) +- [Expose more config methods #1635](https://github.com/nodegit/nodegit/pull/1635) +- [Catch errors and pass them to libgit2 as error codes in rebase signingcb #1636](https://github.com/nodegit/nodegit/pull/1636) +- [Simplify check for IBM i operating system #1637](https://github.com/nodegit/nodegit/pull/1637) +- [Bump LibGit2 to fork of v0.28.1 #1638](https://github.com/nodegit/nodegit/pull/1638) +- [We should clear the persistent cell in structs when they are destroyed #1629](https://github.com/nodegit/nodegit/pull/1629) +- [Fix "errorno" typo #1628](https://github.com/nodegit/nodegit/pull/1628) +- [Bump Libgit2 fork to v0.28.0 #1627](https://github.com/nodegit/nodegit/pull/1627) +- [Fix macOS and Windows Electron 4 builds #1626](https://github.com/nodegit/nodegit/pull/1626) +- [Fix non-existent / dangling refs cause Repository.prototype.createCommitWithSignature to fail #1624](https://github.com/nodegit/nodegit/pull/1624) +- [Handle new gyp information for electron builds #1623](https://github.com/nodegit/nodegit/pull/1623) +- [Use same API for signingCb in all places that can be crypto signed #1621](https://github.com/nodegit/nodegit/pull/1621) +- [Breaking: Repository.prototype.continueRebase enhancements #1619](https://github.com/nodegit/nodegit/pull/1619) +- [adds support for gpg commit signing (fixes #1018) #1448](https://github.com/nodegit/nodegit/pull/1448) +- [Add `updateRef` parameter to Repository#createCommitWithSignature #1610](https://github.com/nodegit/nodegit/pull/1610) +- [Documentation fixes. #1611](https://github.com/nodegit/nodegit/pull/1611) +- [Add Commit#amendWithSignature #1616](https://github.com/nodegit/nodegit/pull/1616) +- [Bump libgit2 to a preview of v0.28 #1615](https://github.com/nodegit/nodegit/pull/1615) +- [Fix issues with Commit#amendWithSignature #1617](https://github.com/nodegit/nodegit/pull/1617) +- [Marked Repository.createBlobFromBuffer as async #1614](https://github.com/nodegit/nodegit/pull/1614) +- [Add functionality for creating Tags with signatures and extracting signatures from Tags #1618](https://github.com/nodegit/nodegit/pull/1618) + +#### Merged PRs into LibGit2 +- [Add sign capability to git_rebase_commit #4913](https://github.com/libgit2/libgit2/pull/4913) +- [Parallelize checkout_create_the_new for perf #4205](https://github.com/libgit2/libgit2/pull/4205) +- [config_file: refresh when creating an iterator](https://github.com/libgit2/libgit2/pull/5181) +- [azure: drop powershell](https://github.com/libgit2/libgit2/pull/5141) +- [fuzzer: use futils instead of fileops](https://github.com/libgit2/libgit2/pull/5180) +- [w32: fix unlinking of directory symlinks](https://github.com/libgit2/libgit2/pull/5151) +- [patch_parse: fix segfault due to line containing static contents](https://github.com/libgit2/libgit2/pull/5179) +- [ignore: fix determining whether a shorter pattern negates another](https://github.com/libgit2/libgit2/pull/5173) +- [patch_parse: handle missing newline indicator in old file](https://github.com/libgit2/libgit2/pull/5159) +- [patch_parse: do not depend on parsed buffer's lifetime](https://github.com/libgit2/libgit2/pull/5158) +- [sha1: fix compilation of WinHTTP backend](https://github.com/libgit2/libgit2/pull/5174) +- [repository: do not initialize HEAD if it's provided by templates](https://github.com/libgit2/libgit2/pull/5176) +- [configuration: cvar -> configmap](https://github.com/libgit2/libgit2/pull/5138) +- [Evict cache items more efficiently](https://github.com/libgit2/libgit2/pull/5172) +- [clar: fix suite count](https://github.com/libgit2/libgit2/pull/5175) +- [Ignore VS2017 specific files and folders](https://github.com/libgit2/libgit2/pull/5163) +- [gitattributes: ignore macros defined in subdirectories](https://github.com/libgit2/libgit2/pull/5156) +- [clar: correctly account for "data" suites when counting](https://github.com/libgit2/libgit2/pull/5168) +- [Allocate memory more efficiently when packing objects](https://github.com/libgit2/libgit2/pull/5170) +- [fileops: fix creation of directory in filesystem root](https://github.com/libgit2/libgit2/pull/5131) +- [win32: fix fuzzers and have CI build them](https://github.com/libgit2/libgit2/pull/5160) +- [Config parser separation](https://github.com/libgit2/libgit2/pull/5134) +- [config_file: implement stat cache to avoid repeated rehashing](https://github.com/libgit2/libgit2/pull/5132) +- [ci: build with ENABLE_WERROR on Windows](https://github.com/libgit2/libgit2/pull/5143) +- [Fix Regression: attr: Correctly load system attr file (on Windows)](https://github.com/libgit2/libgit2/pull/5152) +- [hash: fix missing error return on production builds](https://github.com/libgit2/libgit2/pull/5145) +- [Resolve static check warnings in example code](https://github.com/libgit2/libgit2/pull/5142) +- [Multiple hash algorithms](https://github.com/libgit2/libgit2/pull/4438) +- [More documentation](https://github.com/libgit2/libgit2/pull/5128) +- [Incomplete commondir support](https://github.com/libgit2/libgit2/pull/4967) +- [Remove warnings](https://github.com/libgit2/libgit2/pull/5078) +- [Re-run flaky tests](https://github.com/libgit2/libgit2/pull/5140) +- [errors: use lowercase](https://github.com/libgit2/libgit2/pull/5137) +- [largefile tests: only write 2GB on 32-bit platforms](https://github.com/libgit2/libgit2/pull/5136) +- [Fix broken link in README](https://github.com/libgit2/libgit2/pull/5129) +- [net: remove unused `git_headlist_cb`](https://github.com/libgit2/libgit2/pull/5122) +- [cmake: default NTLM client to off if no HTTPS support](https://github.com/libgit2/libgit2/pull/5124) +- [attr: rename constants and macros for consistency](https://github.com/libgit2/libgit2/pull/5119) +- [Change API instances of `fromnoun` to `from_noun` (with an underscore)](https://github.com/libgit2/libgit2/pull/5117) +- [object: rename git_object__size to git_object_size](https://github.com/libgit2/libgit2/pull/5118) +- [Replace fnmatch with wildmatch](https://github.com/libgit2/libgit2/pull/5110) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/5111) +- [Removal of `p_fallocate`](https://github.com/libgit2/libgit2/pull/5114) +- [Modularize our TLS & hash detection](https://github.com/libgit2/libgit2/pull/5055) +- [tests: merge::analysis: use test variants to avoid duplicated test suites](https://github.com/libgit2/libgit2/pull/5109) +- [Rename options initialization functions](https://github.com/libgit2/libgit2/pull/5101) +- [deps: ntlmclient: disable implicit fallthrough warnings](https://github.com/libgit2/libgit2/pull/5112) +- [gitignore with escapes](https://github.com/libgit2/libgit2/pull/5097) +- [Handle URLs with a colon after host but no port](https://github.com/libgit2/libgit2/pull/5108) +- [Merge analysis support for bare repos](https://github.com/libgit2/libgit2/pull/5022) +- [Add memleak check docs](https://github.com/libgit2/libgit2/pull/5104) +- [Data-driven tests](https://github.com/libgit2/libgit2/pull/5098) +- [sha1dc: update to fix endianess issues on AIX/HP-UX](https://github.com/libgit2/libgit2/pull/5107) +- [Add NTLM support for HTTP(s) servers and proxies](https://github.com/libgit2/libgit2/pull/5052) +- [Callback type names should be suffixed with `_cb`](https://github.com/libgit2/libgit2/pull/5102) +- [tests: checkout: fix symlink.git being created outside of sandbox](https://github.com/libgit2/libgit2/pull/5099) +- [ignore: handle escaped trailing whitespace](https://github.com/libgit2/libgit2/pull/5095) +- [Ignore: only treat one leading slash as a root identifier](https://github.com/libgit2/libgit2/pull/5074) +- [online tests: use gitlab for auth failures](https://github.com/libgit2/libgit2/pull/5094) +- [Ignore files: don't ignore whitespace](https://github.com/libgit2/libgit2/pull/5076) +- [cache: fix cache eviction using deallocated key](https://github.com/libgit2/libgit2/pull/5088) +- [SECURITY.md: split out security-relevant bits from readme](https://github.com/libgit2/libgit2/pull/5085) +- [Restore NetBSD support](https://github.com/libgit2/libgit2/pull/5086) +- [repository: fix garbage return value](https://github.com/libgit2/libgit2/pull/5084) +- [cmake: disable fallthrough warnings for PCRE](https://github.com/libgit2/libgit2/pull/5083) +- [Configuration parsing: validate section headers with quotes](https://github.com/libgit2/libgit2/pull/5073) +- [Loosen restriction on wildcard "*" refspecs](https://github.com/libgit2/libgit2/pull/5060) +- [Use PCRE for our fallback regex engine when regcomp_l is unavailable](https://github.com/libgit2/libgit2/pull/4935) +- [Remote URL last-chance resolution](https://github.com/libgit2/libgit2/pull/5062) +- [Skip UTF8 BOM in ignore files](https://github.com/libgit2/libgit2/pull/5075) +- [We've already added `ZLIB_LIBRARIES` to `LIBGIT2_LIBS` so don't also add the `z` library](https://github.com/libgit2/libgit2/pull/5080) +- [Define SYMBOLIC_LINK_FLAG_DIRECTORY if required](https://github.com/libgit2/libgit2/pull/5077) +- [Support symlinks for directories in win32](https://github.com/libgit2/libgit2/pull/5065) +- [rebase: orig_head and onto accessors](https://github.com/libgit2/libgit2/pull/5057) +- [cmake: correctly detect if system provides `regcomp`](https://github.com/libgit2/libgit2/pull/5063) +- [Correctly write to missing locked global config](https://github.com/libgit2/libgit2/pull/5023) +- [[RFC] util: introduce GIT_DOWNCAST macro](https://github.com/libgit2/libgit2/pull/4561) +- [examples: implement SSH authentication](https://github.com/libgit2/libgit2/pull/5051) +- [git_repository_init: stop traversing at windows root](https://github.com/libgit2/libgit2/pull/5050) +- [config_file: check result of git_array_alloc](https://github.com/libgit2/libgit2/pull/5053) +- [patch_parse.c: Handle CRLF in parse_header_start](https://github.com/libgit2/libgit2/pull/5027) +- [fix typo](https://github.com/libgit2/libgit2/pull/5045) +- [sha1: don't inline `git_hash_global_init` for win32](https://github.com/libgit2/libgit2/pull/5039) +- [ignore: treat paths with trailing "/" as directories](https://github.com/libgit2/libgit2/pull/5040) +- [Test that largefiles can be read through the tree API](https://github.com/libgit2/libgit2/pull/4874) +- [Tests for symlinked user config](https://github.com/libgit2/libgit2/pull/5034) +- [patch_parse: fix parsing addition/deletion of file with space](https://github.com/libgit2/libgit2/pull/5035) +- [Optimize string comparisons](https://github.com/libgit2/libgit2/pull/5018) +- [Negation of subdir ignore causes other subdirs to be unignored](https://github.com/libgit2/libgit2/pull/5020) +- [xdiff: fix typo](https://github.com/libgit2/libgit2/pull/5024) +- [docs: clarify relation of safe and forced checkout strategy](https://github.com/libgit2/libgit2/pull/5032) +- [Each hash implementation should define `git_hash_global_init`](https://github.com/libgit2/libgit2/pull/5026) +- [[Doc] Update URL to git2-rs](https://github.com/libgit2/libgit2/pull/5012) +- [remote: Rename git_remote_completion_type to _t](https://github.com/libgit2/libgit2/pull/5008) +- [odb: provide a free function for custom backends](https://github.com/libgit2/libgit2/pull/5005) +- [Have git_branch_lookup accept GIT_BRANCH_ALL](https://github.com/libgit2/libgit2/pull/5000) +- [Rename git_transfer_progress to git_indexer_progress](https://github.com/libgit2/libgit2/pull/4997) +- [High-level map APIs](https://github.com/libgit2/libgit2/pull/4901) +- [refdb_fs: fix loose/packed refs lookup racing with repacks](https://github.com/libgit2/libgit2/pull/4984) +- [Allocator restructuring](https://github.com/libgit2/libgit2/pull/4998) +- [cache: fix misnaming of `git_cache_free`](https://github.com/libgit2/libgit2/pull/4992) +- [examples: produce single cgit2 binary](https://github.com/libgit2/libgit2/pull/4956) +- [Remove public 'inttypes.h' header](https://github.com/libgit2/libgit2/pull/4991) +- [Prevent reading out of bounds memory](https://github.com/libgit2/libgit2/pull/4996) +- [Fix a memory leak in odb_otype_fast()](https://github.com/libgit2/libgit2/pull/4987) +- [Make stdalloc__reallocarray call stdalloc__realloc](https://github.com/libgit2/libgit2/pull/4986) +- [Remove `git_time_monotonic`](https://github.com/libgit2/libgit2/pull/4990) +- [Fix a _very_ improbable memory leak in git_odb_new()](https://github.com/libgit2/libgit2/pull/4988) +- [ci: publish documentation on merge](https://github.com/libgit2/libgit2/pull/4989) +- [Enable creation of worktree from bare repo's default branch](https://github.com/libgit2/libgit2/pull/4982) +- [Allow bypassing check for '.keep' file](https://github.com/libgit2/libgit2/pull/4965) +- [Deprecation: export the deprecated functions properly](https://github.com/libgit2/libgit2/pull/4979) +- [ci: skip ssh tests on macOS nightly](https://github.com/libgit2/libgit2/pull/4980) +- [CI build fixups](https://github.com/libgit2/libgit2/pull/4976) +- [v0.28 rc1](https://github.com/libgit2/libgit2/pull/4970) +- [Docs](https://github.com/libgit2/libgit2/pull/4968) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/4954) +- [ci: add an individual coverity pipeline](https://github.com/libgit2/libgit2/pull/4964) +- [ci: run docurium to create documentation](https://github.com/libgit2/libgit2/pull/4961) +- [ci: return coverity to the nightlies](https://github.com/libgit2/libgit2/pull/4962) +- [Clean up some warnings](https://github.com/libgit2/libgit2/pull/4950) +- [Nightlies: use `latest` docker images](https://github.com/libgit2/libgit2/pull/4869) +- [index: preserve extension parsing errors](https://github.com/libgit2/libgit2/pull/4858) +- [Deprecate functions and constants more gently](https://github.com/libgit2/libgit2/pull/4952) +- [Don't use deprecated constants](https://github.com/libgit2/libgit2/pull/4957) +- [Fix VS warning C4098: 'giterr_set_str' : void function returning a value](https://github.com/libgit2/libgit2/pull/4955) +- [Move `giterr` to `git_error`](https://github.com/libgit2/libgit2/pull/4917) +- [odb: Fix odb foreach to also close on positive error code](https://github.com/libgit2/libgit2/pull/4949) +- [repository: free memory in symlink detection function](https://github.com/libgit2/libgit2/pull/4948) +- [ci: update poxyproxy, run in quiet mode](https://github.com/libgit2/libgit2/pull/4947) +- [Add/multiply with overflow tweaks](https://github.com/libgit2/libgit2/pull/4945) +- [Improve deprecation of old enums](https://github.com/libgit2/libgit2/pull/4944) +- [Move `git_ref_t` to `git_reference_t`](https://github.com/libgit2/libgit2/pull/4939) +- [More `git_obj` to `git_object` updates](https://github.com/libgit2/libgit2/pull/4940) +- [ci: only run invasive tests in nightly](https://github.com/libgit2/libgit2/pull/4943) +- [Always build a cdecl library](https://github.com/libgit2/libgit2/pull/4930) +- [changelog: document changes since 0.27](https://github.com/libgit2/libgit2/pull/4932) +- [Fix a bunch of warnings](https://github.com/libgit2/libgit2/pull/4925) +- [mailmap: prefer ethomson@edwardthomson.com](https://github.com/libgit2/libgit2/pull/4941) +- [Convert tests/resources/push.sh to LF endings](https://github.com/libgit2/libgit2/pull/4937) +- [Get rid of some test files that were accidentally committed](https://github.com/libgit2/libgit2/pull/4936) +- [Fix crash on remote connection when GIT_PROXY_AUTO is set but no proxy is detected](https://github.com/libgit2/libgit2/pull/4934) +- [Make ENABLE_WERROR actually work](https://github.com/libgit2/libgit2/pull/4924) +- [Remove unconditional -Wno-deprecated-declaration on macOS](https://github.com/libgit2/libgit2/pull/4931) +- [Fix warning 'function': incompatible types - from 'git_cvar_value *' to 'int *' (C4133) on VS](https://github.com/libgit2/libgit2/pull/4926) +- [Fix Linux warnings](https://github.com/libgit2/libgit2/pull/4928) +- [Coverity fixes](https://github.com/libgit2/libgit2/pull/4922) +- [Shutdown callback count](https://github.com/libgit2/libgit2/pull/4919) +- [Update CRLF filtering to match modern git](https://github.com/libgit2/libgit2/pull/4904) +- [refdb_fs: refactor error handling in `refdb_reflog_fs__delete`](https://github.com/libgit2/libgit2/pull/4915) +- [Remove empty (sub-)directories when deleting refs](https://github.com/libgit2/libgit2/pull/4833) +- [Support creating annotated commits from annotated tags](https://github.com/libgit2/libgit2/pull/4910) +- [Fix segfault in loose_backend__readstream](https://github.com/libgit2/libgit2/pull/4906) +- [make proxy_stream_close close target stream even on errors](https://github.com/libgit2/libgit2/pull/4905) +- [Index API updates for consistency](https://github.com/libgit2/libgit2/pull/4807) +- [Allow merge analysis against any reference](https://github.com/libgit2/libgit2/pull/4770) +- [revwalk: Allow changing hide_cb](https://github.com/libgit2/libgit2/pull/4888) +- [Unused function warnings](https://github.com/libgit2/libgit2/pull/4895) +- [Add builtin proxy support for the http transport](https://github.com/libgit2/libgit2/pull/4870) +- [config: fix adding files if their parent directory is a file](https://github.com/libgit2/libgit2/pull/4898) +- [Allow certificate and credential callbacks to decline to act](https://github.com/libgit2/libgit2/pull/4879) +- [Fix warning C4133 incompatible types in MSVC](https://github.com/libgit2/libgit2/pull/4896) +- [index: introduce git_index_iterator](https://github.com/libgit2/libgit2/pull/4884) +- [commit: fix out-of-bound reads when parsing truncated author fields](https://github.com/libgit2/libgit2/pull/4894) +- [tests: 🌀 address two null argument instances #4847](https://github.com/libgit2/libgit2/pull/4847) +- [Some OpenSSL issues](https://github.com/libgit2/libgit2/pull/4875) +- [worktree: Expose git_worktree_add_init_options](https://github.com/libgit2/libgit2/pull/4892) +- [transport/http: Include non-default ports in Host header](https://github.com/libgit2/libgit2/pull/4882) +- [Support symlinks on Windows when core.symlinks=true](https://github.com/libgit2/libgit2/pull/4713) +- [strntol: fix out-of-bounds reads when parsing numbers with leading sign](https://github.com/libgit2/libgit2/pull/4886) +- [apply: small fixups in the test suite](https://github.com/libgit2/libgit2/pull/4885) +- [signature: fix out-of-bounds read when parsing timezone offset](https://github.com/libgit2/libgit2/pull/4883) +- [Remote creation API](https://github.com/libgit2/libgit2/pull/4667) +- [Index collision fixes](https://github.com/libgit2/libgit2/pull/4818) +- [Patch (diff) application](https://github.com/libgit2/libgit2/pull/4705) +- [smart transport: only clear url on hard reset (regression)](https://github.com/libgit2/libgit2/pull/4880) +- [Tree parsing fixes](https://github.com/libgit2/libgit2/pull/4871) +- [CI: Fix macOS leak detection](https://github.com/libgit2/libgit2/pull/4860) +- [README: more CI status badges](https://github.com/libgit2/libgit2/pull/4800) +- [ci: Fix some minor issues](https://github.com/libgit2/libgit2/pull/4867) +- [Object parse fixes](https://github.com/libgit2/libgit2/pull/4864) +- [Windows CI: fail build on test failure](https://github.com/libgit2/libgit2/pull/4862) +- [ci: run all the jobs during nightly builds](https://github.com/libgit2/libgit2/pull/4863) +- [strtol removal](https://github.com/libgit2/libgit2/pull/4851) +- [ buf::oom tests: use custom allocator for oom failures](https://github.com/libgit2/libgit2/pull/4854) +- [ci: arm docker builds](https://github.com/libgit2/libgit2/pull/4804) +- [Win32 path canonicalization refactoring](https://github.com/libgit2/libgit2/pull/4852) +- [Check object existence when creating a tree from an index](https://github.com/libgit2/libgit2/pull/4840) +- [Ninja build](https://github.com/libgit2/libgit2/pull/4841) +- [docs: fix transparent/opaque confusion in the conventions file](https://github.com/libgit2/libgit2/pull/4853) +- [Configuration variables can appear on the same line as the section header](https://github.com/libgit2/libgit2/pull/4819) +- [path: export the dotgit-checking functions](https://github.com/libgit2/libgit2/pull/4849) +- [cmake: correct comment from libssh to libssh2](https://github.com/libgit2/libgit2/pull/4850) +- [Object parsing fuzzer](https://github.com/libgit2/libgit2/pull/4845) +- [config: Port config_file_fuzzer to the new in-memory backend.](https://github.com/libgit2/libgit2/pull/4842) +- [Add some more tests for git_futils_rmdir_r and some cleanup](https://github.com/libgit2/libgit2/pull/4828) +- [diff_stats: use git's formatting of renames with common directories](https://github.com/libgit2/libgit2/pull/4830) +- [ignore unsupported http authentication contexts](https://github.com/libgit2/libgit2/pull/4839) +- [submodule: ignore path and url attributes if they look like options](https://github.com/libgit2/libgit2/pull/4837) +- [Smart packet security fixes](https://github.com/libgit2/libgit2/pull/4836) +- [config_file: properly ignore includes without "path" value](https://github.com/libgit2/libgit2/pull/4832) +- [int-conversion](https://github.com/libgit2/libgit2/pull/4831) +- [cmake: enable new quoted argument policy CMP0054](https://github.com/libgit2/libgit2/pull/4829) +- [fix check if blob is uninteresting when inserting tree to packbuilder](https://github.com/libgit2/libgit2/pull/4824) +- [Documentation fixups](https://github.com/libgit2/libgit2/pull/4827) +- [CI: refactoring](https://github.com/libgit2/libgit2/pull/4812) +- [In-memory configuration](https://github.com/libgit2/libgit2/pull/4767) +- [Some warnings](https://github.com/libgit2/libgit2/pull/4784) +- [index: release the snapshot instead of freeing the index](https://github.com/libgit2/libgit2/pull/4803) +- [online::clone: free url and username before resetting](https://github.com/libgit2/libgit2/pull/4816) +- [git_remote_prune to be O(n * logn)](https://github.com/libgit2/libgit2/pull/4794) +- [Rename "VSTS" to "Azure DevOps" and "Azure Pipelines"](https://github.com/libgit2/libgit2/pull/4813) +- [cmake: enable -Wformat and -Wformat-security](https://github.com/libgit2/libgit2/pull/4810) +- [Fix revwalk limiting regression](https://github.com/libgit2/libgit2/pull/4809) +- [path validation: `char` is not signed by default.](https://github.com/libgit2/libgit2/pull/4805) +- [revwalk: refer the sorting modes more to git's options](https://github.com/libgit2/libgit2/pull/4811) +- [Clar XML output redux](https://github.com/libgit2/libgit2/pull/4778) +- [remote: store the connection data in a private struct](https://github.com/libgit2/libgit2/pull/4785) +- [docs: clarify and include licenses of dependencies](https://github.com/libgit2/libgit2/pull/4789) +- [config_file: fix quadratic behaviour when adding config multivars](https://github.com/libgit2/libgit2/pull/4799) +- [config: Fix a leak parsing multi-line config entries](https://github.com/libgit2/libgit2/pull/4792) +- [Prevent heap-buffer-overflow](https://github.com/libgit2/libgit2/pull/4797) +- [ci: remove travis](https://github.com/libgit2/libgit2/pull/4790) +- [Update VSTS YAML files with the latest syntax](https://github.com/libgit2/libgit2/pull/4791) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/4788) +- [config: convert unbounded recursion into a loop](https://github.com/libgit2/libgit2/pull/4781) +- [Document giterr_last() use only after error. #4772](https://github.com/libgit2/libgit2/pull/4773) +- [util: make the qsort_r check work on macOS](https://github.com/libgit2/libgit2/pull/4765) +- [fuzzer: update for indexer changes](https://github.com/libgit2/libgit2/pull/4782) +- [tree: accept null ids in existing trees when updating](https://github.com/libgit2/libgit2/pull/4727) +- [Pack file verification](https://github.com/libgit2/libgit2/pull/4374) +- [cmake: detect and use libc-provided iconv](https://github.com/libgit2/libgit2/pull/4777) +- [Coverity flavored clang analyzer fixes](https://github.com/libgit2/libgit2/pull/4774) +- [tests: verify adding index conflicts with invalid filemodes fails](https://github.com/libgit2/libgit2/pull/4776) +- [worktree: unlock should return 1 when the worktree isn't locked](https://github.com/libgit2/libgit2/pull/4769) +- [Add a fuzzer for config files](https://github.com/libgit2/libgit2/pull/4752) +- [Fix 'invalid packet line' for ng packets containing errors](https://github.com/libgit2/libgit2/pull/4763) +- [Fix leak in index.c](https://github.com/libgit2/libgit2/pull/4768) +- [threads::diff: use separate git_repository objects](https://github.com/libgit2/libgit2/pull/4754) +- [travis: remove Coverity cron job](https://github.com/libgit2/libgit2/pull/4766) +- [parse: Do not initialize the content in context to NULL](https://github.com/libgit2/libgit2/pull/4749) +- [config_file: Don't crash on options without a section](https://github.com/libgit2/libgit2/pull/4750) +- [ci: Correct the status code check so Coverity doesn't force-fail Travis](https://github.com/libgit2/libgit2/pull/4764) +- [ci: remove appveyor](https://github.com/libgit2/libgit2/pull/4760) +- [diff: fix OOM on AIX when finding similar deltas in empty diff](https://github.com/libgit2/libgit2/pull/4761) +- [travis: do not execute Coverity analysis for all cron jobs](https://github.com/libgit2/libgit2/pull/4755) +- [ci: enable compilation with "-Werror"](https://github.com/libgit2/libgit2/pull/4759) +- [smart_pkt: fix potential OOB-read when processing ng packet](https://github.com/libgit2/libgit2/pull/4758) +- [Fix a double-free in config parsing](https://github.com/libgit2/libgit2/pull/4751) +- [Fuzzers](https://github.com/libgit2/libgit2/pull/4728) +- [ci: run VSTS builds on master and maint branches](https://github.com/libgit2/libgit2/pull/4746) +- [Windows: default credentials / fallback credential handling](https://github.com/libgit2/libgit2/pull/4743) +- [ci: add VSTS build badge to README](https://github.com/libgit2/libgit2/pull/4745) +- [ci: set PKG_CONFIG_PATH for travis](https://github.com/libgit2/libgit2/pull/4744) +- [CI: Refactor and introduce VSTS builds](https://github.com/libgit2/libgit2/pull/4723) +- [revwalk: remove tautologic condition for hiding a commit](https://github.com/libgit2/libgit2/pull/4742) +- [winhttp: retry erroneously failing requests](https://github.com/libgit2/libgit2/pull/4731) +- [Add a configurable limit to the max pack size that will be indexed](https://github.com/libgit2/libgit2/pull/4721) +- [mbedtls: remove unused variable "cacert"](https://github.com/libgit2/libgit2/pull/4739) +- [Squash some leaks](https://github.com/libgit2/libgit2/pull/4732) +- [Add a checkout example](https://github.com/libgit2/libgit2/pull/4692) +- [Assorted Coverity fixes](https://github.com/libgit2/libgit2/pull/4702) +- [Remove GIT_PKT_PACK entirely](https://github.com/libgit2/libgit2/pull/4704) +- [ ignore: improve `git_ignore_path_is_ignored` description Git analogy](https://github.com/libgit2/libgit2/pull/4722) +- [alloc: don't overwrite allocator during init if set](https://github.com/libgit2/libgit2/pull/4724) +- [C90 standard compliance](https://github.com/libgit2/libgit2/pull/4700) +- [Delta OOB access](https://github.com/libgit2/libgit2/pull/4719) +- [Release v0.27.3](https://github.com/libgit2/libgit2/pull/4717) +- [streams: report OpenSSL errors if global init fails](https://github.com/libgit2/libgit2/pull/4710) +- [patch_parse: populate line numbers while parsing diffs](https://github.com/libgit2/libgit2/pull/4687) +- [Fix git_worktree_validate failing on bare repositories](https://github.com/libgit2/libgit2/pull/4686) +- [git_refspec_transform: Handle NULL dst](https://github.com/libgit2/libgit2/pull/4699) +- [Add a "dirty" state to the index when it has unsaved changes](https://github.com/libgit2/libgit2/pull/4536) +- [refspec: rename `git_refspec__free` to `git_refspec__dispose`](https://github.com/libgit2/libgit2/pull/4709) +- [streams: openssl: Handle error in SSL_CTX_new](https://github.com/libgit2/libgit2/pull/4701) +- [refspec: add public parsing api](https://github.com/libgit2/libgit2/pull/4519) +- [Fix interaction between limited flag and sorting over resets](https://github.com/libgit2/libgit2/pull/4688) +- [deps: fix implicit fallthrough warning in http-parser](https://github.com/libgit2/libgit2/pull/4691) +- [Fix assorted leaks found via fuzzing](https://github.com/libgit2/libgit2/pull/4698) +- [Fix type confusion in git_smart__connect](https://github.com/libgit2/libgit2/pull/4695) +- [Verify ref_pkt's are long enough](https://github.com/libgit2/libgit2/pull/4696) +- [Config parser cleanups](https://github.com/libgit2/libgit2/pull/4411) +- [Fix last references to deprecated git_buf_free](https://github.com/libgit2/libgit2/pull/4685) +- [revwalk: avoid walking the entire history when output is unsorted](https://github.com/libgit2/libgit2/pull/4606) +- [Add mailmap support.](https://github.com/libgit2/libgit2/pull/4586) +- [tree: remove unused functions](https://github.com/libgit2/libgit2/pull/4683) +- [Link `mbedTLS` libraries in when `SHA1_BACKEND` == "mbedTLS"](https://github.com/libgit2/libgit2/pull/4678) +- [editorconfig: allow trailing whitespace in markdown](https://github.com/libgit2/libgit2/pull/4676) +- [docs: fix statement about tab width](https://github.com/libgit2/libgit2/pull/4681) +- [diff: fix enum value being out of allowed range](https://github.com/libgit2/libgit2/pull/4680) +- [pack: rename `git_packfile_stream_free`](https://github.com/libgit2/libgit2/pull/4436) +- [Stop leaking the memory](https://github.com/libgit2/libgit2/pull/4677) +- [Bugfix release v0.27.2](https://github.com/libgit2/libgit2/pull/4632) +- [Fix stash save bug with fast path index check](https://github.com/libgit2/libgit2/pull/4668) +- [path: unify `git_path_is_*` APIs](https://github.com/libgit2/libgit2/pull/4662) +- [Fix negative gitignore rules with leading directories ](https://github.com/libgit2/libgit2/pull/4670) +- [Custom memory allocators](https://github.com/libgit2/libgit2/pull/4576) +- [index: Fix alignment issues in write_disk_entry()](https://github.com/libgit2/libgit2/pull/4655) +- [travis: war on leaks](https://github.com/libgit2/libgit2/pull/4558) +- [refdb_fs: fix regression: failure when globbing for non-existant references](https://github.com/libgit2/libgit2/pull/4665) +- [tests: submodule: do not rely on config iteration order](https://github.com/libgit2/libgit2/pull/4673) +- [Detect duplicated submodules for the same path](https://github.com/libgit2/libgit2/pull/4641) +- [Fix docurium missing includes](https://github.com/libgit2/libgit2/pull/4530) +- [github: update issue template](https://github.com/libgit2/libgit2/pull/4627) +- [streams: openssl: add missing check on OPENSSL_LEGACY_API](https://github.com/libgit2/libgit2/pull/4661) +- [mbedtls: don't require mbedtls from our pkgconfig file](https://github.com/libgit2/libgit2/pull/4656) +- [Fixes for CVE 2018-11235](https://github.com/libgit2/libgit2/pull/4660) +- [Backport fixes for CVE 2018-11235](https://github.com/libgit2/libgit2/pull/4659) +- [Added note about Windows junction points to the differences from git document](https://github.com/libgit2/libgit2/pull/4653) +- [cmake: resolve libraries found by pkg-config ](https://github.com/libgit2/libgit2/pull/4642) +- [refdb_fs: enhance performance of globbing](https://github.com/libgit2/libgit2/pull/4629) +- [global: adjust init count under lock](https://github.com/libgit2/libgit2/pull/4645) +- [Fix GCC 8.1 warnings](https://github.com/libgit2/libgit2/pull/4646) +- [Worktrees can be made from bare repositories](https://github.com/libgit2/libgit2/pull/4630) +- [docs: add documentation to state differences from the git cli](https://github.com/libgit2/libgit2/pull/4605) +- [Sanitize the hunk header to ensure it contains UTF-8 valid data](https://github.com/libgit2/libgit2/pull/4542) +- [examples: ls-files: add ls-files to list paths in the index](https://github.com/libgit2/libgit2/pull/4380) +- [OpenSSL legacy API cleanups](https://github.com/libgit2/libgit2/pull/4608) +- [worktree: add functions to get name and path](https://github.com/libgit2/libgit2/pull/4640) +- [Fix deletion of unrelated branch on worktree](https://github.com/libgit2/libgit2/pull/4633) +- [mbedTLS support](https://github.com/libgit2/libgit2/pull/4173) +- [Configuration entry iteration in order](https://github.com/libgit2/libgit2/pull/4525) +- [blame_git: fix coalescing step never being executed](https://github.com/libgit2/libgit2/pull/4580) +- [Fix leaks in master](https://github.com/libgit2/libgit2/pull/4636) +- [Leak fixes for v0.27.1](https://github.com/libgit2/libgit2/pull/4635) +- [worktree: Read worktree specific reflog for HEAD](https://github.com/libgit2/libgit2/pull/4577) +- [fixed stack smashing due to wrong size of struct stat on the stack](https://github.com/libgit2/libgit2/pull/4631) +- [scripts: add backporting script](https://github.com/libgit2/libgit2/pull/4476) +- [worktree: add ability to create worktree with pre-existing branch](https://github.com/libgit2/libgit2/pull/4524) +- [refs: preserve the owning refdb when duping reference](https://github.com/libgit2/libgit2/pull/4618) +- [Submodules-API should report .gitmodules parse errors instead of ignoring them](https://github.com/libgit2/libgit2/pull/4522) +- [Typedef git_pkt_type and clarify recv_pkt return type](https://github.com/libgit2/libgit2/pull/4514) +- [online::clone: validate user:pass in HTTP_PROXY](https://github.com/libgit2/libgit2/pull/4556) +- [ transports: ssh: disconnect session before freeing it ](https://github.com/libgit2/libgit2/pull/4596) +- [revwalk: fix uninteresting revs sometimes not limiting graphwalk](https://github.com/libgit2/libgit2/pull/4622) +- [attr_file: fix handling of directory patterns with trailing spaces](https://github.com/libgit2/libgit2/pull/4614) +- [transports: local: fix assert when fetching into repo with symrefs](https://github.com/libgit2/libgit2/pull/4613) +- [remote/proxy: fix git_transport_certificate_check_db description](https://github.com/libgit2/libgit2/pull/4597) +- [Flag options in describe.h as being optional](https://github.com/libgit2/libgit2/pull/4587) +- [diff: Add missing GIT_DELTA_TYPECHANGE -> 'T' mapping.](https://github.com/libgit2/libgit2/pull/4611) +- [appveyor: fix typo in registry key to disable DHE](https://github.com/libgit2/libgit2/pull/4609) +- [Fix build with LibreSSL 2.7](https://github.com/libgit2/libgit2/pull/4607) +- [appveyor: workaround for intermittent test failures](https://github.com/libgit2/libgit2/pull/4603) +- [sha1dc: update to fix errors with endianess](https://github.com/libgit2/libgit2/pull/4601) +- [submodule: check index for path and prefix before adding submodule](https://github.com/libgit2/libgit2/pull/4378) +- [odb: mempack: fix leaking objects when freeing mempacks](https://github.com/libgit2/libgit2/pull/4602) +- [types: remove unused git_merge_result](https://github.com/libgit2/libgit2/pull/4598) +- [checkout: change default strategy to SAFE](https://github.com/libgit2/libgit2/pull/4531) +- [Add myself to git.git-authors](https://github.com/libgit2/libgit2/pull/4570) + + +## v0.25.0-alpha.16 [(2019-07-23)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.16) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.15...v0.25.0-alpha.16) + +#### Summary of changes +- Adds support for Node 12 +- Updates lodash dependency to address security notice +- Expose Tree.prototype.createUpdated(repo, numUpdates, updates) +- Bumps libgit2 + - Fixes gitignore issue with pattern negation + - Remote.list now gets the correct list of remotes if remotes are changed by external process + +#### Merged PRs into NodeGit +- [Bump libgit2 #1705](https://github.com/nodegit/nodegit/pull/1705) +- [Fix Tree#createUpdated #1704](https://github.com/nodegit/nodegit/pull/1704) +- [Fix failing tests on CI #1703](https://github.com/nodegit/nodegit/pull/1703) +- [Audit lodash and fix package-lock.json #1702](https://github.com/nodegit/nodegit/pull/1702) +- [Implement support for Node 12 #1696](https://github.com/nodegit/nodegit/pull/1696) + +#### Merged PRs into LibGit2 +- [config_file: refresh when creating an iterator #5181](https://github.com/libgit2/libgit2/pull/5181) +- [azure: drop powershell #5141](https://github.com/libgit2/libgit2/pull/5141) +- [fuzzer: use futils instead of fileops #5180](https://github.com/libgit2/libgit2/pull/5180) +- [w32: fix unlinking of directory symlinks #5151](https://github.com/libgit2/libgit2/pull/5151) +- [patch_parse: fix segfault due to line containing static contents #5179](https://github.com/libgit2/libgit2/pull/5179) +- [ignore: fix determining whether a shorter pattern negates another #5173](https://github.com/libgit2/libgit2/pull/5173) +- [patch_parse: handle missing newline indicator in old file #5159](https://github.com/libgit2/libgit2/pull/5159) +- [patch_parse: do not depend on parsed buffer's lifetime #5158](https://github.com/libgit2/libgit2/pull/5158) +- [sha1: fix compilation of WinHTTP backend #5174](https://github.com/libgit2/libgit2/pull/5174) +- [repository: do not initialize HEAD if it's provided by templates #5176](https://github.com/libgit2/libgit2/pull/5176) +- [configuration: cvar -> configmap #5138](https://github.com/libgit2/libgit2/pull/5138) +- [Evict cache items more efficiently #5172](https://github.com/libgit2/libgit2/pull/5172) +- [clar: fix suite count #5175](https://github.com/libgit2/libgit2/pull/5175) +- [Ignore VS2017 specific files and folders #5163](https://github.com/libgit2/libgit2/pull/5163) +- [gitattributes: ignore macros defined in subdirectories #5156](https://github.com/libgit2/libgit2/pull/5156) +- [clar: correctly account for "data" suites when counting #5168](https://github.com/libgit2/libgit2/pull/5168) +- [Allocate memory more efficiently when packing objects #5170](https://github.com/libgit2/libgit2/pull/5170) +- [fileops: fix creation of directory in filesystem root #5131](https://github.com/libgit2/libgit2/pull/5131) +- [win32: fix fuzzers and have CI build them #5160](https://github.com/libgit2/libgit2/pull/5160) +- [Config parser separation #5134](https://github.com/libgit2/libgit2/pull/5134) +- [config_file: implement stat cache to avoid repeated rehashing #5132](https://github.com/libgit2/libgit2/pull/5132) +- [ci: build with ENABLE_WERROR on Windows #5143](https://github.com/libgit2/libgit2/pull/5143) +- [Fix Regression: attr: Correctly load system attr file (on Windows) #5152](https://github.com/libgit2/libgit2/pull/5152) +- [hash: fix missing error return on production builds #5145](https://github.com/libgit2/libgit2/pull/5145) +- [Resolve static check warnings in example code #5142](https://github.com/libgit2/libgit2/pull/5142) +- [Multiple hash algorithms #4438](https://github.com/libgit2/libgit2/pull/4438) +- [More documentation #5128](https://github.com/libgit2/libgit2/pull/5128) +- [Incomplete commondir support #4967](https://github.com/libgit2/libgit2/pull/4967) +- [Remove warnings #5078](https://github.com/libgit2/libgit2/pull/5078) +- [Re-run flaky tests #5140](https://github.com/libgit2/libgit2/pull/5140) + + +## v0.25.0-alpha.15 [(2019-07-15)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.15) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.14...v0.25.0-alpha.15) + +#### Summary of changes +- Removed NSEC optimization due to performance regressions in repositories that did not use NSEC optimization cloned via NodeGit. + +#### Merged PRs into NodeGit +- [Remove NSEC #1699](https://github.com/nodegit/nodegit/pull/1699) + + +## v0.25.0-alpha.14 [(2019-07-01)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.14) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.13...v0.25.0-alpha.14) + +#### Summary of changes +- Always use builtin regex for linux for portability + +#### Merged PRs into NodeGit +- [Use builtin regex library for linux for better portability #1693](https://github.com/nodegit/nodegit/pull/1693) +- [Remove pcre-config from binding.gyp #1694](https://github.com/nodegit/nodegit/pull/1694) + +## v0.25.0-alpha.13 [(2019-06-26)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.13) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.12...v0.25.0-alpha.13) + +#### Summary of changes +- Turn on GIT_USE_NSEC on all platforms +- Use Iconv on OSX for better internationalization support. +- Bump libgit2 to bring in: + - NTLM proxy support + - Negotiate/Kerberos proxy support + - Various git config fixes + - Various git ignore fixes + - Various libgit2 performance improvements + - Windows/Linux now use PCRE for regex, OSX uses regcomp_l, this should address collation issues in diffing +- Fixed bug with Repository.prototype.refreshReferences dying on corrupted reference. We now ignore corrupted references + +#### Merged PRs into NodeGit +- [refresh_references.cc: skip refs that can't be directly resolved #1689](https://github.com/nodegit/nodegit/pull/1689) +- [Bump libgit2 to fork of latest master #1690](https://github.com/nodegit/nodegit/pull/1690) + +#### Merged PRs into LibGit2 +- [errors: use lowercase](https://github.com/libgit2/libgit2/pull/5137) +- [largefile tests: only write 2GB on 32-bit platforms](https://github.com/libgit2/libgit2/pull/5136) +- [Fix broken link in README](https://github.com/libgit2/libgit2/pull/5129) +- [net: remove unused `git_headlist_cb`](https://github.com/libgit2/libgit2/pull/5122) +- [cmake: default NTLM client to off if no HTTPS support](https://github.com/libgit2/libgit2/pull/5124) +- [attr: rename constants and macros for consistency](https://github.com/libgit2/libgit2/pull/5119) +- [Change API instances of `fromnoun` to `from_noun` (with an underscore)](https://github.com/libgit2/libgit2/pull/5117) +- [object: rename git_object__size to git_object_size](https://github.com/libgit2/libgit2/pull/5118) +- [Replace fnmatch with wildmatch](https://github.com/libgit2/libgit2/pull/5110) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/5111) +- [Removal of `p_fallocate`](https://github.com/libgit2/libgit2/pull/5114) +- [Modularize our TLS & hash detection](https://github.com/libgit2/libgit2/pull/5055) +- [tests: merge::analysis: use test variants to avoid duplicated test suites](https://github.com/libgit2/libgit2/pull/5109) +- [Rename options initialization functions](https://github.com/libgit2/libgit2/pull/5101) +- [deps: ntlmclient: disable implicit fallthrough warnings](https://github.com/libgit2/libgit2/pull/5112) +- [gitignore with escapes](https://github.com/libgit2/libgit2/pull/5097) +- [Handle URLs with a colon after host but no port](https://github.com/libgit2/libgit2/pull/5108) +- [Merge analysis support for bare repos](https://github.com/libgit2/libgit2/pull/5022) +- [Add memleak check docs](https://github.com/libgit2/libgit2/pull/5104) +- [Data-driven tests](https://github.com/libgit2/libgit2/pull/5098) +- [sha1dc: update to fix endianess issues on AIX/HP-UX](https://github.com/libgit2/libgit2/pull/5107) +- [Add NTLM support for HTTP(s) servers and proxies](https://github.com/libgit2/libgit2/pull/5052) +- [Callback type names should be suffixed with `_cb`](https://github.com/libgit2/libgit2/pull/5102) +- [tests: checkout: fix symlink.git being created outside of sandbox](https://github.com/libgit2/libgit2/pull/5099) +- [ignore: handle escaped trailing whitespace](https://github.com/libgit2/libgit2/pull/5095) +- [Ignore: only treat one leading slash as a root identifier](https://github.com/libgit2/libgit2/pull/5074) +- [online tests: use gitlab for auth failures](https://github.com/libgit2/libgit2/pull/5094) +- [Ignore files: don't ignore whitespace](https://github.com/libgit2/libgit2/pull/5076) +- [cache: fix cache eviction using deallocated key](https://github.com/libgit2/libgit2/pull/5088) +- [SECURITY.md: split out security-relevant bits from readme](https://github.com/libgit2/libgit2/pull/5085) +- [Restore NetBSD support](https://github.com/libgit2/libgit2/pull/5086) +- [repository: fix garbage return value](https://github.com/libgit2/libgit2/pull/5084) +- [cmake: disable fallthrough warnings for PCRE](https://github.com/libgit2/libgit2/pull/5083) +- [Configuration parsing: validate section headers with quotes](https://github.com/libgit2/libgit2/pull/5073) +- [Loosen restriction on wildcard "*" refspecs](https://github.com/libgit2/libgit2/pull/5060) +- [Use PCRE for our fallback regex engine when regcomp_l is unavailable](https://github.com/libgit2/libgit2/pull/4935) +- [Remote URL last-chance resolution](https://github.com/libgit2/libgit2/pull/5062) +- [Skip UTF8 BOM in ignore files](https://github.com/libgit2/libgit2/pull/5075) +- [We've already added `ZLIB_LIBRARIES` to `LIBGIT2_LIBS` so don't also add the `z` library](https://github.com/libgit2/libgit2/pull/5080) +- [Define SYMBOLIC_LINK_FLAG_DIRECTORY if required](https://github.com/libgit2/libgit2/pull/5077) +- [Support symlinks for directories in win32](https://github.com/libgit2/libgit2/pull/5065) +- [rebase: orig_head and onto accessors](https://github.com/libgit2/libgit2/pull/5057) +- [cmake: correctly detect if system provides `regcomp`](https://github.com/libgit2/libgit2/pull/5063) +- [Correctly write to missing locked global config](https://github.com/libgit2/libgit2/pull/5023) +- [[RFC] util: introduce GIT_DOWNCAST macro](https://github.com/libgit2/libgit2/pull/4561) +- [examples: implement SSH authentication](https://github.com/libgit2/libgit2/pull/5051) +- [git_repository_init: stop traversing at windows root](https://github.com/libgit2/libgit2/pull/5050) +- [config_file: check result of git_array_alloc](https://github.com/libgit2/libgit2/pull/5053) +- [patch_parse.c: Handle CRLF in parse_header_start](https://github.com/libgit2/libgit2/pull/5027) +- [fix typo](https://github.com/libgit2/libgit2/pull/5045) +- [sha1: don't inline `git_hash_global_init` for win32](https://github.com/libgit2/libgit2/pull/5039) +- [ignore: treat paths with trailing "/" as directories](https://github.com/libgit2/libgit2/pull/5040) +- [Test that largefiles can be read through the tree API](https://github.com/libgit2/libgit2/pull/4874) +- [Tests for symlinked user config](https://github.com/libgit2/libgit2/pull/5034) +- [patch_parse: fix parsing addition/deletion of file with space](https://github.com/libgit2/libgit2/pull/5035) +- [Optimize string comparisons](https://github.com/libgit2/libgit2/pull/5018) +- [Negation of subdir ignore causes other subdirs to be unignored](https://github.com/libgit2/libgit2/pull/5020) +- [xdiff: fix typo](https://github.com/libgit2/libgit2/pull/5024) +- [docs: clarify relation of safe and forced checkout strategy](https://github.com/libgit2/libgit2/pull/5032) +- [Each hash implementation should define `git_hash_global_init`](https://github.com/libgit2/libgit2/pull/5026) +- [[Doc] Update URL to git2-rs](https://github.com/libgit2/libgit2/pull/5012) +- [remote: Rename git_remote_completion_type to _t](https://github.com/libgit2/libgit2/pull/5008) +- [odb: provide a free function for custom backends](https://github.com/libgit2/libgit2/pull/5005) +- [Have git_branch_lookup accept GIT_BRANCH_ALL](https://github.com/libgit2/libgit2/pull/5000) +- [Rename git_transfer_progress to git_indexer_progress](https://github.com/libgit2/libgit2/pull/4997) +- [High-level map APIs](https://github.com/libgit2/libgit2/pull/4901) +- [refdb_fs: fix loose/packed refs lookup racing with repacks](https://github.com/libgit2/libgit2/pull/4984) +- [Allocator restructuring](https://github.com/libgit2/libgit2/pull/4998) +- [cache: fix misnaming of `git_cache_free`](https://github.com/libgit2/libgit2/pull/4992) +- [examples: produce single cgit2 binary](https://github.com/libgit2/libgit2/pull/4956) +- [Remove public 'inttypes.h' header](https://github.com/libgit2/libgit2/pull/4991) +- [Prevent reading out of bounds memory](https://github.com/libgit2/libgit2/pull/4996) +- [Fix a memory leak in odb_otype_fast()](https://github.com/libgit2/libgit2/pull/4987) +- [Make stdalloc__reallocarray call stdalloc__realloc](https://github.com/libgit2/libgit2/pull/4986) +- [Remove `git_time_monotonic`](https://github.com/libgit2/libgit2/pull/4990) +- [Fix a _very_ improbable memory leak in git_odb_new()](https://github.com/libgit2/libgit2/pull/4988) +- [ci: publish documentation on merge](https://github.com/libgit2/libgit2/pull/4989) +- [Enable creation of worktree from bare repo's default branch](https://github.com/libgit2/libgit2/pull/4982) +- [Allow bypassing check for '.keep' file](https://github.com/libgit2/libgit2/pull/4965) +- [Release v0.28.1](https://github.com/libgit2/libgit2/pull/4983) + + + +## v0.25.0-alpha.12 [(2019-06-03)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.12) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.11...v0.25.0-alpha.12) + +#### Summary of changes +- Fix bug in Repository.prototype.refreshReferences where new remote references from a new remote added/fetched on a separte repo instance do not show up in the result. +- Fixed a prototype problem with cherrypick, merge, and other collections that have a function at their root. call, apply, and bind should now be on NodeGit.Cherrypick. +- Bumped libssh2 to resolve security notice. + +#### Merged PRs into NodeGit +- [Bump libssh2 to 1.8.2 and fix some npm audit warnings #1678](https://github.com/nodegit/nodegit/pull/1678) +- [Root functions should keep their function prototypes correctly #1681](https://github.com/nodegit/nodegit/pull/1681) +- [refresh_references.cc: bust LibGit2 remote list cache by reading config #1685](https://github.com/nodegit/nodegit/pull/1685) + + +## v0.25.0-alpha.11 [(2019-05-20)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.11) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.10...v0.25.0-alpha.11) + +#### Summary of changes +- Improve speed and correctness of fileHistoryWalk. The API should not have changed; however, when the end of the walk has been reached, `reachedEndOfHistory` will be specified on the resulting array. + +#### Merged PRs into NodeGit +- [Implement faster file history walk #1676](https://github.com/nodegit/nodegit/pull/1676) + + +## v0.25.0-alpha.10 [(2019-05-03)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.10) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.9...v0.25.0-alpha.10) + +#### Summary of changes +- Drops support for Ubuntu 14 after EOL +- Fixes openssl prebuilt downloads for electron builds +- Fixes commits retrieved from Commit.prototype.parent +- *DEPRECATION* Support signing commits in Repository.prototype.mergeBranches. The last parameter `processMergeMessageCallback` is now deprecated, but will continue to work. Use the options object instead, which will contain the `processMergeMessageCallback`, as well as the `signingCb`. +- Bump Node-Gyp to 4.0.0 to fix tar security vulnerability +- *BREAKING* `getRemotes` no longer returns remote names, it now returns remote objects directly. Use `getRemoteNames` to get a list of remote names. +- Optimized a set of routines in NodeGit. These methods as written in Javascript require hundreds or thousands of requests to async workers to retrieve data. We've batched these requests and performed them on a single async worker. There are now native implementations of the following: + - Repository.prototype.getReferences: Retrieves all references on async worker. + - Repository.prototype.getRemotes: Retrieves all remotes on async worker. + - Repository.prototype.getSubmodules: Retrieves all submodules on async worker. + - Repository.prototype.refreshReferences: Open sourced function from GitKraken. Grabs a lot of information about references on an async worker. + - Revwalk.prototype.commitWalk: Retrieves up to N commits from a revwalk on an async worker. + +#### Merged PRs into NodeGit +- [EOL for Node 6 and Ubuntu 14.04 #1649](https://github.com/nodegit/nodegit/pull/1649) +- [Ensures that commits from parent(*) has a repository #1658](https://github.com/nodegit/nodegit/pull/1658) +- [Update openssl conan distributions #1663](https://github.com/nodegit/nodegit/pull/1663) +- [Support signing in Repository#mergeBranches #1664](https://github.com/nodegit/nodegit/pull/1664) +- [Dependency upgrade node-gyp upgraded to 4.0.0 #1672](https://github.com/nodegit/nodegit/pull/1672) +- [Add additional getters to streamline information gathering (breaking change) #1671](https://github.com/nodegit/nodegit/pull/1671) + + + +## v0.25.0-alpha.9 [(2019-03-04)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.9) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.8...v0.25.0-alpha.9) + +#### Summary of changes +- Removed access to the diff_so_far param in git_diff_notify_cb and git_diff_progress_cb +- Changed FilterSource.prototype.repo to async to prevent segfaults on filters that run during Submodule.status +- Clean up deprecation messages to inform users of what was deprecated, not just what users should switch to +- When installing on a machine that has yarn and does not have npm, the preinstall script should succeed now +- ceiling_dirs is now an optional parameter to Repository.discover + +#### Merged PRs into NodeGit +- [Clean up some dangerous memory accesses in callbacks #1642](https://github.com/nodegit/nodegit/pull/1642) +- [Output the item that was deprecated when giving deprecation notice #1643](https://github.com/nodegit/nodegit/pull/1643) +- [Don't fail yarn installs when we can't find npm #1644](https://github.com/nodegit/nodegit/pull/1644) +- [`ceiling_dirs` parameter in `Repository.discover` is optional #1245](https://github.com/nodegit/nodegit/pull/1245) + + ## v0.25.0-alpha.8 [(2019-02-27)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.8) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.7...v0.25.0-alpha.8) @@ -19,7 +1830,7 @@ - Fixed bug where repeated uses of extractSignature would fail because of the use of regex.prototype.match - Added support for building on IBM i (PASE) machines - Fixed bug where signingCb in rebases would not return error codes to LibGit2 if the signingCb threw or rejected -- Expoed AnnotatedCommit methods: +- Exposed AnnotatedCommit methods: - AnnotatedCommit.prototype.ref - Exposed Apply methods: - Apply.apply applies a diff to the repository @@ -2381,8 +4192,4 @@ We have added Node 6 as a supported platform! Going forward we aim to have 1:1 s [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.0.1...v0.0.2) -## v0.0.1 [(2011-03-10)](https://github.com/nodegit/nodegit/tree/v0.0.1) - - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* +## v0.0.1 [(2011-03-10)](https://github.com/nodegit/nodegit/tree/v0.0.1) \ No newline at end of file diff --git a/README.md b/README.md index ddd922d4c3..72442d791d 100644 --- a/README.md +++ b/README.md @@ -2,24 +2,22 @@ > Node bindings to the [libgit2](http://libgit2.github.com/) project. +[](https://github.com/nodegit/nodegit/actions) -Linux & macOS | Windows | Coverage | Dependencies -------------- | ------- | -------- | ------------- -[](https://travis-ci.org/nodegit/nodegit) | [](https://ci.appveyor.com/project/timbranyen/nodegit) | [](https://coveralls.io/r/nodegit/nodegit) | [](https://david-dm.org/nodegit/nodegit) - -**Stable (libgit2@v0.27.3): 0.27.3** +**Stable (libgit2@v0.28.3): 0.28.3** ## Have a problem? Come chat with us! ## Visit [slack.libgit2.org](http://slack.libgit2.org/) to sign up, then join us in #nodegit. ## Maintained by ## -Tim Branyen [@tbranyen](http://twitter.com/tbranyen), -John Haley [@johnhaley81](http://twitter.com/johnhaley81), and -Max Korp [@maxkorp](http://twitter.com/MaximilianoKorp) with help from tons of +Tyler Ang-Wanek [@twwanek](http://twitter.com/twwanek) with help from tons of [awesome contributors](https://github.com/nodegit/nodegit/contributors)! ### Alumni Maintainers ### +Tim Branyen [@tbranyen](http://twitter.com/tbranyen), +John Haley [@johnhaley81](http://twitter.com/johnhaley81), +Max Korp [@maxkorp](http://twitter.com/MaximilianoKorp), Steve Smith [@orderedlist](https://twitter.com/orderedlist), Michael Robinson [@codeofinterest](http://twitter.com/codeofinterest), and Nick Kallen [@nk](http://twitter.com/nk) @@ -76,10 +74,17 @@ In Ubuntu: sudo apt-get install libssl-dev ``` -Additionally, you need `curl-config` on your system. You need one of these packages: - * libcurl4-gnutls-dev - * libcurl4-nss-dev - * libcurl4-openssl-dev +You will need the following libraries installed on your linux machine: + - libpcre + - libpcreposix + - libkrb5 + - libk5crypto + - libcom_err + +When building locally, you will also need development packages for kerberos and pcre, so both of these utilities must be present on your machine: + - pcre-config + - krb5-config + If you are still encountering problems while installing, you should try the [Building from source](http://www.nodegit.org/guides/install/from-source/) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 368e911e8d..0000000000 --- a/appveyor.yml +++ /dev/null @@ -1,63 +0,0 @@ -# appveyor file -# https://www.appveyor.com/docs/appveyor-yml/ - -image: Visual Studio 2015 - -platform: - - x64 - - x86 - -# build version format -version: "{build}" - -# Set a known clone folder -clone_folder: c:\projects\nodegit - -# fix line endings in Windows -init: - - git config --global core.autocrlf input - - git config --global user.name "John Doe" - - git config --global user.email johndoe@example.com - -# what combinations to test -environment: - JOBS: 4 - GIT_SSH: c:\projects\nodegit\vendor\plink.exe - GYP_MSVS_VERSION: 2015 - matrix: - # Node.js - - nodejs_version: "10" - - nodejs_version: "8" - - nodejs_version: "6" - -matrix: - fast_finish: true - -# Get the latest stable version of Node 0.STABLE.latest -install: - - git submodule update --init --recursive - - ps: Install-Product node $env:nodejs_version $env:platform - - ps: Start-Process c:\projects\nodegit\vendor\pageant.exe c:\projects\nodegit\vendor\private.ppk - - npm install -g npm - - npm install -g node-gyp - - appveyor-retry call npm install - -test_script: - - node --version - - npm --version - - appveyor-retry call npm test - -on_success: - - IF %APPVEYOR_REPO_TAG%==true npm install -g node-pre-gyp - - IF %APPVEYOR_REPO_TAG%==true npm install -g aws-sdk - - IF %APPVEYOR_REPO_TAG%==true node lifecycleScripts\clean - - IF %APPVEYOR_REPO_TAG%==true node-pre-gyp package - - IF %APPVEYOR_REPO_TAG%==true node-pre-gyp publish - -build: off - -branches: - only: - - /backport\/.*/ - - master - - v0.3 diff --git a/examples/add-and-commit.js b/examples/add-and-commit.js index 4f4959dd78..42215257b8 100644 --- a/examples/add-and-commit.js +++ b/examples/add-and-commit.js @@ -1,9 +1,9 @@ -var nodegit = require("../"); -var path = require("path"); -var fse = require("fs-extra"); -var fileName = "newfile.txt"; -var fileContent = "hello world"; -var directoryName = "salad/toast/strangerinastrangeland/theresnowaythisexists"; +const nodegit = require("../"); +const path = require("path"); +const fs = require("fs"); +const fileName = "newfile.txt"; +const fileContent = "hello world"; +const directoryName = "salad/toast/strangerinastrangeland/theresnowaythisexists"; /** * This example creates a certain file `newfile.txt`, adds it to the git @@ -11,59 +11,38 @@ var directoryName = "salad/toast/strangerinastrangeland/theresnowaythisexists"; * followed by a `git commit` **/ -var repo; -var index; -var oid; -nodegit.Repository.open(path.resolve(__dirname, "../.git")) -.then(function(repoResult) { - repo = repoResult; - return fse.ensureDir(path.join(repo.workdir(), directoryName)); -}).then(function(){ - return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); -}) -.then(function() { - return fse.writeFile( +(async () => { + const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); + + await fs.promises.mkdir(path.join(repo.workdir(), directoryName), { + recursive: true, + }); + + await fs.promises.writeFile(path.join(repo.workdir(), fileName), fileContent); + await fs.promises.writeFile( path.join(repo.workdir(), directoryName, fileName), fileContent ); -}) -.then(function() { - return repo.refreshIndex(); -}) -.then(function(indexResult) { - index = indexResult; -}) -.then(function() { + + const index = await repo.refreshIndex(); + // this file is in the root of the directory and doesn't need a full path - return index.addByPath(fileName); -}) -.then(function() { + await index.addByPath(fileName); // this file is in a subdirectory and can use a relative path - return index.addByPath(path.posix.join(directoryName, fileName)); -}) -.then(function() { + await index.addByPath(path.posix.join(directoryName, fileName)); // this will write both files to the index - return index.write(); -}) -.then(function() { - return index.writeTree(); -}) -.then(function(oidResult) { - oid = oidResult; - return nodegit.Reference.nameToId(repo, "HEAD"); -}) -.then(function(head) { - return repo.getCommit(head); -}) -.then(function(parent) { - var author = nodegit.Signature.now("Scott Chacon", + await index.write(); + + const oid = await index.writeTree(); + + const parent = await repo.getHeadCommit(); + const author = nodegit.Signature.now("Scott Chacon", "schacon@gmail.com"); - var committer = nodegit.Signature.now("Scott A Chacon", + const committer = nodegit.Signature.now("Scott A Chacon", "scott@github.com"); - return repo.createCommit("HEAD", author, committer, "message", oid, [parent]); -}) -.done(function(commitId) { + const commitId = await repo.createCommit("HEAD", author, committer, "message", oid, [parent]); + console.log("New Commit: ", commitId); -}); +})(); diff --git a/examples/create-new-repo.js b/examples/create-new-repo.js index 1c7e3e9f57..1df93fbbc8 100644 --- a/examples/create-new-repo.js +++ b/examples/create-new-repo.js @@ -1,46 +1,32 @@ -var nodegit = require("../"); -var path = require("path"); -var fse = require("fs-extra"); -var fileName = "newfile.txt"; -var fileContent = "hello world"; -var repoDir = "../../newRepo"; +const nodegit = require("../"); +const path = require("path"); +const fs = require("fs"); +const fileName = "newfile.txt"; +const fileContent = "hello world"; +const repoDir = "../newRepo"; -var repository; -var index; -fse.ensureDir(path.resolve(__dirname, repoDir)) -.then(function() { - return nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); -}) -.then(function(repo) { - repository = repo; - return fse.writeFile(path.join(repository.workdir(), fileName), fileContent); -}) -.then(function(){ - return repository.refreshIndex(); -}) -.then(function(idx) { - index = idx; -}) -.then(function() { - return index.addByPath(fileName); -}) -.then(function() { - return index.write(); -}) -.then(function() { - return index.writeTree(); -}) -.then(function(oid) { - var author = nodegit.Signature.now("Scott Chacon", +(async () => { + await fs.promises.mkdir(path.resolve(__dirname, repoDir), { + recursive: true, + }); + const repo = await nodegit.Repository.init(path.resolve(__dirname, repoDir), 0); + await fs.promises.writeFile(path.join(repo.workdir(), fileName), fileContent); + const index = await repo.refreshIndex(); + await index.addByPath(fileName); + await index.write(); + + const oid = await index.writeTree(); + + const author = nodegit.Signature.now("Scott Chacon", "schacon@gmail.com"); - var committer = nodegit.Signature.now("Scott A Chacon", + const committer = nodegit.Signature.now("Scott A Chacon", "scott@github.com"); - // Since we're creating an inital commit, it has no parents. Note that unlike + // Since we're creating an initial commit, it has no parents. Note that unlike // normal we don't get the head either, because there isn't one yet. - return repository.createCommit("HEAD", author, committer, "message", oid, []); -}) -.done(function(commitId) { + const commitId = await repo.createCommit("HEAD", author, committer, "message", oid, []); console.log("New Commit: ", commitId); -}); +})(); + + diff --git a/examples/details-for-tree-entry.js b/examples/details-for-tree-entry.js index a567fcf75c..13dcd4e210 100644 --- a/examples/details-for-tree-entry.js +++ b/examples/details-for-tree-entry.js @@ -1,29 +1,26 @@ -var nodegit = require("../"); -var path = require("path"); +const nodegit = require("../"); +const path = require("path"); /** * This shows how to get details from a tree entry or a blob **/ -nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { - return repo.getTree("e1b0c7ea57bfc5e30ec279402a98168a27838ac9") - .then(function(tree) { - var treeEntry = tree.entryByIndex(0); +(async () => { + const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); + const tree = await repo.getTree("e1b0c7ea57bfc5e30ec279402a98168a27838ac9"); + const treeEntry = tree.entryByIndex(0); + + // Tree entry doesn't have any data associated with the actual entry + // To get that we need to get the index entry that this points to + const index = await repo.refreshIndex(); + const indexEntry = index.getByPath(treeEntry.path()); - // Tree entry doesn't have any data associated with the actual entry - // To get that we need to get the index entry that this points to - return repo.refreshIndex().then(function(index) { - var indexEntry = index.getByPath(treeEntry.path()); + // With the index entry we can now view the details for the tree entry + console.log("Entry path: " + indexEntry.path); + console.log("Entry time in seconds: " + indexEntry.mtime.seconds()); + console.log("Entry oid: " + indexEntry.id.toString()); + console.log("Entry size: " + indexEntry.fileSize); + + console.log("Done!"); +})(); - // With the index entry we can now view the details for the tree entry - console.log("Entry path: " + indexEntry.path); - console.log("Entry time in seconds: " + indexEntry.mtime.seconds()); - console.log("Entry oid: " + indexEntry.id.toString()); - console.log("Entry size: " + indexEntry.fileSize); - }); - }); - }) - .done(function() { - console.log("Done!"); - }); diff --git a/examples/diff-commits.js b/examples/diff-commits.js index f68d0fcfb1..b3d6d75107 100644 --- a/examples/diff-commits.js +++ b/examples/diff-commits.js @@ -1,41 +1,41 @@ -var nodegit = require("../"); -var path = require("path"); +const nodegit = require("../"); +const path = require("path"); // This code examines the diffs between a particular commit and all of its // parents. Since this commit is not a merge, it only has one parent. This is // similar to doing `git show`. -nodegit.Repository.open(path.resolve(__dirname, "../.git")) -.then(function(repo) { - return repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); -}) -.then(function(commit) { +(async () => { + const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")) + const commit = await repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); console.log("commit " + commit.sha()); - console.log("Author:", commit.author().name() + - " <" + commit.author().email() + ">"); + console.log( + "Author:", commit.author().name() + + " <" + commit.author().email() + ">" + ); console.log("Date:", commit.date()); console.log("\n " + commit.message()); - return commit.getDiff(); -}) -.done(function(diffList) { - diffList.forEach(function(diff) { - diff.patches().then(function(patches) { - patches.forEach(function(patch) { - patch.hunks().then(function(hunks) { - hunks.forEach(function(hunk) { - hunk.lines().then(function(lines) { - console.log("diff", patch.oldFile().path(), - patch.newFile().path()); - console.log(hunk.header().trim()); - lines.forEach(function(line) { - console.log(String.fromCharCode(line.origin()) + - line.content().trim()); - }); - }); - }); - }); - }); - }); - }); -}); + const diffList = await commit.getDiff(); + for (const diff of diffList) { + const patches = await diff.patches(); + for (const patch of patches) { + const hunks = await patch.hunks(); + for (const hunk of hunks) { + const lines = await hunk.lines(); + console.log( + "diff", + patch.oldFile().path(), + patch.newFile().path() + ); + console.log(hunk.header().trim()); + for (const line of lines) { + console.log( + String.fromCharCode(line.origin()) + + line.content().trim() + ); + } + } + } + } +})(); diff --git a/examples/general.js b/examples/general.js index b6ae7efc95..b06c4d7954 100644 --- a/examples/general.js +++ b/examples/general.js @@ -1,12 +1,10 @@ -var nodegit = require("../"); -var path = require("path"); -var oid; -var odb; -var repo; +const nodegit = require("../"); +const path = require("path"); + // **nodegit** is a javascript library for node.js that wraps libgit2, a // pure C implementation of the Git core. It provides an asynchronous -// interface around any functions that do I/O, and a sychronous interface +// interface around any functions that do I/O, and a synchronous interface // around the rest. // // This file is an example of using that API in a real, JS file. @@ -19,348 +17,301 @@ var repo; // Nearly, all git operations in the context of a repository. // To open a repository, -nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repoResult) { - repo = repoResult; - console.log("Opened repository."); - - // ### SHA-1 Value Conversions - - // Objects in git (commits, blobs, etc.) are referred to by their SHA value - // **nodegit** uses a simple wrapper around hash values called an `Oid`. - // The oid validates that the SHA is well-formed. - - oid = nodegit.Oid.fromString("c27d9c35e3715539d941254f2ce57042b978c49c"); - - // Most functions in in **nodegit** that take an oid will also take a - // string, so for example, you can look up a commit by a string SHA or - // an Oid, but but any functions that create new SHAs will always return - // an Oid. - - // If you have a oid, you can easily get the hex value of the SHA again. - console.log("Sha hex string:", oid.toString()); - - // ### Working with the Object Database - - // **libgit2** provides [direct access][odb] to the object database. The - // object database is where the actual objects are stored in Git. For - // working with raw objects, we'll need to get this structure from the - // repository. - return repo.odb(); - }) - - .then(function(odbResult) { - odb = odbResult; - - // We can read raw objects directly from the object database if we have - // the oid (SHA) of the object. This allows us to access objects without - // knowing thier type and inspect the raw bytes unparsed. - - return odb.read(oid); - }) - - .then(function(object) { - // A raw object only has three properties - the type (commit, blob, tree - // or tag), the size of the raw data and the raw, unparsed data itself. - // For a commit or tag, that raw data is human readable plain ASCII - // text. For a blob it is just file contents, so it could be text or - // binary data. For a tree it is a special binary format, so it's unlikely - // to be hugely helpful as a raw object. - var data = object.data(); - var type = object.type(); - var size = object.size(); - - console.log("Object size and type:", size, type); - console.log("Raw data: ", data.toString().substring(100), "..."); - - }) - - .then(function() { - // You can also write raw object data to Git. This is pretty cool because - // it gives you direct access to the key/value properties of Git. Here - // we'll write a new blob object that just contains a simple string. - // Notice that we have to specify the object type. - return odb.write("test data", "test data".length, nodegit.Object.TYPE.BLOB); - }) - - .then(function(oid) { - // Now that we've written the object, we can check out what SHA1 was - // generated when the object was written to our database. - console.log("Written Object: ", oid.toString()); - }) - - .then(function() { - // ### Object Parsing - - // libgit2 has methods to parse every object type in Git so you don't have - // to work directly with the raw data. This is much faster and simpler - // than trying to deal with the raw data yourself. - - // #### Commit Parsing - - // [Parsing commit objects][pco] is simple and gives you access to all the - // data in the commit - the author (name, email, datetime), committer - // (same), tree, message, encoding and parent(s). - - oid = nodegit.Oid.fromString("698c74e817243efe441a5d1f3cbaf3998282ca86"); - - // Many methods in **nodegit** are asynchronous, because they do file - // or network I/O. By convention, all asynchronous methods are named - // imperatively, like `getCommit`, `open`, `read`, `write`, etc., whereas - // synchronous methods are named nominatively, like `type`, `size`, `name`. - - return repo.getCommit(oid); - }) - - .then(function(commit) { - // Each of the properties of the commit object are accessible via methods, - // including commonly needed variations, such as `git_commit_time` which - // returns the author time and `git_commit_message` which gives you the - // commit message. - console.log("Commit:", commit.message(), - commit.author().name(), commit.date()); - - // Commits can have zero or more parents. The first (root) commit will - // have no parents, most commits will have one (i.e. the commit it was - // based on) and merge commits will have two or more. Commits can - // technically have any number, though it's rare to have more than two. - return commit.getParents(); - }) - - .then(function(parents) { - parents.forEach(function(parent) { - console.log("Parent:", parent.toString()); - }); - }) - - .then(function() { - // #### Writing Commits - - // nodegit provides a couple of methods to create commit objects easily as - // well. - var author = nodegit.Signature.now("Scott Chacon", - "schacon@gmail.com"); - var committer = nodegit.Signature.now("Scott A Chacon", - "scott@github.com"); - - // Commit objects need a tree to point to and optionally one or more - // parents. Here we're creating oid objects to create the commit with, - // but you can also use existing ones: - var treeId = nodegit.Oid.fromString( - "4170d10f19600b9cb086504e8e05fe7d863358a2"); - var parentId = nodegit.Oid.fromString( - "eebd0ead15d62eaf0ba276da53af43bbc3ce43ab"); - - return repo.getTree(treeId).then(function(tree) { - return repo.getCommit(parentId).then(function(parent) { - // Here we actually create the commit object with a single call with all - // the values we need to create the commit. The SHA key is written to - // the `commit_id` variable here. - return repo.createCommit( - null /* do not update the HEAD */, - author, - committer, - "example commit", - tree, - [parent]); - }).then(function(oid) { - console.log("New Commit:", oid.toString()); - }); - }); - }) - - .then(function() { - // #### Tag Parsing - - // You can parse and create tags with the [tag management API][tm], which - // functions very similarly to the commit lookup, parsing and creation - // methods, since the objects themselves are very similar. - - oid = nodegit.Oid.fromString("dcc4aa9fcdaced037434cb149ed3b6eab4d0709d"); - return repo.getTag(oid); - }) - - .then(function(tag) { - // Now that we have the tag object, we can extract the information it - // generally contains: the target (usually a commit object), the type of - // the target object (usually "commit"), the name ("v1.0"), the tagger (a - // git_signature - name, email, timestamp), and the tag message. - console.log(tag.name(), tag.targetType(), tag.message()); - - return tag.target(); - }) - - .then(function (target) { - console.log("Target is commit:", target.isCommit()); - }) - - .then(function() { - // #### Tree Parsing - - // A Tree is how Git represents the state of the filesystem - // at a given revision. In general, a tree corresponds to a directory, - // and files in that directory are either files (blobs) or directories. - - // [Tree parsing][tp] is a bit different than the other objects, in that - // we have a subtype which is the tree entry. This is not an actual - // object type in Git, but a useful structure for parsing and traversing - // tree entries. - - oid = nodegit.Oid.fromString("e1b0c7ea57bfc5e30ec279402a98168a27838ac9"); - return repo.getTree(oid); - }) - - .then(function(tree) { - console.log("Tree Size:", tree.entryCount()); - - function dfs(tree) { - var promises = []; - - tree.entries().forEach(function(entry) { - if (entry.isDirectory()) { - promises.push(entry.getTree().then(dfs)); - } else if (entry.isFile()) { - console.log("Tree Entry:", entry.name()); - } - }); - - return Promise.all(promises); +(async () => { + const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); + console.log("Opened repository."); + + // ### SHA-1 Value Conversions + + // Objects in git (commits, blobs, etc.) are referred to by their SHA value + // **nodegit** uses a simple wrapper around hash values called an `Oid`. + // The oid validates that the SHA is well-formed. + + let oid = nodegit.Oid.fromString("c27d9c35e3715539d941254f2ce57042b978c49c"); + + // Most functions in in **nodegit** that take an oid will also take a + // string, so for example, you can look up a commit by a string SHA or + // an Oid, but any functions that create new SHAs will always return + // an Oid. + + // If you have a oid, you can easily get the hex value of the SHA again. + console.log("Sha hex string:", oid.toString()); + + // ### Working with the Object Database + + // **libgit2** provides [direct access][odb] to the object database. The + // object database is where the actual objects are stored in Git. For + // working with raw objects, we'll need to get this structure from the + // repository. + const odb = await repo.odb(); + + // We can read raw objects directly from the object database if we have + // the oid (SHA) of the object. This allows us to access objects without + // knowing their type and inspect the raw bytes unparsed. + + const object = await odb.read(oid); + + // A raw object only has three properties - the type (commit, blob, tree + // or tag), the size of the raw data and the raw, unparsed data itself. + // For a commit or tag, that raw data is human readable plain ASCII + // text. For a blob it is just file contents, so it could be text or + // binary data. For a tree it is a special binary format, so it's unlikely + // to be hugely helpful as a raw object. + const data = object.data(); + const type = object.type(); + const size = object.size(); + + console.log("Object size and type:", size, type); + console.log("Raw data: ", data.toString().substring(100), "..."); + + // You can also write raw object data to Git. This is pretty cool because + // it gives you direct access to the key/value properties of Git. Here + // we'll write a new blob object that just contains a simple string. + // Notice that we have to specify the object type. + oid = await odb.write("test data", "test data".length, nodegit.Object.TYPE.BLOB); + + // Now that we've written the object, we can check out what SHA1 was + // generated when the object was written to our database. + console.log("Written Object: ", oid.toString()); + + // ### Object Parsing + + // libgit2 has methods to parse every object type in Git so you don't have + // to work directly with the raw data. This is much faster and simpler + // than trying to deal with the raw data yourself. + + // #### Commit Parsing + + // [Parsing commit objects][pco] is simple and gives you access to all the + // data in the commit - the author (name, email, datetime), committer + // (same), tree, message, encoding and parent(s). + + oid = nodegit.Oid.fromString("698c74e817243efe441a5d1f3cbaf3998282ca86"); + + // Many methods in **nodegit** are asynchronous, because they do file + // or network I/O. By convention, all asynchronous methods are named + // imperatively, like `getCommit`, `open`, `read`, `write`, etc., whereas + // synchronous methods are named nominatively, like `type`, `size`, `name`. + + const commit = await repo.getCommit(oid); + + // Each of the properties of the commit object are accessible via methods, + // including commonly needed variations, such as `git_commit_time` which + // returns the author time and `git_commit_message` which gives you the + // commit message. + console.log( + "Commit:", commit.message(), + commit.author().name(), commit.date() + ); + + // Commits can have zero or more parents. The first (root) commit will + // have no parents, most commits will have one (i.e. the commit it was + // based on) and merge commits will have two or more. Commits can + // technically have any number, though it's rare to have more than two. + const parents = await commit.getParents(); + for (const parent of parents) { + console.log("Parent:", parent.toString()); + } + + // #### Writing Commits + + // nodegit provides a couple of methods to create commit objects easily as + // well. + const author = nodegit.Signature.now("Scott Chacon", + "schacon@gmail.com"); + const committer = nodegit.Signature.now("Scott A Chacon", + "scott@github.com"); + + // Commit objects need a tree to point to and optionally one or more + // parents. Here we're creating oid objects to create the commit with, + // but you can also use existing ones: + const treeId = nodegit.Oid.fromString( + "4170d10f19600b9cb086504e8e05fe7d863358a2"); + const parentId = nodegit.Oid.fromString( + "eebd0ead15d62eaf0ba276da53af43bbc3ce43ab"); + + let tree = await repo.getTree(treeId); + const parent = await repo.getCommit(parentId); + // Here we actually create the commit object with a single call with all + // the values we need to create the commit. The SHA key is written to + // the `commit_id` variable here. + oid = await repo.createCommit( + null /* do not update the HEAD */, + author, + committer, + "example commit", + tree, + [parent] + ); + console.log("New Commit:", oid.toString()); + + // #### Tag Parsing + + // You can parse and create tags with the [tag management API][tm], which + // functions very similarly to the commit lookup, parsing and creation + // methods, since the objects themselves are very similar. + + oid = nodegit.Oid.fromString("dcc4aa9fcdaced037434cb149ed3b6eab4d0709d"); + const tag = await repo.getTag(oid); + + // Now that we have the tag object, we can extract the information it + // generally contains: the target (usually a commit object), the type of + // the target object (usually "commit"), the name ("v1.0"), the tagger (a + // git_signature - name, email, timestamp), and the tag message. + console.log(tag.name(), tag.targetType(), tag.message()); + + const target = await tag.target(); + console.log("Target is commit:", target.isCommit()); + + // #### Tree Parsing + + // A Tree is how Git represents the state of the filesystem + // at a given revision. In general, a tree corresponds to a directory, + // and files in that directory are either files (blobs) or directories. + + // [Tree parsing][tp] is a bit different than the other objects, in that + // we have a subtype which is the tree entry. This is not an actual + // object type in Git, but a useful structure for parsing and traversing + // tree entries. + + oid = nodegit.Oid.fromString("e1b0c7ea57bfc5e30ec279402a98168a27838ac9"); + tree = await repo.getTree(oid); + + console.log("Tree Size:", tree.entryCount()); + + /** + * @param {nodegit.Tree} tree + */ + function dfs(tree) { + const promises = []; + + for (const entry of tree.entries()) { + if (entry.isDirectory()) { + promises.push(entry.getTree().then(dfs)); + } else if (entry.isFile()) { + console.log("Tree Entry:", entry.name()); + } } - return dfs(tree).then(function() { - // You can also access tree entries by path if you know the path of the - // entry you're looking for. - return tree.getEntry("example/general.js").then(function(entry) { - // Entries which are files have blobs associated with them: - entry.getBlob(function(error, blob) { - console.log("Blob size:", blob.size()); - }); - }); - }); - }) - - .then(function() { - // #### Blob Parsing - - // The last object type is the simplest and requires the least parsing - // help. Blobs are just file contents and can contain anything, there is - // no structure to it. The main advantage to using the [simple blob - // api][ba] is that when you're creating blobs you don't have to calculate - // the size of the content. There is also a helper for reading a file - // from disk and writing it to the db and getting the oid back so you - // don't have to do all those steps yourself. - - oid = nodegit.Oid.fromString("991c06b7b1ec6f939488427e4b41a4fa3e1edd5f"); - return repo.getBlob(oid); - }) - - .then(function(blob) { - // You can access a node.js Buffer with the raw contents - // of the blob directly. Note that this buffer may not - // contain ASCII data for certain blobs (e.g. binary files). - var buffer = blob.content(); - - // If you know that the blob is UTF-8, however, - console.log("Blob contents:", blob.toString().slice(0, 38)); - console.log("Buffer:", buffer.toString().substring(100), "..."); - }) - - .then(function() { - // ### Revwalking - - // The libgit2 [revision walking api][rw] provides methods to traverse the - // directed graph created by the parent pointers of the commit objects. - // Since all commits point back to the commit that came directly before - // them, you can walk this parentage as a graph and find all the commits - // that were ancestors of (reachable from) a given starting point. This - // can allow you to create `git log` type functionality. - - oid = nodegit.Oid.fromString("698c74e817243efe441a5d1f3cbaf3998282ca86"); - - // To use the revwalker, create a new walker, tell it how you want to sort - // the output and then push one or more starting points onto the walker. - // If you want to emulate the output of `git log` you would push the SHA - // of the commit that HEAD points to into the walker and then start - // traversing them. You can also "hide" commits that you want to stop at - // or not see any of their ancestors. So if you want to emulate `git log - // branch1..branch2`, you would push the oid of `branch2` and hide the oid - // of `branch1`. - var revWalk = repo.createRevWalk(); - - revWalk.sorting(nodegit.Revwalk.SORT.TOPOLOGICAL, - nodegit.Revwalk.SORT.REVERSE); - - revWalk.push(oid); - - // Now that we have the starting point pushed onto the walker, we start - // asking for ancestors. It will return them in the sorting order we asked - // for as commit oids. We can then lookup and parse the commited pointed - // at by the returned OID; note that this operation is specially fast - // since the raw contents of the commit object will be cached in memory - - function walk() { - return revWalk.next().then(function(oid) { - if (!oid) { - return; - } - - return repo.getCommit(oid).then(function(commit) { - console.log("Commit:", commit.toString()); - return walk(); - }); - }); + return Promise.all(promises); + } + + await dfs(tree); + + // You can also access tree entries by path if you know the path of the + // entry you're looking for. + const entry = await tree.getEntry("example/general.js"); + // Entries which are files have blobs associated with them: + let blob = await entry.getBlob(); + console.log("Blob size:", blob.rawsize()); + + // #### Blob Parsing + + // The last object type is the simplest and requires the least parsing + // help. Blobs are just file contents and can contain anything, there is + // no structure to it. The main advantage to using the [simple blob + // api][ba] is that when you're creating blobs you don't have to calculate + // the size of the content. There is also a helper for reading a file + // from disk and writing it to the db and getting the oid back so you + // don't have to do all those steps yourself. + + oid = nodegit.Oid.fromString("991c06b7b1ec6f939488427e4b41a4fa3e1edd5f"); + blob = await repo.getBlob(oid); + // You can access a node.js Buffer with the raw contents + // of the blob directly. Note that this buffer may not + // contain ASCII data for certain blobs (e.g. binary files). + const buffer = blob.content(); + + // If you know that the blob is UTF-8, however, + console.log("Blob contents:", blob.toString().slice(0, 38)); + console.log("Buffer:", buffer.toString().substring(100), "..."); + + // ### Revwalking + + // The libgit2 [revision walking api][rw] provides methods to traverse the + // directed graph created by the parent pointers of the commit objects. + // Since all commits point back to the commit that came directly before + // them, you can walk this parentage as a graph and find all the commits + // that were ancestors of (reachable from) a given starting point. This + // can allow you to create `git log` type functionality. + + oid = nodegit.Oid.fromString("698c74e817243efe441a5d1f3cbaf3998282ca86"); + + // To use the revwalker, create a new walker, tell it how you want to sort + // the output and then push one or more starting points onto the walker. + // If you want to emulate the output of `git log` you would push the SHA + // of the commit that HEAD points to into the walker and then start + // traversing them. You can also "hide" commits that you want to stop at + // or not see any of their ancestors. So if you want to emulate `git log + // branch1..branch2`, you would push the oid of `branch2` and hide the oid + // of `branch1`. + const revWalk = repo.createRevWalk(); + + revWalk.sorting( + nodegit.Revwalk.SORT.TOPOLOGICAL, + nodegit.Revwalk.SORT.REVERSE + ); + + revWalk.push(oid); + + // Now that we have the starting point pushed onto the walker, we start + // asking for ancestors. It will return them in the sorting order we asked + // for as commit oids. We can then lookup and parse the commits pointed + // at by the returned OID; note that this operation is specially fast + // since the raw contents of the commit object will be cached in memory. + + async function walk() { + let oid; + try { + oid = await revWalk.next(); + } catch(error) { + if (error.errno !== nodegit.Error.CODE.ITEROVER) { + throw error; + } else { + return; + } } + const commit = await repo.getCommit(oid); + console.log("Commit:", commit.toString()); return walk(); - }) - - .then(function() { - // ### Index File Manipulation - - // The [index file API][gi] allows you to read, traverse, update and write - // the Git index file (sometimes thought of as the staging area). - return repo.refreshIndex(); - }) - - .then(function(index) { - // For each entry in the index, you can get a bunch of information - // including the SHA (oid), path and mode which map to the tree objects - // that are written out. It also has filesystem properties to help - // determine what to inspect for changes (ctime, mtime, dev, ino, uid, - // gid, file_size and flags) All these properties are exported publicly in - // the `IndexEntry` class - - index.entries().forEach(function(entry) { - console.log("Index Entry:", entry.path(), entry.mtime().seconds()); - }); - }) - - .then(function() { - // ### References - - // The [reference API][ref] allows you to list, resolve, create and update - // references such as branches, tags and remote references (everything in - // the .git/refs directory). - - return repo.getReferenceNames(nodegit.Reference.TYPE.LISTALL); - }) - - .then(function(referenceNames) { - var promises = []; - - referenceNames.forEach(function(referenceName) { - promises.push(repo.getReference(referenceName).then(function(reference) { - if (reference.isConcrete()) { - console.log("Reference:", referenceName, reference.target()); - } else if (reference.isSymbolic()) { - console.log("Reference:", referenceName, reference.symbolicTarget()); - } - })); - }); + } - return Promise.all(promises); - }) + await walk(); + + // ### Index File Manipulation + + // The [index file API][gi] allows you to read, traverse, update and write + // the Git index file (sometimes thought of as the staging area). + const index = await repo.refreshIndex(); + + // For each entry in the index, you can get a bunch of information + // including the SHA (oid), path and mode which map to the tree objects + // that are written out. It also has filesystem properties to help + // determine what to inspect for changes (ctime, mtime, dev, ino, uid, + // gid, file_size and flags) All these properties are exported publicly in + // the `IndexEntry` class + + for (const entry of index.entries()) { + console.log("Index Entry:", entry.path, entry.mtime.seconds()); + } + + // ### References + + // The [reference API][ref] allows you to list, resolve, create and update + // references such as branches, tags and remote references (everything in + // the .git/refs directory). + + const referenceNames = await repo.getReferenceNames(nodegit.Reference.TYPE.ALL); + + for (const referenceName of referenceNames) { + const reference = await repo.getReference(referenceName); + if (reference.isConcrete()) { + console.log("Reference:", referenceName, reference.target()); + } else if (reference.isSymbolic()) { + console.log("Reference:", referenceName, reference.symbolicTarget()); + } + } - .done(function() { - console.log("Done!"); - }); + console.log("Done!"); +})(); diff --git a/examples/merge-with-conflicts.js b/examples/merge-with-conflicts.js index 77e78340e4..55fb87d3b8 100644 --- a/examples/merge-with-conflicts.js +++ b/examples/merge-with-conflicts.js @@ -175,8 +175,8 @@ fse.remove(path.resolve(__dirname, repoDir)) } }) -// we need to get a new index as the other one isnt backed to -// the repository in the usual fashion, and just behaves weirdly +// we need to get a new index as the other one is not backed to +// the repository in the usual fashion, and just behaves weirdly. .then(function() { return repository.refreshIndex() .then(function(index) { diff --git a/examples/read-file.js b/examples/read-file.js index 991a5ae390..9da5ed1758 100644 --- a/examples/read-file.js +++ b/examples/read-file.js @@ -1,25 +1,19 @@ -var nodegit = require("../"), - path = require("path"); +const nodegit = require("../"); +const path = require("path"); // This example opens a certain file, `README.md`, at a particular commit, // and prints the first 10 lines as well as some metadata. -var _entry; -nodegit.Repository.open(path.resolve(__dirname, "../.git")) - .then(function(repo) { - return repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); - }) - .then(function(commit) { - return commit.getEntry("README.md"); - }) - .then(function(entry) { - _entry = entry; - return _entry.getBlob(); - }) - .then(function(blob) { - console.log(_entry.name(), _entry.sha(), blob.rawsize() + "b"); - console.log("========================================================\n\n"); - var firstTenLines = blob.toString().split("\n").slice(0, 10).join("\n"); - console.log(firstTenLines); - console.log("..."); - }) - .done(); + +(async () => { + const repo = await nodegit.Repository.open(path.resolve(__dirname, "../.git")); + const commit = await repo.getCommit("59b20b8d5c6ff8d09518454d4dd8b7b30f095ab5"); + const entry = await commit.getEntry("README.md"); + const blob = await entry.getBlob(); + + console.log(entry.name(), entry.sha(), blob.rawsize() + "b"); + console.log("========================================================\n\n"); + const firstTenLines = blob.toString().split("\n").slice(0, 10).join("\n"); + console.log(firstTenLines); + console.log("..."); +})(); + diff --git a/generate/index.js b/generate/index.js index 6bdaa42ef1..753897d5b7 100644 --- a/generate/index.js +++ b/generate/index.js @@ -6,6 +6,23 @@ var submoduleStatus = require("../lifecycleScripts/submodules/getStatus"); module.exports = function generate() { console.log("[nodegit] Generating native code"); + function tryGenerate(numRetries = 3) { + // There appears to be a race condition in the generate code somewhere + // Until we fix that, we should try to generate a few times before + try { + generateJson(); + generateNativeCode(); + generateMissingTests(); + } catch (error) { + if (numRetries > 0) { + console.log("[nodegit] WARNING - Failed to generate native code, trying again"); + tryGenerate(numRetries - 1); + } else { + throw error; + } + } + } + return submoduleStatus() .then(function(statuses) { var dirtySubmodules = statuses @@ -22,14 +39,11 @@ module.exports = function generate() { }); } }) - .then(function() { - generateJson(); - generateNativeCode(); - generateMissingTests(); - }) + .then(tryGenerate) .catch(function(e) { console.error("[nodegit] ERROR - Could not generate native code"); console.error(e); + throw e; }); } diff --git a/generate/input/README.md b/generate/input/README.md index 9ab9b51d6a..f0d7573eed 100644 --- a/generate/input/README.md +++ b/generate/input/README.md @@ -8,7 +8,7 @@ Customize the generated code using this configuration file. Enter the function's signature, arguments and their metadata and which functions can be skipped in this file. If you are using a manual template, remove all of its references from this file. #### libgit2-docs.json - These are provided by the libgit2 team. It includes all the metadata about the API provided by the libgit2 library. To grab the latest version of this file, download https://libgit2.github.com/libgit2/HEAD.json. + These are provided by the libgit2 team. It includes all the metadata about the API provided by the libgit2 library. To grab the latest version of this file, download https://libgit2.org/libgit2/HEAD.json. #### libgit2-supplement.json Use this confiuration file to group and override parts of the generated code. NodeGit tries its best to generate the right classes and structs, if it is not quite right, then use this config file to group/remove the functions. diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index c37a7c8ee8..aa08429954 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -14,7 +14,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_apply_hunk_cb": { @@ -32,7 +33,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_attr_foreach_cb": { @@ -54,25 +56,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 - } - }, - "git_blob_chunk_cb": { - "args": [ - { - "name": "entry", - "cType": "const git_config_entry *" - }, - { - "name": "payload", - "cType": "void *" - } - ], - "return": { - "type": "int", - "noResults": 1, - "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_checkout_notify_cb": { @@ -106,7 +91,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": 0 } }, "git_checkout_progress_cb": { @@ -129,10 +115,7 @@ } ], "return": { - "type": "int", - "noResults": 1, - "success": 0, - "error": -1, + "type": "void", "throttle": 100 } }, @@ -148,26 +131,45 @@ } ], "return": { - "type": "int", - "noResults": 1, - "success": 0, - "error": -1 + "type": "void", + "throttle": 100 } }, - "git_commit_signing_cb": { + "git_commit_create_cb": { "args": [ { - "name": "signature", - "cType": "git_buf *" + "name": "out", + "cType": "git_oid *", + "isReturn": true }, { - "name": "signature_field", - "cType": "git_buf *" + "name": "author", + "cType": "const git_signature *" + }, + { + "name": "committer", + "cType": "const git_signature *" + }, + { + "name": "message_encoding", + "cType": "const char *" }, { - "name": "commit_content", + "name": "message", "cType": "const char *" }, + { + "name": "tree", + "cType": "const git_tree *" + }, + { + "name": "parent_count", + "cType": "size_t" + }, + { + "name": "parents", + "cType": "const git_oid * []" + }, { "name": "payload", "cType": "void *" @@ -177,7 +179,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_config_foreach_cb": { @@ -195,14 +198,15 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, - "git_cred_acquire_cb": { + "git_credential_acquire_cb": { "args": [ { - "name": "cred", - "cType": "git_cred **", + "name": "credential", + "cType": "git_credential **", "isReturn": true }, { @@ -226,7 +230,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_binary_cb": { @@ -248,7 +253,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_file_cb": { @@ -271,7 +277,7 @@ "noResults": 1, "success": 0, "error": -1, - "throttle": 100 + "cancel": -1 } }, "git_diff_hunk_cb": { @@ -293,7 +299,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_line_cb": { @@ -319,14 +326,16 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_notify_cb": { "args": [ { "name": "diff_so_far", - "cType": "const git_diff *" + "cType": "const git_diff *", + "ignore": true }, { "name": "delta_to_add", @@ -345,13 +354,16 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } - },"git_diff_progress_cb": { + }, + "git_diff_progress_cb": { "args": [ { "name": "diff_so_far", - "cType": "const git_diff *" + "cType": "const git_diff *", + "ignore": true }, { "name": "old_path", @@ -370,7 +382,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_apply_fn": { @@ -400,7 +413,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_check_fn": { @@ -426,7 +440,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_cleanup_fn": { @@ -455,7 +470,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_shutdown_fn": { @@ -488,7 +504,28 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 + } + }, + "git_indexer_progress_cb": { + "args": [ + { + "name": "stats", + "cType": "const git_indexer_progress *" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": 0, + "success": 0, + "error": -1, + "cancel": -1, + "throttle": 100 } }, "git_note_foreach_cb": { @@ -510,7 +547,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_odb_foreach_cb": { @@ -523,7 +561,14 @@ "name": "payload", "cType": "void *" } - ] + ], + "return": { + "type": "int", + "noResults": 0, + "success": 0, + "error": -1, + "cancel": -1 + } }, "git_packbuilder_foreach_cb": { "args": [ @@ -544,14 +589,38 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 + } + }, + "git_push_update_reference_cb": { + "args": [ + { + "name": "refname", + "cType": "const char *" + }, + { + "name": "status", + "cType": "const char *" + }, + { + "name": "data", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": 1, + "success": 0, + "error": -1, + "cancel": -1 } }, "git_remote_create_cb": { "args": [ { "name": "out", - "cType": "git_repository **", + "cType": "git_remote **", "isReturn": true }, { @@ -575,7 +644,29 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": -1, + "cancel": -1 + } + }, + "git_remote_ready_cb": { + "args": [ + { + "name": "remote", + "cType": "git_remote *" + }, + { + "name": "direction", + "cType": "int" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "int", + "success": 0, + "error": -1 } }, "git_repository_create_cb": { @@ -602,7 +693,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": 1, + "cancel": -1 } }, "git_reference_foreach_cb": { @@ -620,7 +712,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_reference_foreach_name_cb": { @@ -638,7 +731,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_repository_fetchhead_foreach_cb": { @@ -668,7 +762,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": -1, + "cancel": -1 } }, "git_repository_mergehead_foreach_cb": { @@ -686,7 +781,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": -1, + "cancel": -1 } }, "git_revwalk_hide_cb": { @@ -704,30 +800,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 - } - }, - "git_smart_subtransport_cb": { - "args": [ - { - "name": "out", - "cType": "git_smart_subtransport **", - "isReturn": true - }, - { - "name": "owner", - "cType": "git_transport*" - }, - { - "name": "param", - "cType": "void *" - } - ], - "return": { - "type": "int", - "noResults": 0, - "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_stash_apply_progress_cb": { @@ -746,6 +820,7 @@ "noResults":0, "success": 0, "error": -1, + "cancel": -1, "throttle": 100 } }, @@ -772,7 +847,8 @@ "type": "int", "noResults":0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_status_cb": { @@ -794,7 +870,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_submodule_cb": { @@ -816,7 +893,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_tag_foreach_cb": { @@ -838,29 +916,11 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 - } - }, - "git_transfer_progress_cb": { - "args": [ - { - "name": "stats", - "cType": "const git_transfer_progress *" - }, - { - "name": "payload", - "cType": "void *" - } - ], - "return": { - "type": "int", - "noResults": 0, - "success": 0, "error": -1, - "throttle": 100 + "cancel": -1 } }, - "git_push_transfer_progress": { + "git_push_transfer_progress_cb": { "args": [ { "name": "current", @@ -884,6 +944,7 @@ "noResults": 0, "success": 0, "error": -1, + "cancel": -1, "throttle": 100 } }, @@ -907,7 +968,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_transport_certificate_check_cb": { @@ -933,7 +995,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_transport_message_cb": { @@ -955,7 +1018,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_treebuilder_filter_cb": { @@ -973,7 +1037,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": 0 } }, "git_treewalk_cb": { @@ -995,29 +1060,35 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, - "git_push_update_reference_cb": { + "git_url_resolve_cb": { "args": [ { - "name": "refname", - "cType": "const char *" + "name": "url_resolved", + "cType": "git_buf *" }, { - "name": "status", + "name": "url", "cType": "const char *" }, { - "name": "data", + "name": "direction", + "cType": "int" + }, + { + "name": "payload", "cType": "void *" } ], "return": { "type": "int", - "noResults": 1, + "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -30 } } } diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index f5c436b7e4..99837534db 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -4,6 +4,19 @@ "JsName": "STATES", "isMask": false }, + "blob_filter_flag": { + "values": { + "GIT_BLOB_FILTER_CHECK_FOR_BINARY": { + "JsName": "CHECK_FOR_BINARY" + }, + "GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES": { + "JsName": "NO_SYSTEM_ATTRIBUTES" + }, + "GIT_BLOB_FILTER_ATTTRIBUTES_FROM_HEAD": { + "JsName": "ATTTRIBUTES_FROM_HEAD" + } + } + }, "branch": { "JsName": "BRANCH", "isMask": false @@ -20,6 +33,10 @@ } } }, + "credential": { + "JsName": "TYPE", + "owner": "Credential" + }, "describe_strategy": { "ignore": true }, @@ -53,6 +70,10 @@ "owner": "Object", "removeString": "OBJ_" }, + "oid": { + "JsName": "TYPE", + "owner": "Oid" + }, "proxy": { "JsName": "PROXY", "isMask": false @@ -65,6 +86,10 @@ "JsName": "TYPE", "isMask": false }, + "revspec": { + "JsName": "TYPE", + "isMask": false + }, "sort": { "owner": "Revwalk" }, @@ -93,23 +118,31 @@ } }, "git_annotated_commit_from_ref": { - "return": { - "ownedBy": ["repo"] + "args": { + "out": { + "ownedBy": ["repo"] + } } }, "git_annotated_commit_from_fetchhead": { - "return": { - "ownedBy": ["repo"] + "args": { + "out": { + "ownedBy": ["repo"] + } } }, "git_annotated_commit_lookup": { - "return": { - "ownedBy": ["repo"] + "args": { + "out": { + "ownedBy": ["repo"] + } } }, "git_annotated_commit_from_revspec": { - "return": { - "ownedBy": ["repo"] + "args": { + "out": { + "ownedBy": ["repo"] + } } } } @@ -117,8 +150,31 @@ "apply_options": { "hasConstructor": true }, + "apply": { + "functions": { + "git_apply": { + "args": { + "options": { + "isOptional": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_apply_options_init": { + "ignore": true + } + } + }, "attr": { "functions": { + "git_attr_cache_flush": { + "return": { + "isErrorCode": true + } + }, "git_attr_foreach": { "ignore": true }, @@ -183,6 +239,9 @@ }, "git_blame_init_options": { "ignore": true + }, + "git_blame_options_init": { + "ignore": true } } }, @@ -200,7 +259,7 @@ "singletonCppClassName": "GitRepository" }, "functions": { - "git_blob_create_frombuffer": { + "git_blob_create_from_buffer": { "isAsync": true, "args": { "id": { @@ -215,7 +274,7 @@ "isErrorCode": true } }, - "git_blob_create_fromworkdir": { + "git_blob_create_from_workdir": { "isAsync": true, "args": { "id": { @@ -226,7 +285,10 @@ "isErrorCode": true } }, - "git_blob_create_fromdisk": { + "git_blob_create_fromworkdir": { + "ignore": true + }, + "git_blob_create_from_disk": { "isAsync": true, "args": { "id": { @@ -237,10 +299,41 @@ "isErrorCode": true } }, - "git_blob_create_fromstream": { + "git_blob_create_from_stream": { + "ignore": true + }, + "git_blob_create_from_stream_commit": { "ignore": true }, - "git_blob_create_fromstream_commit": { + "git_blob_filter": { + "isAsync": true, + "isPrototypeMethod": true, + "args": { + "out": { + "isReturn": true, + "cppClassName": "GitBuf", + "jsClassName": "Buffer", + "shouldAlloc": true + }, + "blob": { + "cppClassName": "GitBlob", + "jsClassName": "Blob", + "isSelf": true + }, + "as_path": { + "cppClassName": "String", + "jsClassName": "String", + "cType": "const char *" + }, + "opts": { + "isOptional": true + } + }, + "return": { + "isErrorCode": true + } + }, + "git_blob_filter_options_init": { "ignore": true }, "git_blob_filtered_content": { @@ -294,6 +387,9 @@ "node_buffer.h" ] }, + "blob_filter_options": { + "hasConstructor": true + }, "branch": { "functions": { "git_branch_create": { @@ -346,16 +442,6 @@ "jsClassName": "Buffer", "cType": "git_buf *", "shouldAlloc": true - }, - "repo": { - "cppClassName": "GitRepository", - "jsClassName": "Repo", - "cType": "git_repository *" - }, - "canonical_branch_name": { - "cppClassName": "String", - "jsClassName": "String", - "cType": "const char *" } }, "return": { @@ -365,7 +451,7 @@ "git_branch_set_upstream": { "isAsync": true, "args": { - "upstream_name": { + "branch_name": { "isOptional": true } }, @@ -435,6 +521,9 @@ "../include/git_buf_converter.h" ] }, + "cert": { + "needsForwardDeclaration": false + }, "cert_hostkey": { "fields": { "hash_md5": { @@ -444,6 +533,10 @@ "hash_sha1": { "cppClassName": "String", "size": 20 + }, + "hash_sha256": { + "cppClassName": "String", + "size": 32 } } }, @@ -474,6 +567,9 @@ }, "git_checkout_index": { "args": { + "index": { + "isOptional": true + }, "opts": { "isOptional": true } @@ -486,6 +582,9 @@ "git_checkout_init_options": { "ignore": true }, + "git_checkout_options_init": { + "ignore": true + }, "git_checkout_tree": { "args": { "treeish": { @@ -505,13 +604,28 @@ "cherrypick": { "functions": { "git_cherrypick": { + "args": { + "cherrypick_options": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true } }, + "git_cherrypick_commit": { + "args": { + "merge_options": { + "isOptional": true + } + } + }, "git_cherrypick_init_options": { "ignore": true + }, + "git_cherrypick_options_init": { + "ignore": true } } }, @@ -526,6 +640,9 @@ }, "git_clone_init_options": { "ignore": true + }, + "git_clone_options_init": { + "ignore": true } } }, @@ -682,6 +799,16 @@ } } }, + "commitarray": { + "fields": { + "commits": { + "ignore": true + }, + "count": { + "ignore": true + } + } + }, "config": { "selfFreeing": true, "functions": { @@ -946,6 +1073,7 @@ "selfFreeing": true }, "config_iterator": { + "needsForwardDeclaration": false, "selfFreeing": true, "fields": { "backend": { @@ -1010,61 +1138,67 @@ } } }, - "cred": { + "config_backend_memory_options": { + "selfFreeing": true, + "cDependencies": [ + "git2/sys/config.h" + ] + }, + "credential": { "needsForwardDeclaration": false, "selfFreeing": true, - "cType": "git_cred", + "cType": "git_credential", "fields": { "free": { "ignore": true } }, "functions": { - "git_cred_default_new": { + "git_credential_default_new": { "isAsync": false }, - "git_cred_free": { + "git_credential_free": { "ignore": true }, - "git_cred_ssh_custom_new": { + "git_credential_ssh_custom_new": { "ignore": true }, - "git_cred_ssh_interactive_new": { + "git_credential_ssh_interactive_new": { "ignore": true }, - "git_cred_ssh_key_from_agent": { + "git_credential_ssh_key_from_agent": { "isAsync": false }, - "git_cred_ssh_key_new": { + "git_credential_ssh_key_new": { "isAsync": false }, - "git_cred_userpass": { + "git_credential_userpass": { "ignore": true }, - "git_cred_userpass_plaintext_new": { + "git_credential_userpass_plaintext_new": { "isAsync": false } } }, - "cred_default": { + "credential_default": { "ignore": true }, - "cred_ssh_custom": { + "credential_ssh_custom": { "ignore": true }, - "cred_ssh_interactive": { + "credential_ssh_interactive": { "ignore": true }, - "cred_ssh_key": { + "credential_ssh_key": { "ignore": true }, - "cred_username": { + "credential_username": { "ignore": true }, - "cred_userpass_payload": { + "credential_userpass_payload": { "ignore": true }, - "cred_userpass_plaintext": { + "credential_userpass_plaintext": { "ignore": true }, "describe": { @@ -1129,6 +1263,9 @@ "git_diff_find_init_options": { "ignore": true }, + "git_diff_find_options_init": { + "ignore": true + }, "git_diff_find_similar": { "args": { "diff": { @@ -1154,6 +1291,9 @@ "git_diff_format_email_init_options": { "ignore": true }, + "git_diff_format_email_options_init": { + "ignore": true + }, "git_diff_free": { "ignore": true }, @@ -1227,9 +1367,15 @@ "git_diff_num_deltas_of_type": { "ignore": true }, + "git_diff_options_init": { + "ignore": true + }, "git_diff_patchid_init_options": { "ignore": true }, + "git_diff_patchid_options_init": { + "ignore": true + }, "git_diff_print": { "ignore": true }, @@ -1380,13 +1526,29 @@ } } }, + "email": { + "cDependencies": [ + "git2/sys/email.h" + ] + }, + "email_create_options": { + "hasConstructor": true + }, "fetch": { "functions": { "git_fetch_init_options": { "ignore": true + }, + "git_fetch_options_init": { + "ignore": true } } }, + "fetch_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "filter": { "selfFreeing": false, "hasConstructor": true, @@ -1394,6 +1556,9 @@ "git2/sys/filter.h" ], "fields": { + "cleanup": { + "ignore": true + }, "stream": { "ignore": true } @@ -1504,6 +1669,7 @@ } }, "dependencies": [ + "../include/git_buf_converter.h", "../include/filter_registry.h" ] }, @@ -1533,12 +1699,39 @@ "return": { "isResultOrError": true } + }, + "git_graph_reachable_from_any": { + "args": { + "descendant_array": { + "cType": "git_oid *", + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitOid" + } + }, + "isAsync": true, + "return": { + "isResultOrError": true + } } } }, "hashsig": { "selfFreeing": true, + "freeFunctionName": "git_hashsig_free", "functions": { + "git_hashsig_create": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_hashsig_create_fromfile": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_hashsig_free": { "ignore": true } @@ -1608,6 +1801,9 @@ "git_index_add_frombuffer": { "ignore": true }, + "git_index_add_from_buffer": { + "ignore": true + }, "git_index_checksum": { "return": { "ownedByThis": true @@ -1863,6 +2059,7 @@ } }, "index_entry": { + "isReturnable": true, "hasConstructor": true, "ignoreInit": true }, @@ -1903,7 +2100,10 @@ "git_index_name_clear": { "cppFunctionName": "Clear", "jsFunctionName": "clear", - "isAsync": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_index_name_entrycount": { "cppFunctionName": "Entrycount", @@ -1937,7 +2137,11 @@ "git_index_reuc_clear": { "cppFunctionName": "Clear", "jsFunctionName": "clear", - "isAsync": true + "isAsync": true, + "isPrototypeMethod": false, + "return": { + "isErrorCode": true + } }, "git_index_reuc_entrycount": { "cppFunctionName": "Entrycount", @@ -1971,6 +2175,7 @@ "cppFunctionName": "Remove", "jsFunctionName": "remove", "isAsync": true, + "isPrototypeMethod": false, "return": { "isErrorCode": true } @@ -1980,6 +2185,11 @@ "git2/sys/index.h" ] }, + "index_time": { + "isReturnable": true, + "hasConstructor": true, + "ignoreInit": true + }, "indexer": { "ignore": true }, @@ -2078,10 +2288,12 @@ "jsClassName": "Number" }, "merge_opts": { + "isOptional": true, "cType": "git_merge_options *", "cppClassName": "GitMergeOptions" }, "checkout_opts": { + "isOptional": true, "cType": "git_checkout_options *", "cppClassName": "GitCheckoutOptions" } @@ -2112,6 +2324,9 @@ "cppClassName": "Number", "jsClassName": "Number" } + }, + "return": { + "isErrorCode": true } }, "git_merge_analysis_for_ref": { @@ -2163,12 +2378,24 @@ "git_merge_file_from_index": { "ignore": true }, + "git_merge_file_input_init": { + "ignore": true + }, + "git_merge_file_init_input": { + "ignore": true + }, "git_merge_file_init_options": { "ignore": true }, + "git_merge_file_options_init": { + "ignore": true + }, "git_merge_init_options": { "ignore": true }, + "git_merge_options_init": { + "ignore": true + }, "git_merge_trees": { "args": { "ancestor_tree": { @@ -2228,6 +2455,9 @@ "notes_commit_out": { "isReturn": true } + }, + "return": { + "isErrorCode": true } }, "git_note_comitter": { @@ -2307,7 +2537,10 @@ "ignore": true }, "git_odb_add_disk_alternate": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_odb_exists": { "ignore": true, @@ -2374,9 +2607,11 @@ "ignore": true }, "git_odb_read": { + "isAsync": true, "cppFunctionName": "OdbRead", "args": { - "out": { + "obj": { + "isReturn": true, "ownedByThis": true } } @@ -2461,10 +2696,17 @@ "shouldAlloc": true, "functions": { "git_oid_cpy": { + "isAsync": false, "args": { + "src": { + "shouldAlloc": false + }, "out": { "isReturn": true } + }, + "return": { + "isErrorCode": true } }, "git_oid_fmt": { @@ -2481,7 +2723,18 @@ }, "git_oid_fromstrp": { "isAsync": false, - "jsFunctionName": "fromString" + "jsFunctionName": "fromString", + "args": { + "out": { + "isReturn": true + }, + "str": { + "shouldAlloc": false + } + }, + "return": { + "isErrorCode": true + } }, "git_oid_nfmt": { "ignore": true @@ -2526,9 +2779,7 @@ } }, "openssl": { - "cDependencies": [ - "git2/sys/openssl.h" - ] + "ignore": true }, "packbuilder": { "selfFreeing": true, @@ -2587,10 +2838,37 @@ "dependencies": [ "../include/convenient_patch.h" ], + "ownerFn": { + "name": "git_patch_owner", + "singletonCppClassName": "GitRepository" + }, "functions": { "git_patch_free": { "ignore": true }, + "git_patch_from_blobs": { + "isAsync": true, + "args": { + "out": { + "isReturn": true + }, + "old_blob": { + "isOptional": true + }, + "old_as_path": { + "isOptional": true + }, + "new_blob": { + "isOptional": true + }, + "new_as_path": { + "isOptional": true + }, + "opts": { + "isOptional": true + } + } + }, "git_patch_from_blob_and_buffer": { "ignore": true }, @@ -2599,8 +2877,10 @@ }, "git_patch_from_diff": { "isAsync": true, - "return": { - "ownedBy": ["diff"] + "args": { + "out": { + "ownedBy": ["diff"] + } } }, "git_patch_get_delta": { @@ -2732,13 +3012,22 @@ "functions": { "git_proxy_init_options": { "ignore": true + }, + "git_proxy_options_init": { + "ignore": true } } }, "push": { "ignore": true }, + "push_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "rebase": { + "hasConstructor": false, "selfFreeing": true, "functions": { "git_rebase_abort": { @@ -2794,6 +3083,7 @@ "git_rebase_init": { "args": { "out": { + "isSelf": true, "ownedBy": ["repo"] }, "upstream": { @@ -2806,6 +3096,7 @@ "isOptional": true }, "opts": { + "preserveOnThis": true, "isOptional": true } } @@ -2821,11 +3112,15 @@ } }, "git_rebase_next": { + "isAsync": true, "args": { "operation": { "isReturn": true, "ownedByThis": true } + }, + "return": { + "isErrorCode": true } }, "git_rebase_open": { @@ -2833,6 +3128,10 @@ "out": { "isSelf": true, "ownedBy": ["repo"] + }, + "opts": { + "isOptional": true, + "preserveOnThis": true } } }, @@ -2845,6 +3144,60 @@ "return": { "ownedByThis": true } + }, + "git_rebase_options_init": { + "ignore": true + } + } + }, + "rebase_options": { + "fields": { + "signing_cb": { + "ignore": true + }, + "commit_create_cb": { + "args": [ + { + "name": "out", + "cType": "git_oid *" + }, + { + "name": "author", + "cType": "const git_signature *" + }, + { + "name": "committer", + "cType": "const git_signature *" + }, + { + "name": "message_encoding", + "cType": "const char *" + }, + { + "name": "message", + "cType": "const char *" + }, + { + "name": "tree", + "cType": "const git_tree *" + }, + { + "name": "parent_count", + "cType": "size_t" + }, + { + "name": "parents", + "cType": "const git_oid **", + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitOid", + "arrayLengthArgumentName": "parent_count" + }, + { + "name": "payload", + "cType": "void *" + } + ] } } }, @@ -3059,6 +3412,12 @@ } } }, + "git_remote_create_init_options": { + "ignore": true + }, + "git_remote_create_options_init": { + "ignore": true + }, "git_remote_create_with_opts": { "args": { "opts": { @@ -3068,17 +3427,42 @@ }, "git_remote_connect": { "isAsync": true, + "args": { + "callbacks": { + "isOptional": true, + "preserveOnThis": true + }, + "proxy_opts": { + "isOptional": true, + "preserveOnThis": true + }, + "custom_headers": { + "isOptional": true + } + }, "return": { "isErrorCode": true } }, - "git_remote_disconnect": { + "git_remote_connect_ext": { "isAsync": true }, + "git_remote_connect_options_init": { + "ignore": true + }, + "git_remote_disconnect": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_remote_download": { "args": { "refspecs": { "isOptional": true + }, + "opts": { + "isOptional": true } }, "isAsync": true, @@ -3110,6 +3494,9 @@ }, "git_remote_fetch": { "args": { + "opts": { + "isOptional": true + }, "reflog_message": { "isOptional": true }, @@ -3182,7 +3569,31 @@ "ignore": true }, "git_remote_rename": { - "ignore": true + "isAsync": true, + "args": { + "problems": { + "isReturn": true, + "shouldAlloc": true, + "cppClassName": "Array", + "jsClassName": "Array", + "size": "count", + "key": "strings" + } + }, + "return": { + "isErrorCode": true + } + }, + "git_remote_prune": { + "args": { + "callbacks": { + "isOptional": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_remote_push": { "isAsync": true, @@ -3190,6 +3601,9 @@ "isErrorCode": true }, "args": { + "refspecs": { + "isOptional": true + }, "opts": { "isOptional": true } @@ -3208,9 +3622,36 @@ "return": { "ownedByThis": true } + }, + "git_remote_update_tips": { + "isAsync": true, + "args": { + "reflog_message": { + "isOptional": true + } + }, + "return": { + "isErrorCode": true + } + }, + "git_remote_upload": { + "args": { + "refspecs": { + "isOptional": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } } } }, + "remote_connect_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "remote_callbacks": { "fields": { "completion": { @@ -3223,7 +3664,7 @@ "ignore": true }, "sideband_progress": { - "ignore": true + "ignore": false }, "update_tips": { "ignore": true @@ -3238,12 +3679,40 @@ "selfFreeing": true }, "repository": { + "hasConstructor": false, "selfFreeing": true, "isSingleton": true, "dependencies": [ - "git2/sys/repository.h" + "git2/sys/repository.h", + "../include/commit.h", + "../include/submodule.h", + "../include/remote.h" ], "functions": { + "git_repository__cleanup": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_repository_commit_parents": { + "isAsync": true, + "args": { + "commits": { + "shouldAlloc": true, + "selfFreeing": true, + "isReturn": true, + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitCommit", + "size": "count", + "key": "commits" + } + }, + "return": { + "isErrorCode": true + } + }, "git_repository_config": { "args": { "out": { @@ -3260,6 +3729,9 @@ "isErrorCode": true }, "args": { + "ceiling_dirs": { + "isOptional": true + }, "out": { "isReturn": true, "isSelf": false, @@ -3290,7 +3762,7 @@ }, "isAsync": false }, - "git_repository_init_init_options": { + "git_repository_init_options_init": { "ignore": true }, "git_repository_mergehead_foreach": { @@ -3353,6 +3825,9 @@ "index": { "isOptional": true } + }, + "return": { + "isErrorCode": true } }, "git_repository_set_odb": { @@ -3360,6 +3835,19 @@ }, "git_repository_set_refdb": { "ignore": true + }, + "git_repository_statistics": { + "isAsync": true + }, + "git_repository_submodule_cache_all": { + "return": { + "isErrorCode": true + } + }, + "git_repository_submodule_cache_clear": { + "return": { + "isErrorCode": true + } } } }, @@ -3386,6 +3874,9 @@ }, "git_revert_init_options": { "ignore": true + }, + "git_revert_options_init": { + "ignore": true } } }, @@ -3402,6 +3893,7 @@ ], "functions": { "git_reset": { + "isCollectionRoot": true, "args": { "checkout_opts": { "isOptional": true @@ -3442,9 +3934,6 @@ } } }, - "revspec": { - "ignore": true - }, "revwalk": { "selfFreeing": true, "ownerFn": { @@ -3524,11 +4013,25 @@ "stash": { "functions": { "git_stash_apply": { + "args": { + "options": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true } }, + "git_stash_apply_init_options": { + "ignore": true + }, + "git_stash_apply_options_init": { + "ignore": true + }, + "git_stash_save_options_init": { + "ignore": true + }, "git_stash_drop": { "isAsync": true, "return": { @@ -3541,10 +4044,12 @@ "isErrorCode": true } }, - "git_stash_apply_init_options": { - "ignore": true - }, "git_stash_pop": { + "args": { + "options": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true @@ -3563,6 +4068,11 @@ } } }, + "stash_save_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "stdalloc": { "ignore": true }, @@ -3603,6 +4113,9 @@ }, "git_status_init_options": { "ignore": true + }, + "git_status_options_init": { + "ignore": true } } }, @@ -3612,6 +4125,21 @@ "git_status_list_free": { "ignore": true }, + "git_status_list_get_perfdata": { + "isAsync": false, + "args": { + "out": { + "isReturn": true, + "shouldAlloc": true + }, + "status": { + "isSelf": true + } + }, + "return": { + "isErrorCode": true + } + }, "git_status_list_new": { "isAsync": true, "args": { @@ -3630,7 +4158,11 @@ }, "strarray": { "selfFreeing": true, + "freeFunctionName": "git_strarray_dispose", "functions": { + "git_strarray_dispose": { + "ignore": true + }, "git_strarray_free": { "ignore": true } @@ -3649,6 +4181,7 @@ "ignore": true }, "submodule": { + "hasConstructor": false, "selfFreeing": true, "ownerFn": { "name": "git_submodule_owner", @@ -3796,6 +4329,9 @@ }, "git_submodule_update_init_options": { "ignore": true + }, + "git_submodule_update_options_init": { + "ignore": true } } }, @@ -3831,8 +4367,7 @@ }, "isAsync": true }, - "git_tag_create_frombuffer": { - "jsFunctionName": "createFromBuffer", + "git_tag_create_from_buffer": { "args": { "oid": { "isReturn": true @@ -3939,9 +4474,6 @@ }, "time": { "dupFunction": "git_time_dup", - "dependencies": [ - "git2/sys/time.h" - ], "functions": { "git_time_sign": { "ignore": true @@ -4054,6 +4586,16 @@ "singletonCppClassName": "GitRepository" }, "functions": { + "git_tree_create_updated": { + "args": { + "updates": { + "cType": "git_tree_update *", + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitTreeUpdate" + } + } + }, "git_tree_entry_byid": { "return": { "ownedByThis": true @@ -4104,6 +4646,11 @@ "treebuilder": { "selfFreeing": true, "functions": { + "git_treebuilder_clear": { + "return": { + "isErrorCode": true + } + }, "git_treebuilder_filter": { "ignore": true }, @@ -4197,9 +4744,20 @@ "git_worktree_add_init_options": { "ignore": true }, + "git_worktree_add_options_init": { + "ignore": true + }, "git_worktree_free": { "ignore": true }, + "git_worktree_is_prunable": { + "args": { + "opts": { + "isOptional": true + } + }, + "isAsync": true + }, "git_worktree_lookup": { "args": { "out": { @@ -4216,8 +4774,29 @@ }, "git_worktree_prune_init_options": { "ignore": true + }, + "git_worktree_prune_options_init": { + "ignore": true + }, + "git_worktree_prune": { + "args": { + "opts": { + "isOptional": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } } - } + }, + "dependencies": [ + "../include/git_buf_converter.h" + ] + }, + "tree_update": { + "hasConstructor": true, + "ignoreInit": true }, "writestream": { "cType": "git_writestream", diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index 90392f122d..e1969402e7 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -12,46 +12,54 @@ "git_annotated_commit_free" ], "meta": {}, - "lines": 121 + "lines": 128 }, { "file": "git2/apply.h", "functions": [ "git_apply_delta_cb", "git_apply_hunk_cb", + "git_apply_options_init", "git_apply_to_tree", "git_apply" ], "meta": {}, - "lines": 125 + "lines": 182 }, { "file": "git2/attr.h", "functions": [ "git_attr_value", "git_attr_get", + "git_attr_get_ext", "git_attr_get_many", + "git_attr_get_many_ext", "git_attr_foreach_cb", "git_attr_foreach", + "git_attr_foreach_ext", "git_attr_cache_flush", "git_attr_add_macro" ], "meta": {}, - "lines": 251 + "lines": 378 }, { "file": "git2/blame.h", "functions": [ - "git_blame_init_options", + "git_blame_options_init", + "git_blame_linecount", + "git_blame_hunkcount", + "git_blame_hunk_byindex", + "git_blame_hunk_byline", + "git_blame_line_byindex", "git_blame_get_hunk_count", "git_blame_get_hunk_byindex", "git_blame_get_hunk_byline", - "git_blame_file", "git_blame_buffer", "git_blame_free" ], "meta": {}, - "lines": 224 + "lines": 385 }, { "file": "git2/blob.h", @@ -63,17 +71,19 @@ "git_blob_owner", "git_blob_rawcontent", "git_blob_rawsize", - "git_blob_filtered_content", - "git_blob_create_fromworkdir", - "git_blob_create_fromdisk", - "git_blob_create_fromstream", - "git_blob_create_fromstream_commit", - "git_blob_create_frombuffer", + "git_blob_filter_options_init", + "git_blob_filter", + "git_blob_create_from_workdir", + "git_blob_create_from_disk", + "git_blob_create_from_stream", + "git_blob_create_from_stream_commit", + "git_blob_create_from_buffer", "git_blob_is_binary", + "git_blob_data_is_binary", "git_blob_dup" ], "meta": {}, - "lines": 228 + "lines": 350 }, { "file": "git2/branch.h", @@ -93,22 +103,24 @@ "git_branch_is_head", "git_branch_is_checked_out", "git_branch_remote_name", - "git_branch_upstream_remote" + "git_branch_upstream_remote", + "git_branch_upstream_merge", + "git_branch_name_is_valid" ], "meta": {}, - "lines": 288 + "lines": 339 }, { "file": "git2/buffer.h", - "functions": [ - "git_buf_dispose", - "git_buf_grow", - "git_buf_set", - "git_buf_is_binary", - "git_buf_contains_nul" - ], + "functions": ["git_buf_dispose"], "meta": {}, - "lines": 122 + "lines": 71 + }, + { + "file": "git2/cert.h", + "functions": ["git_transport_certificate_check_cb"], + "meta": {}, + "lines": 168 }, { "file": "git2/checkout.h", @@ -116,34 +128,34 @@ "git_checkout_notify_cb", "git_checkout_progress_cb", "git_checkout_perfdata_cb", - "git_checkout_init_options", + "git_checkout_options_init", "git_checkout_head", "git_checkout_index", "git_checkout_tree" ], "meta": {}, - "lines": 362 + "lines": 463 }, { "file": "git2/cherrypick.h", "functions": [ - "git_cherrypick_init_options", + "git_cherrypick_options_init", "git_cherrypick_commit", "git_cherrypick" ], "meta": {}, - "lines": 86 + "lines": 94 }, { "file": "git2/clone.h", "functions": [ "git_remote_create_cb", "git_repository_create_cb", - "git_clone_init_options", + "git_clone_options_init", "git_clone" ], "meta": {}, - "lines": 205 + "lines": 220 }, { "file": "git2/commit.h", @@ -175,23 +187,28 @@ "git_commit_extract_signature", "git_commit_create", "git_commit_create_v", + "git_commit_create_from_stage", "git_commit_amend", "git_commit_create_buffer", "git_commit_create_with_signature", - "git_commit_dup" + "git_commit_dup", + "git_commit_create_cb", + "git_commitarray_dispose" ], "meta": {}, - "lines": 502 + "lines": 670 }, { "file": "git2/common.h", "functions": [ "git_libgit2_version", + "git_libgit2_prerelease", "git_libgit2_features", + "git_libgit2_feature_backend", "git_libgit2_opts" ], "meta": {}, - "lines": 402 + "lines": 569 }, { "file": "git2/config.h", @@ -208,6 +225,7 @@ "git_config_open_ondisk", "git_config_open_level", "git_config_open_global", + "git_config_set_writeorder", "git_config_snapshot", "git_config_free", "git_config_get_entry", @@ -242,52 +260,91 @@ "git_config_lock" ], "meta": {}, - "lines": 762 + "lines": 847 }, { - "file": "git2/cred_helpers.h", + "file": "git2/credential.h", "functions": [ - "git_cred_userpass" + "git_credential_acquire_cb", + "git_credential_free", + "git_credential_has_username", + "git_credential_get_username", + "git_credential_userpass_plaintext_new", + "git_credential_default_new", + "git_credential_username_new", + "git_credential_ssh_key_new", + "git_credential_ssh_key_memory_new", + "git_credential_ssh_interactive_cb", + "git_credential_ssh_interactive_new", + "git_credential_ssh_key_from_agent", + "git_credential_sign_cb", + "git_credential_ssh_custom_new" ], "meta": {}, - "lines": 48 + "lines": 338 + }, + { + "file": "git2/credential_helpers.h", + "functions": ["git_credential_userpass"], + "meta": {}, + "lines": 49 }, { "file": "git2/deprecated.h", "functions": [ + "git_blob_filtered_content", + "git_filter_list_stream_data", + "git_filter_list_apply_to_data", + "git_treebuilder_write_with_buffer", + "git_buf_grow", + "git_buf_set", + "git_buf_is_binary", + "git_buf_contains_nul", "git_buf_free", + "git_commit_signing_cb", + "git_diff_format_email", + "git_diff_commit_as_email", + "git_diff_format_email_options_init", "giterr_last", "giterr_clear", "giterr_set_str", - "giterr_set_oom" + "giterr_set_oom", + "git_object__size", + "git_remote_is_valid_name", + "git_reference_is_valid_name", + "git_oidarray_free", + "git_headlist_cb", + "git_strarray_copy", + "git_strarray_free", + "git_blame_init_options" ], "meta": {}, - "lines": 148 + "lines": 1035 }, { "file": "git2/describe.h", "functions": [ - "git_describe_init_options", - "git_describe_init_format_options", + "git_describe_options_init", + "git_describe_format_options_init", "git_describe_commit", "git_describe_workdir", "git_describe_format", "git_describe_result_free" ], "meta": {}, - "lines": 184 + "lines": 201 }, { "file": "git2/diff.h", "functions": [ "git_diff_notify_cb", "git_diff_progress_cb", - "git_diff_init_options", + "git_diff_options_init", "git_diff_file_cb", "git_diff_binary_cb", "git_diff_hunk_cb", "git_diff_line_cb", - "git_diff_find_init_options", + "git_diff_find_options_init", "git_diff_free", "git_diff_tree_to_tree", "git_diff_tree_to_index", @@ -315,59 +372,56 @@ "git_diff_stats_deletions", "git_diff_stats_to_buf", "git_diff_stats_free", - "git_diff_format_email", - "git_diff_commit_as_email", - "git_diff_format_email_init_options", - "git_diff_patchid_init_options", + "git_diff_patchid_options_init", "git_diff_patchid" ], "meta": {}, "lines": 1502 }, + { + "file": "git2/email.h", + "functions": ["git_email_create_from_commit"], + "meta": {}, + "lines": 102 + }, { "file": "git2/errors.h", - "functions": [ - "git_error_last", - "git_error_clear", - "git_error_set_str", - "git_error_set_oom" - ], + "functions": ["git_error_last"], "meta": {}, - "lines": 157 + "lines": 149 }, { "file": "git2/filter.h", "functions": [ "git_filter_list_load", + "git_filter_list_load_ext", "git_filter_list_contains", - "git_filter_list_apply_to_data", + "git_filter_list_apply_to_buffer", "git_filter_list_apply_to_file", "git_filter_list_apply_to_blob", - "git_filter_list_stream_data", + "git_filter_list_stream_buffer", "git_filter_list_stream_file", "git_filter_list_stream_blob", "git_filter_list_free" ], "meta": {}, - "lines": 210 + "lines": 278 }, { "file": "git2/global.h", - "functions": [ - "git_libgit2_init", - "git_libgit2_shutdown" - ], + "functions": ["git_libgit2_init", "git_libgit2_shutdown"], "meta": {}, - "lines": 39 + "lines": 45 }, { "file": "git2/graph.h", "functions": [ "git_graph_ahead_behind", - "git_graph_descendant_of" + "git_graph_descendant_of", + "git_graph_reachable_from_any" ], "meta": {}, - "lines": 54 + "lines": 73 }, { "file": "git2/ignore.h", @@ -377,7 +431,7 @@ "git_ignore_path_is_ignored" ], "meta": {}, - "lines": 74 + "lines": 83 }, { "file": "git2/index.h", @@ -411,7 +465,7 @@ "git_index_iterator_next", "git_index_iterator_free", "git_index_add_bypath", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_remove_bypath", "git_index_add_all", "git_index_remove_all", @@ -428,28 +482,22 @@ "git_index_conflict_iterator_free" ], "meta": {}, - "lines": 829 + "lines": 928 }, { "file": "git2/indexer.h", "functions": [ - "git_indexer_init_options", + "git_indexer_progress_cb", + "git_indexer_options_init", "git_indexer_new", "git_indexer_append", "git_indexer_commit", "git_indexer_hash", + "git_indexer_name", "git_indexer_free" ], "meta": {}, - "lines": 98 - }, - { - "file": "git2/inttypes.h", - "functions": [ - "imaxdiv" - ], - "meta": {}, - "lines": 298 + "lines": 207 }, { "file": "git2/mailmap.h", @@ -463,14 +511,14 @@ "git_mailmap_resolve_signature" ], "meta": {}, - "lines": 111 + "lines": 116 }, { "file": "git2/merge.h", "functions": [ - "git_merge_file_init_input", - "git_merge_file_init_options", - "git_merge_init_options", + "git_merge_file_input_init", + "git_merge_file_options_init", + "git_merge_options_init", "git_merge_analysis", "git_merge_analysis_for_ref", "git_merge_base", @@ -486,7 +534,7 @@ "git_merge" ], "meta": {}, - "lines": 606 + "lines": 666 }, { "file": "git2/message.h", @@ -496,40 +544,18 @@ "git_message_trailer_array_free" ], "meta": {}, - "lines": 79 - }, - { - "file": "git2/net.h", - "functions": [ - "git_headlist_cb" - ], - "meta": {}, - "lines": 55 + "lines": 81 }, + { "file": "git2/net.h", "functions": [], "meta": {}, "lines": 51 }, { "file": "git2/notes.h", "functions": [ "git_note_foreach_cb", - "git_note_iterator_new", - "git_note_commit_iterator_new", "git_note_iterator_free", - "git_note_next", - "git_note_read", - "git_note_commit_read", - "git_note_author", - "git_note_committer", - "git_note_message", - "git_note_id", - "git_note_create", - "git_note_commit_create", - "git_note_remove", - "git_note_commit_remove", - "git_note_free", - "git_note_default_ref", - "git_note_foreach" + "git_note_next" ], "meta": {}, - "lines": 302 + "lines": 91 }, { "file": "git2/object.h", @@ -545,12 +571,12 @@ "git_object_type2string", "git_object_string2type", "git_object_typeisloose", - "git_object__size", "git_object_peel", - "git_object_dup" + "git_object_dup", + "git_object_rawcontent_is_valid" ], "meta": {}, - "lines": 237 + "lines": 274 }, { "file": "git2/odb.h", @@ -564,6 +590,7 @@ "git_odb_read_prefix", "git_odb_read_header", "git_odb_exists", + "git_odb_exists_ext", "git_odb_exists_prefix", "git_odb_expand_ids", "git_odb_refresh", @@ -576,6 +603,7 @@ "git_odb_stream_free", "git_odb_open_rstream", "git_odb_write_pack", + "git_odb_write_multi_pack_index", "git_odb_hash", "git_odb_hashfile", "git_odb_object_dup", @@ -587,20 +615,21 @@ "git_odb_add_backend", "git_odb_add_alternate", "git_odb_num_backends", - "git_odb_get_backend" + "git_odb_get_backend", + "git_odb_set_commit_graph" ], "meta": {}, - "lines": 544 + "lines": 691 }, { "file": "git2/odb_backend.h", "functions": [ "git_odb_backend_pack", - "git_odb_backend_loose", - "git_odb_backend_one_pack" + "git_odb_backend_one_pack", + "git_odb_backend_loose" ], "meta": {}, - "lines": 130 + "lines": 246 }, { "file": "git2/oid.h", @@ -620,21 +649,19 @@ "git_oid_ncmp", "git_oid_streq", "git_oid_strcmp", - "git_oid_iszero", + "git_oid_is_zero", "git_oid_shorten_new", "git_oid_shorten_add", "git_oid_shorten_free" ], "meta": {}, - "lines": 264 + "lines": 366 }, { "file": "git2/oidarray.h", - "functions": [ - "git_oidarray_free" - ], + "functions": ["git_oidarray_dispose"], "meta": {}, - "lines": 34 + "lines": 38 }, { "file": "git2/pack.h", @@ -649,6 +676,7 @@ "git_packbuilder_write_buf", "git_packbuilder_write", "git_packbuilder_hash", + "git_packbuilder_name", "git_packbuilder_foreach_cb", "git_packbuilder_foreach", "git_packbuilder_object_count", @@ -658,11 +686,12 @@ "git_packbuilder_free" ], "meta": {}, - "lines": 236 + "lines": 274 }, { "file": "git2/patch.h", "functions": [ + "git_patch_owner", "git_patch_from_diff", "git_patch_from_blobs", "git_patch_from_blob_and_buffer", @@ -679,7 +708,7 @@ "git_patch_to_buf" ], "meta": {}, - "lines": 268 + "lines": 284 }, { "file": "git2/pathspec.h", @@ -699,22 +728,24 @@ "git_pathspec_match_list_failed_entry" ], "meta": {}, - "lines": 277 + "lines": 284 }, { "file": "git2/proxy.h", - "functions": [ - "git_proxy_init_options" - ], + "functions": ["git_proxy_options_init"], "meta": {}, - "lines": 92 + "lines": 103 }, { "file": "git2/rebase.h", "functions": [ - "git_rebase_init_options", + "git_rebase_options_init", "git_rebase_init", "git_rebase_open", + "git_rebase_orig_head_name", + "git_rebase_orig_head_id", + "git_rebase_onto_name", + "git_rebase_onto_id", "git_rebase_operation_entrycount", "git_rebase_operation_current", "git_rebase_operation_byindex", @@ -726,7 +757,7 @@ "git_rebase_free" ], "meta": {}, - "lines": 319 + "lines": 397 }, { "file": "git2/refdb.h", @@ -737,7 +768,7 @@ "git_refdb_free" ], "meta": {}, - "lines": 63 + "lines": 66 }, { "file": "git2/reflog.h", @@ -803,11 +834,11 @@ "git_reference_is_note", "git_reference_normalize_name", "git_reference_peel", - "git_reference_is_valid_name", + "git_reference_name_is_valid", "git_reference_shorthand" ], "meta": {}, - "lines": 744 + "lines": 769 }, { "file": "git2/refspec.h", @@ -819,19 +850,20 @@ "git_refspec_string", "git_refspec_force", "git_refspec_direction", + "git_refspec_src_matches_negative", "git_refspec_src_matches", "git_refspec_dst_matches", "git_refspec_transform", "git_refspec_rtransform" ], "meta": {}, - "lines": 117 + "lines": 126 }, { "file": "git2/remote.h", "functions": [ "git_remote_create", - "git_remote_create_init_options", + "git_remote_create_options_init", "git_remote_create_with_opts", "git_remote_create_with_fetchspec", "git_remote_create_anonymous", @@ -844,25 +876,31 @@ "git_remote_pushurl", "git_remote_set_url", "git_remote_set_pushurl", + "git_remote_set_instance_url", + "git_remote_set_instance_pushurl", "git_remote_add_fetch", "git_remote_get_fetch_refspecs", "git_remote_add_push", "git_remote_get_push_refspecs", "git_remote_refspec_count", "git_remote_get_refspec", - "git_remote_connect", "git_remote_ls", "git_remote_connected", "git_remote_stop", "git_remote_disconnect", "git_remote_free", "git_remote_list", - "git_push_transfer_progress", + "git_push_transfer_progress_cb", "git_push_negotiation", "git_push_update_reference_cb", + "git_url_resolve_cb", + "git_remote_ready_cb", "git_remote_init_callbacks", - "git_fetch_init_options", - "git_push_init_options", + "git_fetch_options_init", + "git_push_options_init", + "git_remote_connect_options_init", + "git_remote_connect", + "git_remote_connect_ext", "git_remote_download", "git_remote_upload", "git_remote_update_tips", @@ -874,12 +912,12 @@ "git_remote_set_autotag", "git_remote_prune_refs", "git_remote_rename", - "git_remote_is_valid_name", + "git_remote_name_is_valid", "git_remote_delete", "git_remote_default_branch" ], "meta": {}, - "lines": 926 + "lines": 1244 }, { "file": "git2/repository.h", @@ -892,7 +930,7 @@ "git_repository_open_bare", "git_repository_free", "git_repository_init", - "git_repository_init_init_options", + "git_repository_init_options_init", "git_repository_init_ext", "git_repository_head", "git_repository_head_for_worktree", @@ -929,10 +967,12 @@ "git_repository_get_namespace", "git_repository_is_shallow", "git_repository_ident", - "git_repository_set_ident" + "git_repository_set_ident", + "git_repository_oid_type", + "git_repository_commit_parents" ], "meta": {}, - "lines": 877 + "lines": 1014 }, { "file": "git2/reset.h", @@ -942,25 +982,21 @@ "git_reset_default" ], "meta": {}, - "lines": 107 + "lines": 119 }, { "file": "git2/revert.h", "functions": [ - "git_revert_init_options", + "git_revert_options_init", "git_revert_commit", "git_revert" ], "meta": {}, - "lines": 86 + "lines": 91 }, { "file": "git2/revparse.h", - "functions": [ - "git_revparse_single", - "git_revparse_ext", - "git_revparse" - ], + "functions": ["git_revparse_single", "git_revparse_ext", "git_revparse"], "meta": {}, "lines": 108 }, @@ -987,27 +1023,30 @@ "git_revwalk_add_hide_cb" ], "meta": {}, - "lines": 291 + "lines": 298 }, { "file": "git2/signature.h", "functions": [ "git_signature_new", "git_signature_now", + "git_signature_default_from_env", "git_signature_default", "git_signature_from_buffer", "git_signature_dup", "git_signature_free" ], "meta": {}, - "lines": 99 + "lines": 143 }, { "file": "git2/stash.h", "functions": [ "git_stash_save", + "git_stash_save_options_init", + "git_stash_save_with_opts", "git_stash_apply_progress_cb", - "git_stash_apply_init_options", + "git_stash_apply_options_init", "git_stash_apply", "git_stash_cb", "git_stash_foreach", @@ -1015,13 +1054,13 @@ "git_stash_pop" ], "meta": {}, - "lines": 256 + "lines": 323 }, { "file": "git2/status.h", "functions": [ "git_status_cb", - "git_status_init_options", + "git_status_options_init", "git_status_foreach", "git_status_foreach_ext", "git_status_file", @@ -1032,33 +1071,26 @@ "git_status_should_ignore" ], "meta": {}, - "lines": 374 - }, - { - "file": "git2/stdint.h", - "functions": [], - "meta": {}, - "lines": 124 + "lines": 451 }, { "file": "git2/strarray.h", - "functions": [ - "git_strarray_free", - "git_strarray_copy" - ], + "functions": ["git_strarray_dispose"], "meta": {}, - "lines": 53 + "lines": 37 }, { "file": "git2/submodule.h", "functions": [ "git_submodule_cb", - "git_submodule_update_init_options", + "git_submodule_update_options_init", "git_submodule_update", "git_submodule_lookup", + "git_submodule_dup", "git_submodule_free", "git_submodule_foreach", "git_submodule_add_setup", + "git_submodule_clone", "git_submodule_add_finalize", "git_submodule_add_to_index", "git_submodule_owner", @@ -1087,238 +1119,25 @@ "git_submodule_location" ], "meta": {}, - "lines": 633 - }, - { - "file": "git2/sys/alloc.h", - "functions": [ - "git_stdalloc_init_allocator", - "git_win32_crtdbg_init_allocator" - ], - "meta": {}, - "lines": 97 - }, - { - "file": "git2/sys/commit.h", - "functions": [ - "git_commit_create_from_ids", - "git_commit_create_from_callback" - ], - "meta": {}, - "lines": 76 - }, - { - "file": "git2/sys/config.h", - "functions": [ - "git_config_init_backend", - "git_config_add_backend" - ], - "meta": {}, - "lines": 126 - }, - { - "file": "git2/sys/diff.h", - "functions": [ - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle", - "git_diff_get_perfdata", - "git_status_list_get_perfdata" - ], - "meta": {}, - "lines": 90 - }, - { - "file": "git2/sys/filter.h", - "functions": [ - "git_filter_lookup", - "git_filter_list_new", - "git_filter_list_push", - "git_filter_list_length", - "git_filter_source_repo", - "git_filter_source_path", - "git_filter_source_filemode", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_flags", - "git_filter_init_fn", - "git_filter_shutdown_fn", - "git_filter_check_fn", - "git_filter_apply_fn", - "git_filter_stream_fn", - "git_filter_cleanup_fn", - "git_filter_init", - "git_filter_register", - "git_filter_unregister" - ], - "meta": {}, - "lines": 328 - }, - { - "file": "git2/sys/hashsig.h", - "functions": [ - "git_hashsig_create", - "git_hashsig_create_fromfile", - "git_hashsig_free", - "git_hashsig_compare" - ], - "meta": {}, - "lines": 102 - }, - { - "file": "git2/sys/index.h", - "functions": [ - "git_index_name_entrycount", - "git_index_name_get_byindex", - "git_index_name_add", - "git_index_name_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_bypath", - "git_index_reuc_get_byindex", - "git_index_reuc_add", - "git_index_reuc_remove", - "git_index_reuc_clear" - ], - "meta": {}, - "lines": 174 - }, - { - "file": "git2/sys/mempack.h", - "functions": [ - "git_mempack_new", - "git_mempack_dump", - "git_mempack_reset" - ], - "meta": {}, - "lines": 82 - }, - { - "file": "git2/sys/merge.h", - "functions": [ - "git_merge_driver_lookup", - "git_merge_driver_source_repo", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_ours", - "git_merge_driver_source_theirs", - "git_merge_driver_source_file_options", - "git_merge_driver_init_fn", - "git_merge_driver_shutdown_fn", - "git_merge_driver_apply_fn", - "git_merge_driver_register", - "git_merge_driver_unregister" - ], - "meta": {}, - "lines": 178 + "lines": 674 }, { - "file": "git2/sys/odb_backend.h", - "functions": [ - "git_odb_init_backend", - "git_odb_backend_malloc" - ], - "meta": {}, - "lines": 120 - }, - { - "file": "git2/sys/openssl.h", - "functions": [ - "git_openssl_set_locking" - ], - "meta": {}, - "lines": 34 - }, - { - "file": "git2/sys/path.h", - "functions": [ - "git_path_is_gitfile" - ], - "meta": {}, - "lines": 60 - }, - { - "file": "git2/sys/refdb_backend.h", - "functions": [ - "git_refdb_init_backend", - "git_refdb_backend_fs", - "git_refdb_set_backend" - ], - "meta": {}, - "lines": 214 - }, - { - "file": "git2/sys/reflog.h", - "functions": [ - "git_reflog_entry__alloc", - "git_reflog_entry__free" - ], - "meta": {}, - "lines": 17 - }, - { - "file": "git2/sys/refs.h", - "functions": [ - "git_reference__alloc", - "git_reference__alloc_symbolic" - ], - "meta": {}, - "lines": 45 - }, - { - "file": "git2/sys/repository.h", - "functions": [ - "git_repository_new", - "git_repository__cleanup", - "git_repository_reinit_filesystem", - "git_repository_set_config", - "git_repository_set_odb", - "git_repository_set_refdb", - "git_repository_set_index", - "git_repository_set_bare", - "git_repository_submodule_cache_all", - "git_repository_submodule_cache_clear" - ], - "meta": {}, - "lines": 165 - }, - { - "file": "git2/sys/stream.h", - "functions": [ - "git_stream_register", - "git_stream_cb", - "git_stream_register_tls" - ], - "meta": {}, - "lines": 130 - }, - { - "file": "git2/sys/time.h", - "functions": [ - "git_time_monotonic" - ], + "file": "git2/sys/commit_graph.h", + "functions": [], "meta": {}, - "lines": 27 + "lines": 99 }, + { "file": "git2/sys/config.h", "functions": [], "meta": {}, "lines": 162 }, + { "file": "git2/sys/filter.h", "functions": [], "meta": {}, "lines": 109 }, + { "file": "git2/sys/hashsig.h", "functions": [], "meta": {}, "lines": 55 }, + { "file": "git2/sys/merge.h", "functions": [], "meta": {}, "lines": 49 }, + { "file": "git2/sys/path.h", "functions": [], "meta": {}, "lines": 51 }, + { "file": "git2/sys/stream.h", "functions": [], "meta": {}, "lines": 105 }, { "file": "git2/sys/transport.h", - "functions": [ - "git_transport_init", - "git_transport_new", - "git_transport_ssh_with_paths", - "git_transport_register", - "git_transport_unregister", - "git_transport_dummy", - "git_transport_local", - "git_transport_smart", - "git_transport_smart_certificate_check", - "git_transport_smart_credentials", - "git_transport_smart_proxy_options", - "git_smart_subtransport_cb", - "git_smart_subtransport_http", - "git_smart_subtransport_git", - "git_smart_subtransport_ssh" - ], + "functions": [], "meta": {}, - "lines": 435 + "lines": 328 }, { "file": "git2/tag.h", @@ -1336,7 +1155,7 @@ "git_tag_message", "git_tag_create", "git_tag_annotation_create", - "git_tag_create_frombuffer", + "git_tag_create_from_buffer", "git_tag_create_lightweight", "git_tag_delete", "git_tag_list", @@ -1344,19 +1163,17 @@ "git_tag_foreach_cb", "git_tag_foreach", "git_tag_peel", - "git_tag_dup" + "git_tag_dup", + "git_tag_name_is_valid" ], "meta": {}, - "lines": 357 + "lines": 380 }, { "file": "git2/trace.h", - "functions": [ - "git_trace_callback", - "git_trace_set" - ], + "functions": ["git_trace_cb", "git_trace_set"], "meta": {}, - "lines": 63 + "lines": 68 }, { "file": "git2/transaction.h", @@ -1375,24 +1192,9 @@ }, { "file": "git2/transport.h", - "functions": [ - "git_transport_cb", - "git_cred_sign_callback", - "git_cred_ssh_interactive_callback", - "git_cred_has_username", - "git_cred_userpass_plaintext_new", - "git_cred_ssh_key_new", - "git_cred_ssh_interactive_new", - "git_cred_ssh_key_from_agent", - "git_cred_ssh_custom_new", - "git_cred_default_new", - "git_cred_username_new", - "git_cred_ssh_key_memory_new", - "git_cred_free", - "git_cred_acquire_cb" - ], + "functions": ["git_transport_message_cb", "git_transport_cb"], "meta": {}, - "lines": 367 + "lines": 45 }, { "file": "git2/tree.h", @@ -1426,25 +1228,15 @@ "git_treebuilder_filter_cb", "git_treebuilder_filter", "git_treebuilder_write", - "git_treebuilder_write_with_buffer", "git_treewalk_cb", "git_tree_walk", "git_tree_dup", "git_tree_create_updated" ], "meta": {}, - "lines": 479 - }, - { - "file": "git2/types.h", - "functions": [ - "git_transfer_progress_cb", - "git_transport_message_cb", - "git_transport_certificate_check_cb" - ], - "meta": {}, - "lines": 442 + "lines": 481 }, + { "file": "git2/types.h", "functions": [], "meta": {}, "lines": 382 }, { "file": "git2/worktree.h", "functions": [ @@ -1453,27 +1245,27 @@ "git_worktree_open_from_repository", "git_worktree_free", "git_worktree_validate", - "git_worktree_add_init_options", + "git_worktree_add_options_init", "git_worktree_add", "git_worktree_lock", "git_worktree_unlock", "git_worktree_is_locked", "git_worktree_name", "git_worktree_path", - "git_worktree_prune_init_options", + "git_worktree_prune_options_init", "git_worktree_is_prunable", "git_worktree_prune" ], "meta": {}, - "lines": 251 + "lines": 273 } ], "functions": { "git_annotated_commit_from_ref": { "type": "function", "file": "git2/annotated_commit.h", - "line": 33, - "lineto": 36, + "line": 40, + "lineto": 43, "args": [ { "name": "out", @@ -1493,19 +1285,21 @@ ], "argline": "git_annotated_commit **out, git_repository *repo, const git_reference *ref", "sig": "git_annotated_commit **::git_repository *::const git_reference *", - "return": { - "type": "int", - "comment": " 0 on success or error code" - }, + "return": { "type": "int", "comment": " 0 on success or error code" }, "description": "
Creates a git_annotated_commit from the given reference.\n The resulting git_annotated_commit must be freed with\n git_annotated_commit_free.
Creates a git_annotated_commit from the given fetch head data.\n The resulting git_annotated_commit must be freed with\n git_annotated_commit_free.
Creates a git_annotated_commit from the given commit id.\n The resulting git_annotated_commit must be freed with\n git_annotated_commit_free.
An annotated commit contains information about how it was\n looked up, which may be useful for functions like merge or\n rebase to provide context to the operation. For example,\n conflict files will include the name of the source or target\n branches being merged. It is therefore preferable to use the\n most specific function (eg git_annotated_commit_from_ref)\n instead of this one when that data is known.
An annotated commit contains information about how it was looked up, which may be useful for functions like merge or rebase to provide context to the operation. For example, conflict files will include the name of the source or target branches being merged. It is therefore preferable to use the most specific function (eg git_annotated_commit_from_ref) instead of this one when that data is known.
Creates a git_annotated_comit from a revision string.
See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.
Creates a git_annotated_commit from a revision string.
See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
Gets the commit ID that the given git_annotated_commit refers to.
Get the refname that the given git_annotated_commit refers to.
Frees a git_annotated_commit.
Initialize git_apply_options structure
\n", + "comments": "Initialize a git_apply_options with default values. Equivalent to creating an instance with GIT_APPLY_OPTIONS_INIT.
Apply a git_diff to a git_tree, and return the resulting image\n as an index.
Apply a git_diff to the given repository, making changes directly\n in the working directory, the index, or both.
Return the value type for a given attribute.
\n", - "comments": "This can be either TRUE, FALSE, UNSPECIFIED (if the attribute\n was not set at all), or VALUE, if the attribute was set to an\n actual string.
If the attribute has a VALUE string, it can be accessed normally\n as a NULL-terminated C string.
This can be either TRUE, FALSE, UNSPECIFIED (if the attribute was not set at all), or VALUE, if the attribute was set to an actual string.
If the attribute has a VALUE string, it can be accessed normally as a NULL-terminated C string.
Look up the value of one git attribute for path.
\n", + "comments": "", + "group": "attr" + }, + "git_attr_get_ext": { + "type": "function", + "file": "git2/attr.h", + "line": 218, + "lineto": 223, + "args": [ + { + "name": "value_out", + "type": "const char **", + "comment": "Output of the value of the attribute. Use the GIT_ATTR_...\n macros to test for TRUE, FALSE, UNSPECIFIED, etc. or just\n use the string value for attributes set to a value. You\n should NOT modify or free this value." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "The repository containing the path." + }, + { + "name": "opts", + "type": "git_attr_options *", + "comment": "The `git_attr_options` to use when querying these attributes." + }, + { + "name": "path", + "type": "const char *", + "comment": "The path to check for attributes. Relative paths are\n interpreted relative to the repo root. The file does\n not have to exist, but if it does not, then it will be\n treated as a plain file (not a directory)." + }, + { + "name": "name", + "type": "const char *", + "comment": "The name of the attribute to look up." + } + ], + "argline": "const char **value_out, git_repository *repo, git_attr_options *opts, const char *path, const char *name", + "sig": "const char **::git_repository *::git_attr_options *::const char *::const char *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Look up the value of one git attribute for path with extended options.
\n", "comments": "", "group": "attr" }, "git_attr_get_many": { "type": "function", "file": "git2/attr.h", - "line": 181, - "lineto": 187, + "line": 255, + "lineto": 261, "args": [ { "name": "values_out", "type": "const char **", - "comment": null + "comment": "An array of num_attr entries that will have string\n pointers written into it for the values of the attributes.\n You should not modify or free the values that are written\n into this array (although of course, you should free the\n array itself if you allocated it)." }, { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository containing the path." }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "A combination of GIT_ATTR_CHECK... flags." }, { "name": "path", "type": "const char *", - "comment": null + "comment": "The path inside the repo to check attributes. This\n does not have to exist, but if it does not, then\n it will be treated as a plain file (i.e. not a directory)." }, { "name": "num_attr", "type": "size_t", - "comment": null + "comment": "The number of attributes being looked up" }, { "name": "names", "type": "const char **", - "comment": null + "comment": "An array of num_attr strings containing attribute names." } ], - "argline": "const char **values_out, git_repository *repo, int flags, const char *path, size_t num_attr, const char **names", - "sig": "const char **::git_repository *::int::const char *::size_t::const char **", + "argline": "const char **values_out, git_repository *repo, uint32_t flags, const char *path, size_t num_attr, const char **names", + "sig": "const char **::git_repository *::uint32_t::const char *::size_t::const char **", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Look up a list of git attributes for path.
\n", + "comments": "Use this if you have a known list of attributes that you want to look up in a single call. This is somewhat more efficient than calling git_attr_get() multiple times.
For example, you might write:
\n\n const char *attrs[] = { "crlf", "diff", "foo" }; const char **values[3]; git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);\n\n\nThen you could loop through the 3 values to get the settings for the three attributes you asked about.
\n", + "group": "attr" + }, + "git_attr_get_many_ext": { + "type": "function", + "file": "git2/attr.h", + "line": 280, + "lineto": 286, + "args": [ + { + "name": "values_out", + "type": "const char **", + "comment": "An array of num_attr entries that will have string\n pointers written into it for the values of the attributes.\n You should not modify or free the values that are written\n into this array (although of course, you should free the\n array itself if you allocated it)." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "The repository containing the path." + }, + { + "name": "opts", + "type": "git_attr_options *", + "comment": "The `git_attr_options` to use when querying these attributes." + }, + { + "name": "path", + "type": "const char *", + "comment": "The path inside the repo to check attributes. This\n does not have to exist, but if it does not, then\n it will be treated as a plain file (i.e. not a directory)." + }, + { + "name": "num_attr", + "type": "size_t", + "comment": "The number of attributes being looked up" + }, + { + "name": "names", + "type": "const char **", + "comment": "An array of num_attr strings containing attribute names." + } + ], + "argline": "const char **values_out, git_repository *repo, git_attr_options *opts, const char *path, size_t num_attr, const char **names", + "sig": "const char **::git_repository *::git_attr_options *::const char *::size_t::const char **", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Look up a list of git attributes for path with extended options.
\n", + "comments": "", + "group": "attr" + }, + "git_attr_foreach": { + "type": "function", + "file": "git2/attr.h", + "line": 319, + "lineto": 324, + "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "The repository containing the path." + }, + { + "name": "flags", + "type": "uint32_t", + "comment": "A combination of GIT_ATTR_CHECK... flags." + }, + { + "name": "path", + "type": "const char *", + "comment": "Path inside the repo to check attributes. This does not have\n to exist, but if it does not, then it will be treated as a\n plain file (i.e. not a directory)." + }, + { + "name": "callback", + "type": "git_attr_foreach_cb", + "comment": "Function to invoke on each attribute name and value.\n See git_attr_foreach_cb." + }, + { + "name": "payload", + "type": "void *", + "comment": "Passed on as extra parameter to callback function." + } + ], + "argline": "git_repository *repo, uint32_t flags, const char *path, git_attr_foreach_cb callback, void *payload", + "sig": "git_repository *::uint32_t::const char *::git_attr_foreach_cb::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "", + "description": "Loop over all the git attributes for a path.
\n", "comments": "", "group": "attr" }, - "git_attr_foreach": { + "git_attr_foreach_ext": { "type": "function", "file": "git2/attr.h", - "line": 220, - "lineto": 225, + "line": 339, + "lineto": 344, "args": [ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository containing the path." }, { - "name": "flags", - "type": "int", - "comment": null + "name": "opts", + "type": "git_attr_options *", + "comment": "The `git_attr_options` to use when querying these attributes." }, { "name": "path", "type": "const char *", - "comment": null + "comment": "Path inside the repo to check attributes. This does not have\n to exist, but if it does not, then it will be treated as a\n plain file (i.e. not a directory)." }, { "name": "callback", "type": "git_attr_foreach_cb", - "comment": null + "comment": "Function to invoke on each attribute name and value.\n See git_attr_foreach_cb." }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Passed on as extra parameter to callback function." } ], - "argline": "git_repository *repo, int flags, const char *path, git_attr_foreach_cb callback, void *payload", - "sig": "git_repository *::int::const char *::git_attr_foreach_cb::void *", + "argline": "git_repository *repo, git_attr_options *opts, const char *path, git_attr_foreach_cb callback, void *payload", + "sig": "git_repository *::git_attr_options *::const char *::git_attr_foreach_cb::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "", + "description": "Loop over all the git attributes for a path with extended options.
\n", "comments": "", "group": "attr" }, "git_attr_cache_flush": { "type": "function", "file": "git2/attr.h", - "line": 235, - "lineto": 236, + "line": 357, + "lineto": 358, "args": [ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository containing the gitattributes cache" } ], "argline": "git_repository *repo", "sig": "git_repository *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "int", "comment": " 0 on success, or an error code" }, "description": "Flush the gitattributes cache.
\n", - "comments": "Call this if you have reason to believe that the attributes files on\n disk no longer match the cached contents of memory. This will cause\n the attributes files to be reloaded the next time that an attribute\n access function is called.
\n", + "comments": "Call this if you have reason to believe that the attributes files on disk no longer match the cached contents of memory. This will cause the attributes files to be reloaded the next time that an attribute access function is called.
\n", "group": "attr" }, "git_attr_add_macro": { "type": "function", "file": "git2/attr.h", - "line": 248, - "lineto": 251, + "line": 375, + "lineto": 378, "args": [ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository to add the macro in." }, { "name": "name", "type": "const char *", - "comment": null + "comment": "The name of the macro." }, { "name": "values", "type": "const char *", - "comment": null + "comment": "The value for the macro." } ], "argline": "git_repository *repo, const char *name, const char *values", "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Add a macro definition.
\n", - "comments": "Macros will automatically be loaded from the top level .gitattributes\n file of the repository (plus the build-in "binary" macro). This\n function allows you to add others. For example, to add the default\n macro, you would call:
git_attr_add_macro(repo, "binary", "-diff -crlf");\n\n",
+ "comments": "Macros will automatically be loaded from the top level .gitattributes file of the repository (plus the built-in "binary" macro). This function allows you to add others. For example, to add the default macro, you would call:
git_attr_add_macro(repo, "binary", "-diff -crlf");\n\n",
"group": "attr"
},
- "git_blame_init_options": {
+ "git_blame_options_init": {
"type": "function",
"file": "git2/blame.h",
- "line": 103,
- "lineto": 105,
+ "line": 146,
+ "lineto": 148,
"args": [
{
"name": "opts",
@@ -2004,57 +1904,79 @@
"comment": " Zero on success; -1 on failure."
},
"description": "Initialize git_blame_options structure
\n", - "comments": "Initializes a git_blame_options with default values. Equivalent to creating\n an instance with GIT_BLAME_OPTIONS_INIT.
Initializes a git_blame_options with default values. Equivalent to creating an instance with GIT_BLAME_OPTIONS_INIT.
Gets the number of lines that exist in the blame structure.
\n", "comments": "", "group": "blame" }, - "git_blame_get_hunk_byindex": { + "git_blame_hunkcount": { "type": "function", "file": "git2/blame.h", - "line": 163, - "lineto": 165, + "line": 252, + "lineto": 252, "args": [ { "name": "blame", "type": "git_blame *", - "comment": null + "comment": "The blame structure to query." + } + ], + "argline": "git_blame *blame", + "sig": "git_blame *", + "return": { "type": "size_t", "comment": " The number of hunks." }, + "description": "Gets the number of hunks that exist in the blame structure.
\n", + "comments": "", + "group": "blame" + }, + "git_blame_hunk_byindex": { + "type": "function", + "file": "git2/blame.h", + "line": 261, + "lineto": 263, + "args": [ + { + "name": "blame", + "type": "git_blame *", + "comment": "the blame structure to query" }, { "name": "index", - "type": "int", - "comment": null + "type": "size_t", + "comment": "index of the hunk to retrieve" } ], - "argline": "git_blame *blame, int index", - "sig": "git_blame *::int", + "argline": "git_blame *blame, size_t index", + "sig": "git_blame *::size_t", "return": { "type": "const git_blame_hunk *", - "comment": null + "comment": " the hunk at the given index, or NULL on error" }, - "description": "", + "description": "Gets the blame hunk at the given index.
\n", "comments": "", "group": "blame" }, - "git_blame_get_hunk_byline": { + "git_blame_hunk_byline": { "type": "function", "file": "git2/blame.h", - "line": 174, - "lineto": 176, + "line": 273, + "lineto": 275, "args": [ { "name": "blame", @@ -2073,62 +1995,118 @@ "type": "const git_blame_hunk *", "comment": " the hunk that contains the given line, or NULL on error" }, - "description": "Gets the hunk that relates to the given line number in the newest commit.
\n", + "description": "Gets the hunk that relates to the given line number in the newest\n commit.
\n", "comments": "", "group": "blame", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blame_get_hunk_byline-1" - ] + "blame.c": ["ex/v1.9.1/blame.html#git_blame_hunk_byline-1"] } }, - "git_blame_file": { + "git_blame_line_byindex": { "type": "function", "file": "git2/blame.h", - "line": 189, - "lineto": 193, + "line": 284, + "lineto": 286, "args": [ { - "name": "out", - "type": "git_blame **", - "comment": "pointer that will receive the blame object" + "name": "blame", + "type": "git_blame *", + "comment": "the blame structure to query" }, { - "name": "repo", - "type": "git_repository *", - "comment": "repository whose history is to be walked" + "name": "idx", + "type": "size_t", + "comment": "the (1-based) line number" + } + ], + "argline": "git_blame *blame, size_t idx", + "sig": "git_blame *::size_t", + "return": { + "type": "const git_blame_line *", + "comment": " the blamed line, or NULL on error" + }, + "description": "Gets the information about the line in the blame.
\n", + "comments": "", + "group": "blame" + }, + "git_blame_get_hunk_count": { + "type": "function", + "file": "git2/blame.h", + "line": 296, + "lineto": 296, + "args": [ + { + "name": "blame", + "type": "git_blame *", + "comment": "The blame structure to query." + } + ], + "argline": "git_blame *blame", + "sig": "git_blame *", + "return": { "type": "uint32_t", "comment": " The number of hunks." }, + "description": "Gets the number of hunks that exist in the blame structure.
\n", + "comments": "", + "group": "blame" + }, + "git_blame_get_hunk_byindex": { + "type": "function", + "file": "git2/blame.h", + "line": 305, + "lineto": 307, + "args": [ + { + "name": "blame", + "type": "git_blame *", + "comment": "the blame structure to query" }, { - "name": "path", - "type": "const char *", - "comment": "path to file to consider" + "name": "index", + "type": "uint32_t", + "comment": "index of the hunk to retrieve" + } + ], + "argline": "git_blame *blame, uint32_t index", + "sig": "git_blame *::uint32_t", + "return": { + "type": "const git_blame_hunk *", + "comment": " the hunk at the given index, or NULL on error" + }, + "description": "Gets the blame hunk at the given index.
\n", + "comments": "", + "group": "blame" + }, + "git_blame_get_hunk_byline": { + "type": "function", + "file": "git2/blame.h", + "line": 316, + "lineto": 318, + "args": [ + { + "name": "blame", + "type": "git_blame *", + "comment": "the blame structure to query" }, { - "name": "options", - "type": "git_blame_options *", - "comment": "options for the blame operation. If NULL, this is treated as\n though GIT_BLAME_OPTIONS_INIT were passed." + "name": "lineno", + "type": "size_t", + "comment": "the (1-based) line number to find a hunk for" } ], - "argline": "git_blame **out, git_repository *repo, const char *path, git_blame_options *options", - "sig": "git_blame **::git_repository *::const char *::git_blame_options *", + "argline": "git_blame *blame, size_t lineno", + "sig": "git_blame *::size_t", "return": { - "type": "int", - "comment": " 0 on success, or an error code. (use git_error_last for information\n about the error.)" + "type": "const git_blame_hunk *", + "comment": " the hunk that contains the given line, or NULL on error" }, - "description": "Get the blame for a single file.
\n", + "description": "Gets the hunk that relates to the given line number in the newest commit.
\n", "comments": "", - "group": "blame", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blame_file-2" - ] - } + "group": "blame" }, "git_blame_buffer": { "type": "function", "file": "git2/blame.h", - "line": 213, - "lineto": 217, + "line": 374, + "lineto": 378, "args": [ { "name": "out", @@ -2136,7 +2114,7 @@ "comment": "pointer that will receive the resulting blame data" }, { - "name": "reference", + "name": "base", "type": "git_blame *", "comment": "cached blame from the history of the file (usually the output\n from git_blame_file)" }, @@ -2151,21 +2129,21 @@ "comment": "number of valid bytes in the buffer" } ], - "argline": "git_blame **out, git_blame *reference, const char *buffer, size_t buffer_len", + "argline": "git_blame **out, git_blame *base, const char *buffer, size_t buffer_len", "sig": "git_blame **::git_blame *::const char *::size_t", "return": { "type": "int", "comment": " 0 on success, or an error code. (use git_error_last for information\n about the error)" }, - "description": "Get blame data for a file that has been modified in memory. The reference\n parameter is a pre-calculated blame for the in-odb history of the file. This\n means that once a file blame is completed (which can be expensive), updating\n the buffer blame is very fast.
Lines that differ between the buffer and the committed version are marked as\n having a zero OID for their final_commit_id.
\n", + "description": "Get blame data for a file that has been modified in memory. The blame\n parameter is a pre-calculated blame for the in-odb history of the file.\n This means that once a file blame is completed (which can be expensive),\n updating the buffer blame is very fast.
Lines that differ between the buffer and the committed version are marked as having a zero OID for their final_commit_id.
\n", "group": "blame" }, "git_blame_free": { "type": "function", "file": "git2/blame.h", - "line": 224, - "lineto": 224, + "line": 385, + "lineto": 385, "args": [ { "name": "blame", @@ -2175,24 +2153,17 @@ ], "argline": "git_blame *blame", "sig": "git_blame *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free memory allocated by git_blame_file or git_blame_buffer.
\n", "comments": "", "group": "blame", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blame_free-3" - ] - } + "examples": { "blame.c": ["ex/v1.9.1/blame.html#git_blame_free-2"] } }, "git_blob_lookup": { "type": "function", "file": "git2/blob.h", - "line": 33, - "lineto": 33, + "line": 37, + "lineto": 40, "args": [ { "name": "blob", @@ -2212,27 +2183,20 @@ ], "argline": "git_blob **blob, git_repository *repo, const git_oid *id", "sig": "git_blob **::git_repository *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a blob object from a repository.
\n", "comments": "", "group": "blob", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_lookup-4" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_blob_lookup-1" - ] + "blame.c": ["ex/v1.9.1/blame.html#git_blob_lookup-3"], + "general.c": ["ex/v1.9.1/general.html#git_blob_lookup-1"] } }, "git_blob_lookup_prefix": { "type": "function", "file": "git2/blob.h", - "line": 47, - "lineto": 47, + "line": 54, + "lineto": 54, "args": [ { "name": "blob", @@ -2257,10 +2221,7 @@ ], "argline": "git_blob **blob, git_repository *repo, const git_oid *id, size_t len", "sig": "git_blob **::git_repository *::const git_oid *::size_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a blob object from a repository,\n given a prefix of its identifier (short id).
\n", "comments": "", "group": "blob" @@ -2268,38 +2229,27 @@ "git_blob_free": { "type": "function", "file": "git2/blob.h", - "line": 60, - "lineto": 60, + "line": 67, + "lineto": 67, "args": [ - { - "name": "blob", - "type": "git_blob *", - "comment": "the blob to close" - } + { "name": "blob", "type": "git_blob *", "comment": "the blob to close" } ], "argline": "git_blob *blob", "sig": "git_blob *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Close an open blob
\n", - "comments": "This is a wrapper around git_object_free()
\n\nIMPORTANT:\n It is necessary to call this method when you stop\n using a blob. Failure to do so will cause a memory leak.
\n", + "comments": "This is a wrapper around git_object_free()
\n\nIMPORTANT: It is necessary to call this method when you stop using a blob. Failure to do so will cause a memory leak.
\n", "group": "blob", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_free-5" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_blob_free-2" - ] + "blame.c": ["ex/v1.9.1/blame.html#git_blob_free-4"], + "general.c": ["ex/v1.9.1/general.html#git_blob_free-2"] } }, "git_blob_id": { "type": "function", "file": "git2/blob.h", - "line": 68, - "lineto": 68, + "line": 75, + "lineto": 75, "args": [ { "name": "blob", @@ -2320,8 +2270,8 @@ "git_blob_owner": { "type": "function", "file": "git2/blob.h", - "line": 76, - "lineto": 76, + "line": 83, + "lineto": 83, "args": [ { "name": "blob", @@ -2342,8 +2292,8 @@ "git_blob_rawcontent": { "type": "function", "file": "git2/blob.h", - "line": 89, - "lineto": 89, + "line": 96, + "lineto": 96, "args": [ { "name": "blob", @@ -2355,28 +2305,22 @@ "sig": "const git_blob *", "return": { "type": "const void *", - "comment": " the pointer" + "comment": " \n\n `unsigned char *` the pointer, or NULL on error" }, "description": "Get a read-only buffer with the raw content of a blob.
\n", - "comments": "A pointer to the raw content of a blob is returned;\n this pointer is owned internally by the object and shall\n not be free'd. The pointer may be invalidated at a later\n time.
\n", + "comments": "A pointer to the raw content of a blob is returned; this pointer is owned internally by the object and shall not be free'd. The pointer may be invalidated at a later time.
\n", "group": "blob", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_rawcontent-6" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_blob_rawcontent-1" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_blob_rawcontent-3" - ] + "blame.c": ["ex/v1.9.1/blame.html#git_blob_rawcontent-5"], + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_blob_rawcontent-1"], + "general.c": ["ex/v1.9.1/general.html#git_blob_rawcontent-3"] } }, "git_blob_rawsize": { "type": "function", "file": "git2/blob.h", - "line": 97, - "lineto": 97, + "line": 104, + "lineto": 104, "args": [ { "name": "blob", @@ -2386,31 +2330,51 @@ ], "argline": "const git_blob *blob", "sig": "const git_blob *", - "return": { - "type": "git_off_t", - "comment": " size on bytes" - }, + "return": { "type": "git_object_size_t", "comment": " size in bytes" }, "description": "Get the size in bytes of the contents of a blob
\n", "comments": "", "group": "blob", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_rawsize-7" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_blob_rawsize-2" - ], + "blame.c": ["ex/v1.9.1/blame.html#git_blob_rawsize-6"], + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_blob_rawsize-2"], "general.c": [ - "ex/v0.28.0/general.html#git_blob_rawsize-4", - "ex/v0.28.0/general.html#git_blob_rawsize-5" + "ex/v1.9.1/general.html#git_blob_rawsize-4", + "ex/v1.9.1/general.html#git_blob_rawsize-5" ] } }, - "git_blob_filtered_content": { + "git_blob_filter_options_init": { "type": "function", "file": "git2/blob.h", - "line": 122, - "lineto": 126, + "line": 201, + "lineto": 203, + "args": [ + { + "name": "opts", + "type": "git_blob_filter_options *", + "comment": "The `git_blob_filter_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass GIT_BLOB_FILTER_OPTIONS_VERSION" + } + ], + "argline": "git_blob_filter_options *opts, unsigned int version", + "sig": "git_blob_filter_options *::unsigned int", + "return": { + "type": "int", + "comment": " Zero on success; -1 on failure." + }, + "description": "Initialize git_blob_filter_options structure
\n", + "comments": "Initializes a git_blob_filter_options with default values. Equivalent to creating an instance with GIT_BLOB_FILTER_OPTIONS_INIT.
Get a buffer with the filtered content of a blob.
\n", - "comments": "This applies filters as if the blob was being checked out to the\n working directory under the specified filename. This may apply\n CRLF filtering or other types of changes depending on the file\n attributes set for the blob and the content detected in it.
\n\nThe output is written into a git_buf which the caller must free\n when done (via git_buf_dispose).
If no filters need to be applied, then the out buffer will just\n be populated with a pointer to the raw content of the blob. In\n that case, be careful to not free the blob until done with the\n buffer or copy it into memory you own.
This applies filters as if the blob was being checked out to the working directory under the specified filename. This may apply CRLF filtering or other types of changes depending on the file attributes set for the blob and the content detected in it.
\n\nThe output is written into a git_buf which the caller must dispose when done (via git_buf_dispose).
If no filters need to be applied, then the out buffer will just be populated with a pointer to the raw content of the blob. In that case, be careful to not free the blob until done with the buffer or copy it into memory you own.
Read a file from the working folder of a repository\n and write it to the Object Database as a loose blob
\n", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Read a file from the working folder of a repository and write it\n to the object database.
\n", "comments": "", "group": "blob" }, - "git_blob_create_fromdisk": { + "git_blob_create_from_disk": { "type": "function", "file": "git2/blob.h", - "line": 151, - "lineto": 151, + "line": 257, + "lineto": 260, "args": [ { "name": "id", @@ -2499,19 +2460,16 @@ ], "argline": "git_oid *id, git_repository *repo, const char *path", "sig": "git_oid *::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Read a file from the filesystem and write its content\n to the Object Database as a loose blob
\n", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Read a file from the filesystem (not necessarily inside the\n working folder of the repository) and write it to the object\n database.
\n", "comments": "", "group": "blob" }, - "git_blob_create_fromstream": { + "git_blob_create_from_stream": { "type": "function", "file": "git2/blob.h", - "line": 178, - "lineto": 181, + "line": 287, + "lineto": 290, "args": [ { "name": "out", @@ -2531,19 +2489,16 @@ ], "argline": "git_writestream **out, git_repository *repo, const char *hintpath", "sig": "git_writestream **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or error code" - }, - "description": "Create a stream to write a new blob into the object db
\n", - "comments": "This function may need to buffer the data on disk and will in\n general not be the right choice if you know the size of the data\n to write. If you have data in memory, use\n git_blob_create_frombuffer(). If you do not, but know the size of\n the contents (and don't want/need to perform filtering), use\n git_odb_open_wstream().
Don't close this stream yourself but pass it to\n git_blob_create_fromstream_commit() to commit the write to the\n object db and get the object id.
If the hintpath parameter is filled, it will be used to determine\n what git filters should be applied to the object before it is written\n to the object database.
Create a stream to write a new blob into the object database.
\n", + "comments": "This function may need to buffer the data on disk and will in general not be the right choice if you know the size of the data to write. If you have data in memory, use git_blob_create_from_buffer(). If you do not, but know the size of the contents (and don't want/need to perform filtering), use git_odb_open_wstream().
Don't close this stream yourself but pass it to git_blob_create_from_stream_commit() to commit the write to the object db and get the object id.
If the hintpath parameter is filled, it will be used to determine what git filters should be applied to the object before it is written to the object database.
Close the stream and write the blob to the object db
\n", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Close the stream and finalize writing the blob to the object database.
\n", "comments": "The stream will be closed and freed.
\n", "group": "blob" }, - "git_blob_create_frombuffer": { + "git_blob_create_from_buffer": { "type": "function", "file": "git2/blob.h", - "line": 205, - "lineto": 206, + "line": 314, + "lineto": 315, "args": [ { "name": "id", @@ -2580,34 +2532,27 @@ { "name": "repo", "type": "git_repository *", - "comment": "repository where to blob will be written" + "comment": "repository where the blob will be written" }, { "name": "buffer", "type": "const void *", "comment": "data to be written into the blob" }, - { - "name": "len", - "type": "size_t", - "comment": "length of the data" - } + { "name": "len", "type": "size_t", "comment": "length of the data" } ], "argline": "git_oid *id, git_repository *repo, const void *buffer, size_t len", "sig": "git_oid *::git_repository *::const void *::size_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Write an in-memory buffer to the ODB as a blob
\n", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Write an in-memory buffer to the object database as a blob.
\n", "comments": "", "group": "blob" }, "git_blob_is_binary": { "type": "function", "file": "git2/blob.h", - "line": 219, - "lineto": 219, + "line": 328, + "lineto": 328, "args": [ { "name": "blob", @@ -2617,19 +2562,42 @@ ], "argline": "const git_blob *blob", "sig": "const git_blob *", + "return": { + "type": "int", + "comment": " \n\n bool 1 if the content of the blob is detected\n as binary; 0 otherwise." + }, + "description": "Determine if the blob content is most likely binary or not.
\n", + "comments": "The heuristic used to guess if a file is binary is taken from core git: Searching for NUL bytes and looking for a reasonable ratio of printable to non-printable characters among the first 8000 bytes.
\n", + "group": "blob" + }, + "git_blob_data_is_binary": { + "type": "function", + "file": "git2/blob.h", + "line": 340, + "lineto": 340, + "args": [ + { + "name": "data", + "type": "const char *", + "comment": "The blob data which content should be analyzed" + }, + { "name": "len", "type": "size_t", "comment": "The length of the data" } + ], + "argline": "const char *data, size_t len", + "sig": "const char *::size_t", "return": { "type": "int", "comment": " 1 if the content of the blob is detected\n as binary; 0 otherwise." }, - "description": "Determine if the blob content is most certainly binary or not.
\n", - "comments": "The heuristic used to guess if a file is binary is taken from core git:\n Searching for NUL bytes and looking for a reasonable ratio of printable\n to non-printable characters among the first 8000 bytes.
\n", + "description": "Determine if the given content is most certainly binary or not;\n this is the same mechanism used by git_blob_is_binary but only\n looking at raw data.
Create an in-memory copy of a blob. The copy must be explicitly\n free'd or it will leak.
\n", "comments": "", "group": "blob" @@ -2655,8 +2620,8 @@ "git_branch_create": { "type": "function", "file": "git2/branch.h", - "line": 50, - "lineto": 55, + "line": 53, + "lineto": 58, "args": [ { "name": "out", @@ -2666,17 +2631,17 @@ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "the repository to create the branch in." }, { "name": "branch_name", "type": "const char *", - "comment": "Name for the branch; this name is\n validated for consistency. It should also not conflict with\n an already existing branch name." + "comment": "Name for the branch; this name is\n validated for consistency. It should also not conflict with\n an already existing branch name." }, { "name": "target", "type": "const git_commit *", - "comment": "Commit to which this branch should point. This object\n must belong to the given `repo`." + "comment": "Commit to which this branch should point. This object\n must belong to the given `repo`." }, { "name": "force", @@ -2691,56 +2656,61 @@ "comment": " 0, GIT_EINVALIDSPEC or an error code.\n A proper reference is written in the refs/heads namespace\n pointing to the provided target commit." }, "description": "Create a new branch pointing at a target commit
\n", - "comments": "A new direct reference will be created pointing to\n this target commit. If force is true and a reference\n already exists with the given name, it'll be replaced.
The returned reference must be freed by the user.
\n\nThe branch name will be checked for validity.\n See git_tag_create() for rules about valid names.
A new direct reference will be created pointing to this target commit. If force is true and a reference already exists with the given name, it'll be replaced.
The returned reference must be freed by the user.
\n\nThe branch name will be checked for validity. See git_tag_create() for rules about valid names.
Create a new branch pointing at a target commit
\n", - "comments": "This behaves like git_branch_create() but takes an annotated\n commit, which lets you specify which extended sha syntax string was\n specified by a user, allowing for more exact reflog messages.
See the documentation for git_branch_create().
This behaves like git_branch_create() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.
Delete an existing branch reference.
\n", - "comments": "If the branch is successfully deleted, the passed reference\n object will be invalidated. The reference must be freed manually\n by the user.
\n", + "comments": "Note that if the deletion succeeds, the reference object will not be valid anymore, and should be freed immediately by the user using git_reference_free().
Create an iterator which loops over the requested branches.
\n", "comments": "", "group": "branch" @@ -2793,8 +2760,8 @@ "git_branch_next": { "type": "function", "file": "git2/branch.h", - "line": 114, - "lineto": 114, + "line": 123, + "lineto": 123, "args": [ { "name": "out", @@ -2825,8 +2792,8 @@ "git_branch_iterator_free": { "type": "function", "file": "git2/branch.h", - "line": 121, - "lineto": 121, + "line": 130, + "lineto": 130, "args": [ { "name": "iter", @@ -2836,10 +2803,7 @@ ], "argline": "git_branch_iterator *iter", "sig": "git_branch_iterator *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a branch iterator
\n", "comments": "", "group": "branch" @@ -2847,13 +2811,13 @@ "git_branch_move": { "type": "function", "file": "git2/branch.h", - "line": 138, - "lineto": 142, + "line": 153, + "lineto": 157, "args": [ { "name": "out", "type": "git_reference **", - "comment": null + "comment": "New reference object for the updated name." }, { "name": "branch", @@ -2878,14 +2842,14 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code." }, "description": "Move/rename an existing local branch reference.
\n", - "comments": "The new branch name will be checked for validity.\n See git_tag_create() for rules about valid names.
The new branch name will be checked for validity. See git_tag_create() for rules about valid names.
Note that if the move succeeds, the old reference object will not be valid anymore, and should be freed immediately by the user using git_reference_free().
Lookup a branch by its name in a repository.
\n", - "comments": "The generated reference must be freed by the user.
\n\nThe branch name will be checked for validity.\n See git_tag_create() for rules about valid names.
The generated reference must be freed by the user. The branch name will be checked for validity.
\n", "group": "branch" }, "git_branch_name": { "type": "function", "file": "git2/branch.h", - "line": 186, - "lineto": 188, + "line": 198, + "lineto": 200, "args": [ { "name": "out", "type": "const char **", - "comment": "where the pointer of branch name is stored;\n this is valid as long as the ref is not freed." + "comment": "Pointer to the abbreviated reference name.\n Owned by ref, do not free." }, { "name": "ref", "type": "const git_reference *", - "comment": "the reference ideally pointing to a branch" + "comment": "A reference object, ideally pointing to a branch" } ], "argline": "const char **out, const git_reference *ref", "sig": "const char **::const git_reference *", "return": { "type": "int", - "comment": " 0 on success; otherwise an error code (e.g., if the\n ref is no local or remote branch)." + "comment": " 0 on success; GIT_EINVALID if the reference isn't either a local or\n remote branch, otherwise an error code." }, - "description": "Return the name of the given local or remote branch.
\n", - "comments": "The name of the branch matches the definition of the name\n for git_branch_lookup. That is, if the returned name is given\n to git_branch_lookup() then the reference is returned that\n was given to this function.
\n", + "description": "Get the branch name
\n", + "comments": "Given a reference object, this will check that it really is a branch (ie. it lives under "refs/heads/" or "refs/remotes/"), and return the branch part of it.
\n", "group": "branch", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_branch_name-4" - ] - } + "examples": { "merge.c": ["ex/v1.9.1/merge.html#git_branch_name-4"] } }, "git_branch_upstream": { "type": "function", "file": "git2/branch.h", - "line": 202, - "lineto": 204, + "line": 216, + "lineto": 218, "args": [ { "name": "out", "type": "git_reference **", - "comment": "Pointer where to store the retrieved\n reference." + "comment": "Pointer where to store the retrieved reference." }, { "name": "branch", @@ -2971,17 +2931,17 @@ "sig": "git_reference **::const git_reference *", "return": { "type": "int", - "comment": " 0 on success; GIT_ENOTFOUND when no remote tracking\n reference exists, otherwise an error code." + "comment": " 0 on success; GIT_ENOTFOUND when no remote tracking\n reference exists, otherwise an error code." }, - "description": "Return the reference supporting the remote tracking branch,\n given a local branch reference.
\n", - "comments": "", + "description": "Get the upstream of a branch
\n", + "comments": "Given a reference, this will return a new reference object corresponding to its remote tracking branch. The reference must be a local branch.
\n", "group": "branch" }, "git_branch_set_upstream": { "type": "function", "file": "git2/branch.h", - "line": 216, - "lineto": 216, + "line": 235, + "lineto": 237, "args": [ { "name": "branch", @@ -2989,36 +2949,36 @@ "comment": "the branch to configure" }, { - "name": "upstream_name", + "name": "branch_name", "type": "const char *", - "comment": "remote-tracking or local branch to set as\n upstream. Pass NULL to unset." + "comment": "remote-tracking or local branch to set as upstream." } ], - "argline": "git_reference *branch, const char *upstream_name", + "argline": "git_reference *branch, const char *branch_name", "sig": "git_reference *::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " \n\n git_error_t 0 on success; GIT_ENOTFOUND if there's no branch named `branch_name`\n or an error code" }, - "description": "Set the upstream configuration for a given local branch
\n", - "comments": "", + "description": "Set a branch's upstream branch
\n", + "comments": "This will update the configuration to set the branch named branch_name as the upstream of branch. Pass a NULL name to unset the upstream information.
Return the name of the reference supporting the remote tracking branch,\n given the name of a local branch reference.
\n", - "comments": "", + "description": "Get the upstream name of a branch
\n", + "comments": "Given a local branch, this will return its remote-tracking branch information, as a full reference name, ie. "feature/nice" would become "refs/remote/origin/feature/nice", depending on that branch's configuration.
\n", "group": "branch" }, "git_branch_is_head": { "type": "function", "file": "git2/branch.h", - "line": 245, - "lineto": 246, + "line": 266, + "lineto": 267, "args": [ { "name": "branch", "type": "const git_reference *", - "comment": "Current underlying reference of the branch." + "comment": "A reference to a local branch." } ], "argline": "const git_reference *branch", "sig": "const git_reference *", "return": { "type": "int", - "comment": " 1 if HEAD points at the branch, 0 if it isn't,\n error code otherwise." + "comment": " 1 if HEAD points at the branch, 0 if it isn't, or a negative value\n \t\t as an error code." }, - "description": "Determine if the current local branch is pointed at by HEAD.
\n", + "description": "Determine if HEAD points to the given branch
\n", "comments": "", "group": "branch" }, "git_branch_is_checked_out": { "type": "function", "file": "git2/branch.h", - "line": 257, - "lineto": 258, + "line": 279, + "lineto": 280, "args": [ { "name": "branch", "type": "const git_reference *", - "comment": "Reference to the branch." + "comment": "A reference to a local branch." } ], "argline": "const git_reference *branch", "sig": "const git_reference *", "return": { "type": "int", - "comment": " 1 if branch is checked out, 0 if it isn't,\n error code otherwise." + "comment": " 1 if branch is checked out, 0 if it isn't, an error code otherwise." }, - "description": "Determine if the current branch is checked out in any linked\n repository.
\n", - "comments": "", + "description": "Determine if any HEAD points to the current branch
\n", + "comments": "This will iterate over all known linked repositories (usually in the form of worktrees) and report whether any HEAD is pointing at the current branch.
\n", "group": "branch" }, "git_branch_remote_name": { "type": "function", "file": "git2/branch.h", - "line": 274, - "lineto": 277, + "line": 298, + "lineto": 301, "args": [ { "name": "out", "type": "git_buf *", - "comment": "Pointer to the user-allocated git_buf which will be filled with the name of the remote." + "comment": "The buffer into which the name will be written." }, { "name": "repo", @@ -3097,26 +3057,26 @@ "comment": "The repository where the branch lives." }, { - "name": "canonical_branch_name", + "name": "refname", "type": "const char *", - "comment": "name of the remote tracking branch." + "comment": "complete name of the remote tracking branch." } ], - "argline": "git_buf *out, git_repository *repo, const char *canonical_branch_name", + "argline": "git_buf *out, git_repository *repo, const char *refname", "sig": "git_buf *::git_repository *::const char *", "return": { "type": "int", - "comment": " 0, GIT_ENOTFOUND\n when no remote matching remote was found,\n GIT_EAMBIGUOUS when the branch maps to several remotes,\n otherwise an error code." + "comment": " 0 on success, GIT_ENOTFOUND when no matching remote was found,\n GIT_EAMBIGUOUS when the branch maps to several remotes,\n otherwise an error code." }, - "description": "Return the name of remote that the remote tracking branch belongs to.
\n", - "comments": "", + "description": "Find the remote name of a remote-tracking branch
\n", + "comments": "This will return the name of the remote whose fetch refspec is matching the given branch. E.g. given a branch "refs/remotes/test/master", it will extract the "test" part. If refspecs from multiple remotes match, the function will return GIT_EAMBIGUOUS.
\n", "group": "branch" }, "git_branch_upstream_remote": { "type": "function", "file": "git2/branch.h", - "line": 288, - "lineto": 288, + "line": 314, + "lineto": 314, "args": [ { "name": "buf", @@ -3136,155 +3096,95 @@ ], "argline": "git_buf *buf, git_repository *repo, const char *refname", "sig": "git_buf *::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Retrieve the name of the upstream remote of a local branch
\n", - "comments": "", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Retrieve the upstream remote of a local branch
\n", + "comments": "This will return the currently configured "branch.*.remote" for a given branch. This branch must be local.
\n", "group": "branch" }, - "git_buf_dispose": { + "git_branch_upstream_merge": { "type": "function", - "file": "git2/buffer.h", - "line": 72, - "lineto": 72, + "file": "git2/branch.h", + "line": 327, + "lineto": 327, "args": [ { - "name": "buffer", + "name": "buf", "type": "git_buf *", - "comment": "The buffer to deallocate" - } - ], - "argline": "git_buf *buffer", - "sig": "git_buf *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free the memory referred to by the git_buf.
\n", - "comments": "Note that this does not free the git_buf itself, just the memory\n pointed to by buffer->ptr. This will not free the memory if it looks\n like it was not allocated internally, but it will clear the buffer back\n to the empty state.
Resize the buffer allocation to make more space.
\n", - "comments": "This will attempt to grow the buffer to accommodate the target size.
\n\nIf the buffer refers to memory that was not allocated by libgit2 (i.e.\n the asize field is zero), then ptr will be replaced with a newly\n allocated block of data. Be careful so that memory allocated by the\n caller is not lost. As a special variant, if you pass target_size as\n 0 and the memory is not allocated by libgit2, this will allocate a new\n buffer of size size and copy the external data into it.
Currently, this will never shrink a buffer, only expand it.
\n\nIf the allocation fails, this will return an error and the buffer will be\n marked as invalid for future operations, invaliding the contents.
\n", - "group": "buf" + "argline": "git_buf *buf, git_repository *repo, const char *refname", + "sig": "git_buf *::git_repository *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Retrieve the upstream merge of a local branch
\n", + "comments": "This will return the currently configured "branch.*.merge" for a given branch. This branch must be local.
\n", + "group": "branch" }, - "git_buf_set": { + "git_branch_name_is_valid": { "type": "function", - "file": "git2/buffer.h", - "line": 105, - "lineto": 106, + "file": "git2/branch.h", + "line": 339, + "lineto": 339, "args": [ { - "name": "buffer", - "type": "git_buf *", - "comment": "The buffer to set" - }, - { - "name": "data", - "type": "const void *", - "comment": "The data to copy into the buffer" + "name": "valid", + "type": "int *", + "comment": "output pointer to set with validity of given branch name" }, { - "name": "datalen", - "type": "size_t", - "comment": "The length of the data to copy into the buffer" - } - ], - "argline": "git_buf *buffer, const void *data, size_t datalen", - "sig": "git_buf *::const void *::size_t", - "return": { - "type": "int", - "comment": " 0 on success, -1 on allocation failure" - }, - "description": "Set buffer to a copy of some raw data.
\n", - "comments": "", - "group": "buf" - }, - "git_buf_is_binary": { - "type": "function", - "file": "git2/buffer.h", - "line": 114, - "lineto": 114, - "args": [ - { - "name": "buf", - "type": "const git_buf *", - "comment": "Buffer to check" + "name": "name", + "type": "const char *", + "comment": "a branch name to test" } ], - "argline": "const git_buf *buf", - "sig": "const git_buf *", - "return": { - "type": "int", - "comment": " 1 if buffer looks like non-text data" - }, - "description": "Check quickly if buffer looks like it contains binary data
\n", + "argline": "int *valid, const char *name", + "sig": "int *::const char *", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Determine whether a branch name is valid, meaning that (when prefixed\n with refs/heads/) that it is a valid reference name, and that any\n additional branch name restrictions are imposed (eg, it cannot start\n with a -).
Check quickly if buffer contains a NUL byte
\n", - "comments": "", - "group": "buf" + "argline": "git_buf *buffer", + "sig": "git_buf *", + "return": { "type": "void", "comment": null }, + "description": "Free the memory referred to by the git_buf.
\n", + "comments": "Note that this does not free the git_buf itself, just the memory pointed to by buffer->ptr.
Initialize git_checkout_options structure
\n", - "comments": "Initializes a git_checkout_options with default values. Equivalent to creating\n an instance with GIT_CHECKOUT_OPTIONS_INIT.
Initializes a git_checkout_options with default values. Equivalent to creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
Updates files in the index and the working tree to match the content of\n the commit pointed at by HEAD.
\n", - "comments": "Note that this is not the correct mechanism used to switch branches;\n do not change your HEAD and then call this method, that would leave\n you with checkout conflicts since your working directory would then\n appear to be dirty. Instead, checkout the target of the branch and\n then update HEAD using git_repository_set_head to point to the\n branch you checked out.
Note that this is not the correct mechanism used to switch branches; do not change your HEAD and then call this method, that would leave you with checkout conflicts since your working directory would then appear to be dirty. Instead, checkout the target of the branch and then update HEAD using git_repository_set_head to point to the branch you checked out.
Initialize git_cherrypick_options structure
\n", - "comments": "Initializes a git_cherrypick_options with default values. Equivalent to creating\n an instance with GIT_CHERRYPICK_OPTIONS_INIT.
Initializes a git_cherrypick_options with default values. Equivalent to creating an instance with GIT_CHERRYPICK_OPTIONS_INIT.
Initialize git_clone_options structure
\n", - "comments": "Initializes a git_clone_options with default values. Equivalent to creating\n an instance with GIT_CLONE_OPTIONS_INIT.
Initializes a git_clone_options with default values. Equivalent to creating an instance with GIT_CLONE_OPTIONS_INIT.
Clone a remote repository.
\n", - "comments": "By default this creates its repository and initial remote to match\n git's defaults. You can use the options in the callback to\n customize how these are created.
\n", + "comments": "By default this creates its repository and initial remote to match git's defaults. You can use the options in the callback to customize how these are created.
\n\nNote that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Lookup a commit object from a repository.
\n", - "comments": "The returned object should be released with git_commit_free when no\n longer needed.
The returned object should be released with git_commit_free when no longer needed.
Lookup a commit object from a repository, given a prefix of its\n identifier (short id).
\n", - "comments": "The returned object should be released with git_commit_free when no\n longer needed.
The returned object should be released with git_commit_free when no longer needed.
Close an open commit
\n", - "comments": "This is a wrapper around git_object_free()
\n\nIMPORTANT:\n It is necessary to call this method when you stop\n using a commit. Failure to do so will cause a memory leak.
\n", + "comments": "This is a wrapper around git_object_free()
\n\nIMPORTANT: It is necessary to call this method when you stop using a commit. Failure to do so will cause a memory leak.
\n", "group": "commit", "examples": { - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_commit_free-7" - ], + "checkout.c": ["ex/v1.9.1/checkout.html#git_commit_free-10"], "general.c": [ - "ex/v0.28.0/general.html#git_commit_free-9", - "ex/v0.28.0/general.html#git_commit_free-10", - "ex/v0.28.0/general.html#git_commit_free-11", - "ex/v0.28.0/general.html#git_commit_free-12", - "ex/v0.28.0/general.html#git_commit_free-13" + "ex/v1.9.1/general.html#git_commit_free-9", + "ex/v1.9.1/general.html#git_commit_free-10", + "ex/v1.9.1/general.html#git_commit_free-11", + "ex/v1.9.1/general.html#git_commit_free-12", + "ex/v1.9.1/general.html#git_commit_free-13" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_free-2", - "ex/v0.28.0/log.html#git_commit_free-3", - "ex/v0.28.0/log.html#git_commit_free-4", - "ex/v0.28.0/log.html#git_commit_free-5" + "ex/v1.9.1/log.html#git_commit_free-2", + "ex/v1.9.1/log.html#git_commit_free-3", + "ex/v1.9.1/log.html#git_commit_free-4", + "ex/v1.9.1/log.html#git_commit_free-5" ] } }, "git_commit_id": { "type": "function", "file": "git2/commit.h", - "line": 78, - "lineto": 78, + "line": 82, + "lineto": 82, "args": [ { "name": "commit", @@ -3723,19 +3602,15 @@ "comments": "", "group": "commit", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_commit_id-14" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_commit_id-6" - ] + "general.c": ["ex/v1.9.1/general.html#git_commit_id-14"], + "log.c": ["ex/v1.9.1/log.html#git_commit_id-6"] } }, "git_commit_owner": { "type": "function", "file": "git2/commit.h", - "line": 86, - "lineto": 86, + "line": 90, + "lineto": 90, "args": [ { "name": "commit", @@ -3754,16 +3629,16 @@ "group": "commit", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_commit_owner-7", - "ex/v0.28.0/log.html#git_commit_owner-8" + "ex/v1.9.1/log.html#git_commit_owner-7", + "ex/v1.9.1/log.html#git_commit_owner-8" ] } }, "git_commit_message_encoding": { "type": "function", "file": "git2/commit.h", - "line": 98, - "lineto": 98, + "line": 102, + "lineto": 102, "args": [ { "name": "commit", @@ -3773,19 +3648,16 @@ ], "argline": "const git_commit *commit", "sig": "const git_commit *", - "return": { - "type": "const char *", - "comment": " NULL, or the encoding" - }, + "return": { "type": "const char *", "comment": " NULL, or the encoding" }, "description": "Get the encoding for the message of a commit,\n as a string representing a standard encoding name.
\n", - "comments": "The encoding may be NULL if the encoding header\n in the commit is missing; in that case UTF-8 is assumed.
The encoding may be NULL if the encoding header in the commit is missing; in that case UTF-8 is assumed.
Get the full message of a commit.
\n", - "comments": "The returned message will be slightly prettified by removing any\n potential leading newlines.
\n", + "comments": "The returned message will be slightly prettified by removing any potential leading newlines.
\n", "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_message-3", - "ex/v0.28.0/cat-file.html#git_commit_message-4" + "ex/v1.9.1/cat-file.html#git_commit_message-3", + "ex/v1.9.1/cat-file.html#git_commit_message-4" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_message-15", - "ex/v0.28.0/general.html#git_commit_message-16", - "ex/v0.28.0/general.html#git_commit_message-17" + "ex/v1.9.1/general.html#git_commit_message-15", + "ex/v1.9.1/general.html#git_commit_message-16", + "ex/v1.9.1/general.html#git_commit_message-17" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_message-9", - "ex/v0.28.0/log.html#git_commit_message-10", - "ex/v0.28.0/log.html#git_commit_message-11" + "ex/v1.9.1/log.html#git_commit_message-9", + "ex/v1.9.1/log.html#git_commit_message-10", + "ex/v1.9.1/log.html#git_commit_message-11" ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_commit_message-2" - ] + "tag.c": ["ex/v1.9.1/tag.html#git_commit_message-2"] } }, "git_commit_message_raw": { "type": "function", "file": "git2/commit.h", - "line": 117, - "lineto": 117, + "line": 121, + "lineto": 121, "args": [ { "name": "commit", @@ -3847,8 +3717,8 @@ "git_commit_summary": { "type": "function", "file": "git2/commit.h", - "line": 128, - "lineto": 128, + "line": 132, + "lineto": 132, "args": [ { "name": "commit", @@ -3863,14 +3733,14 @@ "comment": " the summary of a commit or NULL on error" }, "description": "Get the short "summary" of the git commit message.
\n", - "comments": "The returned message is the summary of the commit, comprising the\n first paragraph of the message with whitespace trimmed and squashed.
\n", + "comments": "The returned message is the summary of the commit, comprising the first paragraph of the message with whitespace trimmed and squashed.
\n", "group": "commit" }, "git_commit_body": { "type": "function", "file": "git2/commit.h", - "line": 141, - "lineto": 141, + "line": 145, + "lineto": 145, "args": [ { "name": "commit", @@ -3885,14 +3755,14 @@ "comment": " the body of a commit or NULL when no the message only\n consists of a summary" }, "description": "Get the long "body" of the git commit message.
\n", - "comments": "The returned message is the body of the commit, comprising\n everything but the first paragraph of the message. Leading and\n trailing whitespaces are trimmed.
\n", + "comments": "The returned message is the body of the commit, comprising everything but the first paragraph of the message. Leading and trailing whitespaces are trimmed.
\n", "group": "commit" }, "git_commit_time": { "type": "function", "file": "git2/commit.h", - "line": 149, - "lineto": 149, + "line": 153, + "lineto": 153, "args": [ { "name": "commit", @@ -3902,25 +3772,22 @@ ], "argline": "const git_commit *commit", "sig": "const git_commit *", - "return": { - "type": "git_time_t", - "comment": " the time of a commit" - }, + "return": { "type": "git_time_t", "comment": " the time of a commit" }, "description": "Get the commit time (i.e. committer time) of a commit.
\n", "comments": "", "group": "commit", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_commit_time-18", - "ex/v0.28.0/general.html#git_commit_time-19" + "ex/v1.9.1/general.html#git_commit_time-18", + "ex/v1.9.1/general.html#git_commit_time-19" ] } }, "git_commit_time_offset": { "type": "function", "file": "git2/commit.h", - "line": 157, - "lineto": 157, + "line": 161, + "lineto": 161, "args": [ { "name": "commit", @@ -3941,8 +3808,8 @@ "git_commit_committer": { "type": "function", "file": "git2/commit.h", - "line": 165, - "lineto": 165, + "line": 169, + "lineto": 169, "args": [ { "name": "commit", @@ -3960,22 +3827,16 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_committer-5" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_commit_committer-20" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_commit_committer-12" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_commit_committer-5"], + "general.c": ["ex/v1.9.1/general.html#git_commit_committer-20"], + "log.c": ["ex/v1.9.1/log.html#git_commit_committer-12"] } }, "git_commit_author": { "type": "function", "file": "git2/commit.h", - "line": 173, - "lineto": 173, + "line": 177, + "lineto": 177, "args": [ { "name": "commit", @@ -3993,24 +3854,22 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_author-6" - ], + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_commit_author-6"], "general.c": [ - "ex/v0.28.0/general.html#git_commit_author-21", - "ex/v0.28.0/general.html#git_commit_author-22" + "ex/v1.9.1/general.html#git_commit_author-21", + "ex/v1.9.1/general.html#git_commit_author-22" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_author-13", - "ex/v0.28.0/log.html#git_commit_author-14" + "ex/v1.9.1/log.html#git_commit_author-13", + "ex/v1.9.1/log.html#git_commit_author-14" ] } }, "git_commit_committer_with_mailmap": { "type": "function", "file": "git2/commit.h", - "line": 186, - "lineto": 187, + "line": 190, + "lineto": 191, "args": [ { "name": "out", @@ -4030,10 +3889,7 @@ ], "argline": "git_signature **out, const git_commit *commit, const git_mailmap *mailmap", "sig": "git_signature **::const git_commit *::const git_mailmap *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the committer of a commit, using the mailmap to map names and email\n addresses to canonical real names and email addresses.
\n", "comments": "Call git_signature_free to free the signature.
Get the author of a commit, using the mailmap to map names and email\n addresses to canonical real names and email addresses.
\n", "comments": "Call git_signature_free to free the signature.
Get the tree pointed to by a commit.
\n", "comments": "", "group": "commit", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_commit_tree-15", - "ex/v0.28.0/log.html#git_commit_tree-16", - "ex/v0.28.0/log.html#git_commit_tree-17", - "ex/v0.28.0/log.html#git_commit_tree-18", - "ex/v0.28.0/log.html#git_commit_tree-19" + "ex/v1.9.1/log.html#git_commit_tree-15", + "ex/v1.9.1/log.html#git_commit_tree-16", + "ex/v1.9.1/log.html#git_commit_tree-17", + "ex/v1.9.1/log.html#git_commit_tree-18", + "ex/v1.9.1/log.html#git_commit_tree-19" ] } }, "git_commit_tree_id": { "type": "function", "file": "git2/commit.h", - "line": 228, - "lineto": 228, + "line": 232, + "lineto": 232, "args": [ { "name": "commit", @@ -4150,16 +4000,14 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_tree_id-7" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_commit_tree_id-7"] } }, "git_commit_parentcount": { "type": "function", "file": "git2/commit.h", - "line": 236, - "lineto": 236, + "line": 240, + "lineto": 240, "args": [ { "name": "commit", @@ -4177,23 +4025,19 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_parentcount-8" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_commit_parentcount-23" - ], + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_commit_parentcount-8"], + "general.c": ["ex/v1.9.1/general.html#git_commit_parentcount-23"], "log.c": [ - "ex/v0.28.0/log.html#git_commit_parentcount-20", - "ex/v0.28.0/log.html#git_commit_parentcount-21" + "ex/v1.9.1/log.html#git_commit_parentcount-20", + "ex/v1.9.1/log.html#git_commit_parentcount-21" ] } }, "git_commit_parent": { "type": "function", "file": "git2/commit.h", - "line": 246, - "lineto": 249, + "line": 250, + "lineto": 253, "args": [ { "name": "out", @@ -4213,28 +4057,23 @@ ], "argline": "git_commit **out, const git_commit *commit, unsigned int n", "sig": "git_commit **::const git_commit *::unsigned int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the specified parent of the commit.
\n", "comments": "", "group": "commit", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_commit_parent-24" - ], + "general.c": ["ex/v1.9.1/general.html#git_commit_parent-24"], "log.c": [ - "ex/v0.28.0/log.html#git_commit_parent-22", - "ex/v0.28.0/log.html#git_commit_parent-23" + "ex/v1.9.1/log.html#git_commit_parent-22", + "ex/v1.9.1/log.html#git_commit_parent-23" ] } }, "git_commit_parent_id": { "type": "function", "file": "git2/commit.h", - "line": 260, - "lineto": 262, + "line": 264, + "lineto": 266, "args": [ { "name": "commit", @@ -4257,19 +4096,15 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_parent_id-9" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_commit_parent_id-24" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_commit_parent_id-9"], + "log.c": ["ex/v1.9.1/log.html#git_commit_parent_id-24"] } }, "git_commit_nth_gen_ancestor": { "type": "function", "file": "git2/commit.h", - "line": 278, - "lineto": 281, + "line": 282, + "lineto": 285, "args": [ { "name": "ancestor", @@ -4294,14 +4129,14 @@ "comment": " 0 on success; GIT_ENOTFOUND if no matching ancestor exists\n or an error code" }, "description": "Get the commit object that is the \n<n
\n\n\n\n", - "comments": "th generation ancestor\n of the named commit object, following only the first parents.\n The returned commit has to be freed by the caller.
\n
Passing 0 as the generation number returns another instance of the\n base commit itself.
Passing 0 as the generation number returns another instance of the base commit itself.
Extract the signature from a commit
\n", - "comments": "If the id is not for a commit, the error class will be\n GIT_ERROR_INVALID. If the commit does not have a signature, the\n error class will be GIT_ERROR_OBJECT.
If the id is not for a commit, the error class will be GIT_ERROR_INVALID. If the commit does not have a signature, the error class will be GIT_ERROR_OBJECT.
Create new commit in the repository from a list of git_object pointers
The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.
The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.
Create new commit in the repository using a variable argument list.
\n", - "comments": "The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.
The parents for the commit are specified as a variable list of pointers\n to const git_commit *. Note that this is a convenience method which may\n not be safe to export for certain languages or compilers
All other parameters remain the same as git_commit_create().
The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.
The parents for the commit are specified as a variable list of pointers to const git_commit *. Note that this is a convenience method which may not be safe to export for certain languages or compilers
All other parameters remain the same as git_commit_create().
Commits the staged changes in the repository; this is a near analog to\n git commit -m message.
By default, empty commits are not allowed.
\n", + "group": "commit" + }, "git_commit_amend": { "type": "function", "file": "git2/commit.h", - "line": 418, - "lineto": 426, + "line": 528, + "lineto": 536, "args": [ { "name": "id", "type": "git_oid *", - "comment": null + "comment": "Pointer in which to store the OID of the newly created commit" }, { "name": "commit_to_amend", "type": "const git_commit *", - "comment": null + "comment": "The commit to amend" }, { "name": "update_ref", "type": "const char *", - "comment": null + "comment": "If not NULL, name of the reference that\n\twill be updated to point to this commit. If the reference\n\tis not direct, it will be resolved to a direct reference.\n\tUse \"HEAD\" to update the HEAD of the current branch and\n\tmake it point to this commit. If the reference doesn't\n\texist yet, it will be created. If it does exist, the first\n\tparent must be the tip of this branch." }, { "name": "author", "type": "const git_signature *", - "comment": null + "comment": "Signature with author and author time of commit" }, { "name": "committer", "type": "const git_signature *", - "comment": null + "comment": "Signature with committer and * commit time of commit" }, { "name": "message_encoding", "type": "const char *", - "comment": null + "comment": "The encoding for the message in the\n commit, represented with a standard encoding name.\n E.g. \"UTF-8\". If NULL, no encoding header is written and\n UTF-8 is assumed." }, { "name": "message", "type": "const char *", - "comment": null + "comment": "Full message for this commit" }, { "name": "tree", "type": "const git_tree *", - "comment": null + "comment": "An instance of a `git_tree` object that will\n be used as the tree for the commit. This tree object must\n also be owned by the given `repo`." } ], "argline": "git_oid *id, const git_commit *commit_to_amend, const char *update_ref, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message, const git_tree *tree", "sig": "git_oid *::const git_commit *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_tree *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code\n\tThe created commit will be written to the Object Database and\n\tthe given reference will be updated to point to it" }, "description": "Amend an existing commit by replacing only non-NULL values.
\n", - "comments": "This creates a new commit that is exactly the same as the old commit,\n except that any non-NULL values will be updated. The new commit has\n the same parents as the old commit.
\n\nThe update_ref value works as in the regular git_commit_create(),\n updating the ref to point to the newly rewritten commit. If you want\n to amend a commit that is not currently the tip of the branch and then\n rewrite the following commits to reach a ref, pass this as NULL and\n update the rest of the commit chain and ref separately.
Unlike git_commit_create(), the author, committer, message,\n message_encoding, and tree parameters can be NULL in which case this\n will use the values from the original commit_to_amend.
All parameters have the same meanings as in git_commit_create().
This creates a new commit that is exactly the same as the old commit, except that any non-NULL values will be updated. The new commit has the same parents as the old commit.
\n\nThe update_ref value works as in the regular git_commit_create(), updating the ref to point to the newly rewritten commit. If you want to amend a commit that is not currently the tip of the branch and then rewrite the following commits to reach a ref, pass this as NULL and update the rest of the commit chain and ref separately.
Unlike git_commit_create(), the author, committer, message, message_encoding, and tree parameters can be NULL in which case this will use the values from the original commit_to_amend.
All parameters have the same meanings as in git_commit_create().
Create a commit and write it into a buffer
\n", - "comments": "Create a commit as with git_commit_create() but instead of\n writing it to the objectdb, write the contents of the object into a\n buffer.
Create a commit as with git_commit_create() but instead of writing it to the objectdb, write the contents of the object into a buffer.
Create a commit object from the given buffer and signature
\n", - "comments": "Given the unsigned commit object's contents, its signature and the\n header field in which to store the signature, attach the signature\n to the commit and write it into the given repository.
\n", + "comments": "Given the unsigned commit object's contents, its signature and the header field in which to store the signature, attach the signature to the commit and write it into the given repository.
\n", "group": "commit" }, "git_commit_dup": { "type": "function", "file": "git2/commit.h", - "line": 502, - "lineto": 502, + "line": 615, + "lineto": 615, "args": [ { "name": "out", @@ -4693,19 +4552,35 @@ ], "argline": "git_commit **out, git_commit *source", "sig": "git_commit **::git_commit *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0" }, "description": "Create an in-memory copy of a commit. The copy must be explicitly\n free'd or it will leak.
\n", "comments": "", "group": "commit" }, + "git_commitarray_dispose": { + "type": "function", + "file": "git2/commit.h", + "line": 670, + "lineto": 670, + "args": [ + { + "name": "array", + "type": "git_commitarray *", + "comment": "The git_commitarray that contains commits to free" + } + ], + "argline": "git_commitarray *array", + "sig": "git_commitarray *", + "return": { "type": "void", "comment": null }, + "description": "Free the commits contained in a commit array. This method should\n be called on git_commitarray objects that were provided by the\n library. Not doing so will result in a memory leak.
This does not free the git_commitarray itself, since the library will never allocate that object directly itself.
Return the version of the libgit2 library\n being currently used.
\n", "comments": "", "group": "libgit2" }, + "git_libgit2_prerelease": { + "type": "function", + "file": "git2/common.h", + "line": 130, + "lineto": 130, + "args": [], + "argline": "", + "sig": "", + "return": { + "type": "const char *", + "comment": " the name of the prerelease state or NULL" + }, + "description": "Return the prerelease state of the libgit2 library currently being\n used. For nightly builds during active development, this will be\n "alpha". Releases may have a "beta" or release candidate ("rc1",\n "rc2", etc) prerelease. For a final release, this function returns\n NULL.
\n", + "comments": "", + "group": "libgit2" + }, "git_libgit2_features": { "type": "function", "file": "git2/common.h", - "line": 173, - "lineto": 173, + "line": 184, + "lineto": 184, "args": [], "argline": "", "sig": "", @@ -4746,21 +4637,37 @@ "comment": " A combination of GIT_FEATURE_* values." }, "description": "Query compile time options for libgit2.
\n", - "comments": "GIT_FEATURE_THREADS\nLibgit2 was compiled with thread support. Note that thread support is\nstill to be seen as a 'work in progress' - basic object lookups are\nbelieved to be threadsafe, but other operations may not be.
GIT_FEATURE_HTTPS\nLibgit2 supports the https:// protocol. This requires the openssl\nlibrary to be found when compiling libgit2.
GIT_FEATURE_SSH\nLibgit2 supports the SSH protocol for network operations. This requires\nthe libssh2 library to be found when compiling libgit2
Query the backend details for the compile-time feature in libgit2.
\n", + "comments": "This will return the "backend" for the feature, which is useful for things like HTTPS or SSH support, that can have multiple backends that could be compiled in.
\n\nFor example, when libgit2 is compiled with dynamic OpenSSL support, the feature backend will be openssl-dynamic. The feature backend names reflect the compilation options specified to the build system (though in all lower case). The backend may be "builtin" for features that are provided by libgit2 itself.
If the feature is not supported by the library, this API returns NULL.
Set or query a library global option
\n", - "comments": "Available options:
\n\n* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n >Set the maximum amount of memory that can be mapped at any time\n by the library\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n > Get the search path for a given level of config data. "level" must\n > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`,\n > `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n > The search path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n > Set the search path for a level of config data. The search path\n > applied to shared attributes and ignore files, too.\n >\n > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR.\n > Pass NULL to reset to the default (generally based on environment\n > variables). Use magic path `$PATH` to include the old value\n > of the path (if you want to prepend or append, for instance).\n >\n > - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`,\n > `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or\n > `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_object_t type, size_t size)\n\n > Set the maximum data size for the given type of object to be\n > considered eligible for caching in memory. Setting to value to\n > zero means that that type of object will not be cached.\n > Defaults to 0 for GIT_OBJECT_BLOB (i.e. won't cache blobs) and 4k\n > for GIT_OBJECT_COMMIT, GIT_OBJECT_TREE, and GIT_OBJECT_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n > Set the maximum total data size that will be cached in memory\n > across all repositories before libgit2 starts evicting objects\n > from the cache. This is a soft limit, in that the library might\n > briefly exceed it, but will start aggressively evicting objects\n > from cache when that happens. The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n > Enable or disable caching completely.\n >\n > Because caches are repository-specific, disabling the cache\n > cannot immediately clear all cached objects, but each cache will\n > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n > Get the current bytes in cache and the maximum that would be\n > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n > Get the default template path.\n > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n > Set the default template path.\n >\n > - `path` directory of template.\n\n* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)\n\n > Set the SSL certificate-authority locations.\n >\n > - `file` is the location of a file containing several\n > certificates concatenated together.\n > - `path` is the location of a directory holding several\n > certificates, one per file.\n >\n > Either parameter may be `NULL`, but not both.\n\n* opts(GIT_OPT_SET_USER_AGENT, const char *user_agent)\n\n > Set the value of the User-Agent header. This value will be\n > appended to "git/1.0", for compatibility with other git clients.\n >\n > - `user_agent` is the value that will be delivered as the\n > User-Agent header on HTTP requests.\n\n* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)\n\n > Set the share mode used when opening files on Windows.\n > For more information, see the documentation for CreateFile.\n > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE. This is\n > ignored and unused on non-Windows platforms.\n\n* opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)\n\n > Get the share mode used when opening files on Windows.\n\n* opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)\n\n > Enable strict input validation when creating new objects\n > to ensure that all inputs to the new objects are valid. For\n > example, when this is enabled, the parent(s) and tree inputs\n > will be validated when creating a new commit. This defaults\n > to enabled.\n\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n > Validate the target of a symbolic ref when creating it. For\n > example, `foobar` is not a valid ref, therefore `foobar` is\n > not a valid target for a symbolic ref by default, whereas\n > `refs/heads/foobar` is. Disabling this bypasses validation\n > so that an arbitrary strings such as `foobar` can be used\n > for a symbolic ref target. This defaults to enabled.\n\n* opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)\n\n > Set the SSL ciphers use for HTTPS connections.\n >\n > - `ciphers` is the list of ciphers that are eanbled.\n\n* opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)\n\n > Enable or disable the use of "offset deltas" when creating packfiles,\n > and the negotiation of them when talking to a remote server.\n > Offset deltas store a delta base location as an offset into the\n > packfile from the current location, which provides a shorter encoding\n > and thus smaller resultant packfiles.\n > Packfiles containing offset deltas can still be read.\n > This defaults to enabled.\n\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n > Enable synchronized writes of files in the gitdir using `fsync`\n > (or the platform equivalent) to ensure that new object data\n > is written to permanent storage, not simply cached. This\n > defaults to disabled.\n\n opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)\n\n > Enable strict verification of object hashsums when reading\n > objects from disk. This may impact performance due to an\n > additional checksum calculation on each object. This defaults\n > to enabled.\n\n opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)\n\n > Set the memory allocator to a different memory allocator. This\n > allocator will then be used to make all memory allocations for\n > libgit2 operations. If the given `allocator` is NULL, then the\n > system default will be restored.\n\n opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)\n\n > Ensure that there are no unsaved changes in the index before\n > beginning any operation that reloads the index from disk (eg,\n > checkout). If there are unsaved changes, the instruction will\n > fail. (Using the FORCE flag to checkout will still overwrite\n > these changes.)\n\n opts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)\n\n > Get the maximum number of objects libgit2 will allow in a pack\n > file when downloading a pack file from a remote. This can be\n > used to limit maximum memory usage when fetching from an untrusted\n > remote.\n\n opts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)\n\n > Set the maximum number of objects libgit2 will allow in a pack\n > file when downloading a pack file from a remote.\n\n",
+ "comments": "Available options:
\n\n* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n > Set the maximum amount of memory that can be mapped at any time > by the library\n\n* opts(GIT_OPT_GET_MWINDOW_FILE_LIMIT, size_t *):\n\n > Get the maximum number of files that will be mapped at any time by the > library\n\n* opts(GIT_OPT_SET_MWINDOW_FILE_LIMIT, size_t):\n\n > Set the maximum number of files that can be mapped at any time > by the library. The default (0) is unlimited.\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n > Get the search path for a given level of config data. "level" must > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`, > `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`. > The search path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n > Set the search path for a level of config data. The search path > applied to shared attributes and ignore files, too. > > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR. > Pass NULL to reset to the default (generally based on environment > variables). Use magic path `$PATH` to include the old value > of the path (if you want to prepend or append, for instance). > > - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`, > `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or > `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_object_t type, size_t size)\n\n > Set the maximum data size for the given type of object to be > considered eligible for caching in memory. Setting to value to > zero means that that type of object will not be cached. > Defaults to 0 for GIT_OBJECT_BLOB (i.e. won't cache blobs) and 4k > for GIT_OBJECT_COMMIT, GIT_OBJECT_TREE, and GIT_OBJECT_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n > Set the maximum total data size that will be cached in memory > across all repositories before libgit2 starts evicting objects > from the cache. This is a soft limit, in that the library might > briefly exceed it, but will start aggressively evicting objects > from cache when that happens. The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n > Enable or disable caching completely. > > Because caches are repository-specific, disabling the cache > cannot immediately clear all cached objects, but each cache will > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n > Get the current bytes in cache and the maximum that would be > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n > Get the default template path. > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n > Set the default template path. > > - `path` directory of template.\n\n* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)\n\n > Set the SSL certificate-authority locations. > > - `file` is the location of a file containing several > certificates concatenated together. > - `path` is the location of a directory holding several > certificates, one per file. > > Calling `GIT_OPT_ADD_SSL_X509_CERT` may override the > data in `path`. > > Either parameter may be `NULL`, but not both.\n\n\nopts(GIT_OPT_ADD_SSL_X509_CERT, const X509 *cert)
\n\n> Add a raw X509 certificate into the SSL certs store. > This certificate is only used by libgit2 invocations > during the application lifetime and is not persisted > to disk. This certificate cannot be removed from the > application once is has been added. > > - `cert` is the raw X509 cert will be added to cert store.\n\n\nopts(GIT_OPT_SET_USER_AGENT, const char *user_agent)
\n\n\nSet the value of the comment section of the User-Agent header. > This can be information about your product and its version. > By default this is "libgit2" followed by the libgit2 version. > > This value will be appended to User-Agent product, which > is typically set to "git/2.0". > > Set to the empty string ("") to not send any information in the > comment section, or set to NULL to restore the default.
\n
opts(GIT_OPT_GET_USER_AGENT, git_buf *out)
\n\n\nGet the value of the User-Agent header. > The User-Agent is written to the
\noutbuffer.
opts(GIT_OPT_SET_USER_AGENT_PRODUCT, const char *user_agent_product)
\n\n\nSet the value of the product portion of the User-Agent header. > This defaults to "git/2.0", for compatibility with other git > clients. It is recommended to keep this as git/
\nfor > compatibility with servers that do user-agent detection. > > Set to the empty string ("") to not send any user-agent string, > or set to NULL to restore the default.
opts(GIT_OPT_GET_USER_AGENT_PRODUCT, git_buf *out)
\n\n\nGet the value of the User-Agent product header. > The User-Agent product is written to the
\noutbuffer.
opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)
\n\n\nSet the share mode used when opening files on Windows. > For more information, see the documentation for CreateFile. > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE. This is > ignored and unused on non-Windows platforms.
\n
opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)
\n\n\nGet the share mode used when opening files on Windows.
\n
opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)
\n\n\nEnable strict input validation when creating new objects > to ensure that all inputs to the new objects are valid. For > example, when this is enabled, the parent(s) and tree inputs > will be validated when creating a new commit. This defaults > to enabled.
\n
opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)
\n\n\nValidate the target of a symbolic ref when creating it. For > example,
\nfoobaris not a valid ref, thereforefoobaris > not a valid target for a symbolic ref by default, whereas >refs/heads/foobaris. Disabling this bypasses validation > so that an arbitrary strings such asfoobarcan be used > for a symbolic ref target. This defaults to enabled.
opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)
\n\n\nSet the SSL ciphers use for HTTPS connections. > > -
\nciphersis the list of ciphers that are eanbled.
opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)
\n\n\nEnable or disable the use of "offset deltas" when creating packfiles, > and the negotiation of them when talking to a remote server. > Offset deltas store a delta base location as an offset into the > packfile from the current location, which provides a shorter encoding > and thus smaller resultant packfiles. > Packfiles containing offset deltas can still be read. > This defaults to enabled.
\n
opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)
\n\n\nEnable synchronized writes of files in the gitdir using
\nfsync> (or the platform equivalent) to ensure that new object data > is written to permanent storage, not simply cached. This > defaults to disabled.
opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)
\n\n> Enable strict verification of object hashsums when reading > objects from disk. This may impact performance due to an > additional checksum calculation on each object. This defaults > to enabled.\n\n\nopts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)
\n\n> Set the memory allocator to a different memory allocator. This > allocator will then be used to make all memory allocations for > libgit2 operations. If the given `allocator` is NULL, then the > system default will be restored.\n\n\nopts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)
\n\n> Ensure that there are no unsaved changes in the index before > beginning any operation that reloads the index from disk (eg, > checkout). If there are unsaved changes, the instruction will > fail. (Using the FORCE flag to checkout will still overwrite > these changes.)\n\n\nopts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)
\n\n> Get the maximum number of objects libgit2 will allow in a pack > file when downloading a pack file from a remote. This can be > used to limit maximum memory usage when fetching from an untrusted > remote.\n\n\nopts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)
\n\n> Set the maximum number of objects libgit2 will allow in a pack > file when downloading a pack file from a remote.\n\n\nopts(GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS, int enabled) > This will cause .keep file existence checks to be skipped when > accessing packfiles, which can help performance with remote filesystems.
\n\nopts(GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE, int enabled) > When connecting to a server using NTLM or Negotiate > authentication, use expect/continue when POSTing data. > This option is not available on Windows.
opts(GIT_OPT_SET_ODB_PACKED_PRIORITY, int priority) > Override the default priority of the packed ODB backend which > is added when default backends are assigned to a repository
\n\nopts(GIT_OPT_SET_ODB_LOOSE_PRIORITY, int priority) > Override the default priority of the loose ODB backend which > is added when default backends are assigned to a repository
\n\nopts(GIT_OPT_GET_EXTENSIONS, git_strarray *out) > Returns the list of git extensions that are supported. This > is the list of built-in extensions supported by libgit2 and > custom extensions that have been added with > GIT_OPT_SET_EXTENSIONS. Extensions that have been negated > will not be returned. The returned list should be released > with git_strarray_dispose.
opts(GIT_OPT_SET_EXTENSIONS, const char **extensions, size_t len) > Set that the given git extensions are supported by the caller. > Extensions supported by libgit2 may be negated by prefixing > them with a !. For example: setting extensions to > { "!noop", "newext" } indicates that the caller does not want > to support repositories with the noop extension but does want > to support repositories with the newext extension.
opts(GIT_OPT_GET_OWNER_VALIDATION, int *enabled) > Gets the owner validation setting for repository > directories.
\n\nopts(GIT_OPT_SET_OWNER_VALIDATION, int enabled) > Set that repository directories should be owned by the current > user. The default is to validate ownership.
\n\nopts(GIT_OPT_GET_HOMEDIR, git_buf *out) > Gets the current user's home directory, as it will be used > for file lookups. The path is written to the out buffer.
opts(GIT_OPT_SET_HOMEDIR, const char *path) > Sets the directory used as the current user's home directory, > for file lookups. > > - path directory of home directory.
opts(GIT_OPT_GET_SERVER_CONNECT_TIMEOUT, int *timeout) > Gets the timeout (in milliseconds) to attempt connections to > a remote server.
\n\nopts(GIT_OPT_SET_SERVER_CONNECT_TIMEOUT, int timeout) > Sets the timeout (in milliseconds) to attempt connections to > a remote server. Set to 0 to use the system default. Note that > this may not be able to be configured longer than the system > default, typically 75 seconds.
\n\nopts(GIT_OPT_GET_SERVER_TIMEOUT, int *timeout) > Gets the timeout (in milliseconds) for reading from and writing > to a remote server.
\n\nopts(GIT_OPT_SET_SERVER_TIMEOUT, int timeout) > Sets the timeout (in milliseconds) for reading from and writing > to a remote server. Set to 0 to use the system default.
\n", "group": "libgit2" }, "git_config_entry_free": { "type": "function", "file": "git2/config.h", - "line": 76, - "lineto": 76, + "line": 131, + "lineto": 131, "args": [ { - "name": "", + "name": "entry", "type": "git_config_entry *", - "comment": null + "comment": "The entry to free." } ], - "argline": "git_config_entry *", + "argline": "git_config_entry *entry", "sig": "git_config_entry *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free a config entry
\n", + "return": { "type": "void", "comment": null }, + "description": "Free a config entry.
\n", "comments": "", - "group": "config" + "group": "config", + "examples": { + "config.c": [ + "ex/v1.9.1/config.html#git_config_entry_free-1", + "ex/v1.9.1/config.html#git_config_entry_free-2" + ] + } }, "git_config_find_global": { "type": "function", "file": "git2/config.h", - "line": 127, - "lineto": 127, + "line": 183, + "lineto": 183, "args": [ { "name": "out", @@ -4812,14 +4722,14 @@ "comment": " 0 if a global configuration file has been found. Its path will be stored in `out`." }, "description": "Locate the path to the global configuration file
\n", - "comments": "The user or global configuration file is usually\n located in $HOME/.gitconfig.
This method will try to guess the full path to that\n file, if the file exists. The returned path\n may be used on any git_config call to load the\n global configuration file.
This method will not guess the path to the xdg compatible\n config file (.config/git/config).
\n", + "comments": "The user or global configuration file is usually located in $HOME/.gitconfig.
This method will try to guess the full path to that file, if the file exists. The returned path may be used on any git_config call to load the global configuration file.
This method will not guess the path to the xdg compatible config file (.config/git/config).
Locate the path to the global xdg compatible configuration file
\n", - "comments": "The xdg compatible configuration file is usually\n located in $HOME/.config/git/config.
This method will try to guess the full path to that\n file, if the file exists. The returned path\n may be used on any git_config call to load the\n xdg compatible configuration file.
The xdg compatible configuration file is usually located in $HOME/.config/git/config.
This method will try to guess the full path to that file, if the file exists. The returned path may be used on any git_config call to load the xdg compatible configuration file.
Locate the path to the system configuration file
\n", - "comments": "If /etc/gitconfig doesn't exist, it will look for\n %PROGRAMFILES%
\n\n.
\n", + "comments": "If /etc/gitconfig doesn't exist, it will look for %PROGRAMFILES%.
Locate the path to the configuration file in ProgramData
\n", - "comments": "Look for the file in %PROGRAMDATA%
\n\nused by portable git.
\n", + "comments": "Look for the file in %PROGRAMDATA% used by portable git.
Open the global, XDG and system configuration files
\n", - "comments": "Utility wrapper that finds the global, XDG and system configuration files\n and opens them into a single prioritized config object that can be\n used when accessing default config data outside a repository.
\n", + "comments": "Utility wrapper that finds the global, XDG and system configuration files and opens them into a single prioritized config object that can be used when accessing default config data outside a repository.
\n", "group": "config" }, "git_config_new": { "type": "function", "file": "git2/config.h", - "line": 190, - "lineto": 190, + "line": 246, + "lineto": 246, "args": [ { "name": "out", @@ -4917,19 +4824,16 @@ ], "argline": "git_config **out", "sig": "git_config **", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Allocate a new configuration object
\n", - "comments": "This object is empty, so you have to add a file to it before you\n can do anything with it.
\n", + "comments": "This object is empty, so you have to add a file to it before you can do anything with it.
\n", "group": "config" }, "git_config_add_file_ondisk": { "type": "function", "file": "git2/config.h", - "line": 219, - "lineto": 224, + "line": 275, + "lineto": 280, "args": [ { "name": "cfg", @@ -4964,14 +4868,14 @@ "comment": " 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0),\n GIT_ENOTFOUND when the file doesn't exist or error code" }, "description": "Add an on-disk config file instance to an existing config
\n", - "comments": "The on-disk file pointed at by path will be opened and\n parsed; it's expected to be a native Git config file following\n the default Git config syntax (see man git-config).
If the file does not exist, the file will still be added and it\n will be created the first time we write to it.
\n\nNote that the configuration object will free the file\n automatically.
\n\nFurther queries on this config object will access each\n of the config file instances in order (instances with\n a higher priority level will be accessed first).
\n", + "comments": "The on-disk file pointed at by path will be opened and parsed; it's expected to be a native Git config file following the default Git config syntax (see man git-config).
If the file does not exist, the file will still be added and it will be created the first time we write to it.
\n\nNote that the configuration object will free the file automatically.
\n\nFurther queries on this config object will access each of the config file instances in order (instances with a higher priority level will be accessed first).
\n", "group": "config" }, "git_config_open_ondisk": { "type": "function", "file": "git2/config.h", - "line": 238, - "lineto": 238, + "line": 294, + "lineto": 294, "args": [ { "name": "out", @@ -4986,24 +4890,19 @@ ], "argline": "git_config **out, const char *path", "sig": "git_config **::const char *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, + "return": { "type": "int", "comment": " 0 on success, or an error code" }, "description": "Create a new config instance containing a single on-disk file
\n", - "comments": "This method is a simple utility wrapper for the following sequence\n of calls:\n - git_config_new\n - git_config_add_file_ondisk
\n", + "comments": "This method is a simple utility wrapper for the following sequence of calls: - git_config_new - git_config_add_file_ondisk
\n", "group": "config", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_config_open_ondisk-26" - ] + "general.c": ["ex/v1.9.1/general.html#git_config_open_ondisk-26"] } }, "git_config_open_level": { "type": "function", "file": "git2/config.h", - "line": 256, - "lineto": 259, + "line": 312, + "lineto": 315, "args": [ { "name": "out", @@ -5028,14 +4927,14 @@ "comment": " 0, GIT_ENOTFOUND if the passed level cannot be found in the\n multi-level parent config, or an error code" }, "description": "Build a single-level focused config object from a multi-level one.
\n", - "comments": "The returned config object can be used to perform get/set/delete operations\n on a single specific level.
\n\nGetting several times the same level from the same parent multi-level config\n will return different config instances, but containing the same config_file\n instance.
\n", + "comments": "The returned config object can be used to perform get/set/delete operations on a single specific level.
\n\nGetting several times the same level from the same parent multi-level config will return different config instances, but containing the same config_file instance.
\n", "group": "config" }, "git_config_open_global": { "type": "function", "file": "git2/config.h", - "line": 273, - "lineto": 273, + "line": 330, + "lineto": 330, "args": [ { "name": "out", @@ -5050,19 +4949,45 @@ ], "argline": "git_config **out, git_config *config", "sig": "git_config **::git_config *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Open the global/XDG configuration file according to git's rules
\n", - "comments": "Git allows you to store your global configuration at\n $HOME/.gitconfig or $XDG_CONFIG_HOME/git/config. For backwards\n compatability, the XDG file shouldn't be used unless the use has\n created it explicitly. With this function you'll open the correct\n one to write to.
Git allows you to store your global configuration at $HOME/.gitconfig or $XDG_CONFIG_HOME/git/config. For backwards compatibility, the XDG file shouldn't be used unless the use has created it explicitly. With this function you'll open the correct one to write to.
Set the write order for configuration backends. By default, the\n write ordering does not match the read ordering; for example, the\n worktree configuration is a high-priority for reading, but is not\n written to unless explicitly chosen.
\n", + "comments": "", "group": "config" }, "git_config_snapshot": { "type": "function", "file": "git2/config.h", - "line": 289, - "lineto": 289, + "line": 362, + "lineto": 362, "args": [ { "name": "out", @@ -5077,19 +5002,16 @@ ], "argline": "git_config **out, git_config *config", "sig": "git_config **::git_config *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Create a snapshot of the configuration
\n", - "comments": "Create a snapshot of the current state of a configuration, which\n allows you to look into a consistent view of the configuration for\n looking up complex values (e.g. a remote, submodule).
\n\nThe string returned when querying such a config object is valid\n until it is freed.
\n", + "comments": "Create a snapshot of the current state of a configuration, which allows you to look into a consistent view of the configuration for looking up complex values (e.g. a remote, submodule).
\n\nThe string returned when querying such a config object is valid until it is freed.
\n", "group": "config" }, "git_config_free": { "type": "function", "file": "git2/config.h", - "line": 296, - "lineto": 296, + "line": 369, + "lineto": 369, "args": [ { "name": "cfg", @@ -5099,25 +5021,23 @@ ], "argline": "git_config *cfg", "sig": "git_config *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the configuration and its associated memory and files
\n", "comments": "", "group": "config", "examples": { + "config.c": ["ex/v1.9.1/config.html#git_config_free-3"], "general.c": [ - "ex/v0.28.0/general.html#git_config_free-27", - "ex/v0.28.0/general.html#git_config_free-28" + "ex/v1.9.1/general.html#git_config_free-27", + "ex/v1.9.1/general.html#git_config_free-28" ] } }, "git_config_get_entry": { "type": "function", "file": "git2/config.h", - "line": 308, - "lineto": 311, + "line": 381, + "lineto": 384, "args": [ { "name": "out", @@ -5137,89 +5057,83 @@ ], "argline": "git_config_entry **out, const git_config *cfg, const char *name", "sig": "git_config_entry **::const git_config *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the git_config_entry of a config variable.
\n", "comments": "Free the git_config_entry after use with git_config_entry_free().
Get the value of an integer config variable.
\n", + "comments": "All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_config_get_int32-29", - "ex/v0.28.0/general.html#git_config_get_int32-30" + "ex/v1.9.1/general.html#git_config_get_int32-29", + "ex/v1.9.1/general.html#git_config_get_int32-30" ] } }, "git_config_get_int64": { "type": "function", "file": "git2/config.h", - "line": 339, - "lineto": 339, + "line": 412, + "lineto": 412, "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int64_t *", + "comment": "pointer to the variable where the value should be stored" }, { "name": "cfg", "type": "const git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" } ], - "argline": "int *out, const git_config *cfg, const char *name", - "sig": "int *::const git_config *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", + "argline": "int64_t *out, const git_config *cfg, const char *name", + "sig": "int64_t *::const git_config *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Get the value of a long integer config variable.
\n", + "comments": "All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config" }, "git_config_get_bool": { "type": "function", "file": "git2/config.h", - "line": 356, - "lineto": 356, + "line": 429, + "lineto": 429, "args": [ { "name": "out", @@ -5239,19 +5153,16 @@ ], "argline": "int *out, const git_config *cfg, const char *name", "sig": "int *::const git_config *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the value of a boolean config variable.
\n", - "comments": "This function uses the usual C convention of 0 being false and\n anything else true.
\n\nAll config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.
\n", + "comments": "This function uses the usual C convention of 0 being false and anything else true.
\n\nAll config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config" }, "git_config_get_path": { "type": "function", "file": "git2/config.h", - "line": 374, - "lineto": 374, + "line": 447, + "lineto": 447, "args": [ { "name": "out", @@ -5271,19 +5182,16 @@ ], "argline": "git_buf *out, const git_config *cfg, const char *name", "sig": "git_buf *::const git_config *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the value of a path config variable.
\n", - "comments": "A leading '~' will be expanded to the global search path (which\n defaults to the user's home directory but can be overridden via\n git_libgit2_opts().
All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.
\n", + "comments": "A leading '~' will be expanded to the global search path (which defaults to the user's home directory but can be overridden via git_libgit2_opts().
All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config" }, "git_config_get_string": { "type": "function", "file": "git2/config.h", - "line": 392, - "lineto": 392, + "line": 465, + "lineto": 465, "args": [ { "name": "out", @@ -5303,25 +5211,22 @@ ], "argline": "const char **out, const git_config *cfg, const char *name", "sig": "const char **::const git_config *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the value of a string config variable.
\n", - "comments": "This function can only be used on snapshot config objects. The\n string is owned by the config and should not be freed by the\n user. The pointer will be valid until the config is freed.
\n\nAll config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.
\n", + "comments": "This function can only be used on snapshot config objects. The string is owned by the config and should not be freed by the user. The pointer will be valid until the config is freed.
\n\nAll config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_config_get_string-31", - "ex/v0.28.0/general.html#git_config_get_string-32" + "ex/v1.9.1/general.html#git_config_get_string-31", + "ex/v1.9.1/general.html#git_config_get_string-32" ] } }, "git_config_get_string_buf": { "type": "function", "file": "git2/config.h", - "line": 408, - "lineto": 408, + "line": 481, + "lineto": 481, "args": [ { "name": "out", @@ -5341,19 +5246,16 @@ ], "argline": "git_buf *out, const git_config *cfg, const char *name", "sig": "git_buf *::const git_config *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the value of a string config variable.
\n", - "comments": "The value of the config will be copied into the buffer.
\n\nAll config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.
\n", + "comments": "The value of the config will be copied into the buffer.
\n\nAll config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config" }, "git_config_get_multivar_foreach": { "type": "function", "file": "git2/config.h", - "line": 426, - "lineto": 426, + "line": 500, + "lineto": 500, "args": [ { "name": "cfg", @@ -5383,19 +5285,16 @@ ], "argline": "const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload", "sig": "const git_config *::const char *::const char *::git_config_foreach_cb::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Get each value of a multivar in a foreach callback
\n", - "comments": "The callback will be called on each variable found
\n\nThe regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.
\n", + "comments": "The callback will be called on each variable found
\n\nThe regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n", "group": "config" }, "git_config_multivar_iterator_new": { "type": "function", "file": "git2/config.h", - "line": 441, - "lineto": 441, + "line": 516, + "lineto": 516, "args": [ { "name": "out", @@ -5420,19 +5319,16 @@ ], "argline": "git_config_iterator **out, const git_config *cfg, const char *name, const char *regexp", "sig": "git_config_iterator **::const git_config *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Get each value of a multivar
\n", - "comments": "The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.
\n", + "comments": "The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n", "group": "config" }, "git_config_next": { "type": "function", "file": "git2/config.h", - "line": 453, - "lineto": 453, + "line": 528, + "lineto": 528, "args": [ { "name": "entry", @@ -5452,14 +5348,14 @@ "comment": " 0 or an error code. GIT_ITEROVER if the iteration has completed" }, "description": "Return the current entry and advance the iterator
\n", - "comments": "The pointers returned by this function are valid until the iterator\n is freed.
\n", + "comments": "The pointers returned by this function are valid until the next call to git_config_next or until the iterator is freed.
Free a config iterator
\n", "comments": "", "group": "config" @@ -5480,72 +5373,66 @@ "git_config_set_int32": { "type": "function", "file": "git2/config.h", - "line": 471, - "lineto": 471, + "line": 546, + "lineto": 546, "args": [ { "name": "cfg", "type": "git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" }, { "name": "value", - "type": "int", - "comment": null + "type": "int32_t", + "comment": "Integer value for the variable" } ], - "argline": "git_config *cfg, const char *name, int value", - "sig": "git_config *::const char *::int", - "return": { - "type": "int", - "comment": null - }, - "description": "", + "argline": "git_config *cfg, const char *name, int32_t value", + "sig": "git_config *::const char *::int32_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Set the value of an integer config variable in the config file\n with the highest level (usually the local one).
\n", "comments": "", "group": "config" }, "git_config_set_int64": { "type": "function", "file": "git2/config.h", - "line": 482, - "lineto": 482, + "line": 557, + "lineto": 557, "args": [ { "name": "cfg", "type": "git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" }, { "name": "value", - "type": "int", - "comment": null + "type": "int64_t", + "comment": "Long integer value for the variable" } ], - "argline": "git_config *cfg, const char *name, int value", - "sig": "git_config *::const char *::int", - "return": { - "type": "int", - "comment": null - }, - "description": "", + "argline": "git_config *cfg, const char *name, int64_t value", + "sig": "git_config *::const char *::int64_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Set the value of a long integer config variable in the config file\n with the highest level (usually the local one).
\n", "comments": "", "group": "config" }, "git_config_set_bool": { "type": "function", "file": "git2/config.h", - "line": 493, - "lineto": 493, + "line": 568, + "lineto": 568, "args": [ { "name": "cfg", @@ -5557,18 +5444,11 @@ "type": "const char *", "comment": "the variable's name" }, - { - "name": "value", - "type": "int", - "comment": "the value to store" - } + { "name": "value", "type": "int", "comment": "the value to store" } ], "argline": "git_config *cfg, const char *name, int value", "sig": "git_config *::const char *::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Set the value of a boolean config variable in the config file\n with the highest level (usually the local one).
\n", "comments": "", "group": "config" @@ -5576,8 +5456,8 @@ "git_config_set_string": { "type": "function", "file": "git2/config.h", - "line": 507, - "lineto": 507, + "line": 582, + "lineto": 582, "args": [ { "name": "cfg", @@ -5597,19 +5477,19 @@ ], "argline": "git_config *cfg, const char *name, const char *value", "sig": "git_config *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Set the value of a string config variable in the config file\n with the highest level (usually the local one).
\n", - "comments": "A copy of the string is made and the user is free to use it\n afterwards.
\n", - "group": "config" + "comments": "A copy of the string is made and the user is free to use it afterwards.
\n", + "group": "config", + "examples": { + "config.c": ["ex/v1.9.1/config.html#git_config_set_string-5"] + } }, "git_config_set_multivar": { "type": "function", "file": "git2/config.h", - "line": 519, - "lineto": 519, + "line": 595, + "lineto": 595, "args": [ { "name": "cfg", @@ -5626,18 +5506,11 @@ "type": "const char *", "comment": "a regular expression to indicate which values to replace" }, - { - "name": "value", - "type": "const char *", - "comment": "the new value." - } + { "name": "value", "type": "const char *", "comment": "the new value." } ], "argline": "git_config *cfg, const char *name, const char *regexp, const char *value", "sig": "git_config *::const char *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Set a multivar in the local config file.
\n", "comments": "The regular expression is applied case-sensitively on the value.
\n", "group": "config" @@ -5645,8 +5518,8 @@ "git_config_delete_entry": { "type": "function", "file": "git2/config.h", - "line": 528, - "lineto": 528, + "line": 605, + "lineto": 605, "args": [ { "name": "cfg", @@ -5661,10 +5534,7 @@ ], "argline": "git_config *cfg, const char *name", "sig": "git_config *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Delete a config variable from the config file\n with the highest level (usually the local one).
\n", "comments": "", "group": "config" @@ -5672,8 +5542,8 @@ "git_config_delete_multivar": { "type": "function", "file": "git2/config.h", - "line": 541, - "lineto": 541, + "line": 618, + "lineto": 618, "args": [ { "name": "cfg", @@ -5693,10 +5563,7 @@ ], "argline": "git_config *cfg, const char *name, const char *regexp", "sig": "git_config *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Deletes one or several entries from a multivar in the local config file.
\n", "comments": "The regular expression is applied case-sensitively on the value.
\n", "group": "config" @@ -5704,8 +5571,8 @@ "git_config_foreach": { "type": "function", "file": "git2/config.h", - "line": 559, - "lineto": 562, + "line": 636, + "lineto": 639, "args": [ { "name": "cfg", @@ -5730,14 +5597,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "Perform an operation on each config variable.
\n", - "comments": "The callback receives the normalized name and value of each variable\n in the config backend, and the data pointer passed to this function.\n If the callback returns a non-zero value, the function stops iterating\n and returns that value to the caller.
\n\nThe pointers passed to the callback are only valid as long as the\n iteration is ongoing.
\n", + "comments": "The callback receives the normalized name and value of each variable in the config backend, and the data pointer passed to this function. If the callback returns a non-zero value, the function stops iterating and returns that value to the caller.
\n\nThe pointers passed to the callback are only valid as long as the iteration is ongoing.
\n", "group": "config" }, "git_config_iterator_new": { "type": "function", "file": "git2/config.h", - "line": 573, - "lineto": 573, + "line": 651, + "lineto": 651, "args": [ { "name": "out", @@ -5747,24 +5614,21 @@ { "name": "cfg", "type": "const git_config *", - "comment": "where to ge the variables from" + "comment": "where to get the variables from" } ], "argline": "git_config_iterator **out, const git_config *cfg", "sig": "git_config_iterator **::const git_config *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Iterate over all the config variables
\n", - "comments": "Use git_config_next to advance the iteration and\n git_config_iterator_free when done.
Use git_config_next to advance the iteration and git_config_iterator_free when done.
Iterate over all the config variables whose name matches a pattern
\n", - "comments": "Use git_config_next to advance the iteration and\n git_config_iterator_free when done.
The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.
\n", + "comments": "Use git_config_next to advance the iteration and git_config_iterator_free when done.
The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n", "group": "config" }, "git_config_foreach_match": { "type": "function", "file": "git2/config.h", - "line": 611, - "lineto": 615, + "line": 690, + "lineto": 694, "args": [ { "name": "cfg", @@ -5826,14 +5687,14 @@ "comment": " 0 or the return value of the callback which didn't return 0" }, "description": "Perform an operation on each config variable matching a regular expression.
\n", - "comments": "This behaves like git_config_foreach with an additional filter of a\n regular expression that filters which config keys are passed to the\n callback.
The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.
\n\nThe regular expression is applied case-sensitively on the normalized form of\n the variable name: the case-insensitive parts are lower-case.
\n", + "comments": "This behaves like git_config_foreach with an additional filter of a regular expression that filters which config keys are passed to the callback.
The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n\nThe regular expression is applied case-sensitively on the normalized form of the variable name: the case-insensitive parts are lower-case.
\n", "group": "config" }, "git_config_get_mapped": { "type": "function", "file": "git2/config.h", - "line": 651, - "lineto": 656, + "line": 730, + "lineto": 735, "args": [ { "name": "out", @@ -5852,8 +5713,8 @@ }, { "name": "maps", - "type": "const git_cvar_map *", - "comment": "array of `git_cvar_map` objects specifying the possible mappings" + "type": "const git_configmap *", + "comment": "array of `git_configmap` objects specifying the possible mappings" }, { "name": "map_n", @@ -5861,21 +5722,21 @@ "comment": "number of mapping objects in `maps`" } ], - "argline": "int *out, const git_config *cfg, const char *name, const git_cvar_map *maps, size_t map_n", - "sig": "int *::const git_config *::const char *::const git_cvar_map *::size_t", + "argline": "int *out, const git_config *cfg, const char *name, const git_configmap *maps, size_t map_n", + "sig": "int *::const git_config *::const char *::const git_configmap *::size_t", "return": { "type": "int", "comment": " 0 on success, error code otherwise" }, "description": "Query the value of a config variable and return it mapped to\n an integer constant.
\n", - "comments": "This is a helper method to easily map different possible values\n to a variable to integer constants that easily identify them.
\n\nA mapping array looks as follows:
\n\ngit_cvar_map autocrlf_mapping[] = {\n {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},\n {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},\n {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},\n {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n\n\nOn any "false" value for the variable (e.g. "false", "FALSE", "no"), the\n mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.
The same thing applies for any "true" value such as "true", "yes" or "1", storing\n the GIT_AUTO_CRLF_TRUE variable.
Otherwise, if the value matches the string "input" (with case insensitive comparison),\n the given constant will be stored in out, and likewise for "default".
If not a single match can be made to store in out, an error code will be\n returned.
This is a helper method to easily map different possible values to a variable to integer constants that easily identify them.
\n\nA mapping array looks as follows:
\n\ngit_configmap autocrlf_mapping[] = { {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE}, {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE}, {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT}, {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n\n\nOn any "false" value for the variable (e.g. "false", "FALSE", "no"), the mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.
The same thing applies for any "true" value such as "true", "yes" or "1", storing the GIT_AUTO_CRLF_TRUE variable.
Otherwise, if the value matches the string "input" (with case insensitive comparison), the given constant will be stored in out, and likewise for "default".
If not a single match can be made to store in out, an error code will be returned.
Maps a string value to an integer constant
\n", "comments": "", "group": "config" @@ -5911,89 +5765,68 @@ "git_config_parse_bool": { "type": "function", "file": "git2/config.h", - "line": 682, - "lineto": 682, + "line": 763, + "lineto": 763, "args": [ { "name": "out", "type": "int *", "comment": "place to store the result of the parsing" }, - { - "name": "value", - "type": "const char *", - "comment": "value to parse" - } + { "name": "value", "type": "const char *", "comment": "value to parse" } ], "argline": "int *out, const char *value", "sig": "int *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Parse a string value as a bool.
\n", - "comments": "Valid values for true are: 'true', 'yes', 'on', 1 or any\n number different from 0\n Valid values for false are: 'false', 'no', 'off', 0
\n", + "comments": "Valid values for true are: 'true', 'yes', 'on', 1 or any number different from 0 Valid values for false are: 'false', 'no', 'off', 0
\n", "group": "config" }, "git_config_parse_int32": { "type": "function", "file": "git2/config.h", - "line": 694, - "lineto": 694, + "line": 776, + "lineto": 776, "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int32_t *", + "comment": "place to store the result of the parsing" }, - { - "name": "value", - "type": "const char *", - "comment": null - } + { "name": "value", "type": "const char *", "comment": "value to parse" } ], - "argline": "int *out, const char *value", - "sig": "int *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", + "argline": "int32_t *out, const char *value", + "sig": "int32_t *::const char *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Parse a string value as an int32.
\n", + "comments": "An optional value suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output.
\n", "group": "config" }, "git_config_parse_int64": { "type": "function", "file": "git2/config.h", - "line": 706, - "lineto": 706, + "line": 789, + "lineto": 789, "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int64_t *", + "comment": "place to store the result of the parsing" }, - { - "name": "value", - "type": "const char *", - "comment": null - } + { "name": "value", "type": "const char *", "comment": "value to parse" } ], - "argline": "int *out, const char *value", - "sig": "int *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", + "argline": "int64_t *out, const char *value", + "sig": "int64_t *::const char *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Parse a string value as an int64.
\n", + "comments": "An optional value suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output.
\n", "group": "config" }, "git_config_parse_path": { "type": "function", "file": "git2/config.h", - "line": 721, - "lineto": 721, + "line": 805, + "lineto": 805, "args": [ { "name": "out", @@ -6008,19 +5841,16 @@ ], "argline": "git_buf *out, const char *value", "sig": "git_buf *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Parse a string value as a path.
\n", - "comments": "A leading '~' will be expanded to the global search path (which\n defaults to the user's home directory but can be overridden via\n git_libgit2_opts().
If the value does not begin with a tilde, the input will be\n returned.
\n", + "comments": "A leading '~' will be expanded to the global search path (which defaults to the user's home directory but can be overridden via git_libgit2_opts().
If the value does not begin with a tilde, the input will be returned.
\n", "group": "config" }, "git_config_backend_foreach_match": { "type": "function", "file": "git2/config.h", - "line": 739, - "lineto": 743, + "line": 824, + "lineto": 828, "args": [ { "name": "backend", @@ -6045,19 +5875,16 @@ ], "argline": "git_config_backend *backend, const char *regexp, git_config_foreach_cb callback, void *payload", "sig": "git_config_backend *::const char *::git_config_foreach_cb::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Perform an operation on each config variable in a given config backend,\n matching a regular expression.
\n", - "comments": "This behaves like git_config_foreach_match except that only config\n entries from the given backend entry are enumerated.
The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.
\n", + "comments": "This behaves like git_config_foreach_match except that only config entries from the given backend entry are enumerated.
The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n", "group": "config" }, "git_config_lock": { "type": "function", "file": "git2/config.h", - "line": 762, - "lineto": 762, + "line": 847, + "lineto": 847, "args": [ { "name": "tx", @@ -6072,18673 +5899,15548 @@ ], "argline": "git_transaction **tx, git_config *cfg", "sig": "git_transaction **::git_config *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lock the backend with the highest priority
\n", - "comments": "Locking disallows anybody else from writing to that backend. Any\n updates made after locking will not be visible to a reader until\n the file is unlocked.
\n\nYou can apply the changes by calling git_transaction_commit()\n before freeing the transaction. Either of these actions will unlock\n the config.
Locking disallows anybody else from writing to that backend. Any updates made after locking will not be visible to a reader until the file is unlocked.
\n\nYou can apply the changes by calling git_transaction_commit() before freeing the transaction. Either of these actions will unlock the config.
Free a credential.
\n", + "comments": "This is only necessary if you own the object; that is, if you are a transport.
\n", + "group": "credential" + }, + "git_credential_has_username": { + "type": "function", + "file": "git2/credential.h", + "line": 157, + "lineto": 157, + "args": [ { - "name": "payload", - "type": "void *", - "comment": "The payload provided when specifying this callback. (This is\n interpreted as a `git_cred_userpass_payload*`.)" + "name": "cred", + "type": "git_credential *", + "comment": "object to check" } ], - "argline": "git_cred **cred, const char *url, const char *user_from_url, unsigned int allowed_types, void *payload", - "sig": "git_cred **::const char *::const char *::unsigned int::void *", + "argline": "git_credential *cred", + "sig": "git_credential *", "return": { "type": "int", - "comment": null + "comment": " 1 if the credential object has non-NULL username, 0 otherwise" }, - "description": "Stock callback usable as a git_cred_acquire_cb. This calls\n git_cred_userpass_plaintext_new unless the protocol has not specified\n GIT_CREDTYPE_USERPASS_PLAINTEXT as an allowed type.
Check whether a credential object contains username information.
\n", "comments": "", - "group": "cred" + "group": "credential" }, - "git_buf_free": { + "git_credential_get_username": { "type": "function", - "file": "git2/deprecated.h", - "line": 51, - "lineto": 51, + "file": "git2/credential.h", + "line": 165, + "lineto": 165, "args": [ { - "name": "buffer", - "type": "git_buf *", - "comment": null + "name": "cred", + "type": "git_credential *", + "comment": "object to check" } ], - "argline": "git_buf *buffer", - "sig": "git_buf *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free the memory referred to by the git_buf. This is an alias of\n git_buf_dispose and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this\n function at this time.
\n", - "group": "buf" - }, - "giterr_last": { - "type": "function", - "file": "git2/deprecated.h", - "line": 112, - "lineto": 112, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "const git_error *", - "comment": null - }, - "description": "Return the last git_error object that was generated for the\n current thread. This is an alias of git_error_last and is\n preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this\n function at this time.
\n", - "group": "giterr" - }, - "giterr_clear": { - "type": "function", - "file": "git2/deprecated.h", - "line": 124, - "lineto": 124, - "args": [], - "argline": "", - "sig": "", + "argline": "git_credential *cred", + "sig": "git_credential *", "return": { - "type": "void", - "comment": null + "type": "const char *", + "comment": " the credential username, or NULL if not applicable" }, - "description": "Clear the last error. This is an alias of git_error_last and is\n preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this\n function at this time.
\n", - "group": "giterr" + "description": "Return the username associated with a credential object.
\n", + "comments": "", + "group": "credential" }, - "giterr_set_str": { + "git_credential_userpass_plaintext_new": { "type": "function", - "file": "git2/deprecated.h", - "line": 136, - "lineto": 136, + "file": "git2/credential.h", + "line": 176, + "lineto": 179, "args": [ { - "name": "error_class", - "type": "int", - "comment": null + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "string", + "name": "username", "type": "const char *", - "comment": null + "comment": "The username of the credential." + }, + { + "name": "password", + "type": "const char *", + "comment": "The password of the credential." } ], - "argline": "int error_class, const char *string", - "sig": "int::const char *", - "return": { - "type": "void", - "comment": null - }, - "description": "Sets the error message to the given string. This is an alias of\n git_error_set_str and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this\n function at this time.
\n", - "group": "giterr" - }, - "giterr_set_oom": { - "type": "function", - "file": "git2/deprecated.h", - "line": 148, - "lineto": 148, - "args": [], - "argline": "", - "sig": "", + "argline": "git_credential **out, const char *username, const char *password", + "sig": "git_credential **::const char *::const char *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 for success or an error code for failure" }, - "description": "Indicates that an out-of-memory situation occured. This is an alias\n of git_error_set_oom and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this\n function at this time.
\n", - "group": "giterr" + "description": "Create a new plain-text username and password credential object.\n The supplied credential parameter will be internally duplicated.
\n", + "comments": "", + "group": "credential" }, - "git_describe_init_options": { + "git_credential_default_new": { "type": "function", - "file": "git2/describe.h", - "line": 82, - "lineto": 82, + "file": "git2/credential.h", + "line": 188, + "lineto": 188, "args": [ { - "name": "opts", - "type": "git_describe_options *", - "comment": "The `git_describe_options` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`." + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." } ], - "argline": "git_describe_options *opts, unsigned int version", - "sig": "git_describe_options *::unsigned int", + "argline": "git_credential **out", + "sig": "git_credential **", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0 for success or an error code for failure" }, - "description": "Initialize git_describe_options structure
\n", - "comments": "Initializes a git_describe_options with default values. Equivalent to creating\n an instance with GIT_DESCRIBE_OPTIONS_INIT.
Create a "default" credential usable for Negotiate mechanisms like NTLM\n or Kerberos authentication.
\n", + "comments": "", + "group": "credential" }, - "git_describe_init_format_options": { + "git_credential_username_new": { "type": "function", - "file": "git2/describe.h", - "line": 129, - "lineto": 129, + "file": "git2/credential.h", + "line": 200, + "lineto": 200, "args": [ { - "name": "opts", - "type": "git_describe_format_options *", - "comment": "The `git_describe_format_options` struct to initialize." + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`." + "name": "username", + "type": "const char *", + "comment": "The username to authenticate with" } ], - "argline": "git_describe_format_options *opts, unsigned int version", - "sig": "git_describe_format_options *::unsigned int", + "argline": "git_credential **out, const char *username", + "sig": "git_credential **::const char *", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0 for success or an error code for failure" }, - "description": "Initialize git_describe_format_options structure
\n", - "comments": "Initializes a git_describe_format_options with default values. Equivalent to creating\n an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.
Create a credential to specify a username.
\n", + "comments": "This is used with ssh authentication to query for the username if none is specified in the url.
\n", + "group": "credential" }, - "git_describe_commit": { + "git_credential_ssh_key_new": { "type": "function", - "file": "git2/describe.h", - "line": 146, - "lineto": 149, + "file": "git2/credential.h", + "line": 213, + "lineto": 218, "args": [ { - "name": "result", - "type": "git_describe_result **", - "comment": "pointer to store the result. You must free this once\n you're done with it." + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "committish", - "type": "git_object *", - "comment": "a committish to describe" + "name": "username", + "type": "const char *", + "comment": "username to use to authenticate" }, { - "name": "opts", - "type": "git_describe_options *", - "comment": "the lookup options (or NULL for defaults)" + "name": "publickey", + "type": "const char *", + "comment": "The path to the public key of the credential." + }, + { + "name": "privatekey", + "type": "const char *", + "comment": "The path to the private key of the credential." + }, + { + "name": "passphrase", + "type": "const char *", + "comment": "The passphrase of the credential." } ], - "argline": "git_describe_result **result, git_object *committish, git_describe_options *opts", - "sig": "git_describe_result **::git_object *::git_describe_options *", + "argline": "git_credential **out, const char *username, const char *publickey, const char *privatekey, const char *passphrase", + "sig": "git_credential **::const char *::const char *::const char *::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 for success or an error code for failure" }, - "description": "Describe a commit
\n", - "comments": "Perform the describe operation on the given committish object.
\n", - "group": "describe", - "examples": { - "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_commit-3" - ] - } + "description": "Create a new passphrase-protected ssh key credential object.\n The supplied credential parameter will be internally duplicated.
\n", + "comments": "", + "group": "credential" }, - "git_describe_workdir": { + "git_credential_ssh_key_memory_new": { "type": "function", - "file": "git2/describe.h", - "line": 163, - "lineto": 166, + "file": "git2/credential.h", + "line": 230, + "lineto": 235, "args": [ { "name": "out", - "type": "git_describe_result **", - "comment": "pointer to store the result. You must free this once\n you're done with it." + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to perform the describe" + "name": "username", + "type": "const char *", + "comment": "username to use to authenticate." }, { - "name": "opts", - "type": "git_describe_options *", - "comment": "the lookup options (or NULL for defaults)" + "name": "publickey", + "type": "const char *", + "comment": "The public key of the credential." + }, + { + "name": "privatekey", + "type": "const char *", + "comment": "The private key of the credential." + }, + { + "name": "passphrase", + "type": "const char *", + "comment": "The passphrase of the credential." } ], - "argline": "git_describe_result **out, git_repository *repo, git_describe_options *opts", - "sig": "git_describe_result **::git_repository *::git_describe_options *", + "argline": "git_credential **out, const char *username, const char *publickey, const char *privatekey, const char *passphrase", + "sig": "git_credential **::const char *::const char *::const char *::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 for success or an error code for failure" }, - "description": "Describe a commit
\n", - "comments": "Perform the describe operation on the current commit and the\n worktree. After peforming describe on HEAD, a status is run and the\n description is considered to be dirty if there are.
\n", - "group": "describe", - "examples": { - "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_workdir-4" - ] - } + "description": "Create a new ssh key credential object reading the keys from memory.
\n", + "comments": "", + "group": "credential" }, - "git_describe_format": { + "git_credential_ssh_interactive_new": { "type": "function", - "file": "git2/describe.h", - "line": 176, - "lineto": 179, + "file": "git2/credential.h", + "line": 278, + "lineto": 282, "args": [ { "name": "out", - "type": "git_buf *", - "comment": "The buffer to store the result" + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "result", - "type": "const git_describe_result *", - "comment": "the result from `git_describe_commit()` or\n `git_describe_workdir()`." + "name": "username", + "type": "const char *", + "comment": "Username to use to authenticate." }, { - "name": "opts", - "type": "const git_describe_format_options *", - "comment": "the formatting options (or NULL for defaults)" + "name": "prompt_callback", + "type": "git_credential_ssh_interactive_cb", + "comment": "The callback method used for prompts." + }, + { + "name": "payload", + "type": "void *", + "comment": "Additional data to pass to the callback." } ], - "argline": "git_buf *out, const git_describe_result *result, const git_describe_format_options *opts", - "sig": "git_buf *::const git_describe_result *::const git_describe_format_options *", + "argline": "git_credential **out, const char *username, git_credential_ssh_interactive_cb prompt_callback, void *payload", + "sig": "git_credential **::const char *::git_credential_ssh_interactive_cb::void *", "return": { "type": "int", - "comment": null + "comment": " 0 for success or an error code for failure." }, - "description": "Print the describe result to a buffer
\n", + "description": "Create a new ssh keyboard-interactive based credential object.\n The supplied credential parameter will be internally duplicated.
\n", "comments": "", - "group": "describe", - "examples": { - "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_format-5" - ] - } + "group": "credential" }, - "git_describe_result_free": { + "git_credential_ssh_key_from_agent": { "type": "function", - "file": "git2/describe.h", - "line": 184, - "lineto": 184, + "file": "git2/credential.h", + "line": 292, + "lineto": 294, "args": [ { - "name": "result", - "type": "git_describe_result *", - "comment": null + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." + }, + { + "name": "username", + "type": "const char *", + "comment": "username to use to authenticate" } ], - "argline": "git_describe_result *result", - "sig": "git_describe_result *", + "argline": "git_credential **out, const char *username", + "sig": "git_credential **::const char *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 for success or an error code for failure" }, - "description": "Free the describe result.
\n", + "description": "Create a new ssh key credential object used for querying an ssh-agent.\n The supplied credential parameter will be internally duplicated.
\n", "comments": "", - "group": "describe" + "group": "credential" }, - "git_diff_init_options": { + "git_credential_ssh_custom_new": { "type": "function", - "file": "git2/diff.h", - "line": 454, - "lineto": 456, + "file": "git2/credential.h", + "line": 332, + "lineto": 338, "args": [ { - "name": "opts", - "type": "git_diff_options *", - "comment": "The `git_diff_options` struct to initialize." + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_DIFF_OPTIONS_VERSION`." + "name": "username", + "type": "const char *", + "comment": "username to use to authenticate" + }, + { + "name": "publickey", + "type": "const char *", + "comment": "The bytes of the public key." + }, + { + "name": "publickey_len", + "type": "size_t", + "comment": "The length of the public key in bytes." + }, + { + "name": "sign_callback", + "type": "git_credential_sign_cb", + "comment": "The callback method to sign the data during the challenge." + }, + { + "name": "payload", + "type": "void *", + "comment": "Additional data to pass to the callback." } ], - "argline": "git_diff_options *opts, unsigned int version", - "sig": "git_diff_options *::unsigned int", + "argline": "git_credential **out, const char *username, const char *publickey, size_t publickey_len, git_credential_sign_cb sign_callback, void *payload", + "sig": "git_credential **::const char *::const char *::size_t::git_credential_sign_cb::void *", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0 for success or an error code for failure" }, - "description": "Initialize git_diff_options structure
\n", - "comments": "Initializes a git_diff_options with default values. Equivalent to creating\n an instance with GIT_DIFF_OPTIONS_INIT.
Create an ssh key credential with a custom signing function.
\n", + "comments": "This lets you use your own function to sign the challenge.
\n\nThis function and its credential type is provided for completeness and wraps libssh2_userauth_publickey(), which is undocumented.
The supplied credential parameter will be internally duplicated.
\n", + "group": "credential" }, - "git_diff_find_init_options": { + "git_credential_userpass": { "type": "function", - "file": "git2/diff.h", - "line": 787, - "lineto": 789, + "file": "git2/credential_helpers.h", + "line": 44, + "lineto": 49, "args": [ { - "name": "opts", - "type": "git_diff_find_options *", - "comment": "The `git_diff_find_options` struct to initialize." + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "version", + "name": "url", + "type": "const char *", + "comment": "The resource for which we are demanding a credential." + }, + { + "name": "user_from_url", + "type": "const char *", + "comment": "The username that was embedded in a \"user\n@\nhost\"\n remote url, or NULL if not included." + }, + { + "name": "allowed_types", "type": "unsigned int", - "comment": "The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`." + "comment": "A bitmask stating which credential types are OK to return." + }, + { + "name": "payload", + "type": "void *", + "comment": "The payload provided when specifying this callback. (This is\n interpreted as a `git_credential_userpass_payload*`.)" } ], - "argline": "git_diff_find_options *opts, unsigned int version", - "sig": "git_diff_find_options *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initialize git_diff_find_options structure
\n", - "comments": "Initializes a git_diff_find_options with default values. Equivalent to creating\n an instance with GIT_DIFF_FIND_OPTIONS_INIT.
Stock callback usable as a git_credential_acquire_cb. This calls\n git_cred_userpass_plaintext_new unless the protocol has not specified\n GIT_CREDENTIAL_USERPASS_PLAINTEXT as an allowed type.
Deallocate a diff.
\n", + "argline": "git_buf *out, git_blob *blob, const char *as_path, int check_for_binary_data", + "sig": "git_buf *::git_blob *::const char *::int", + "return": { "type": "int", "comment": null }, + "description": "Deprecated in favor of git_blob_filter.
Deprecated in favor of git_filter_list_stream_buffer.
Deprecated in favor of git_filter_list_apply_to_buffer.
Write the contents of the tree builder as a tree object.\n This is an alias of git_treebuilder_write and is preserved\n for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "treebuilder" + }, + "git_buf_grow": { + "type": "function", + "file": "git2/deprecated.h", + "line": 229, + "lineto": 229, "args": [ { - "name": "diff", - "type": "git_diff **", - "comment": "Output pointer to a git_diff pointer to be allocated." - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "The repository containing the trees." - }, - { - "name": "old_tree", - "type": "git_tree *", - "comment": "A git_tree object to diff from, or NULL for empty tree." - }, - { - "name": "new_tree", - "type": "git_tree *", - "comment": "A git_tree object to diff to, or NULL for empty tree." + "name": "buffer", + "type": "git_buf *", + "comment": "The buffer to be resized; may or may not be allocated yet" }, { - "name": "opts", - "type": "const git_diff_options *", - "comment": "Structure with options to influence diff or NULL for defaults." + "name": "target_size", + "type": "size_t", + "comment": "The desired available size" } ], - "argline": "git_diff **diff, git_repository *repo, git_tree *old_tree, git_tree *new_tree, const git_diff_options *opts", - "sig": "git_diff **::git_repository *::git_tree *::git_tree *::const git_diff_options *", + "argline": "git_buf *buffer, size_t target_size", + "sig": "git_buf *::size_t", "return": { "type": "int", - "comment": null + "comment": " 0 on success, -1 on allocation failure" }, - "description": "Create a diff with the difference between two tree objects.
\n", - "comments": "This is equivalent to git diff \n<old\n-tree> \n<new\n-tree>
The first tree will be used for the "old_file" side of the delta and the\n second tree will be used for the "new_file" side of the delta. You can\n pass NULL to indicate an empty tree, although it is an error to pass\n NULL for both the old_tree and new_tree.
Resize the buffer allocation to make more space.
\n", + "comments": "This will attempt to grow the buffer to accommodate the target size.
\n\nIf the buffer refers to memory that was not allocated by libgit2 (i.e. the asize field is zero), then ptr will be replaced with a newly allocated block of data. Be careful so that memory allocated by the caller is not lost. As a special variant, if you pass target_size as 0 and the memory is not allocated by libgit2, this will allocate a new buffer of size size and copy the external data into it.
Currently, this will never shrink a buffer, only expand it.
\n\nIf the allocation fails, this will return an error and the buffer will be marked as invalid for future operations, invaliding the contents.
\n", + "group": "buf" }, - "git_diff_tree_to_index": { + "git_buf_set": { "type": "function", - "file": "git2/diff.h", - "line": 847, - "lineto": 852, + "file": "git2/deprecated.h", + "line": 239, + "lineto": 240, "args": [ { - "name": "diff", - "type": "git_diff **", - "comment": "Output pointer to a git_diff pointer to be allocated." + "name": "buffer", + "type": "git_buf *", + "comment": "The buffer to set" }, { - "name": "repo", - "type": "git_repository *", - "comment": "The repository containing the tree and index." - }, - { - "name": "old_tree", - "type": "git_tree *", - "comment": "A git_tree object to diff from, or NULL for empty tree." - }, - { - "name": "index", - "type": "git_index *", - "comment": "The index to diff with; repo index used if NULL." - }, - { - "name": "opts", - "type": "const git_diff_options *", - "comment": "Structure with options to influence diff or NULL for defaults." - } - ], - "argline": "git_diff **diff, git_repository *repo, git_tree *old_tree, git_index *index, const git_diff_options *opts", - "sig": "git_diff **::git_repository *::git_tree *::git_index *::const git_diff_options *", - "return": { - "type": "int", - "comment": null - }, - "description": "Create a diff between a tree and repository index.
\n", - "comments": "This is equivalent to `git diff --cached \n<treeish
\n\n\n\n\n\n
or if you pass\n the HEAD tree, then likegit diff --cached`.
The tree you pass will be used for the "old_file" side of the delta, and\n the index will be used for the "new_file" side of the delta.
\n\nIf you pass NULL for the index, then the existing index of the repo\n will be used. In this case, the index will be refreshed from disk\n (if it has changed) before the diff is generated.
Create a diff between the repository index and the workdir directory.
\n", - "comments": "This matches the git diff command. See the note below on\n git_diff_tree_to_workdir for a discussion of the difference between\n git diff and git diff HEAD and how to emulate a `git diff \n<treeish
\n\n\n`\n using libgit2.
\n
The index will be used for the "old_file" side of the delta, and the\n working directory will be used for the "new_file" side of the delta.
\n\nIf you pass NULL for the index, then the existing index of the repo\n will be used. In this case, the index will be refreshed from disk\n (if it has changed) before the diff is generated.
Create a diff between a tree and the working directory.
\n", - "comments": "The tree you provide will be used for the "old_file" side of the delta,\n and the working directory will be used for the "new_file" side.
\n\nThis is not the same as `git diff \n<treeish
\n\n\n\n\n\n
orgit diff-index
<treeish
\n\n\n\n\n\n
. Those commands use information from the index, whereas this\n function strictly returns the differences between the tree and the files\n in the working directory, regardless of the state of the index. Use\ngit_diff_tree_to_workdir_with_index` to emulate those commands.
To see difference between this and git_diff_tree_to_workdir_with_index,\n consider the example of a staged file deletion where the file has then\n been put back into the working dir and further modified. The\n tree-to-workdir diff for that file is 'modified', but git diff would\n show status 'deleted' since there is a staged delete.
Create a diff between a tree and the working directory using index data\n to account for staged deletes, tracked files, etc.
\n", - "comments": "This emulates `git diff \n<tree
\n\n\n\n", - "group": "diff", - "examples": { - "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_tree_to_workdir_with_index-7" - ] - } - }, - "git_diff_index_to_index": { - "type": "function", - "file": "git2/diff.h", - "line": 940, - "lineto": 945, - "args": [ - { - "name": "diff", - "type": "git_diff **", - "comment": "Output pointer to a git_diff pointer to be allocated." - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "The repository containing the indexes." - }, - { - "name": "old_index", - "type": "git_index *", - "comment": "A git_index object to diff from." - }, - { - "name": "new_index", - "type": "git_index *", - "comment": "A git_index object to diff to." - }, - { - "name": "opts", - "type": "const git_diff_options *", - "comment": "Structure with options to influence diff or NULL for defaults." - } - ], - "argline": "git_diff **diff, git_repository *repo, git_index *old_index, git_index *new_index, const git_diff_options *opts", - "sig": "git_diff **::git_repository *::git_index *::git_index *::const git_diff_options *", - "return": { - "type": "int", - "comment": null - }, - "description": "` by diffing the tree to the index and\n the index to the working directory and blending the results into a\n single diff that includes staged deleted, etc.
\n
Create a diff with the difference between two index objects.
\n", - "comments": "The first index will be used for the "old_file" side of the delta and the\n second index will be used for the "new_file" side of the delta.
\n", - "group": "diff" - }, - "git_diff_merge": { - "type": "function", - "file": "git2/diff.h", - "line": 960, - "lineto": 962, - "args": [ - { - "name": "onto", - "type": "git_diff *", - "comment": "Diff to merge into." - }, - { - "name": "from", - "type": "const git_diff *", - "comment": "Diff to merge." - } - ], - "argline": "git_diff *onto, const git_diff *from", - "sig": "git_diff *::const git_diff *", - "return": { - "type": "int", - "comment": null - }, - "description": "Merge one diff into another.
\n", - "comments": "This merges items from the "from" list into the "onto" list. The\n resulting diff will have all items that appear in either list.\n If an item appears in both lists, then it will be "merged" to appear\n as if the old version was from the "onto" list and the new version\n is from the "from" list (with the exception that if the item has a\n pending DELETE in the middle, then it will show as deleted).
\n", - "group": "diff" - }, - "git_diff_find_similar": { - "type": "function", - "file": "git2/diff.h", - "line": 976, - "lineto": 978, - "args": [ - { - "name": "diff", - "type": "git_diff *", - "comment": "diff to run detection algorithms on" - }, - { - "name": "options", - "type": "const git_diff_find_options *", - "comment": "Control how detection should be run, NULL for defaults" - } - ], - "argline": "git_diff *diff, const git_diff_find_options *options", - "sig": "git_diff *::const git_diff_find_options *", - "return": { - "type": "int", - "comment": " 0 on success, -1 on failure" - }, - "description": "Transform a diff marking file renames, copies, etc.
\n", - "comments": "This modifies a diff in place, replacing old entries that look\n like renames or copies with new entries reflecting those changes.\n This also will, if requested, break modified files into add/remove\n pairs if the amount of change is above a threshold.
\n", - "group": "diff", - "examples": { - "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_find_similar-8" - ] - } - }, - "git_diff_num_deltas": { - "type": "function", - "file": "git2/diff.h", - "line": 996, - "lineto": 996, - "args": [ - { - "name": "diff", - "type": "const git_diff *", - "comment": "A git_diff generated by one of the above functions" - } - ], - "argline": "const git_diff *diff", - "sig": "const git_diff *", - "return": { - "type": "size_t", - "comment": " Count of number of deltas in the list" - }, - "description": "Query how many diff records are there in a diff.
\n", - "comments": "", - "group": "diff", - "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_diff_num_deltas-29" - ] - } - }, - "git_diff_num_deltas_of_type": { - "type": "function", - "file": "git2/diff.h", - "line": 1009, - "lineto": 1010, - "args": [ - { - "name": "diff", - "type": "const git_diff *", - "comment": "A git_diff generated by one of the above functions" - }, - { - "name": "type", - "type": "git_delta_t", - "comment": "A git_delta_t value to filter the count" - } - ], - "argline": "const git_diff *diff, git_delta_t type", - "sig": "const git_diff *::git_delta_t", - "return": { - "type": "size_t", - "comment": " Count of number of deltas matching delta_t type" - }, - "description": "Query how many diff deltas are there in a diff filtered by type.
\n", - "comments": "This works just like git_diff_entrycount() with an extra parameter\n that is a git_delta_t and returns just the count of how many deltas\n match that particular type.
Return the diff delta for an entry in the diff list.
\n", - "comments": "The git_diff_delta pointer points to internal data and you do not\n have to release it when you are done with it. It will go away when\n the * git_diff (or any associated git_patch) goes away.
Note that the flags on the delta related to whether it has binary\n content or not may not be set if there are no attributes set for the\n file and there has been no reason to load the file data at this point.\n For now, if you need those flags to be up to date, your only option is\n to either use git_diff_foreach or create a git_patch.
Check if deltas are sorted case sensitively or insensitively.
\n", - "comments": "", - "group": "diff" - }, - "git_diff_foreach": { - "type": "function", - "file": "git2/diff.h", - "line": 1066, - "lineto": 1072, - "args": [ - { - "name": "diff", - "type": "git_diff *", - "comment": "A git_diff generated by one of the above functions." - }, - { - "name": "file_cb", - "type": "git_diff_file_cb", - "comment": "Callback function to make per file in the diff." - }, - { - "name": "binary_cb", - "type": "git_diff_binary_cb", - "comment": "Optional callback to make for binary files." - }, - { - "name": "hunk_cb", - "type": "git_diff_hunk_cb", - "comment": "Optional callback to make per hunk of text diff. This\n callback is called to describe a range of lines in the\n diff. It will not be issued for binary files." - }, - { - "name": "line_cb", - "type": "git_diff_line_cb", - "comment": "Optional callback to make per line of diff text. This\n same callback will be made for context lines, added, and\n removed lines, and even for a deleted trailing newline." - }, - { - "name": "payload", - "type": "void *", - "comment": "Reference pointer that will be passed to your callbacks." - } - ], - "argline": "git_diff *diff, git_diff_file_cb file_cb, git_diff_binary_cb binary_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *payload", - "sig": "git_diff *::git_diff_file_cb::git_diff_binary_cb::git_diff_hunk_cb::git_diff_line_cb::void *", - "return": { - "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" - }, - "description": "Loop over all deltas in a diff issuing callbacks.
\n", - "comments": "This will iterate through all of the files described in a diff. You\n should provide a file callback to learn about each file.
\n\nThe "hunk" and "line" callbacks are optional, and the text diff of the\n files will only be calculated if they are not NULL. Of course, these\n callbacks will not be invoked for binary files on the diff or for\n files whose only changed is a file mode change.
\n\nReturning a non-zero value from any of the callbacks will terminate\n the iteration and return the value to the user.
\n", - "group": "diff" - }, - "git_diff_status_char": { - "type": "function", - "file": "git2/diff.h", - "line": 1085, - "lineto": 1085, - "args": [ - { - "name": "status", - "type": "git_delta_t", - "comment": "The git_delta_t value to look up" - } - ], - "argline": "git_delta_t status", - "sig": "git_delta_t", - "return": { - "type": "char", - "comment": " The single character label for that code" - }, - "description": "Look up the single character abbreviation for a delta status code.
\n", - "comments": "When you run git diff --name-status it uses single letter codes in\n the output such as 'A' for added, 'D' for deleted, 'M' for modified,\n etc. This function converts a git_delta_t value into these letters for\n your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').
Iterate over a diff generating formatted text output.
\n", - "comments": "Returning a non-zero value from the callbacks will terminate the\n iteration and return the non-zero value to the caller.
\n", - "group": "diff", - "examples": { - "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_print-9" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_diff_print-30" - ] - } - }, - "git_diff_to_buf": { - "type": "function", - "file": "git2/diff.h", - "line": 1126, - "lineto": 1129, - "args": [ - { - "name": "out", - "type": "git_buf *", - "comment": "A pointer to a user-allocated git_buf that will\n contain the diff text" - }, - { - "name": "diff", - "type": "git_diff *", - "comment": "A git_diff generated by one of the above functions." - }, - { - "name": "format", - "type": "git_diff_format_t", - "comment": "A git_diff_format_t value to pick the text format." - } - ], - "argline": "git_buf *out, git_diff *diff, git_diff_format_t format", - "sig": "git_buf *::git_diff *::git_diff_format_t", - "return": { - "type": "int", - "comment": " 0 on success or error code" - }, - "description": "Produce the complete formatted text output from a diff into a\n buffer.
\n", - "comments": "", - "group": "diff" - }, - "git_diff_blobs": { - "type": "function", - "file": "git2/diff.h", - "line": 1166, - "lineto": 1176, - "args": [ - { - "name": "old_blob", - "type": "const git_blob *", - "comment": "Blob for old side of diff, or NULL for empty blob" - }, - { - "name": "old_as_path", - "type": "const char *", - "comment": "Treat old blob as if it had this filename; can be NULL" - }, - { - "name": "new_blob", - "type": "const git_blob *", - "comment": "Blob for new side of diff, or NULL for empty blob" - }, - { - "name": "new_as_path", - "type": "const char *", - "comment": "Treat new blob as if it had this filename; can be NULL" - }, - { - "name": "options", - "type": "const git_diff_options *", - "comment": "Options for diff, or NULL for default options" - }, - { - "name": "file_cb", - "type": "git_diff_file_cb", - "comment": "Callback for \"file\"; made once if there is a diff; can be NULL" - }, - { - "name": "binary_cb", - "type": "git_diff_binary_cb", - "comment": "Callback for binary files; can be NULL" - }, - { - "name": "hunk_cb", - "type": "git_diff_hunk_cb", - "comment": "Callback for each hunk in diff; can be NULL" - }, - { - "name": "line_cb", - "type": "git_diff_line_cb", - "comment": "Callback for each line in diff; can be NULL" - }, - { - "name": "payload", - "type": "void *", - "comment": "Payload passed to each callback function" - } - ], - "argline": "const git_blob *old_blob, const char *old_as_path, const git_blob *new_blob, const char *new_as_path, const git_diff_options *options, git_diff_file_cb file_cb, git_diff_binary_cb binary_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *payload", - "sig": "const git_blob *::const char *::const git_blob *::const char *::const git_diff_options *::git_diff_file_cb::git_diff_binary_cb::git_diff_hunk_cb::git_diff_line_cb::void *", - "return": { - "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" - }, - "description": "Directly run a diff on two blobs.
\n", - "comments": "Compared to a file, a blob lacks some contextual information. As such,\n the git_diff_file given to the callback will have some fake data; i.e.\n mode will be 0 and path will be NULL.
NULL is allowed for either old_blob or new_blob and will be treated\n as an empty blob, with the oid set to NULL in the git_diff_file data.\n Passing NULL for both blobs is a noop; no callbacks will be made at all.
We do run a binary content check on the blob content and if either blob\n looks like binary data, the git_diff_delta binary attribute will be set\n to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass\n GIT_DIFF_FORCE_TEXT of course).
Directly run a diff between a blob and a buffer.
\n", - "comments": "As with git_diff_blobs, comparing a blob and buffer lacks some context,\n so the git_diff_file parameters to the callbacks will be faked a la the\n rules for git_diff_blobs().
Passing NULL for old_blob will be treated as an empty blob (i.e. the\n file_cb will be invoked with GIT_DELTA_ADDED and the diff will be the\n entire content of the buffer added). Passing NULL to the buffer will do\n the reverse, with GIT_DELTA_REMOVED and blob content removed.
Directly run a diff between two buffers.
\n", - "comments": "Even more than with git_diff_blobs, comparing two buffer lacks\n context, so the git_diff_file parameters to the callbacks will be\n faked a la the rules for git_diff_blobs().
Read the contents of a git patch file into a git_diff object.
The diff object produced is similar to the one that would be\n produced if you actually produced it computationally by comparing\n two trees, however there may be subtle differences. For example,\n a patch file likely contains abbreviated object IDs, so the\n object IDs in a git_diff_delta produced by this function will\n also be abbreviated.
This function will only read patch files created by a git\n implementation, it will not read unified diffs produced by\n the diff program, nor any other types of patch files.
Accumulate diff statistics for all patches.
\n", - "comments": "", - "group": "diff", - "examples": { - "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_get_stats-10" - ] - } - }, - "git_diff_stats_files_changed": { - "type": "function", - "file": "git2/diff.h", - "line": 1319, - "lineto": 1320, - "args": [ - { - "name": "stats", - "type": "const git_diff_stats *", - "comment": "A `git_diff_stats` generated by one of the above functions." - } - ], - "argline": "const git_diff_stats *stats", - "sig": "const git_diff_stats *", - "return": { - "type": "size_t", - "comment": " total number of files changed in the diff" - }, - "description": "Get the total number of files changed in a diff
\n", - "comments": "", - "group": "diff" - }, - "git_diff_stats_insertions": { - "type": "function", - "file": "git2/diff.h", - "line": 1328, - "lineto": 1329, - "args": [ - { - "name": "stats", - "type": "const git_diff_stats *", - "comment": "A `git_diff_stats` generated by one of the above functions." - } - ], - "argline": "const git_diff_stats *stats", - "sig": "const git_diff_stats *", - "return": { - "type": "size_t", - "comment": " total number of insertions in the diff" - }, - "description": "Get the total number of insertions in a diff
\n", - "comments": "", - "group": "diff" - }, - "git_diff_stats_deletions": { - "type": "function", - "file": "git2/diff.h", - "line": 1337, - "lineto": 1338, - "args": [ - { - "name": "stats", - "type": "const git_diff_stats *", - "comment": "A `git_diff_stats` generated by one of the above functions." - } - ], - "argline": "const git_diff_stats *stats", - "sig": "const git_diff_stats *", - "return": { - "type": "size_t", - "comment": " total number of deletions in the diff" - }, - "description": "Get the total number of deletions in a diff
\n", - "comments": "", - "group": "diff" - }, - "git_diff_stats_to_buf": { - "type": "function", - "file": "git2/diff.h", - "line": 1349, - "lineto": 1353, - "args": [ - { - "name": "out", - "type": "git_buf *", - "comment": "buffer to store the formatted diff statistics in." - }, - { - "name": "stats", - "type": "const git_diff_stats *", - "comment": "A `git_diff_stats` generated by one of the above functions." - }, - { - "name": "format", - "type": "git_diff_stats_format_t", - "comment": "Formatting option." - }, - { - "name": "width", - "type": "size_t", - "comment": "Target width for output (only affects GIT_DIFF_STATS_FULL)" - } - ], - "argline": "git_buf *out, const git_diff_stats *stats, git_diff_stats_format_t format, size_t width", - "sig": "git_buf *::const git_diff_stats *::git_diff_stats_format_t::size_t", - "return": { - "type": "int", - "comment": " 0 on success; non-zero on error" - }, - "description": "Print diff statistics to a git_buf.
Deallocate a git_diff_stats.
Create an e-mail ready patch from a diff.
\n", - "comments": "", - "group": "diff" - }, - "git_diff_commit_as_email": { - "type": "function", - "file": "git2/diff.h", - "line": 1432, - "lineto": 1439, - "args": [ - { - "name": "out", - "type": "git_buf *", - "comment": "buffer to store the e-mail patch in" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "containing the commit" - }, - { - "name": "commit", - "type": "git_commit *", - "comment": "pointer to up commit" - }, - { - "name": "patch_no", - "type": "size_t", - "comment": "patch number of the commit" - }, - { - "name": "total_patches", - "type": "size_t", - "comment": "total number of patches in the patch set" - }, - { - "name": "flags", - "type": "git_diff_format_email_flags_t", - "comment": "determines the formatting of the e-mail" - }, - { - "name": "diff_opts", - "type": "const git_diff_options *", - "comment": "structure with options to influence diff or NULL for defaults." - } - ], - "argline": "git_buf *out, git_repository *repo, git_commit *commit, size_t patch_no, size_t total_patches, git_diff_format_email_flags_t flags, const git_diff_options *diff_opts", - "sig": "git_buf *::git_repository *::git_commit *::size_t::size_t::git_diff_format_email_flags_t::const git_diff_options *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create an e-mail ready patch for a commit.
\n", - "comments": "Does not support creating patches for merge commits (yet).
\n", - "group": "diff" - }, - "git_diff_format_email_init_options": { - "type": "function", - "file": "git2/diff.h", - "line": 1451, - "lineto": 1453, - "args": [ - { - "name": "opts", - "type": "git_diff_format_email_options *", - "comment": "The `git_blame_options` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`." - } - ], - "argline": "git_diff_format_email_options *opts, unsigned int version", - "sig": "git_diff_format_email_options *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initialize git_diff_format_email_options structure
\n", - "comments": "Initializes a git_diff_format_email_options with default values. Equivalent\n to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
Initialize git_diff_patchid_options structure
\n", - "comments": "Initializes a git_diff_patchid_options with default values. Equivalent to\n creating an instance with GIT_DIFF_PATCHID_OPTIONS_INIT.
Calculate the patch ID for the given patch.
\n", - "comments": "Calculate a stable patch ID for the given patch by summing the\n hash of the file diffs, ignoring whitespace and line numbers.\n This can be used to derive whether two diffs are the same with\n a high probability.
\n\nCurrently, this function only calculates stable patch IDs, as\n defined in git-patch-id(1), and should in fact generate the\n same IDs as the upstream git project does.
\n", - "group": "diff" - }, - "git_error_last": { - "type": "function", - "file": "git2/errors.h", - "line": 123, - "lineto": 123, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "const git_error *", - "comment": " A git_error object." - }, - "description": "Return the last git_error object that was generated for the\n current thread.
The default behaviour of this function is to return NULL if no previous error has occurred.\n However, libgit2's error strings are not cleared aggressively, so a prior\n (unrelated) error may be returned. This can be avoided by only calling\n this function if the prior call to a libgit2 API returned an error.
\n", - "group": "error", - "examples": { - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_error_last-8", - "ex/v0.28.0/checkout.html#git_error_last-9", - "ex/v0.28.0/checkout.html#git_error_last-10", - "ex/v0.28.0/checkout.html#git_error_last-11" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_error_last-33" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_error_last-8", - "ex/v0.28.0/merge.html#git_error_last-9" - ] - } - }, - "git_error_clear": { - "type": "function", - "file": "git2/errors.h", - "line": 128, - "lineto": 128, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "void", - "comment": null - }, - "description": "Clear the last library error that occurred for this thread.
\n", - "comments": "", - "group": "error" - }, - "git_error_set_str": { - "type": "function", - "file": "git2/errors.h", - "line": 146, - "lineto": 146, - "args": [ - { - "name": "error_class", - "type": "int", - "comment": "One of the `git_error_t` enum above describing the\n general subsystem that is responsible for the error." - }, - { - "name": "string", - "type": "const char *", - "comment": "The formatted error message to keep" - } - ], - "argline": "int error_class, const char *string", - "sig": "int::const char *", - "return": { - "type": "void", - "comment": null - }, - "description": "Set the error message string for this thread.
\n", - "comments": "This function is public so that custom ODB backends and the like can\n relay an error message through libgit2. Most regular users of libgit2\n will never need to call this function -- actually, calling it in most\n circumstances (for example, calling from within a callback function)\n will just end up having the value overwritten by libgit2 internals.
\n\nThis error message is stored in thread-local storage and only applies\n to the particular thread that this libgit2 call is made from.
\n", - "group": "error" - }, - "git_error_set_oom": { - "type": "function", - "file": "git2/errors.h", - "line": 157, - "lineto": 157, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "void", - "comment": null - }, - "description": "Set the error message to a special value for memory allocation failure.
\n", - "comments": "The normal git_error_set_str() function attempts to strdup() the\n string that is passed in. This is not a good idea when the error in\n question is a memory allocation failure. That circumstance has a\n special setter function that sets the error string to a known and\n statically allocated internal value.
Query the filter list to see if a given filter (by name) will run.\n The built-in filters "crlf" and "ident" can be queried, otherwise this\n is the name of the filter specified by the filter attribute.
\n", - "comments": "This will return 0 if the given filter is not in the list, or 1 if\n the filter will be applied.
\n", - "group": "filter" - }, - "git_filter_list_apply_to_data": { - "type": "function", - "file": "git2/filter.h", - "line": 134, - "lineto": 137, - "args": [ - { - "name": "out", - "type": "git_buf *", - "comment": "Buffer to store the result of the filtering" - }, - { - "name": "filters", - "type": "git_filter_list *", - "comment": "A loaded git_filter_list (or NULL)" - }, - { - "name": "in", - "type": "git_buf *", - "comment": "Buffer containing the data to filter" - } - ], - "argline": "git_buf *out, git_filter_list *filters, git_buf *in", - "sig": "git_buf *::git_filter_list *::git_buf *", - "return": { - "type": "int", - "comment": " 0 on success, an error code otherwise" - }, - "description": "Apply filter list to a data buffer.
\n", - "comments": "See git2/buffer.h for background on git_buf objects.
If the in buffer holds data allocated by libgit2 (i.e. in->asize is\n not zero), then it will be overwritten when applying the filters. If\n not, then it will be left untouched.
If there are no filters to apply (or filters is NULL), then the out\n buffer will reference the in buffer data (with asize set to zero)\n instead of allocating data. This keeps allocations to a minimum, but\n it means you have to be careful about freeing the in data since out\n may be pointing to it!
Apply a filter list to the contents of a file on disk
\n", - "comments": "", - "group": "filter" - }, - "git_filter_list_apply_to_blob": { - "type": "function", - "file": "git2/filter.h", - "line": 161, - "lineto": 164, - "args": [ - { - "name": "out", - "type": "git_buf *", - "comment": "buffer into which to store the filtered file" - }, - { - "name": "filters", - "type": "git_filter_list *", - "comment": "the list of filters to apply" - }, - { - "name": "blob", - "type": "git_blob *", - "comment": "the blob to filter" - } - ], - "argline": "git_buf *out, git_filter_list *filters, git_blob *blob", - "sig": "git_buf *::git_filter_list *::git_blob *", - "return": { - "type": "int", - "comment": null - }, - "description": "Apply a filter list to the contents of a blob
\n", - "comments": "", - "group": "filter" - }, - "git_filter_list_stream_data": { - "type": "function", - "file": "git2/filter.h", - "line": 173, - "lineto": 176, - "args": [ - { - "name": "filters", - "type": "git_filter_list *", - "comment": "the list of filters to apply" - }, - { - "name": "data", - "type": "git_buf *", - "comment": "the buffer to filter" - }, - { - "name": "target", - "type": "git_writestream *", - "comment": "the stream into which the data will be written" - } - ], - "argline": "git_filter_list *filters, git_buf *data, git_writestream *target", - "sig": "git_filter_list *::git_buf *::git_writestream *", - "return": { - "type": "int", - "comment": null - }, - "description": "Apply a filter list to an arbitrary buffer as a stream
\n", - "comments": "", - "group": "filter" - }, - "git_filter_list_stream_file": { - "type": "function", - "file": "git2/filter.h", - "line": 187, - "lineto": 191, - "args": [ - { - "name": "filters", - "type": "git_filter_list *", - "comment": "the list of filters to apply" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to perform the filtering" - }, - { - "name": "path", - "type": "const char *", - "comment": "the path of the file to filter, a relative path will be\n taken as relative to the workdir" - }, - { - "name": "target", - "type": "git_writestream *", - "comment": "the stream into which the data will be written" - } - ], - "argline": "git_filter_list *filters, git_repository *repo, const char *path, git_writestream *target", - "sig": "git_filter_list *::git_repository *::const char *::git_writestream *", - "return": { - "type": "int", - "comment": null - }, - "description": "Apply a filter list to a file as a stream
\n", - "comments": "", - "group": "filter" - }, - "git_filter_list_stream_blob": { - "type": "function", - "file": "git2/filter.h", - "line": 200, - "lineto": 203, - "args": [ - { - "name": "filters", - "type": "git_filter_list *", - "comment": "the list of filters to apply" - }, - { - "name": "blob", - "type": "git_blob *", - "comment": "the blob to filter" - }, - { - "name": "target", - "type": "git_writestream *", - "comment": "the stream into which the data will be written" - } - ], - "argline": "git_filter_list *filters, git_blob *blob, git_writestream *target", - "sig": "git_filter_list *::git_blob *::git_writestream *", - "return": { - "type": "int", - "comment": null - }, - "description": "Apply a filter list to a blob as a stream
\n", - "comments": "", - "group": "filter" - }, - "git_filter_list_free": { - "type": "function", - "file": "git2/filter.h", - "line": 210, - "lineto": 210, - "args": [ - { - "name": "filters", - "type": "git_filter_list *", - "comment": "A git_filter_list created by `git_filter_list_load`" - } - ], - "argline": "git_filter_list *filters", - "sig": "git_filter_list *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free a git_filter_list
\n", - "comments": "", - "group": "filter" - }, - "git_libgit2_init": { - "type": "function", - "file": "git2/global.h", - "line": 26, - "lineto": 26, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "int", - "comment": " the number of initializations of the library, or an error code." - }, - "description": "Init the global state
\n", - "comments": "This function must be called before any other libgit2 function in\n order to set up global state and threading.
\n\nThis function may be called multiple times - it will return the number\n of times the initialization has been called (including this one) that have\n not subsequently been shutdown.
\n", - "group": "libgit2", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_libgit2_init-8" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_libgit2_init-10" - ], - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_libgit2_init-12" - ], - "describe.c": [ - "ex/v0.28.0/describe.html#git_libgit2_init-6" - ], - "diff.c": [ - "ex/v0.28.0/diff.html#git_libgit2_init-13" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_libgit2_init-34" - ], - "init.c": [ - "ex/v0.28.0/init.html#git_libgit2_init-2" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_libgit2_init-31" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_libgit2_init-1" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_libgit2_init-10" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_libgit2_init-2" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_libgit2_init-1" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_libgit2_init-1" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_libgit2_init-3" - ] - } - }, - "git_libgit2_shutdown": { - "type": "function", - "file": "git2/global.h", - "line": 39, - "lineto": 39, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "int", - "comment": " the number of remaining initializations of the library, or an\n error code." - }, - "description": "Shutdown the global state
\n", - "comments": "Clean up the global state and threading context after calling it as\n many times as git_libgit2_init() was called - it will return the\n number of remainining initializations that have not been shutdown\n (after this one).
Count the number of unique commits between two commit objects
\n", - "comments": "There is no need for branches containing the commits to have any\n upstream relationship, but it helps to think of one as a branch and\n the other as its upstream, the ahead and behind values will be\n what git would report for the branches.
Determine if a commit is the descendant of another commit.
\n", - "comments": "Note that a commit is not considered a descendant of itself, in contrast\n to git merge-base --is-ancestor.
Add ignore rules for a repository.
\n", - "comments": "Excludesfile rules (i.e. .gitignore rules) are generally read from\n .gitignore files in the repository tree or from a shared system file\n only if a "core.excludesfile" config value is set. The library also\n keeps a set of per-repository internal ignores that can be configured\n in-memory and will not persist. This function allows you to add to\n that internal rules list.
\n\nExample usage:
\n\n error = git_ignore_add_rule(myrepo, "*.c\n\n\n/
\n\nwith space
\n\n");
\n\nThis would add three rules to the ignores.
\n", - "group": "ignore" - }, - "git_ignore_clear_internal_rules": { - "type": "function", - "file": "git2/ignore.h", - "line": 52, - "lineto": 53, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "The repository to remove ignore rules from." - } - ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": " 0 on success" - }, - "description": "Clear ignore rules that were explicitly added.
\n", - "comments": "Resets to the default internal ignore rules. This will not turn off\n rules in .gitignore files that actually exist in the filesystem.
\n\nThe default internal ignores ignore ".", ".." and ".git" entries.
\n", - "group": "ignore" - }, - "git_ignore_path_is_ignored": { - "type": "function", - "file": "git2/ignore.h", - "line": 71, - "lineto": 74, - "args": [ - { - "name": "ignored", - "type": "int *", - "comment": "boolean returning 0 if the file is not ignored, 1 if it is" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "a repository object" - }, - { - "name": "path", - "type": "const char *", - "comment": "the file to check ignores for, relative to the repo's workdir." - } - ], - "argline": "int *ignored, git_repository *repo, const char *path", - "sig": "int *::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." - }, - "description": "Test if the ignore rules apply to a given path.
\n", - "comments": "This function checks the ignore rules to see if they would apply to the\n given file. This indicates if the file would be ignored regardless of\n whether the file is already in the index or committed to the repository.
\n\nOne way to think of this is if you were to do "git check-ignore --no-index"\n on the given file, would it be shown or not?
\n", - "group": "ignore" - }, - "git_index_open": { - "type": "function", - "file": "git2/index.h", - "line": 186, - "lineto": 186, - "args": [ - { - "name": "out", - "type": "git_index **", - "comment": "the pointer for the new index" - }, - { - "name": "index_path", - "type": "const char *", - "comment": "the path to the index file in disk" - } - ], - "argline": "git_index **out, const char *index_path", - "sig": "git_index **::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a new bare Git index object as a memory representation\n of the Git index file in 'index_path', without a repository\n to back it.
\n", - "comments": "Since there is no ODB or working directory behind this index,\n any Index methods which rely on these (e.g. index_add_bypath)\n will fail with the GIT_ERROR error code.
\n\nIf you need to access the index of an actual repository,\n use the git_repository_index wrapper.
The index must be freed once it's no longer in use.
\n", - "group": "index" - }, - "git_index_new": { - "type": "function", - "file": "git2/index.h", - "line": 199, - "lineto": 199, - "args": [ - { - "name": "out", - "type": "git_index **", - "comment": "the pointer for the new index" - } - ], - "argline": "git_index **out", - "sig": "git_index **", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create an in-memory index object.
\n", - "comments": "This index object cannot be read/written to the filesystem,\n but may be used to perform in-memory index operations.
\n\nThe index must be freed once it's no longer in use.
\n", - "group": "index" - }, - "git_index_free": { - "type": "function", - "file": "git2/index.h", - "line": 206, - "lineto": 206, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free an existing index object.
\n", - "comments": "", - "group": "index", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_index_free-35" - ], - "init.c": [ - "ex/v0.28.0/init.html#git_index_free-4" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_index_free-3" - ] - } - }, - "git_index_owner": { - "type": "function", - "file": "git2/index.h", - "line": 214, - "lineto": 214, - "args": [ - { - "name": "index", - "type": "const git_index *", - "comment": "The index" - } - ], - "argline": "const git_index *index", - "sig": "const git_index *", - "return": { - "type": "git_repository *", - "comment": " A pointer to the repository" - }, - "description": "Get the repository this index relates to
\n", - "comments": "", - "group": "index" - }, - "git_index_caps": { - "type": "function", - "file": "git2/index.h", - "line": 222, - "lineto": 222, - "args": [ - { - "name": "index", - "type": "const git_index *", - "comment": "An existing index object" - } - ], - "argline": "const git_index *index", - "sig": "const git_index *", - "return": { - "type": "int", - "comment": " A combination of GIT_INDEX_CAPABILITY values" - }, - "description": "Read index capabilities flags.
\n", - "comments": "", - "group": "index" - }, - "git_index_set_caps": { - "type": "function", - "file": "git2/index.h", - "line": 235, - "lineto": 235, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "An existing index object" - }, - { - "name": "caps", - "type": "int", - "comment": "A combination of GIT_INDEX_CAPABILITY values" - } - ], - "argline": "git_index *index, int caps", - "sig": "git_index *::int", - "return": { - "type": "int", - "comment": " 0 on success, -1 on failure" - }, - "description": "Set index capabilities flags.
\n", - "comments": "If you pass GIT_INDEX_CAPABILITY_FROM_OWNER for the caps, then\n capabilities will be read from the config of the owner object,\n looking at core.ignorecase, core.filemode, core.symlinks.
Get index on-disk version.
\n", - "comments": "Valid return values are 2, 3, or 4. If 3 is returned, an index\n with version 2 may be written instead, if the extension data in\n version 3 is not necessary.
\n", - "group": "index" - }, - "git_index_set_version": { - "type": "function", - "file": "git2/index.h", - "line": 260, - "lineto": 260, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "An existing index object" - }, - { - "name": "version", - "type": "unsigned int", - "comment": "The new version number" - } - ], - "argline": "git_index *index, unsigned int version", - "sig": "git_index *::unsigned int", - "return": { - "type": "int", - "comment": " 0 on success, -1 on failure" - }, - "description": "Set index on-disk version.
\n", - "comments": "Valid values are 2, 3, or 4. If 2 is given, git_index_write may\n write an index with version 3 instead, if necessary to accurately\n represent the index.
\n", - "group": "index" - }, - "git_index_read": { - "type": "function", - "file": "git2/index.h", - "line": 279, - "lineto": 279, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "force", - "type": "int", - "comment": "if true, always reload, vs. only read if file has changed" - } - ], - "argline": "git_index *index, int force", - "sig": "git_index *::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Update the contents of an existing index object in memory by reading\n from the hard disk.
\n", - "comments": "If force is true, this performs a "hard" read that discards in-memory\n changes and always reloads the on-disk index data. If there is no\n on-disk version, the index will be cleared.
If force is false, this does a "soft" read that reloads the index\n data from disk only if it has changed since the last time it was\n loaded. Purely in-memory index data will be untouched. Be aware: if\n there are changes on disk, unwritten in-memory changes are discarded.
Write an existing index object from memory back to disk\n using an atomic file lock.
\n", - "comments": "", - "group": "index" - }, - "git_index_path": { - "type": "function", - "file": "git2/index.h", - "line": 296, - "lineto": 296, - "args": [ - { - "name": "index", - "type": "const git_index *", - "comment": "an existing index object" - } - ], - "argline": "const git_index *index", - "sig": "const git_index *", - "return": { - "type": "const char *", - "comment": " path to index file or NULL for in-memory index" - }, - "description": "Get the full path to the index file on disk.
\n", - "comments": "", - "group": "index" - }, - "git_index_checksum": { - "type": "function", - "file": "git2/index.h", - "line": 308, - "lineto": 308, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "const git_oid *", - "comment": " a pointer to the checksum of the index" - }, - "description": "Get the checksum of the index
\n", - "comments": "This checksum is the SHA-1 hash over the index file (except the\n last 20 bytes which are the checksum itself). In cases where the\n index does not exist on-disk, it will be zeroed out.
\n", - "group": "index" - }, - "git_index_read_tree": { - "type": "function", - "file": "git2/index.h", - "line": 319, - "lineto": 319, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "tree", - "type": "const git_tree *", - "comment": "tree to read" - } - ], - "argline": "git_index *index, const git_tree *tree", - "sig": "git_index *::const git_tree *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Read a tree into the index file with stats
\n", - "comments": "The current index contents will be replaced by the specified tree.
\n", - "group": "index" - }, - "git_index_write_tree": { - "type": "function", - "file": "git2/index.h", - "line": 340, - "lineto": 340, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "Pointer where to store the OID of the written tree" - }, - { - "name": "index", - "type": "git_index *", - "comment": "Index to write" - } - ], - "argline": "git_oid *out, git_index *index", - "sig": "git_oid *::git_index *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" - }, - "description": "Write the index as a tree
\n", - "comments": "This method will scan the index and write a representation\n of its current state back to disk; it recursively creates\n tree objects for each of the subtrees stored in the index,\n but only returns the OID of the root tree. This is the OID\n that can be used e.g. to create a commit.
\n\nThe index instance cannot be bare, and needs to be associated\n to an existing repository.
\n\nThe index must not contain any file in conflict.
\n", - "group": "index", - "examples": { - "init.c": [ - "ex/v0.28.0/init.html#git_index_write_tree-5" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_index_write_tree-12" - ] - } - }, - "git_index_write_tree_to": { - "type": "function", - "file": "git2/index.h", - "line": 357, - "lineto": 357, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "Pointer where to store OID of the the written tree" - }, - { - "name": "index", - "type": "git_index *", - "comment": "Index to write" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where to write the tree" - } - ], - "argline": "git_oid *out, git_index *index, git_repository *repo", - "sig": "git_oid *::git_index *::git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" - }, - "description": "Write the index as a tree to the given repository
\n", - "comments": "This method will do the same as git_index_write_tree, but\n letting the user choose the repository where the tree will\n be written.
The index must not contain any file in conflict.
\n", - "group": "index" - }, - "git_index_entrycount": { - "type": "function", - "file": "git2/index.h", - "line": 376, - "lineto": 376, - "args": [ - { - "name": "index", - "type": "const git_index *", - "comment": "an existing index object" - } - ], - "argline": "const git_index *index", - "sig": "const git_index *", - "return": { - "type": "size_t", - "comment": " integer of count of current entries" - }, - "description": "Get the count of entries currently in the index
\n", - "comments": "", - "group": "index", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_index_entrycount-36" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_index_entrycount-4" - ] - } - }, - "git_index_clear": { - "type": "function", - "file": "git2/index.h", - "line": 387, - "lineto": 387, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "int", - "comment": " 0 on success, error code \n<\n 0 on failure" - }, - "description": "Clear the contents (all the entries) of an index object.
\n", - "comments": "This clears the index object in memory; changes must be explicitly\n written to disk for them to take effect persistently.
\n", - "group": "index" - }, - "git_index_get_byindex": { - "type": "function", - "file": "git2/index.h", - "line": 400, - "lineto": 401, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "n", - "type": "size_t", - "comment": "the position of the entry" - } - ], - "argline": "git_index *index, size_t n", - "sig": "git_index *::size_t", - "return": { - "type": "const git_index_entry *", - "comment": " a pointer to the entry; NULL if out of bounds" - }, - "description": "Get a pointer to one of the entries in the index
\n", - "comments": "The entry is not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.
Get a pointer to one of the entries in the index
\n", - "comments": "The entry is not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.
Remove an entry from the index
\n", - "comments": "", - "group": "index" - }, - "git_index_remove_directory": { - "type": "function", - "file": "git2/index.h", - "line": 436, - "lineto": 437, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "dir", - "type": "const char *", - "comment": "container directory path" + "name": "data", + "type": "const void *", + "comment": "The data to copy into the buffer" }, { - "name": "stage", - "type": "int", - "comment": "stage to search" + "name": "datalen", + "type": "size_t", + "comment": "The length of the data to copy into the buffer" } ], - "argline": "git_index *index, const char *dir, int stage", - "sig": "git_index *::const char *::int", + "argline": "git_buf *buffer, const void *data, size_t datalen", + "sig": "git_buf *::const void *::size_t", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, -1 on allocation failure" }, - "description": "Remove all entries from the index under a given directory
\n", + "description": "Set buffer to a copy of some raw data.
\n", "comments": "", - "group": "index" + "group": "buf" }, - "git_index_add": { + "git_buf_is_binary": { "type": "function", - "file": "git2/index.h", - "line": 453, - "lineto": 453, + "file": "git2/deprecated.h", + "line": 248, + "lineto": 248, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "source_entry", - "type": "const git_index_entry *", - "comment": "new entry object" + "name": "buf", + "type": "const git_buf *", + "comment": "Buffer to check" } ], - "argline": "git_index *index, const git_index_entry *source_entry", - "sig": "git_index *::const git_index_entry *", + "argline": "const git_buf *buf", + "sig": "const git_buf *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 1 if buffer looks like non-text data" }, - "description": "Add or update an index entry from an in-memory struct
\n", - "comments": "If a previous index entry exists that has the same path and stage\n as the given 'source_entry', it will be replaced. Otherwise, the\n 'source_entry' will be added.
\n\nA full copy (including the 'path' string) of the given\n 'source_entry' will be inserted on the index.
\n", - "group": "index" + "description": "Check quickly if buffer looks like it contains binary data
\n", + "comments": "", + "group": "buf" }, - "git_index_entry_stage": { + "git_buf_contains_nul": { "type": "function", - "file": "git2/index.h", - "line": 465, - "lineto": 465, + "file": "git2/deprecated.h", + "line": 256, + "lineto": 256, "args": [ { - "name": "entry", - "type": "const git_index_entry *", - "comment": "The entry" + "name": "buf", + "type": "const git_buf *", + "comment": "Buffer to check" } ], - "argline": "const git_index_entry *entry", - "sig": "const git_index_entry *", + "argline": "const git_buf *buf", + "sig": "const git_buf *", "return": { "type": "int", - "comment": " the stage number" + "comment": " 1 if buffer contains a NUL byte" }, - "description": "Return the stage number from a git index entry
\n", - "comments": "This entry is calculated from the entry's flag attribute like this:
\n\n(entry->flags \n\n\n&\n GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT
\n", - "group": "index" + "description": "Check quickly if buffer contains a NUL byte
\n", + "comments": "", + "group": "buf" }, - "git_index_entry_is_conflict": { + "git_buf_free": { "type": "function", - "file": "git2/index.h", - "line": 474, - "lineto": 474, + "file": "git2/deprecated.h", + "line": 268, + "lineto": 268, + "args": [{ "name": "buffer", "type": "git_buf *", "comment": null }], + "argline": "git_buf *buffer", + "sig": "git_buf *", + "return": { "type": "void", "comment": null }, + "description": "Free the memory referred to by the git_buf. This is an alias of\n git_buf_dispose and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "buf" + }, + "git_diff_format_email": { + "type": "function", + "file": "git2/deprecated.h", + "line": 374, + "lineto": 377, "args": [ + { "name": "out", "type": "git_buf *", "comment": null }, + { "name": "diff", "type": "git_diff *", "comment": null }, { - "name": "entry", - "type": "const git_index_entry *", - "comment": "The entry" + "name": "opts", + "type": "const git_diff_format_email_options *", + "comment": null } ], - "argline": "const git_index_entry *entry", - "sig": "const git_index_entry *", - "return": { - "type": "int", - "comment": " 1 if the entry is a conflict entry, 0 otherwise" - }, - "description": "Return whether the given index entry is a conflict (has a high stage\n entry). This is simply shorthand for git_index_entry_stage > 0.
Create an e-mail ready patch from a diff.
\n", "comments": "", - "group": "index" + "group": "diff" }, - "git_index_iterator_new": { + "git_diff_commit_as_email": { "type": "function", - "file": "git2/index.h", - "line": 494, - "lineto": 496, + "file": "git2/deprecated.h", + "line": 385, + "lineto": 392, "args": [ + { "name": "out", "type": "git_buf *", "comment": null }, + { "name": "repo", "type": "git_repository *", "comment": null }, + { "name": "commit", "type": "git_commit *", "comment": null }, + { "name": "patch_no", "type": "size_t", "comment": null }, + { "name": "total_patches", "type": "size_t", "comment": null }, + { "name": "flags", "type": "uint32_t", "comment": null }, { - "name": "iterator_out", - "type": "git_index_iterator **", - "comment": "The newly created iterator" - }, - { - "name": "index", - "type": "git_index *", - "comment": "The index to iterate" + "name": "diff_opts", + "type": "const git_diff_options *", + "comment": null } ], - "argline": "git_index_iterator **iterator_out, git_index *index", - "sig": "git_index_iterator **::git_index *", - "return": { - "type": "int", - "comment": null - }, - "description": "Create an iterator that will return every entry contained in the\n index at the time of creation. Entries are returned in order,\n sorted by path. This iterator is backed by a snapshot that allows\n callers to modify the index while iterating without affecting the\n iterator.
\n", + "argline": "git_buf *out, git_repository *repo, git_commit *commit, size_t patch_no, size_t total_patches, uint32_t flags, const git_diff_options *diff_opts", + "sig": "git_buf *::git_repository *::git_commit *::size_t::size_t::uint32_t::const git_diff_options *", + "return": { "type": "int", "comment": null }, + "description": "Create an e-mail ready patch for a commit.
\n", "comments": "", - "group": "index" + "group": "diff" }, - "git_index_iterator_next": { + "git_diff_format_email_options_init": { "type": "function", - "file": "git2/index.h", - "line": 505, - "lineto": 507, + "file": "git2/deprecated.h", + "line": 404, + "lineto": 406, "args": [ { - "name": "out", - "type": "const git_index_entry **", - "comment": "Pointer to store the index entry in" + "name": "opts", + "type": "git_diff_format_email_options *", + "comment": "The `git_blame_options` struct to initialize." }, { - "name": "iterator", - "type": "git_index_iterator *", - "comment": "The iterator" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`." } ], - "argline": "const git_index_entry **out, git_index_iterator *iterator", - "sig": "const git_index_entry **::git_index_iterator *", + "argline": "git_diff_format_email_options *opts, unsigned int version", + "sig": "git_diff_format_email_options *::unsigned int", "return": { "type": "int", - "comment": " 0, GIT_ITEROVER on iteration completion or an error code" + "comment": " Zero on success; -1 on failure." }, - "description": "Return the next index entry in-order from the iterator.
\n", - "comments": "", - "group": "index" + "description": "Initialize git_diff_format_email_options structure
\n", + "comments": "Initializes a git_diff_format_email_options with default values. Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
Return the last git_error object that was generated for the\n current thread. This is an alias of git_error_last and is\n preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "giterr" + }, + "giterr_clear": { + "type": "function", + "file": "git2/deprecated.h", + "line": 515, + "lineto": 515, + "args": [], + "argline": "", + "sig": "", + "return": { "type": "void", "comment": null }, + "description": "Clear the last error. This is an alias of git_error_last and is\n preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "giterr" + }, + "giterr_set_str": { + "type": "function", + "file": "git2/deprecated.h", + "line": 527, + "lineto": 527, "args": [ - { - "name": "iterator", - "type": "git_index_iterator *", - "comment": "The iterator to free" - } + { "name": "error_class", "type": "int", "comment": null }, + { "name": "string", "type": "const char *", "comment": null } ], - "argline": "git_index_iterator *iterator", - "sig": "git_index_iterator *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free the index iterator
\n", - "comments": "", - "group": "index" + "argline": "int error_class, const char *string", + "sig": "int::const char *", + "return": { "type": "void", "comment": null }, + "description": "Sets the error message to the given string. This is an alias of\n git_error_set_str and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "giterr" }, - "git_index_add_bypath": { + "giterr_set_oom": { "type": "function", - "file": "git2/index.h", - "line": 545, - "lineto": 545, + "file": "git2/deprecated.h", + "line": 539, + "lineto": 539, + "args": [], + "argline": "", + "sig": "", + "return": { "type": "void", "comment": null }, + "description": "Indicates that an out-of-memory situation occurred. This is an alias\n of git_error_set_oom and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "giterr" + }, + "git_object__size": { + "type": "function", + "file": "git2/deprecated.h", + "line": 666, + "lineto": 666, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", - "type": "const char *", - "comment": "filename to add" + "name": "type", + "type": "git_object_t", + "comment": "object type to get its size" } ], - "argline": "git_index *index, const char *path", - "sig": "git_index *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Add or update an index entry from a file on disk
\n", - "comments": "The file path must be relative to the repository's\n working folder and must be readable.
This method will fail in bare index instances.
\n\nThis forces the file to be added to the index, not looking\n at gitignore rules. Those rules can be evaluated through\n the git_status APIs (in status.h) before calling this.
\n\nIf this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.
\n", - "group": "index" + "argline": "git_object_t type", + "sig": "git_object_t", + "return": { "type": "size_t", "comment": " size in bytes of the object" }, + "description": "Get the size in bytes for the structure which\n acts as an in-memory representation of any given\n object type.
\n", + "comments": "For all the core types, this would the equivalent of calling sizeof(git_commit) if the core types were not opaque on the external API.
Add or update an index entry from a buffer in memory
\n", - "comments": "This method will create a blob in the repository that owns the\n index and then add the index entry to the index. The path of the\n entry represents the position of the blob relative to the\n repository's root folder.
If a previous index entry exists that has the same path as the\n given 'entry', it will be replaced. Otherwise, the 'entry' will be\n added. The id and the file_size of the 'entry' are updated with the\n real value of the blob.
This forces the file to be added to the index, not looking\n at gitignore rules. Those rules can be evaluated through\n the git_status APIs (in status.h) before calling this.
\n\nIf this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.
\n", - "group": "index" + "description": "Ensure the remote name is well-formed.
\n", + "comments": "", + "group": "remote" }, - "git_index_remove_bypath": { + "git_reference_is_valid_name": { "type": "function", - "file": "git2/index.h", - "line": 593, - "lineto": 593, + "file": "git2/deprecated.h", + "line": 741, + "lineto": 741, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", + "name": "refname", "type": "const char *", - "comment": "filename to remove" + "comment": "name to be checked." } ], - "argline": "git_index *index, const char *path", - "sig": "git_index *::const char *", + "argline": "const char *refname", + "sig": "const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 1 if the reference name is acceptable; 0 if it isn't" }, - "description": "Remove an index entry corresponding to a file on disk
\n", - "comments": "The file path must be relative to the repository's\n working folder. It may exist.
If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.
\n", - "group": "index" + "description": "Ensure the reference name is well-formed.
\n", + "comments": "Valid reference names must follow one of two patterns:
\n\nFree the memory referred to by the git_oidarray. This is an alias of\n git_oidarray_dispose and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "oidarray" + }, + "git_strarray_copy": { + "type": "function", + "file": "git2/deprecated.h", + "line": 991, + "lineto": 991, "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "pathspec", - "type": "const git_strarray *", - "comment": "array of path patterns" - }, - { - "name": "flags", - "type": "unsigned int", - "comment": "combination of git_index_add_option_t flags" - }, - { - "name": "callback", - "type": "git_index_matched_path_cb", - "comment": "notification callback for each added/updated path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan." - }, - { - "name": "payload", - "type": "void *", - "comment": "payload passed through to callback function" - } + { "name": "tgt", "type": "git_strarray *", "comment": "target" }, + { "name": "src", "type": "const git_strarray *", "comment": "source" } ], - "argline": "git_index *index, const git_strarray *pathspec, unsigned int flags, git_index_matched_path_cb callback, void *payload", - "sig": "git_index *::const git_strarray *::unsigned int::git_index_matched_path_cb::void *", + "argline": "git_strarray *tgt, const git_strarray *src", + "sig": "git_strarray *::const git_strarray *", "return": { "type": "int", - "comment": " 0 on success, negative callback return value, or error code" + "comment": " 0 on success, \n<\n 0 on allocation failure" }, - "description": "Add or update index entries matching files in the working directory.
\n", - "comments": "This method will fail in bare index instances.
\n\nThe pathspec is a list of file names or shell glob patterns that will\n be matched against files in the repository's working directory. Each\n file that matches will be added to the index (either updating an\n existing entry or adding a new entry). You can disable glob expansion\n and force exact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\n flag.
Files that are ignored will be skipped (unlike git_index_add_bypath).\n If a file is already tracked in the index, then it will be updated\n even if it is ignored. Pass the GIT_INDEX_ADD_FORCE flag to skip\n the checking of ignore rules.
To emulate git add -A and generate an error if the pathspec contains\n the exact path of an ignored file (when not using FORCE), add the\n GIT_INDEX_ADD_CHECK_PATHSPEC flag. This checks that each entry\n in the pathspec that is an exact match to a filename on disk is\n either not ignored or already in the index. If this check fails, the\n function will return GIT_EINVALIDSPEC.
To emulate git add -A with the "dry-run" option, just use a callback\n function that always returns a positive value. See below for details.
If any files are currently the result of a merge conflict, those files\n will no longer be marked as conflicting. The data about the conflicts\n will be moved to the "resolve undo" (REUC) section.
\n\nIf you provide a callback function, it will be invoked on each matching\n item in the working directory immediately before it is added to /\n updated in the index. Returning zero will add the item to the index,\n greater than zero will skip the item, and less than zero will abort the\n scan and return that value to the caller.
\n", - "group": "index" + "description": "Copy a string array object from source to target.
\n", + "comments": "This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "strarray" }, - "git_index_remove_all": { + "git_strarray_free": { "type": "function", - "file": "git2/index.h", - "line": 663, - "lineto": 667, + "file": "git2/deprecated.h", + "line": 1003, + "lineto": 1003, + "args": [{ "name": "array", "type": "git_strarray *", "comment": null }], + "argline": "git_strarray *array", + "sig": "git_strarray *", + "return": { "type": "void", "comment": null }, + "description": "Free the memory referred to by the git_strarray. This is an alias of\n git_strarray_dispose and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this function at this time.
\n", + "group": "strarray" + }, + "git_blame_init_options": { + "type": "function", + "file": "git2/deprecated.h", + "line": 1035, + "lineto": 1035, + "args": [ + { "name": "opts", "type": "git_blame_options *", "comment": null }, + { "name": "version", "type": "unsigned int", "comment": null } + ], + "argline": "git_blame_options *opts, unsigned int version", + "sig": "git_blame_options *::unsigned int", + "return": { "type": "int", "comment": null }, + "description": "", + "comments": "These functions are retained for backward compatibility. The newer versions of these functions should be preferred in all new code.
\n\nThere is no plan to remove these backward compatibility functions at this time.
\n\n@{
\n", + "group": "blame" + }, + "git_describe_options_init": { + "type": "function", + "file": "git2/describe.h", + "line": 91, + "lineto": 91, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "An existing index object" - }, - { - "name": "pathspec", - "type": "const git_strarray *", - "comment": "array of path patterns" - }, - { - "name": "callback", - "type": "git_index_matched_path_cb", - "comment": "notification callback for each removed path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan." + "name": "opts", + "type": "git_describe_options *", + "comment": "The `git_describe_options` struct to initialize." }, { - "name": "payload", - "type": "void *", - "comment": "payload passed through to callback function" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`." } ], - "argline": "git_index *index, const git_strarray *pathspec, git_index_matched_path_cb callback, void *payload", - "sig": "git_index *::const git_strarray *::git_index_matched_path_cb::void *", + "argline": "git_describe_options *opts, unsigned int version", + "sig": "git_describe_options *::unsigned int", "return": { "type": "int", - "comment": " 0 on success, negative callback return value, or error code" + "comment": " Zero on success; -1 on failure." }, - "description": "Remove all matching index entries.
\n", - "comments": "If you provide a callback function, it will be invoked on each matching\n item in the index immediately before it is removed. Return 0 to\n remove the item, > 0 to skip the item, and \n<\n 0 to abort the scan.
\n", - "group": "index" + "description": "Initialize git_describe_options structure
\n", + "comments": "Initializes a git_describe_options with default values. Equivalent to creating an instance with GIT_DESCRIBE_OPTIONS_INIT.
Update all index entries to match the working directory
\n", - "comments": "This method will fail in bare index instances.
\n\nThis scans the existing index entries and synchronizes them with the\n working directory, deleting them if the corresponding working directory\n file no longer exists otherwise updating the information (including\n adding the latest version of file to the ODB if needed).
\n\nIf you provide a callback function, it will be invoked on each matching\n item in the index immediately before it is updated (either refreshed\n or removed depending on working directory state). Return 0 to proceed\n with updating the item, > 0 to skip the item, and \n<\n 0 to abort the scan.
\n", - "group": "index" + "description": "Initialize git_describe_format_options structure
\n", + "comments": "Initializes a git_describe_format_options with default values. Equivalent to creating an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.
Find the first position of any entries which point to given\n path in the Git index.
\n", - "comments": "", - "group": "index" + "argline": "git_describe_result **result, git_object *committish, git_describe_options *opts", + "sig": "git_describe_result **::git_object *::git_describe_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Describe a commit
\n", + "comments": "Perform the describe operation on the given committish object.
\n", + "group": "describe", + "examples": { + "describe.c": ["ex/v1.9.1/describe.html#git_describe_commit-3"] + } }, - "git_index_find_prefix": { + "git_describe_workdir": { "type": "function", - "file": "git2/index.h", - "line": 718, - "lineto": 718, + "file": "git2/describe.h", + "line": 177, + "lineto": 180, "args": [ { - "name": "at_pos", - "type": "size_t *", - "comment": "the address to which the position of the index entry is written (optional)" + "name": "out", + "type": "git_describe_result **", + "comment": "pointer to store the result. You must free this once\n you're done with it." }, { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to perform the describe" }, { - "name": "prefix", - "type": "const char *", - "comment": "the prefix to search for" + "name": "opts", + "type": "git_describe_options *", + "comment": "the lookup options (or NULL for defaults)" } ], - "argline": "size_t *at_pos, git_index *index, const char *prefix", - "sig": "size_t *::git_index *::const char *", - "return": { - "type": "int", - "comment": " 0 with valid value in at_pos; an error code otherwise" - }, - "description": "Find the first position of any entries matching a prefix. To find the first position\n of a path inside a given folder, suffix the prefix with a '/'.
\n", - "comments": "", - "group": "index" + "argline": "git_describe_result **out, git_repository *repo, git_describe_options *opts", + "sig": "git_describe_result **::git_repository *::git_describe_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Describe a commit
\n", + "comments": "Perform the describe operation on the current commit and the worktree. After performing describe on HEAD, a status is run and the description is considered to be dirty if there are.
\n", + "group": "describe", + "examples": { + "describe.c": ["ex/v1.9.1/describe.html#git_describe_workdir-4"] + } }, - "git_index_conflict_add": { + "git_describe_format": { "type": "function", - "file": "git2/index.h", - "line": 743, - "lineto": 747, + "file": "git2/describe.h", + "line": 191, + "lineto": 194, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "ancestor_entry", - "type": "const git_index_entry *", - "comment": "the entry data for the ancestor of the conflict" + "name": "out", + "type": "git_buf *", + "comment": "The buffer to store the result" }, { - "name": "our_entry", - "type": "const git_index_entry *", - "comment": "the entry data for our side of the merge conflict" + "name": "result", + "type": "const git_describe_result *", + "comment": "the result from `git_describe_commit()` or\n `git_describe_workdir()`." }, { - "name": "their_entry", - "type": "const git_index_entry *", - "comment": "the entry data for their side of the merge conflict" + "name": "opts", + "type": "const git_describe_format_options *", + "comment": "the formatting options (or NULL for defaults)" } ], - "argline": "git_index *index, const git_index_entry *ancestor_entry, const git_index_entry *our_entry, const git_index_entry *their_entry", - "sig": "git_index *::const git_index_entry *::const git_index_entry *::const git_index_entry *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Add or update index entries to represent a conflict. Any staged\n entries that exist at the given paths will be removed.
\n", - "comments": "The entries are the entries from the tree included in the merge. Any\n entry may be null to indicate that that file was not present in the\n trees during the merge. For example, ancestor_entry may be NULL to\n indicate that a file was added in both branches and must be resolved.
\n", - "group": "index" + "argline": "git_buf *out, const git_describe_result *result, const git_describe_format_options *opts", + "sig": "git_buf *::const git_describe_result *::const git_describe_format_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Print the describe result to a buffer
\n", + "comments": "", + "group": "describe", + "examples": { + "describe.c": ["ex/v1.9.1/describe.html#git_describe_format-5"] + } }, - "git_index_conflict_get": { + "git_describe_result_free": { "type": "function", - "file": "git2/index.h", - "line": 763, - "lineto": 768, + "file": "git2/describe.h", + "line": 201, + "lineto": 201, "args": [ { - "name": "ancestor_out", - "type": "const git_index_entry **", - "comment": "Pointer to store the ancestor entry" - }, - { - "name": "our_out", - "type": "const git_index_entry **", - "comment": "Pointer to store the our entry" - }, - { - "name": "their_out", - "type": "const git_index_entry **", - "comment": "Pointer to store the their entry" - }, - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", - "type": "const char *", - "comment": "path to search" + "name": "result", + "type": "git_describe_result *", + "comment": "The result to free." } ], - "argline": "const git_index_entry **ancestor_out, const git_index_entry **our_out, const git_index_entry **their_out, git_index *index, const char *path", - "sig": "const git_index_entry **::const git_index_entry **::const git_index_entry **::git_index *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Get the index entries that represent a conflict of a single file.
\n", - "comments": "The entries are not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.
Free the describe result.
\n", + "comments": "", + "group": "describe" }, - "git_index_conflict_remove": { + "git_diff_options_init": { "type": "function", - "file": "git2/index.h", - "line": 777, - "lineto": 777, + "file": "git2/diff.h", + "line": 492, + "lineto": 494, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "opts", + "type": "git_diff_options *", + "comment": "The `git_diff_options` struct to initialize." }, { - "name": "path", - "type": "const char *", - "comment": "path to remove conflicts for" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_DIFF_OPTIONS_VERSION`." } ], - "argline": "git_index *index, const char *path", - "sig": "git_index *::const char *", + "argline": "git_diff_options *opts, unsigned int version", + "sig": "git_diff_options *::unsigned int", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " Zero on success; -1 on failure." }, - "description": "Removes the index entries that represent a conflict of a single file.
\n", - "comments": "", - "group": "index" + "description": "Initialize git_diff_options structure
\n", + "comments": "Initializes a git_diff_options with default values. Equivalent to creating an instance with GIT_DIFF_OPTIONS_INIT.
Remove all conflicts in the index (entries with a stage greater than 0).
\n", - "comments": "", - "group": "index" + "description": "Initialize git_diff_find_options structure
\n", + "comments": "Initializes a git_diff_find_options with default values. Equivalent to creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
Determine if the index contains entries representing file conflicts.
\n", + "argline": "git_diff *diff", + "sig": "git_diff *", + "return": { "type": "void", "comment": null }, + "description": "Deallocate a diff.
\n", "comments": "", - "group": "index", + "group": "diff", "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_index_has_conflicts-13" + "diff.c": ["ex/v1.9.1/diff.html#git_diff_free-3"], + "log.c": [ + "ex/v1.9.1/log.html#git_diff_free-25", + "ex/v1.9.1/log.html#git_diff_free-26" ] } }, - "git_index_conflict_iterator_new": { + "git_diff_tree_to_tree": { "type": "function", - "file": "git2/index.h", - "line": 803, - "lineto": 805, + "file": "git2/diff.h", + "line": 881, + "lineto": 886, "args": [ { - "name": "iterator_out", - "type": "git_index_conflict_iterator **", - "comment": "The newly created conflict iterator" + "name": "diff", + "type": "git_diff **", + "comment": "Output pointer to a git_diff pointer to be allocated." }, { - "name": "index", - "type": "git_index *", - "comment": "The index to scan" + "name": "repo", + "type": "git_repository *", + "comment": "The repository containing the trees." + }, + { + "name": "old_tree", + "type": "git_tree *", + "comment": "A git_tree object to diff from, or NULL for empty tree." + }, + { + "name": "new_tree", + "type": "git_tree *", + "comment": "A git_tree object to diff to, or NULL for empty tree." + }, + { + "name": "opts", + "type": "const git_diff_options *", + "comment": "Structure with options to influence diff or NULL for defaults." } ], - "argline": "git_index_conflict_iterator **iterator_out, git_index *index", - "sig": "git_index_conflict_iterator **::git_index *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create an iterator for the conflicts in the index.
\n", - "comments": "The index must not be modified while iterating; the results are undefined.
\n", - "group": "index", + "argline": "git_diff **diff, git_repository *repo, git_tree *old_tree, git_tree *new_tree, const git_diff_options *opts", + "sig": "git_diff **::git_repository *::git_tree *::git_tree *::const git_diff_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Create a diff with the difference between two tree objects.
\n", + "comments": "This is equivalent to git diff <old-tree> <new-tree>
The first tree will be used for the "old_file" side of the delta and the second tree will be used for the "new_file" side of the delta. You can pass NULL to indicate an empty tree, although it is an error to pass NULL for both the old_tree and new_tree.
Returns the current conflict (ancestor, ours and theirs entry) and\n advance the iterator internally to the next value.
\n", - "comments": "", - "group": "index", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_index_conflict_next-15" - ] - } + "argline": "git_diff **diff, git_repository *repo, git_tree *old_tree, git_index *index, const git_diff_options *opts", + "sig": "git_diff **::git_repository *::git_tree *::git_index *::const git_diff_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Create a diff between a tree and repository index.
\n", + "comments": "This is equivalent to git diff --cached <treeish> or if you pass the HEAD tree, then like git diff --cached.
The tree you pass will be used for the "old_file" side of the delta, and the index will be used for the "new_file" side of the delta.
\n\nIf you pass NULL for the index, then the existing index of the repo will be used. In this case, the index will be refreshed from disk (if it has changed) before the diff is generated.
Frees a git_index_conflict_iterator.
Create a diff between the repository index and the workdir directory.
\n", + "comments": "This matches the git diff command. See the note below on git_diff_tree_to_workdir for a discussion of the difference between git diff and git diff HEAD and how to emulate a git diff <treeish> using libgit2.
The index will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side of the delta.
\n\nIf you pass NULL for the index, then the existing index of the repo will be used. In this case, the index will be refreshed from disk (if it has changed) before the diff is generated.
Initializes a git_indexer_options with default values. Equivalent to\n creating an instance with GIT_INDEXER_OPTIONS_INIT.
Create a diff between a tree and the working directory.
\n", + "comments": "The tree you provide will be used for the "old_file" side of the delta, and the working directory will be used for the "new_file" side.
\n\nThis is not the same as git diff <treeish> or git diff-index <treeish>. Those commands use information from the index, whereas this function strictly returns the differences between the tree and the files in the working directory, regardless of the state of the index. Use git_diff_tree_to_workdir_with_index to emulate those commands.
To see difference between this and git_diff_tree_to_workdir_with_index, consider the example of a staged file deletion where the file has then been put back into the working dir and further modified. The tree-to-workdir diff for that file is 'modified', but git diff would show status 'deleted' since there is a staged delete.
Create a new indexer instance
\n", - "comments": "", - "group": "indexer" + "argline": "git_diff **diff, git_repository *repo, git_tree *old_tree, const git_diff_options *opts", + "sig": "git_diff **::git_repository *::git_tree *::const git_diff_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Create a diff between a tree and the working directory using index data\n to account for staged deletes, tracked files, etc.
\n", + "comments": "This emulates git diff <tree> by diffing the tree to the index and the index to the working directory and blending the results into a single diff that includes staged deleted, etc.
Add data to the indexer
\n", - "comments": "", - "group": "indexer" + "argline": "git_diff **diff, git_repository *repo, git_index *old_index, git_index *new_index, const git_diff_options *opts", + "sig": "git_diff **::git_repository *::git_index *::git_index *::const git_diff_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Create a diff with the difference between two index objects.
\n", + "comments": "The first index will be used for the "old_file" side of the delta and the second index will be used for the "new_file" side of the delta.
\n", + "group": "diff" }, - "git_indexer_commit": { + "git_diff_merge": { "type": "function", - "file": "git2/indexer.h", - "line": 81, - "lineto": 81, + "file": "git2/diff.h", + "line": 1026, + "lineto": 1028, "args": [ { - "name": "idx", - "type": "git_indexer *", - "comment": "the indexer" + "name": "onto", + "type": "git_diff *", + "comment": "Diff to merge into." }, { - "name": "stats", - "type": "git_transfer_progress *", - "comment": null + "name": "from", + "type": "const git_diff *", + "comment": "Diff to merge." } ], - "argline": "git_indexer *idx, git_transfer_progress *stats", - "sig": "git_indexer *::git_transfer_progress *", - "return": { - "type": "int", - "comment": null - }, - "description": "Finalize the pack and index
\n", - "comments": "Resolve any pending deltas and write out the index file
\n", - "group": "indexer" + "argline": "git_diff *onto, const git_diff *from", + "sig": "git_diff *::const git_diff *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Merge one diff into another.
\n", + "comments": "This merges items from the "from" list into the "onto" list. The resulting diff will have all items that appear in either list. If an item appears in both lists, then it will be "merged" to appear as if the old version was from the "onto" list and the new version is from the "from" list (with the exception that if the item has a pending DELETE in the middle, then it will show as deleted).
\n", + "group": "diff" }, - "git_indexer_hash": { + "git_diff_find_similar": { "type": "function", - "file": "git2/indexer.h", - "line": 91, - "lineto": 91, + "file": "git2/diff.h", + "line": 1042, + "lineto": 1044, "args": [ { - "name": "idx", - "type": "const git_indexer *", - "comment": "the indexer instance" + "name": "diff", + "type": "git_diff *", + "comment": "diff to run detection algorithms on" + }, + { + "name": "options", + "type": "const git_diff_find_options *", + "comment": "Control how detection should be run, NULL for defaults" } ], - "argline": "const git_indexer *idx", - "sig": "const git_indexer *", - "return": { - "type": "const git_oid *", - "comment": null - }, - "description": "Get the packfile's hash
\n", - "comments": "A packfile's name is derived from the sorted hashing of all object\n names. This is only correct after the index has been finalized.
\n", - "group": "indexer" + "argline": "git_diff *diff, const git_diff_find_options *options", + "sig": "git_diff *::const git_diff_find_options *", + "return": { "type": "int", "comment": " 0 on success, -1 on failure" }, + "description": "Transform a diff marking file renames, copies, etc.
\n", + "comments": "This modifies a diff in place, replacing old entries that look like renames or copies with new entries reflecting those changes. This also will, if requested, break modified files into add/remove pairs if the amount of change is above a threshold.
\n", + "group": "diff", + "examples": { "diff.c": ["ex/v1.9.1/diff.html#git_diff_find_similar-9"] } }, - "git_indexer_free": { + "git_diff_num_deltas": { "type": "function", - "file": "git2/indexer.h", - "line": 98, - "lineto": 98, + "file": "git2/diff.h", + "line": 1062, + "lineto": 1062, "args": [ { - "name": "idx", - "type": "git_indexer *", - "comment": "the indexer to free" + "name": "diff", + "type": "const git_diff *", + "comment": "A git_diff generated by one of the above functions" } ], - "argline": "git_indexer *idx", - "sig": "git_indexer *", + "argline": "const git_diff *diff", + "sig": "const git_diff *", "return": { - "type": "void", - "comment": null + "type": "size_t", + "comment": " Count of number of deltas in the list" }, - "description": "Free the indexer and its resources
\n", + "description": "Query how many diff records are there in a diff.
\n", "comments": "", - "group": "indexer" + "group": "diff", + "examples": { "log.c": ["ex/v1.9.1/log.html#git_diff_num_deltas-29"] } }, - "imaxdiv": { + "git_diff_num_deltas_of_type": { "type": "function", - "file": "git2/inttypes.h", - "line": 284, - "lineto": 298, + "file": "git2/diff.h", + "line": 1075, + "lineto": 1076, "args": [ { - "name": "numer", - "type": "intmax_t", - "comment": null + "name": "diff", + "type": "const git_diff *", + "comment": "A git_diff generated by one of the above functions" }, { - "name": "denom", - "type": "intmax_t", - "comment": null + "name": "type", + "type": "git_delta_t", + "comment": "A git_delta_t value to filter the count" } ], - "argline": "intmax_t numer, intmax_t denom", - "sig": "intmax_t::intmax_t", + "argline": "const git_diff *diff, git_delta_t type", + "sig": "const git_diff *::git_delta_t", "return": { - "type": "int", - "comment": null + "type": "size_t", + "comment": " Count of number of deltas matching delta_t type" }, - "description": "", - "comments": "", - "group": "imaxdiv" + "description": "Query how many diff deltas are there in a diff filtered by type.
\n", + "comments": "This works just like git_diff_num_deltas() with an extra parameter that is a git_delta_t and returns just the count of how many deltas match that particular type.
Allocate a new mailmap object.
\n", - "comments": "This object is empty, so you'll have to add a mailmap file before you can do\n anything with it. The mailmap must be freed with 'git_mailmap_free'.
\n", - "group": "mailmap" + "description": "Return the diff delta for an entry in the diff list.
\n", + "comments": "The git_diff_delta pointer points to internal data and you do not have to release it when you are done with it. It will go away when the * git_diff (or any associated git_patch) goes away.
Note that the flags on the delta related to whether it has binary content or not may not be set if there are no attributes set for the file and there has been no reason to load the file data at this point. For now, if you need those flags to be up to date, your only option is to either use git_diff_foreach or create a git_patch.
Free the mailmap and its associated memory.
\n", + "description": "Check if deltas are sorted case sensitively or insensitively.
\n", "comments": "", - "group": "mailmap" + "group": "diff" }, - "git_mailmap_add_entry": { + "git_diff_foreach": { "type": "function", - "file": "git2/mailmap.h", - "line": 52, - "lineto": 54, + "file": "git2/diff.h", + "line": 1132, + "lineto": 1138, "args": [ { - "name": "mm", - "type": "git_mailmap *", - "comment": "mailmap to add the entry to" + "name": "diff", + "type": "git_diff *", + "comment": "A git_diff generated by one of the above functions." }, { - "name": "real_name", - "type": "const char *", - "comment": "the real name to use, or NULL" + "name": "file_cb", + "type": "git_diff_file_cb", + "comment": "Callback function to make per file in the diff." }, { - "name": "real_email", - "type": "const char *", - "comment": "the real email to use, or NULL" + "name": "binary_cb", + "type": "git_diff_binary_cb", + "comment": "Optional callback to make for binary files." }, { - "name": "replace_name", - "type": "const char *", - "comment": "the name to replace, or NULL" + "name": "hunk_cb", + "type": "git_diff_hunk_cb", + "comment": "Optional callback to make per hunk of text diff. This\n callback is called to describe a range of lines in the\n diff. It will not be issued for binary files." }, { - "name": "replace_email", - "type": "const char *", - "comment": "the email to replace" + "name": "line_cb", + "type": "git_diff_line_cb", + "comment": "Optional callback to make per line of diff text. This\n same callback will be made for context lines, added, and\n removed lines, and even for a deleted trailing newline." + }, + { + "name": "payload", + "type": "void *", + "comment": "Reference pointer that will be passed to your callbacks." } ], - "argline": "git_mailmap *mm, const char *real_name, const char *real_email, const char *replace_name, const char *replace_email", - "sig": "git_mailmap *::const char *::const char *::const char *::const char *", + "argline": "git_diff *diff, git_diff_file_cb file_cb, git_diff_binary_cb binary_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *payload", + "sig": "git_diff *::git_diff_file_cb::git_diff_binary_cb::git_diff_hunk_cb::git_diff_line_cb::void *", "return": { "type": "int", - "comment": " 0 on success, or an error code" + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "Add a single entry to the given mailmap object. If the entry already exists,\n it will be replaced with the new entry.
\n", - "comments": "", - "group": "mailmap" + "description": "Loop over all deltas in a diff issuing callbacks.
\n", + "comments": "This will iterate through all of the files described in a diff. You should provide a file callback to learn about each file.
\n\nThe "hunk" and "line" callbacks are optional, and the text diff of the files will only be calculated if they are not NULL. Of course, these callbacks will not be invoked for binary files on the diff or for files whose only changed is a file mode change.
\n\nReturning a non-zero value from any of the callbacks will terminate the iteration and return the value to the user.
\n", + "group": "diff" }, - "git_mailmap_from_buffer": { + "git_diff_status_char": { "type": "function", - "file": "git2/mailmap.h", - "line": 64, - "lineto": 65, + "file": "git2/diff.h", + "line": 1151, + "lineto": 1151, "args": [ { - "name": "out", - "type": "git_mailmap **", - "comment": "pointer to store the new mailmap" + "name": "status", + "type": "git_delta_t", + "comment": "The git_delta_t value to look up" + } + ], + "argline": "git_delta_t status", + "sig": "git_delta_t", + "return": { + "type": "char", + "comment": " The single character label for that code" + }, + "description": "Look up the single character abbreviation for a delta status code.
\n", + "comments": "When you run git diff --name-status it uses single letter codes in the output such as 'A' for added, 'D' for deleted, 'M' for modified, etc. This function converts a git_delta_t value into these letters for your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').
Create a new mailmap instance containing a single mailmap file
\n", - "comments": "", - "group": "mailmap" + "description": "Iterate over a diff generating formatted text output.
\n", + "comments": "Returning a non-zero value from the callbacks will terminate the iteration and return the non-zero value to the caller.
\n", + "group": "diff", + "examples": { + "diff.c": ["ex/v1.9.1/diff.html#git_diff_print-10"], + "log.c": ["ex/v1.9.1/log.html#git_diff_print-30"] + } }, - "git_mailmap_from_repository": { + "git_diff_to_buf": { "type": "function", - "file": "git2/mailmap.h", - "line": 81, - "lineto": 82, + "file": "git2/diff.h", + "line": 1193, + "lineto": 1196, "args": [ { "name": "out", - "type": "git_mailmap **", - "comment": "pointer to store the new mailmap" + "type": "git_buf *", + "comment": "A pointer to a user-allocated git_buf that will\n contain the diff text" }, { - "name": "repo", - "type": "git_repository *", - "comment": "repository to load mailmap information from" + "name": "diff", + "type": "git_diff *", + "comment": "A git_diff generated by one of the above functions." + }, + { + "name": "format", + "type": "git_diff_format_t", + "comment": "A git_diff_format_t value to pick the text format." } ], - "argline": "git_mailmap **out, git_repository *repo", - "sig": "git_mailmap **::git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, - "description": "Create a new mailmap instance from a repository, loading mailmap files based\n on the repository's configuration.
\n", - "comments": "Mailmaps are loaded in the following order:\n 1. '.mailmap' in the root of the repository's working directory, if present.\n 2. The blob object identified by the 'mailmap.blob' config entry, if set.\n [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]\n 3. The path in the 'mailmap.file' config entry, if set.
\n", - "group": "mailmap" + "argline": "git_buf *out, git_diff *diff, git_diff_format_t format", + "sig": "git_buf *::git_diff *::git_diff_format_t", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Produce the complete formatted text output from a diff into a\n buffer.
\n", + "comments": "", + "group": "diff" }, - "git_mailmap_resolve": { + "git_diff_blobs": { "type": "function", - "file": "git2/mailmap.h", - "line": 96, - "lineto": 98, + "file": "git2/diff.h", + "line": 1232, + "lineto": 1242, "args": [ { - "name": "real_name", - "type": "const char **", - "comment": "pointer to store the real name" + "name": "old_blob", + "type": "const git_blob *", + "comment": "Blob for old side of diff, or NULL for empty blob" }, { - "name": "real_email", - "type": "const char **", - "comment": "pointer to store the real email" + "name": "old_as_path", + "type": "const char *", + "comment": "Treat old blob as if it had this filename; can be NULL" }, { - "name": "mm", - "type": "const git_mailmap *", - "comment": "the mailmap to perform a lookup with (may be NULL)" + "name": "new_blob", + "type": "const git_blob *", + "comment": "Blob for new side of diff, or NULL for empty blob" }, { - "name": "name", + "name": "new_as_path", "type": "const char *", - "comment": "the name to look up" + "comment": "Treat new blob as if it had this filename; can be NULL" }, { - "name": "email", - "type": "const char *", - "comment": "the email to look up" - } - ], - "argline": "const char **real_name, const char **real_email, const git_mailmap *mm, const char *name, const char *email", - "sig": "const char **::const char **::const git_mailmap *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, - "description": "Resolve a name and email to the corresponding real name and email.
\n", - "comments": "The lifetime of the strings are tied to mm, name, and email parameters.
Resolve a signature to use real names and emails with a mailmap.
\n", - "comments": "Call git_signature_free() to free the data.
Initializes a git_merge_file_input with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_INPUT_INIT.
Directly run a diff on two blobs.
\n", + "comments": "Compared to a file, a blob lacks some contextual information. As such, the git_diff_file given to the callback will have some fake data; i.e. mode will be 0 and path will be NULL.
NULL is allowed for either old_blob or new_blob and will be treated as an empty blob, with the oid set to NULL in the git_diff_file data. Passing NULL for both blobs is a noop; no callbacks will be made at all.
We do run a binary content check on the blob content and if either blob looks like binary data, the git_diff_delta binary attribute will be set to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass GIT_DIFF_FORCE_TEXT of course).
Initialize git_merge_file_options structure
\n", - "comments": "Initializes a git_merge_file_options with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.
Initialize git_merge_options structure
\n", - "comments": "Initializes a git_merge_options with default values. Equivalent to\n creating an instance with GIT_MERGE_OPTIONS_INIT.
Analyzes the given branch(es) and determines the opportunities for\n merging them into the HEAD of the repository.
\n", - "comments": "", - "group": "merge", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_merge_analysis-17" - ] - } + "description": "Directly run a diff between a blob and a buffer.
\n", + "comments": "As with git_diff_blobs, comparing a blob and buffer lacks some context, so the git_diff_file parameters to the callbacks will be faked a la the rules for git_diff_blobs().
Passing NULL for old_blob will be treated as an empty blob (i.e. the file_cb will be invoked with GIT_DELTA_ADDED and the diff will be the entire content of the buffer added). Passing NULL to the buffer will do the reverse, with GIT_DELTA_REMOVED and blob content removed.
Analyzes the given branch(es) and determines the opportunities for\n merging them into a reference.
\n", - "comments": "", - "group": "merge" - }, - "git_merge_base": { - "type": "function", - "file": "git2/merge.h", - "line": 419, - "lineto": 423, - "args": [ + "name": "new_as_path", + "type": "const char *", + "comment": "Treat buffer as if it had this filename; can be NULL" + }, { - "name": "out", - "type": "git_oid *", - "comment": "the OID of a merge base between 'one' and 'two'" + "name": "options", + "type": "const git_diff_options *", + "comment": "Options for diff, or NULL for default options" }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository where the commits exist" + "name": "file_cb", + "type": "git_diff_file_cb", + "comment": "Callback for \"file\"; made once if there is a diff; can be NULL" }, { - "name": "one", - "type": "const git_oid *", - "comment": "one of the commits" + "name": "binary_cb", + "type": "git_diff_binary_cb", + "comment": "Callback for binary files; can be NULL" + }, + { + "name": "hunk_cb", + "type": "git_diff_hunk_cb", + "comment": "Callback for each hunk in diff; can be NULL" }, { - "name": "two", - "type": "const git_oid *", - "comment": "the other commit" + "name": "line_cb", + "type": "git_diff_line_cb", + "comment": "Callback for each line in diff; can be NULL" + }, + { + "name": "payload", + "type": "void *", + "comment": "Payload passed to each callback function" } ], - "argline": "git_oid *out, git_repository *repo, const git_oid *one, const git_oid *two", - "sig": "git_oid *::git_repository *::const git_oid *::const git_oid *", + "argline": "const void *old_buffer, size_t old_len, const char *old_as_path, const void *new_buffer, size_t new_len, const char *new_as_path, const git_diff_options *options, git_diff_file_cb file_cb, git_diff_binary_cb binary_cb, git_diff_hunk_cb hunk_cb, git_diff_line_cb line_cb, void *payload", + "sig": "const void *::size_t::const char *::const void *::size_t::const char *::const git_diff_options *::git_diff_file_cb::git_diff_binary_cb::git_diff_hunk_cb::git_diff_line_cb::void *", "return": { "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if not found or error code" + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "Find a merge base between two commits
\n", - "comments": "", - "group": "merge", - "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_merge_base-33" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_merge_base-3" - ] - } + "description": "Directly run a diff between two buffers.
\n", + "comments": "Even more than with git_diff_blobs, comparing two buffer lacks context, so the git_diff_file parameters to the callbacks will be faked a la the rules for git_diff_blobs().
Find merge bases between two commits
\n", - "comments": "", - "group": "merge" + "argline": "git_diff **out, const char *content, size_t content_len", + "sig": "git_diff **::const char *::size_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Read the contents of a git patch file into a git_diff object.
The diff object produced is similar to the one that would be produced if you actually produced it computationally by comparing two trees, however there may be subtle differences. For example, a patch file likely contains abbreviated object IDs, so the object IDs in a git_diff_delta produced by this function will also be abbreviated.
This function will only read patch files created by a git implementation, it will not read unified diffs produced by the diff program, nor any other types of patch files.
Find a merge base given a list of commits
\n", + "description": "Accumulate diff statistics for all patches.
\n", "comments": "", - "group": "merge" + "group": "diff", + "examples": { "diff.c": ["ex/v1.9.1/diff.html#git_diff_get_stats-13"] } }, - "git_merge_bases_many": { + "git_diff_stats_files_changed": { "type": "function", - "file": "git2/merge.h", - "line": 464, - "lineto": 468, + "file": "git2/diff.h", + "line": 1408, + "lineto": 1409, "args": [ { - "name": "out", - "type": "git_oidarray *", - "comment": "array in which to store the resulting ids" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository where the commits exist" - }, - { - "name": "length", - "type": "size_t", - "comment": "The number of commits in the provided `input_array`" - }, - { - "name": "input_array", - "type": "const git_oid []", - "comment": "oids of the commits" + "name": "stats", + "type": "const git_diff_stats *", + "comment": "A `git_diff_stats` generated by one of the above functions." } ], - "argline": "git_oidarray *out, git_repository *repo, size_t length, const git_oid [] input_array", - "sig": "git_oidarray *::git_repository *::size_t::const git_oid []", + "argline": "const git_diff_stats *stats", + "sig": "const git_diff_stats *", "return": { - "type": "int", - "comment": " Zero on success; GIT_ENOTFOUND or -1 on failure." + "type": "size_t", + "comment": " total number of files changed in the diff" }, - "description": "Find all merge bases given a list of commits
\n", + "description": "Get the total number of files changed in a diff
\n", "comments": "", - "group": "merge" + "group": "diff" }, - "git_merge_base_octopus": { + "git_diff_stats_insertions": { "type": "function", - "file": "git2/merge.h", - "line": 479, - "lineto": 483, + "file": "git2/diff.h", + "line": 1417, + "lineto": 1418, "args": [ { - "name": "out", - "type": "git_oid *", - "comment": "the OID of a merge base considering all the commits" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository where the commits exist" - }, - { - "name": "length", - "type": "size_t", - "comment": "The number of commits in the provided `input_array`" - }, - { - "name": "input_array", - "type": "const git_oid []", - "comment": "oids of the commits" + "name": "stats", + "type": "const git_diff_stats *", + "comment": "A `git_diff_stats` generated by one of the above functions." } ], - "argline": "git_oid *out, git_repository *repo, size_t length, const git_oid [] input_array", - "sig": "git_oid *::git_repository *::size_t::const git_oid []", + "argline": "const git_diff_stats *stats", + "sig": "const git_diff_stats *", "return": { - "type": "int", - "comment": " Zero on success; GIT_ENOTFOUND or -1 on failure." + "type": "size_t", + "comment": " total number of insertions in the diff" }, - "description": "Find a merge base in preparation for an octopus merge
\n", + "description": "Get the total number of insertions in a diff
\n", "comments": "", - "group": "merge" + "group": "diff" }, - "git_merge_file": { + "git_diff_stats_deletions": { "type": "function", - "file": "git2/merge.h", - "line": 501, - "lineto": 506, + "file": "git2/diff.h", + "line": 1426, + "lineto": 1427, "args": [ { - "name": "out", - "type": "git_merge_file_result *", - "comment": "The git_merge_file_result to be filled in" - }, - { - "name": "ancestor", - "type": "const git_merge_file_input *", - "comment": "The contents of the ancestor file" - }, - { - "name": "ours", - "type": "const git_merge_file_input *", - "comment": "The contents of the file in \"our\" side" - }, - { - "name": "theirs", - "type": "const git_merge_file_input *", - "comment": "The contents of the file in \"their\" side" - }, - { - "name": "opts", - "type": "const git_merge_file_options *", - "comment": "The merge file options or `NULL` for defaults" + "name": "stats", + "type": "const git_diff_stats *", + "comment": "A `git_diff_stats` generated by one of the above functions." } ], - "argline": "git_merge_file_result *out, const git_merge_file_input *ancestor, const git_merge_file_input *ours, const git_merge_file_input *theirs, const git_merge_file_options *opts", - "sig": "git_merge_file_result *::const git_merge_file_input *::const git_merge_file_input *::const git_merge_file_input *::const git_merge_file_options *", + "argline": "const git_diff_stats *stats", + "sig": "const git_diff_stats *", "return": { - "type": "int", - "comment": " 0 on success or error code" + "type": "size_t", + "comment": " total number of deletions in the diff" }, - "description": "Merge two files as they exist in the in-memory data structures, using\n the given common ancestor as the baseline, producing a\n git_merge_file_result that reflects the merge result. The\n git_merge_file_result must be freed with git_merge_file_result_free.
Note that this function does not reference a repository and any\n configuration must be passed as git_merge_file_options.
Get the total number of deletions in a diff
\n", + "comments": "", + "group": "diff" }, - "git_merge_file_from_index": { + "git_diff_stats_to_buf": { "type": "function", - "file": "git2/merge.h", - "line": 522, - "lineto": 528, + "file": "git2/diff.h", + "line": 1438, + "lineto": 1442, "args": [ { "name": "out", - "type": "git_merge_file_result *", - "comment": "The git_merge_file_result to be filled in" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "The repository" - }, - { - "name": "ancestor", - "type": "const git_index_entry *", - "comment": "The index entry for the ancestor file (stage level 1)" + "type": "git_buf *", + "comment": "buffer to store the formatted diff statistics in." }, { - "name": "ours", - "type": "const git_index_entry *", - "comment": "The index entry for our file (stage level 2)" + "name": "stats", + "type": "const git_diff_stats *", + "comment": "A `git_diff_stats` generated by one of the above functions." }, { - "name": "theirs", - "type": "const git_index_entry *", - "comment": "The index entry for their file (stage level 3)" + "name": "format", + "type": "git_diff_stats_format_t", + "comment": "Formatting option." }, { - "name": "opts", - "type": "const git_merge_file_options *", - "comment": "The merge file options or NULL" + "name": "width", + "type": "size_t", + "comment": "Target width for output (only affects GIT_DIFF_STATS_FULL)" } ], - "argline": "git_merge_file_result *out, git_repository *repo, const git_index_entry *ancestor, const git_index_entry *ours, const git_index_entry *theirs, const git_merge_file_options *opts", - "sig": "git_merge_file_result *::git_repository *::const git_index_entry *::const git_index_entry *::const git_index_entry *::const git_merge_file_options *", + "argline": "git_buf *out, const git_diff_stats *stats, git_diff_stats_format_t format, size_t width", + "sig": "git_buf *::const git_diff_stats *::git_diff_stats_format_t::size_t", "return": { "type": "int", - "comment": " 0 on success or error code" + "comment": " 0 on success; non-zero on error" }, - "description": "Merge two files as they exist in the index, using the given common\n ancestor as the baseline, producing a git_merge_file_result that\n reflects the merge result. The git_merge_file_result must be freed with\n git_merge_file_result_free.
Print diff statistics to a git_buf.
Frees a git_merge_file_result.
Deallocate a git_diff_stats.
Merge two trees, producing a git_index that reflects the result of\n the merge. The index may be written as-is to the working directory\n or checked out. If the index is to be converted to a tree, the caller\n should resolve any conflicts that arose as part of the merge.
The returned index must be freed explicitly with git_index_free.
Initialize git_diff_patchid_options structure
\n", + "comments": "Initializes a git_diff_patchid_options with default values. Equivalent to creating an instance with GIT_DIFF_PATCHID_OPTIONS_INIT.
Merge two commits, producing a git_index that reflects the result of\n the merge. The index may be written as-is to the working directory\n or checked out. If the index is to be converted to a tree, the caller\n should resolve any conflicts that arose as part of the merge.
The returned index must be freed explicitly with git_index_free.
Calculate the patch ID for the given patch.
\n", + "comments": "Calculate a stable patch ID for the given patch by summing the hash of the file diffs, ignoring whitespace and line numbers. This can be used to derive whether two diffs are the same with a high probability.
\n\nCurrently, this function only calculates stable patch IDs, as defined in git-patch-id(1), and should in fact generate the same IDs as the upstream git project does.
\n", + "group": "diff" }, - "git_merge": { + "git_email_create_from_commit": { "type": "function", - "file": "git2/merge.h", - "line": 601, - "lineto": 606, + "file": "git2/email.h", + "line": 99, + "lineto": 102, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to merge" - }, - { - "name": "their_heads", - "type": "const git_annotated_commit **", - "comment": "the heads to merge into" - }, - { - "name": "their_heads_len", - "type": "size_t", - "comment": "the number of heads to merge" + "name": "out", + "type": "git_buf *", + "comment": "buffer to store the e-mail patch in" }, { - "name": "merge_opts", - "type": "const git_merge_options *", - "comment": "merge options" + "name": "commit", + "type": "git_commit *", + "comment": "commit to create a patch for" }, { - "name": "checkout_opts", - "type": "const git_checkout_options *", - "comment": "checkout options" + "name": "opts", + "type": "const git_email_create_options *", + "comment": "email creation options" } ], - "argline": "git_repository *repo, const git_annotated_commit **their_heads, size_t their_heads_len, const git_merge_options *merge_opts, const git_checkout_options *checkout_opts", - "sig": "git_repository *::const git_annotated_commit **::size_t::const git_merge_options *::const git_checkout_options *", + "argline": "git_buf *out, git_commit *commit, const git_email_create_options *opts", + "sig": "git_buf *::git_commit *::const git_email_create_options *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a diff for a commit in mbox format for sending via email.\n The commit must not be a merge commit.
\n", + "comments": "", + "group": "email" + }, + "git_error_last": { + "type": "function", + "file": "git2/errors.h", + "line": 149, + "lineto": 149, + "args": [], + "argline": "", + "sig": "", "return": { - "type": "int", - "comment": " 0 on success or error code" + "type": "const git_error *", + "comment": " A pointer to a `git_error` object that describes the error." }, - "description": "Merges the given commit(s) into HEAD, writing the results into the working\n directory. Any changes are staged for commit and any conflicts are written\n to the index. Callers should inspect the repository's index after this\n completes, resolve any conflicts and prepare a commit.
\n", - "comments": "For compatibility with git, the repository is put into a merging\n state. Once the commit is done (or if the uses wishes to abort),\n you should clear this state by calling\n git_repository_state_cleanup().
Return the last git_error object that was generated for the\n current thread.
This function will never return NULL.
\n\nCallers should not rely on this to determine whether an error has occurred. For error checking, callers should examine the return codes of libgit2 functions.
\n\nThis call can only reliably report error messages when an error has occurred. (It may contain stale information if it is called after a different function that succeeds.)
\n\nThe memory for this object is managed by libgit2. It should not be freed.
\n", + "group": "error", "examples": { + "checkout.c": [ + "ex/v1.9.1/checkout.html#git_error_last-11", + "ex/v1.9.1/checkout.html#git_error_last-12", + "ex/v1.9.1/checkout.html#git_error_last-13", + "ex/v1.9.1/checkout.html#git_error_last-14" + ], + "commit.c": ["ex/v1.9.1/commit.html#git_error_last-2"], + "config.c": [ + "ex/v1.9.1/config.html#git_error_last-6", + "ex/v1.9.1/config.html#git_error_last-7", + "ex/v1.9.1/config.html#git_error_last-8" + ], + "general.c": ["ex/v1.9.1/general.html#git_error_last-33"], "merge.c": [ - "ex/v0.28.0/merge.html#git_merge-18" + "ex/v1.9.1/merge.html#git_error_last-8", + "ex/v1.9.1/merge.html#git_error_last-9" ] } }, - "git_message_prettify": { + "git_filter_list_load": { "type": "function", - "file": "git2/message.h", - "line": 38, - "lineto": 38, + "file": "git2/filter.h", + "line": 138, + "lineto": 144, "args": [ { - "name": "out", - "type": "git_buf *", - "comment": "The user-allocated git_buf which will be filled with the\n cleaned up message." + "name": "filters", + "type": "git_filter_list **", + "comment": "Output newly created git_filter_list (or NULL)" }, { - "name": "message", + "name": "repo", + "type": "git_repository *", + "comment": "Repository object that contains `path`" + }, + { + "name": "blob", + "type": "git_blob *", + "comment": "The blob to which the filter will be applied (if known)" + }, + { + "name": "path", "type": "const char *", - "comment": "The message to be prettified." + "comment": "Relative path of the file to be filtered" }, { - "name": "strip_comments", - "type": "int", - "comment": "Non-zero to remove comment lines, 0 to leave them in." + "name": "mode", + "type": "git_filter_mode_t", + "comment": "Filtering direction (WT->ODB or ODB->WT)" }, { - "name": "comment_char", - "type": "char", - "comment": "Comment character. Lines starting with this character\n are considered to be comments and removed if `strip_comments` is non-zero." + "name": "flags", + "type": "uint32_t", + "comment": "Combination of `git_filter_flag_t` flags" } ], - "argline": "git_buf *out, const char *message, int strip_comments, char comment_char", - "sig": "git_buf *::const char *::int::char", + "argline": "git_filter_list **filters, git_repository *repo, git_blob *blob, const char *path, git_filter_mode_t mode, uint32_t flags", + "sig": "git_filter_list **::git_repository *::git_blob *::const char *::git_filter_mode_t::uint32_t", "return": { "type": "int", - "comment": " 0 or an error code." + "comment": " 0 on success (which could still return NULL if no filters are\n needed for the requested file), \n<\n0 on error" }, - "description": "Clean up excess whitespace and make sure there is a trailing newline in the message.
\n", - "comments": "Optionally, it can remove lines which start with the comment character.
\n", - "group": "message" + "description": "Load the filter list for a given path.
\n", + "comments": "This will return 0 (success) but set the output git_filter_list to NULL if no filters are requested for the given file.
\n", + "group": "filter" }, - "git_message_trailers": { + "git_filter_list_load_ext": { "type": "function", - "file": "git2/message.h", - "line": 73, - "lineto": 73, + "file": "git2/filter.h", + "line": 161, + "lineto": 167, "args": [ { - "name": "arr", - "type": "git_message_trailer_array *", - "comment": "A pre-allocated git_message_trailer_array struct to be filled in\n with any trailers found during parsing." + "name": "filters", + "type": "git_filter_list **", + "comment": "Output newly created git_filter_list (or NULL)" }, { - "name": "message", + "name": "repo", + "type": "git_repository *", + "comment": "Repository object that contains `path`" + }, + { + "name": "blob", + "type": "git_blob *", + "comment": "The blob to which the filter will be applied (if known)" + }, + { + "name": "path", "type": "const char *", - "comment": "The message to be parsed" - } - ], - "argline": "git_message_trailer_array *arr, const char *message", - "sig": "git_message_trailer_array *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, or non-zero on error." - }, - "description": "Parse trailers out of a message, filling the array pointed to by +arr+.
\n", - "comments": "Trailers are key/value pairs in the last paragraph of a message, not\n including any patches or conflicts that may be present.
\n", - "group": "message" - }, - "git_message_trailer_array_free": { - "type": "function", - "file": "git2/message.h", - "line": 79, - "lineto": 79, - "args": [ + "comment": "Relative path of the file to be filtered" + }, { - "name": "arr", - "type": "git_message_trailer_array *", - "comment": null + "name": "mode", + "type": "git_filter_mode_t", + "comment": "Filtering direction (WT->ODB or ODB->WT)" + }, + { + "name": "opts", + "type": "git_filter_options *", + "comment": "The `git_filter_options` to use when loading filters" } ], - "argline": "git_message_trailer_array *arr", - "sig": "git_message_trailer_array *", + "argline": "git_filter_list **filters, git_repository *repo, git_blob *blob, const char *path, git_filter_mode_t mode, git_filter_options *opts", + "sig": "git_filter_list **::git_repository *::git_blob *::const char *::git_filter_mode_t::git_filter_options *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success (which could still return NULL if no filters are\n needed for the requested file), \n<\n0 on error" }, - "description": "Clean's up any allocated memory in the git_message_trailer_array filled by\n a call to git_message_trailers.
\n", - "comments": "", - "group": "message" + "description": "Load the filter list for a given path.
\n", + "comments": "This will return 0 (success) but set the output git_filter_list to NULL if no filters are requested for the given file.
\n", + "group": "filter" }, - "git_note_iterator_new": { + "git_filter_list_contains": { "type": "function", - "file": "git2/notes.h", - "line": 49, - "lineto": 52, + "file": "git2/filter.h", + "line": 181, + "lineto": 183, "args": [ { - "name": "out", - "type": "git_note_iterator **", - "comment": "pointer to the iterator" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "repository where to look up the note" + "name": "filters", + "type": "git_filter_list *", + "comment": "A loaded git_filter_list (or NULL)" }, { - "name": "notes_ref", + "name": "name", "type": "const char *", - "comment": "canonical name of the reference to use (optional); defaults to\n \"refs/notes/commits\"" + "comment": "The name of the filter to query" } ], - "argline": "git_note_iterator **out, git_repository *repo, const char *notes_ref", - "sig": "git_note_iterator **::git_repository *::const char *", + "argline": "git_filter_list *filters, const char *name", + "sig": "git_filter_list *::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 1 if the filter is in the list, 0 otherwise" }, - "description": "Creates a new iterator for notes
\n", - "comments": "The iterator must be freed manually by the user.
\n", - "group": "note" + "description": "Query the filter list to see if a given filter (by name) will run.\n The built-in filters "crlf" and "ident" can be queried, otherwise this\n is the name of the filter specified by the filter attribute.
\n", + "comments": "This will return 0 if the given filter is not in the list, or 1 if the filter will be applied.
\n", + "group": "filter" }, - "git_note_commit_iterator_new": { + "git_filter_list_apply_to_buffer": { "type": "function", - "file": "git2/notes.h", - "line": 64, - "lineto": 66, + "file": "git2/filter.h", + "line": 194, + "lineto": 198, "args": [ { "name": "out", - "type": "git_note_iterator **", - "comment": "pointer to the iterator" + "type": "git_buf *", + "comment": "Buffer to store the result of the filtering" }, { - "name": "notes_commit", - "type": "git_commit *", - "comment": "a pointer to the notes commit object" + "name": "filters", + "type": "git_filter_list *", + "comment": "A loaded git_filter_list (or NULL)" + }, + { + "name": "in", + "type": "const char *", + "comment": "Buffer containing the data to filter" + }, + { + "name": "in_len", + "type": "size_t", + "comment": "The length of the input buffer" } ], - "argline": "git_note_iterator **out, git_commit *notes_commit", - "sig": "git_note_iterator **::git_commit *", + "argline": "git_buf *out, git_filter_list *filters, const char *in, size_t in_len", + "sig": "git_buf *::git_filter_list *::const char *::size_t", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, an error code otherwise" }, - "description": "Creates a new iterator for notes from a commit
\n", - "comments": "The iterator must be freed manually by the user.
\n", - "group": "note" + "description": "Apply filter list to a data buffer.
\n", + "comments": "", + "group": "filter" }, - "git_note_iterator_free": { + "git_filter_list_apply_to_file": { "type": "function", - "file": "git2/notes.h", - "line": 73, - "lineto": 73, + "file": "git2/filter.h", + "line": 210, + "lineto": 214, "args": [ { - "name": "it", - "type": "git_note_iterator *", - "comment": "pointer to the iterator" + "name": "out", + "type": "git_buf *", + "comment": "buffer into which to store the filtered file" + }, + { + "name": "filters", + "type": "git_filter_list *", + "comment": "the list of filters to apply" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to perform the filtering" + }, + { + "name": "path", + "type": "const char *", + "comment": "the path of the file to filter, a relative path will be\n taken as relative to the workdir" } ], - "argline": "git_note_iterator *it", - "sig": "git_note_iterator *", - "return": { - "type": "void", - "comment": null - }, - "description": "Frees an git_note_iterator
\n", + "argline": "git_buf *out, git_filter_list *filters, git_repository *repo, const char *path", + "sig": "git_buf *::git_filter_list *::git_repository *::const char *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Apply a filter list to the contents of a file on disk
\n", "comments": "", - "group": "note" + "group": "filter" }, - "git_note_next": { + "git_filter_list_apply_to_blob": { "type": "function", - "file": "git2/notes.h", - "line": 86, - "lineto": 89, + "file": "git2/filter.h", + "line": 224, + "lineto": 227, "args": [ { - "name": "note_id", - "type": "git_oid *", - "comment": "id of blob containing the message" + "name": "out", + "type": "git_buf *", + "comment": "buffer into which to store the filtered file" }, { - "name": "annotated_id", - "type": "git_oid *", - "comment": "id of the git object being annotated" + "name": "filters", + "type": "git_filter_list *", + "comment": "the list of filters to apply" }, { - "name": "it", - "type": "git_note_iterator *", - "comment": "pointer to the iterator" + "name": "blob", + "type": "git_blob *", + "comment": "the blob to filter" } ], - "argline": "git_oid *note_id, git_oid *annotated_id, git_note_iterator *it", - "sig": "git_oid *::git_oid *::git_note_iterator *", - "return": { - "type": "int", - "comment": " 0 (no error), GIT_ITEROVER (iteration is done) or an error code\n (negative value)" - }, - "description": "Return the current item (note_id and annotated_id) and advance the iterator\n internally to the next value
\n", + "argline": "git_buf *out, git_filter_list *filters, git_blob *blob", + "sig": "git_buf *::git_filter_list *::git_blob *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Apply a filter list to the contents of a blob
\n", "comments": "", - "group": "note" + "group": "filter" }, - "git_note_read": { + "git_filter_list_stream_buffer": { "type": "function", - "file": "git2/notes.h", - "line": 105, - "lineto": 109, + "file": "git2/filter.h", + "line": 238, + "lineto": 242, "args": [ { - "name": "out", - "type": "git_note **", - "comment": "pointer to the read note; NULL in case of error" + "name": "filters", + "type": "git_filter_list *", + "comment": "the list of filters to apply" }, { - "name": "repo", - "type": "git_repository *", - "comment": "repository where to look up the note" + "name": "buffer", + "type": "const char *", + "comment": "the buffer to filter" }, { - "name": "notes_ref", - "type": "const char *", - "comment": "canonical name of the reference to use (optional); defaults to\n \"refs/notes/commits\"" + "name": "len", + "type": "size_t", + "comment": "the size of the buffer" }, { - "name": "oid", - "type": "const git_oid *", - "comment": "OID of the git object to read the note from" + "name": "target", + "type": "git_writestream *", + "comment": "the stream into which the data will be written" } ], - "argline": "git_note **out, git_repository *repo, const char *notes_ref, const git_oid *oid", - "sig": "git_note **::git_repository *::const char *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Read the note for an object
\n", - "comments": "The note must be freed manually by the user.
\n", - "group": "note" + "argline": "git_filter_list *filters, const char *buffer, size_t len, git_writestream *target", + "sig": "git_filter_list *::const char *::size_t::git_writestream *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Apply a filter list to an arbitrary buffer as a stream
\n", + "comments": "", + "group": "filter" }, - "git_note_commit_read": { + "git_filter_list_stream_file": { "type": "function", - "file": "git2/notes.h", - "line": 124, - "lineto": 128, + "file": "git2/filter.h", + "line": 254, + "lineto": 258, "args": [ { - "name": "out", - "type": "git_note **", - "comment": "pointer to the read note; NULL in case of error" + "name": "filters", + "type": "git_filter_list *", + "comment": "the list of filters to apply" }, { "name": "repo", "type": "git_repository *", - "comment": "repository where to look up the note" + "comment": "the repository in which to perform the filtering" }, { - "name": "notes_commit", - "type": "git_commit *", - "comment": "a pointer to the notes commit object" + "name": "path", + "type": "const char *", + "comment": "the path of the file to filter, a relative path will be\n taken as relative to the workdir" }, { - "name": "oid", - "type": "const git_oid *", - "comment": "OID of the git object to read the note from" + "name": "target", + "type": "git_writestream *", + "comment": "the stream into which the data will be written" } ], - "argline": "git_note **out, git_repository *repo, git_commit *notes_commit, const git_oid *oid", - "sig": "git_note **::git_repository *::git_commit *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Read the note for an object from a note commit
\n", - "comments": "The note must be freed manually by the user.
\n", - "group": "note" + "argline": "git_filter_list *filters, git_repository *repo, const char *path, git_writestream *target", + "sig": "git_filter_list *::git_repository *::const char *::git_writestream *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Apply a filter list to a file as a stream
\n", + "comments": "", + "group": "filter" }, - "git_note_author": { + "git_filter_list_stream_blob": { "type": "function", - "file": "git2/notes.h", - "line": 136, - "lineto": 136, + "file": "git2/filter.h", + "line": 268, + "lineto": 271, "args": [ { - "name": "note", - "type": "const git_note *", - "comment": "the note" + "name": "filters", + "type": "git_filter_list *", + "comment": "the list of filters to apply" + }, + { + "name": "blob", + "type": "git_blob *", + "comment": "the blob to filter" + }, + { + "name": "target", + "type": "git_writestream *", + "comment": "the stream into which the data will be written" } ], - "argline": "const git_note *note", - "sig": "const git_note *", - "return": { - "type": "const git_signature *", - "comment": " the author" - }, - "description": "Get the note author
\n", + "argline": "git_filter_list *filters, git_blob *blob, git_writestream *target", + "sig": "git_filter_list *::git_blob *::git_writestream *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Apply a filter list to a blob as a stream
\n", "comments": "", - "group": "note" + "group": "filter" }, - "git_note_committer": { + "git_filter_list_free": { "type": "function", - "file": "git2/notes.h", - "line": 144, - "lineto": 144, + "file": "git2/filter.h", + "line": 278, + "lineto": 278, "args": [ { - "name": "note", - "type": "const git_note *", - "comment": "the note" + "name": "filters", + "type": "git_filter_list *", + "comment": "A git_filter_list created by `git_filter_list_load`" } ], - "argline": "const git_note *note", - "sig": "const git_note *", - "return": { - "type": "const git_signature *", - "comment": " the committer" - }, - "description": "Get the note committer
\n", + "argline": "git_filter_list *filters", + "sig": "git_filter_list *", + "return": { "type": "void", "comment": null }, + "description": "Free a git_filter_list
\n", "comments": "", - "group": "note" + "group": "filter" }, - "git_note_message": { + "git_libgit2_init": { "type": "function", - "file": "git2/notes.h", - "line": 153, - "lineto": 153, - "args": [ - { - "name": "note", - "type": "const git_note *", - "comment": "the note" - } - ], - "argline": "const git_note *note", - "sig": "const git_note *", + "file": "git2/global.h", + "line": 32, + "lineto": 32, + "args": [], + "argline": "", + "sig": "", "return": { - "type": "const char *", - "comment": " the note message" + "type": "int", + "comment": " the number of initializations of the library, or an error code." }, - "description": "Get the note message
\n", - "comments": "", - "group": "note" + "description": "Init the global state
\n", + "comments": "This function must be called before any other libgit2 function in order to set up global state and threading.
\n\nThis function may be called multiple times - it will return the number of times the initialization has been called (including this one) that have not subsequently been shutdown.
\n", + "group": "libgit2", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_libgit2_init-34"] + } }, - "git_note_id": { + "git_libgit2_shutdown": { "type": "function", - "file": "git2/notes.h", - "line": 162, - "lineto": 162, - "args": [ - { - "name": "note", - "type": "const git_note *", - "comment": "the note" - } - ], - "argline": "const git_note *note", - "sig": "const git_note *", + "file": "git2/global.h", + "line": 45, + "lineto": 45, + "args": [], + "argline": "", + "sig": "", "return": { - "type": "const git_oid *", - "comment": " the note object's id" + "type": "int", + "comment": " the number of remaining initializations of the library, or an\n error code." }, - "description": "Get the note object's id
\n", - "comments": "", - "group": "note" + "description": "Shutdown the global state
\n", + "comments": "Clean up the global state and threading context after calling it as many times as git_libgit2_init() was called - it will return the number of remainining initializations that have not been shutdown (after this one).
Count the number of unique commits between two commit objects
\n", + "comments": "There is no need for branches containing the commits to have any upstream relationship, but it helps to think of one as a branch and the other as its upstream, the ahead and behind values will be what git would report for the branches.
Add a note for an object
\n", - "comments": "", - "group": "note" + "description": "Determine if a commit is the descendant of another commit.
\n", + "comments": "Note that a commit is not considered a descendant of itself, in contrast to git merge-base --is-ancestor.
Add a note for an object from a commit
\n", - "comments": "This function will create a notes commit for a given object,\n the commit is a dangling commit, no reference is created.
\n", - "group": "note" + "description": "Determine if a commit is reachable from any of a list of commits by\n following parent edges.
\n", + "comments": "", + "group": "graph" }, - "git_note_remove": { + "git_ignore_add_rule": { "type": "function", - "file": "git2/notes.h", - "line": 232, - "lineto": 237, + "file": "git2/ignore.h", + "line": 46, + "lineto": 48, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "repository where the note lives" + "comment": "The repository to add ignore rules to." }, { - "name": "notes_ref", + "name": "rules", "type": "const char *", - "comment": "canonical name of the reference to use (optional);\n\t\t\t\t\tdefaults to \"refs/notes/commits\"" - }, + "comment": "Text of rules, the contents to add on a .gitignore file.\n It is okay to have multiple rules in the text; if so,\n each rule should be terminated with a newline." + } + ], + "argline": "git_repository *repo, const char *rules", + "sig": "git_repository *::const char *", + "return": { "type": "int", "comment": " 0 on success" }, + "description": "Add ignore rules for a repository.
\n", + "comments": "Excludesfile rules (i.e. .gitignore rules) are generally read from .gitignore files in the repository tree or from a shared system file only if a "core.excludesfile" config value is set. The library also keeps a set of per-repository internal ignores that can be configured in-memory and will not persist. This function allows you to add to that internal rules list.
\n\nExample usage:
\n\n error = git_ignore_add_rule(myrepo, "*.c/ with space");\n\n\nThis would add three rules to the ignores.
\n", + "group": "ignore" + }, + "git_ignore_clear_internal_rules": { + "type": "function", + "file": "git2/ignore.h", + "line": 61, + "lineto": 62, + "args": [ { - "name": "author", - "type": "const git_signature *", - "comment": "signature of the notes commit author" + "name": "repo", + "type": "git_repository *", + "comment": "The repository to remove ignore rules from." + } + ], + "argline": "git_repository *repo", + "sig": "git_repository *", + "return": { "type": "int", "comment": " 0 on success" }, + "description": "Clear ignore rules that were explicitly added.
\n", + "comments": "Resets to the default internal ignore rules. This will not turn off rules in .gitignore files that actually exist in the filesystem.
\n\nThe default internal ignores ignore ".", ".." and ".git" entries.
\n", + "group": "ignore" + }, + "git_ignore_path_is_ignored": { + "type": "function", + "file": "git2/ignore.h", + "line": 80, + "lineto": 83, + "args": [ + { + "name": "ignored", + "type": "int *", + "comment": "boolean returning 0 if the file is not ignored, 1 if it is" }, { - "name": "committer", - "type": "const git_signature *", - "comment": "signature of the notes commit committer" + "name": "repo", + "type": "git_repository *", + "comment": "a repository object" }, { - "name": "oid", - "type": "const git_oid *", - "comment": "OID of the git object to remove the note from" + "name": "path", + "type": "const char *", + "comment": "the file to check ignores for, relative to the repo's workdir." } ], - "argline": "git_repository *repo, const char *notes_ref, const git_signature *author, const git_signature *committer, const git_oid *oid", - "sig": "git_repository *::const char *::const git_signature *::const git_signature *::const git_oid *", + "argline": "int *ignored, git_repository *repo, const char *path", + "sig": "int *::git_repository *::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." }, - "description": "Remove the note for an object
\n", - "comments": "", - "group": "note" + "description": "Test if the ignore rules apply to a given path.
\n", + "comments": "This function checks the ignore rules to see if they would apply to the given file. This indicates if the file would be ignored regardless of whether the file is already in the index or committed to the repository.
\n\nOne way to think of this is if you were to do "git check-ignore --no-index" on the given file, would it be shown or not?
\n", + "group": "ignore" }, - "git_note_commit_remove": { + "git_index_open": { "type": "function", - "file": "git2/notes.h", - "line": 257, - "lineto": 263, + "file": "git2/index.h", + "line": 278, + "lineto": 278, "args": [ { - "name": "notes_commit_out", - "type": "git_oid *", - "comment": "pointer to store the new notes commit (optional);\n\t\t\t\t\tNULL in case of error.\n\t\t\t\t\tWhen removing a note a new tree containing all notes\n\t\t\t\t\tsans the note to be removed is created and a new commit\n\t\t\t\t\tpointing to that tree is also created.\n\t\t\t\t\tIn the case where the resulting tree is an empty tree\n\t\t\t\t\ta new commit pointing to this empty tree will be returned." - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "repository where the note lives" - }, - { - "name": "notes_commit", - "type": "git_commit *", - "comment": "a pointer to the notes commit object" + "name": "index_out", + "type": "git_index **", + "comment": "the pointer for the new index" }, { - "name": "author", - "type": "const git_signature *", - "comment": "signature of the notes commit author" - }, + "name": "index_path", + "type": "const char *", + "comment": "the path to the index file in disk" + } + ], + "argline": "git_index **index_out, const char *index_path", + "sig": "git_index **::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new bare Git index object as a memory representation\n of the Git index file in 'index_path', without a repository\n to back it.
\n", + "comments": "Since there is no ODB or working directory behind this index, any Index methods which rely on these (e.g. index_add_bypath) will fail with the GIT_ERROR error code.
\n\nIf you need to access the index of an actual repository, use the git_repository_index wrapper.
The index must be freed once it's no longer in use.
\n", + "group": "index" + }, + "git_index_new": { + "type": "function", + "file": "git2/index.h", + "line": 291, + "lineto": 291, + "args": [ { - "name": "committer", - "type": "const git_signature *", - "comment": "signature of the notes commit committer" - }, + "name": "index_out", + "type": "git_index **", + "comment": "the pointer for the new index" + } + ], + "argline": "git_index **index_out", + "sig": "git_index **", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create an in-memory index object.
\n", + "comments": "This index object cannot be read/written to the filesystem, but may be used to perform in-memory index operations.
\n\nThe index must be freed once it's no longer in use.
\n", + "group": "index" + }, + "git_index_free": { + "type": "function", + "file": "git2/index.h", + "line": 300, + "lineto": 300, + "args": [ { - "name": "oid", - "type": "const git_oid *", - "comment": "OID of the git object to remove the note from" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" } ], - "argline": "git_oid *notes_commit_out, git_repository *repo, git_commit *notes_commit, const git_signature *author, const git_signature *committer, const git_oid *oid", - "sig": "git_oid *::git_repository *::git_commit *::const git_signature *::const git_signature *::const git_oid *", + "argline": "git_index *index", + "sig": "git_index *", + "return": { "type": "void", "comment": null }, + "description": "Free an existing index object.
\n", + "comments": "", + "group": "index", + "examples": { + "add.c": ["ex/v1.9.1/add.html#git_index_free-1"], + "commit.c": ["ex/v1.9.1/commit.html#git_index_free-3"], + "general.c": ["ex/v1.9.1/general.html#git_index_free-35"], + "init.c": ["ex/v1.9.1/init.html#git_index_free-2"], + "ls-files.c": ["ex/v1.9.1/ls-files.html#git_index_free-1"] + } + }, + "git_index_owner": { + "type": "function", + "file": "git2/index.h", + "line": 308, + "lineto": 308, + "args": [ + { "name": "index", "type": "const git_index *", "comment": "The index" } + ], + "argline": "const git_index *index", + "sig": "const git_index *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "git_repository *", + "comment": " A pointer to the repository" }, - "description": "Remove the note for an object
\n", + "description": "Get the repository this index relates to
\n", "comments": "", - "group": "note" + "group": "index" }, - "git_note_free": { + "git_index_caps": { "type": "function", - "file": "git2/notes.h", - "line": 270, - "lineto": 270, + "file": "git2/index.h", + "line": 316, + "lineto": 316, "args": [ { - "name": "note", - "type": "git_note *", - "comment": "git_note object" + "name": "index", + "type": "const git_index *", + "comment": "An existing index object" } ], - "argline": "git_note *note", - "sig": "git_note *", + "argline": "const git_index *index", + "sig": "const git_index *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " A combination of GIT_INDEX_CAPABILITY values" }, - "description": "Free a git_note object
\n", + "description": "Read index capabilities flags.
\n", "comments": "", - "group": "note" + "group": "index" }, - "git_note_default_ref": { + "git_index_set_caps": { "type": "function", - "file": "git2/notes.h", - "line": 280, - "lineto": 280, + "file": "git2/index.h", + "line": 329, + "lineto": 329, "args": [ { - "name": "out", - "type": "git_buf *", - "comment": "buffer in which to store the name of the default notes reference" + "name": "index", + "type": "git_index *", + "comment": "An existing index object" }, { - "name": "repo", - "type": "git_repository *", - "comment": "The Git repository" + "name": "caps", + "type": "int", + "comment": "A combination of GIT_INDEX_CAPABILITY values" } ], - "argline": "git_buf *out, git_repository *repo", - "sig": "git_buf *::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Get the default notes reference for a repository
\n", - "comments": "", - "group": "note" + "argline": "git_index *index, int caps", + "sig": "git_index *::int", + "return": { "type": "int", "comment": " 0 on success, -1 on failure" }, + "description": "Set index capabilities flags.
\n", + "comments": "If you pass GIT_INDEX_CAPABILITY_FROM_OWNER for the caps, then capabilities will be read from the config of the owner object, looking at core.ignorecase, core.filemode, core.symlinks.
Get index on-disk version.
\n", + "comments": "Valid return values are 2, 3, or 4. If 3 is returned, an index with version 2 may be written instead, if the extension data in version 3 is not necessary.
\n", + "group": "index" + }, + "git_index_set_version": { + "type": "function", + "file": "git2/index.h", + "line": 354, + "lineto": 354, + "args": [ { - "name": "note_cb", - "type": "git_note_foreach_cb", - "comment": "Callback to invoke per found annotation. Return non-zero\n to stop looping." + "name": "index", + "type": "git_index *", + "comment": "An existing index object" }, { - "name": "payload", - "type": "void *", - "comment": "Extra parameter to callback function." + "name": "version", + "type": "unsigned int", + "comment": "The new version number" } ], - "argline": "git_repository *repo, const char *notes_ref, git_note_foreach_cb note_cb, void *payload", - "sig": "git_repository *::const char *::git_note_foreach_cb::void *", - "return": { - "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" - }, - "description": "Loop over all the notes within a specified namespace\n and issue a callback for each one.
\n", - "comments": "", - "group": "note" + "argline": "git_index *index, unsigned int version", + "sig": "git_index *::unsigned int", + "return": { "type": "int", "comment": " 0 on success, -1 on failure" }, + "description": "Set index on-disk version.
\n", + "comments": "Valid values are 2, 3, or 4. If 2 is given, git_index_write may write an index with version 3 instead, if necessary to accurately represent the index.
\n", + "group": "index" }, - "git_object_lookup": { + "git_index_read": { "type": "function", - "file": "git2/object.h", - "line": 42, - "lineto": 46, + "file": "git2/index.h", + "line": 373, + "lineto": 373, "args": [ { - "name": "object", - "type": "git_object **", - "comment": "pointer to the looked-up object" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to look up the object" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "id", - "type": "const git_oid *", - "comment": "the unique identifier for the object" - }, + "name": "force", + "type": "int", + "comment": "if true, always reload, vs. only read if file has changed" + } + ], + "argline": "git_index *index, int force", + "sig": "git_index *::int", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Update the contents of an existing index object in memory by reading\n from the hard disk.
\n", + "comments": "If force is true, this performs a "hard" read that discards in-memory changes and always reloads the on-disk index data. If there is no on-disk version, the index will be cleared.
If force is false, this does a "soft" read that reloads the index data from disk only if it has changed since the last time it was loaded. Purely in-memory index data will be untouched. Be aware: if there are changes on disk, unwritten in-memory changes are discarded.
Lookup a reference to one of the objects in a repository.
\n", - "comments": "The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.
The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJECT_ANY' may be passed to let\n the method guess the object's type.
\n", - "group": "object", + "argline": "git_index *index", + "sig": "git_index *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Write an existing index object from memory back to disk\n using an atomic file lock.
\n", + "comments": "", + "group": "index", "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_object_lookup-34" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_object_lookup-19" - ] + "add.c": ["ex/v1.9.1/add.html#git_index_write-2"], + "commit.c": ["ex/v1.9.1/commit.html#git_index_write-4"] } }, - "git_object_lookup_prefix": { + "git_index_path": { "type": "function", - "file": "git2/object.h", - "line": 75, - "lineto": 80, + "file": "git2/index.h", + "line": 390, + "lineto": 390, "args": [ { - "name": "object_out", - "type": "git_object **", - "comment": "pointer where to store the looked-up object" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to look up the object" - }, - { - "name": "id", - "type": "const git_oid *", - "comment": "a short identifier for the object" - }, - { - "name": "len", - "type": "size_t", - "comment": "the length of the short identifier" - }, - { - "name": "type", - "type": "git_object_t", - "comment": "the type of the object" + "name": "index", + "type": "const git_index *", + "comment": "an existing index object" } ], - "argline": "git_object **object_out, git_repository *repo, const git_oid *id, size_t len, git_object_t type", - "sig": "git_object **::git_repository *::const git_oid *::size_t::git_object_t", + "argline": "const git_index *index", + "sig": "const git_index *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "const char *", + "comment": " path to index file or NULL for in-memory index" }, - "description": "Lookup a reference to one of the objects in a repository,\n given a prefix of its identifier (short id).
\n", - "comments": "The object obtained will be so that its identifier\n matches the first 'len' hexadecimal characters\n (packets of 4 bits) of the given 'id'.\n 'len' must be at least GIT_OID_MINPREFIXLEN, and\n long enough to identify a unique object matching\n the prefix; otherwise the method will fail.
\n\nThe generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.
The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJECT_ANY' may be passed to let\n the method guess the object's type.
\n", - "group": "object" + "description": "Get the full path to the index file on disk.
\n", + "comments": "", + "group": "index" }, - "git_object_lookup_bypath": { + "git_index_checksum": { "type": "function", - "file": "git2/object.h", - "line": 93, - "lineto": 97, + "file": "git2/index.h", + "line": 404, + "lineto": 404, "args": [ { - "name": "out", - "type": "git_object **", - "comment": "buffer that receives a pointer to the object (which must be freed\n by the caller)" - }, - { - "name": "treeish", - "type": "const git_object *", - "comment": "root object that can be peeled to a tree" - }, - { - "name": "path", - "type": "const char *", - "comment": "relative path from the root object to the desired object" - }, - { - "name": "type", - "type": "git_object_t", - "comment": "type of object desired" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" } ], - "argline": "git_object **out, const git_object *treeish, const char *path, git_object_t type", - "sig": "git_object **::const git_object *::const char *::git_object_t", + "argline": "git_index *index", + "sig": "git_index *", "return": { - "type": "int", - "comment": " 0 on success, or an error code" + "type": "const git_oid *", + "comment": " a pointer to the checksum of the index" }, - "description": "Lookup an object that represents a tree entry.
\n", - "comments": "", - "group": "object" + "description": "Get the checksum of the index
\n", + "comments": "This checksum is the SHA-1 hash over the index file (except the last 20 bytes which are the checksum itself). In cases where the index does not exist on-disk, it will be zeroed out.
\n", + "group": "index" }, - "git_object_id": { + "git_index_read_tree": { "type": "function", - "file": "git2/object.h", - "line": 105, - "lineto": 105, + "file": "git2/index.h", + "line": 416, + "lineto": 416, "args": [ { - "name": "obj", - "type": "const git_object *", - "comment": "the repository object" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "tree", + "type": "const git_tree *", + "comment": "tree to read" } ], - "argline": "const git_object *obj", - "sig": "const git_object *", + "argline": "git_index *index, const git_tree *tree", + "sig": "git_index *::const git_tree *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Read a tree into the index file with stats
\n", + "comments": "The current index contents will be replaced by the specified tree.
\n", + "group": "index" + }, + "git_index_write_tree": { + "type": "function", + "file": "git2/index.h", + "line": 437, + "lineto": 437, + "args": [ + { + "name": "out", + "type": "git_oid *", + "comment": "Pointer where to store the OID of the written tree" + }, + { "name": "index", "type": "git_index *", "comment": "Index to write" } + ], + "argline": "git_oid *out, git_index *index", + "sig": "git_oid *::git_index *", "return": { - "type": "const git_oid *", - "comment": " the SHA1 id" + "type": "int", + "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" }, - "description": "Get the id (SHA1) of a repository object
\n", - "comments": "", - "group": "object", + "description": "Write the index as a tree
\n", + "comments": "This method will scan the index and write a representation of its current state back to disk; it recursively creates tree objects for each of the subtrees stored in the index, but only returns the OID of the root tree. This is the OID that can be used e.g. to create a commit.
\n\nThe index instance cannot be bare, and needs to be associated to an existing repository.
\n\nThe index must not contain any file in conflict.
\n", + "group": "index", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_object_id-10", - "ex/v0.28.0/blame.html#git_object_id-11", - "ex/v0.28.0/blame.html#git_object_id-12", - "ex/v0.28.0/blame.html#git_object_id-13" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_object_id-12", - "ex/v0.28.0/cat-file.html#git_object_id-13" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_object_id-35", - "ex/v0.28.0/log.html#git_object_id-36", - "ex/v0.28.0/log.html#git_object_id-37", - "ex/v0.28.0/log.html#git_object_id-38" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_object_id-4", - "ex/v0.28.0/rev-parse.html#git_object_id-5", - "ex/v0.28.0/rev-parse.html#git_object_id-6", - "ex/v0.28.0/rev-parse.html#git_object_id-7", - "ex/v0.28.0/rev-parse.html#git_object_id-8" - ] + "commit.c": ["ex/v1.9.1/commit.html#git_index_write_tree-5"], + "init.c": ["ex/v1.9.1/init.html#git_index_write_tree-3"], + "merge.c": ["ex/v1.9.1/merge.html#git_index_write_tree-10"] } }, - "git_object_short_id": { + "git_index_write_tree_to": { "type": "function", - "file": "git2/object.h", - "line": 119, - "lineto": 119, + "file": "git2/index.h", + "line": 454, + "lineto": 454, "args": [ { "name": "out", - "type": "git_buf *", - "comment": "Buffer to write string into" + "type": "git_oid *", + "comment": "Pointer where to store OID of the written tree" }, + { "name": "index", "type": "git_index *", "comment": "Index to write" }, { - "name": "obj", - "type": "const git_object *", - "comment": "The object to get an ID for" + "name": "repo", + "type": "git_repository *", + "comment": "Repository where to write the tree" } ], - "argline": "git_buf *out, const git_object *obj", - "sig": "git_buf *::const git_object *", + "argline": "git_oid *out, git_index *index, git_repository *repo", + "sig": "git_oid *::git_index *::git_repository *", "return": { "type": "int", - "comment": " 0 on success, \n<\n0 for error" + "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" }, - "description": "Get a short abbreviated OID string for the object
\n", - "comments": "This starts at the "core.abbrev" length (default 7 characters) and\n iteratively extends to a longer string if that length is ambiguous.\n The result will be unambiguous (at least until new objects are added to\n the repository).
\n", - "group": "object", - "examples": { - "tag.c": [ - "ex/v0.28.0/tag.html#git_object_short_id-5" - ] - } + "description": "Write the index as a tree to the given repository
\n", + "comments": "This method will do the same as git_index_write_tree, but letting the user choose the repository where the tree will be written.
The index must not contain any file in conflict.
\n", + "group": "index" }, - "git_object_type": { + "git_index_entrycount": { "type": "function", - "file": "git2/object.h", - "line": 127, - "lineto": 127, + "file": "git2/index.h", + "line": 473, + "lineto": 473, "args": [ { - "name": "obj", - "type": "const git_object *", - "comment": "the repository object" + "name": "index", + "type": "const git_index *", + "comment": "an existing index object" } ], - "argline": "const git_object *obj", - "sig": "const git_object *", + "argline": "const git_index *index", + "sig": "const git_index *", "return": { - "type": "git_object_t", - "comment": " the object's type" + "type": "size_t", + "comment": " integer of count of current entries" }, - "description": "Get the object type of an object
\n", + "description": "Get the count of entries currently in the index
\n", "comments": "", - "group": "object", + "group": "index", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_object_type-14", - "ex/v0.28.0/cat-file.html#git_object_type-15", - "ex/v0.28.0/cat-file.html#git_object_type-16" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_object_type-6" - ] + "general.c": ["ex/v1.9.1/general.html#git_index_entrycount-36"], + "ls-files.c": ["ex/v1.9.1/ls-files.html#git_index_entrycount-2"] } }, - "git_object_owner": { + "git_index_clear": { "type": "function", - "file": "git2/object.h", - "line": 141, - "lineto": 141, + "file": "git2/index.h", + "line": 484, + "lineto": 484, "args": [ { - "name": "obj", - "type": "const git_object *", - "comment": "the object" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" } ], - "argline": "const git_object *obj", - "sig": "const git_object *", + "argline": "git_index *index", + "sig": "git_index *", "return": { - "type": "git_repository *", - "comment": " the repository who owns this object" + "type": "int", + "comment": " 0 on success, error code \n<\n 0 on failure" }, - "description": "Get the repository that owns this object
\n", - "comments": "Freeing or calling git_repository_close on the\n returned pointer will invalidate the actual object.
Any other operation may be run on the repository without\n affecting the object.
\n", - "group": "object" + "description": "Clear the contents (all the entries) of an index object.
\n", + "comments": "This clears the index object in memory; changes must be explicitly written to disk for them to take effect persistently.
\n", + "group": "index" }, - "git_object_free": { + "git_index_get_byindex": { "type": "function", - "file": "git2/object.h", - "line": 158, - "lineto": 158, + "file": "git2/index.h", + "line": 497, + "lineto": 498, "args": [ { - "name": "object", - "type": "git_object *", - "comment": "the object to close" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "n", + "type": "size_t", + "comment": "the position of the entry" } ], - "argline": "git_object *object", - "sig": "git_object *", + "argline": "git_index *index, size_t n", + "sig": "git_index *::size_t", "return": { - "type": "void", - "comment": null + "type": "const git_index_entry *", + "comment": " a pointer to the entry; NULL if out of bounds" }, - "description": "Close an open object
\n", - "comments": "This method instructs the library to close an existing\n object; note that git_objects are owned and cached by the repository\n so the object may or may not be freed after this library call,\n depending on how aggressive is the caching mechanism used\n by the repository.
\n\nIMPORTANT:\n It is necessary to call this method when you stop using\n an object. Failure to do so will cause a memory leak.
\n", - "group": "object", + "description": "Get a pointer to one of the entries in the index
\n", + "comments": "The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.
Convert an object type to its string representation.
\n", - "comments": "The result is a pointer to a string in static memory and\n should not be free()'ed.
\n", - "group": "object", + "description": "Get a pointer to one of the entries in the index
\n", + "comments": "The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.
Convert a string object type representation to it's git_object_t.
\n", + "argline": "git_index *index, const char *path, int stage", + "sig": "git_index *::const char *::int", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Remove an entry from the index
\n", "comments": "", - "group": "object" + "group": "index" }, - "git_object_typeisloose": { + "git_index_remove_directory": { "type": "function", - "file": "git2/object.h", - "line": 186, - "lineto": 186, + "file": "git2/index.h", + "line": 533, + "lineto": 534, "args": [ { - "name": "type", - "type": "git_object_t", - "comment": "object type to test." - } - ], - "argline": "git_object_t type", - "sig": "git_object_t", - "return": { - "type": "int", - "comment": " true if the type represents a valid loose object type,\n false otherwise." - }, - "description": "Determine if the given git_object_t is a valid loose object type.
\n", - "comments": "", - "group": "object" - }, - "git_object__size": { - "type": "function", - "file": "git2/object.h", - "line": 200, - "lineto": 200, - "args": [ + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, { - "name": "type", - "type": "git_object_t", - "comment": "object type to get its size" - } + "name": "dir", + "type": "const char *", + "comment": "container directory path" + }, + { "name": "stage", "type": "int", "comment": "stage to search" } ], - "argline": "git_object_t type", - "sig": "git_object_t", - "return": { - "type": "size_t", - "comment": " size in bytes of the object" - }, - "description": "Get the size in bytes for the structure which\n acts as an in-memory representation of any given\n object type.
\n", - "comments": "For all the core types, this would the equivalent\n of calling sizeof(git_commit) if the core types\n were not opaque on the external API.
Remove all entries from the index under a given directory
\n", + "comments": "", + "group": "index" }, - "git_object_peel": { + "git_index_add": { "type": "function", - "file": "git2/object.h", - "line": 225, - "lineto": 228, + "file": "git2/index.h", + "line": 550, + "lineto": 550, "args": [ { - "name": "peeled", - "type": "git_object **", - "comment": "Pointer to the peeled git_object" - }, - { - "name": "object", - "type": "const git_object *", - "comment": "The object to be processed" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "target_type", - "type": "git_object_t", - "comment": "The type of the requested object (a GIT_OBJECT_ value)" + "name": "source_entry", + "type": "const git_index_entry *", + "comment": "new entry object" } ], - "argline": "git_object **peeled, const git_object *object, git_object_t target_type", - "sig": "git_object **::const git_object *::git_object_t", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EPEEL, or an error code" - }, - "description": "Recursively peel an object until an object of the specified type is met.
\n", - "comments": "If the query cannot be satisfied due to the object model,\n GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a\n tree).
\n\nIf you pass GIT_OBJECT_ANY as the target type, then the object will\n be peeled until the type changes. A tag will be peeled until the\n referenced object is no longer a tag, and a commit will be peeled\n to a tree. Any other object type will return GIT_EINVALIDSPEC.
If peeling a tag we discover an object which cannot be peeled to\n the target type due to the object model, GIT_EPEEL will be\n returned.
\n\nYou must free the returned object.
\n", - "group": "object" + "argline": "git_index *index, const git_index_entry *source_entry", + "sig": "git_index *::const git_index_entry *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Add or update an index entry from an in-memory struct
\n", + "comments": "If a previous index entry exists that has the same path and stage as the given 'source_entry', it will be replaced. Otherwise, the 'source_entry' will be added.
\n\nA full copy (including the 'path' string) of the given 'source_entry' will be inserted on the index.
\n", + "group": "index" }, - "git_object_dup": { + "git_index_entry_stage": { "type": "function", - "file": "git2/object.h", - "line": 237, - "lineto": 237, + "file": "git2/index.h", + "line": 562, + "lineto": 562, "args": [ { - "name": "dest", - "type": "git_object **", - "comment": "Pointer to store the copy of the object" - }, - { - "name": "source", - "type": "git_object *", - "comment": "Original object to copy" + "name": "entry", + "type": "const git_index_entry *", + "comment": "The entry" } ], - "argline": "git_object **dest, git_object *source", - "sig": "git_object **::git_object *", - "return": { - "type": "int", - "comment": null - }, - "description": "Create an in-memory copy of a Git object. The copy must be\n explicitly free'd or it will leak.
\n", - "comments": "", - "group": "object" + "argline": "const git_index_entry *entry", + "sig": "const git_index_entry *", + "return": { "type": "int", "comment": " the stage number" }, + "description": "Return the stage number from a git index entry
\n", + "comments": "This entry is calculated from the entry's flag attribute like this:
\n\n(entry->flags & GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT\n\n",
+ "group": "index"
},
- "git_odb_new": {
+ "git_index_entry_is_conflict": {
"type": "function",
- "file": "git2/odb.h",
- "line": 39,
- "lineto": 39,
+ "file": "git2/index.h",
+ "line": 571,
+ "lineto": 571,
"args": [
{
- "name": "out",
- "type": "git_odb **",
- "comment": "location to store the database pointer, if opened.\n\t\t\tSet to NULL if the open failed."
+ "name": "entry",
+ "type": "const git_index_entry *",
+ "comment": "The entry"
}
],
- "argline": "git_odb **out",
- "sig": "git_odb **",
+ "argline": "const git_index_entry *entry",
+ "sig": "const git_index_entry *",
"return": {
"type": "int",
- "comment": " 0 or an error code"
+ "comment": " 1 if the entry is a conflict entry, 0 otherwise"
},
- "description": "Create a new object database with no backends.
\n", - "comments": "Before the ODB can be used for read/writing, a custom database\n backend must be manually added using git_odb_add_backend()
Return whether the given index entry is a conflict (has a high stage\n entry). This is simply shorthand for git_index_entry_stage > 0.
Create a new object database and automatically add\n the two default backends:
\n", - "comments": "- git_odb_backend_loose: read and write loose object files\n from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles,\n assuming `objects_dir` as the Objects folder which\n contains a 'pack/' folder with the corresponding data\n\n",
- "group": "odb"
+ "argline": "git_index_iterator **iterator_out, git_index *index",
+ "sig": "git_index_iterator **::git_index *",
+ "return": { "type": "int", "comment": " 0 or an error code." },
+ "description": "Create an iterator that will return every entry contained in the\n index at the time of creation. Entries are returned in order,\n sorted by path. This iterator is backed by a snapshot that allows\n callers to modify the index while iterating without affecting the\n iterator.
\n", + "comments": "", + "group": "index" }, - "git_odb_add_disk_alternate": { + "git_index_iterator_next": { "type": "function", - "file": "git2/odb.h", - "line": 74, - "lineto": 74, + "file": "git2/index.h", + "line": 603, + "lineto": 605, "args": [ { - "name": "odb", - "type": "git_odb *", - "comment": "database to add the backend to" + "name": "out", + "type": "const git_index_entry **", + "comment": "Pointer to store the index entry in" }, { - "name": "path", - "type": "const char *", - "comment": "path to the objects folder for the alternate" + "name": "iterator", + "type": "git_index_iterator *", + "comment": "The iterator" } ], - "argline": "git_odb *odb, const char *path", - "sig": "git_odb *::const char *", + "argline": "const git_index_entry **out, git_index_iterator *iterator", + "sig": "const git_index_entry **::git_index_iterator *", "return": { "type": "int", - "comment": " 0 on success; error code otherwise" + "comment": " 0, GIT_ITEROVER on iteration completion or an error code" }, - "description": "Add an on-disk alternate to an existing Object DB.
\n", - "comments": "Note that the added path must point to an objects, not\n to a full repository, to use it as an alternate store.
Alternate backends are always checked for objects after\n all the main backends have been exhausted.
\n\nWriting is disabled on alternate backends.
\n", - "group": "odb" + "description": "Return the next index entry in-order from the iterator.
\n", + "comments": "", + "group": "index" }, - "git_odb_free": { + "git_index_iterator_free": { "type": "function", - "file": "git2/odb.h", - "line": 81, - "lineto": 81, + "file": "git2/index.h", + "line": 612, + "lineto": 612, "args": [ { - "name": "db", - "type": "git_odb *", - "comment": "database pointer to close. If NULL no action is taken." + "name": "iterator", + "type": "git_index_iterator *", + "comment": "The iterator to free" } ], - "argline": "git_odb *db", - "sig": "git_odb *", - "return": { - "type": "void", - "comment": null - }, - "description": "Close an open object database.
\n", + "argline": "git_index_iterator *iterator", + "sig": "git_index_iterator *", + "return": { "type": "void", "comment": null }, + "description": "Free the index iterator
\n", "comments": "", - "group": "odb", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_odb_free-22" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_odb_free-41" - ] - } + "group": "index" }, - "git_odb_read": { + "git_index_add_bypath": { "type": "function", - "file": "git2/odb.h", - "line": 100, - "lineto": 100, + "file": "git2/index.h", + "line": 643, + "lineto": 643, "args": [ { - "name": "out", - "type": "git_odb_object **", - "comment": "pointer where to store the read object" - }, - { - "name": "db", - "type": "git_odb *", - "comment": "database to search for the object in." + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, - { - "name": "id", - "type": "const git_oid *", - "comment": "identity of the object to read." - } + { "name": "path", "type": "const char *", "comment": "filename to add" } ], - "argline": "git_odb_object **out, git_odb *db, const git_oid *id", - "sig": "git_odb_object **::git_odb *::const git_oid *", - "return": { - "type": "int", - "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." - }, - "description": "Read an object from the database.
\n", - "comments": "This method queries all available ODB backends\n trying to read the given OID.
\n\nThe returned object is reference counted and\n internally cached, so it should be closed\n by the user once it's no longer in use.
\n", - "group": "odb", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_odb_read-23" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_odb_read-42" - ] - } + "argline": "git_index *index, const char *path", + "sig": "git_index *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Add or update an index entry from a file on disk
\n", + "comments": "The file path must be relative to the repository's working folder and must be readable.
This method will fail in bare index instances.
\n\nThis forces the file to be added to the index, not looking at gitignore rules. Those rules can be evaluated through the git_status APIs (in status.h) before calling this.
\n\nIf this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.
\n", + "group": "index" }, - "git_odb_read_prefix": { + "git_index_add_from_buffer": { "type": "function", - "file": "git2/odb.h", - "line": 129, - "lineto": 129, + "file": "git2/index.h", + "line": 671, + "lineto": 674, "args": [ { - "name": "out", - "type": "git_odb_object **", - "comment": "pointer where to store the read object" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "db", - "type": "git_odb *", - "comment": "database to search for the object in." + "name": "entry", + "type": "const git_index_entry *", + "comment": "filename to add" }, { - "name": "short_id", - "type": "const git_oid *", - "comment": "a prefix of the id of the object to read." + "name": "buffer", + "type": "const void *", + "comment": "data to be written into the blob" }, - { - "name": "len", - "type": "size_t", - "comment": "the length of the prefix" - } + { "name": "len", "type": "size_t", "comment": "length of the data" } ], - "argline": "git_odb_object **out, git_odb *db, const git_oid *short_id, size_t len", - "sig": "git_odb_object **::git_odb *::const git_oid *::size_t", - "return": { - "type": "int", - "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database.\n - GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)" - }, - "description": "Read an object from the database, given a prefix\n of its identifier.
\n", - "comments": "This method queries all available ODB backends\n trying to match the 'len' first hexadecimal\n characters of the 'short_id'.\n The remaining (GIT_OID_HEXSZ-len)*4 bits of\n 'short_id' must be 0s.\n 'len' must be at least GIT_OID_MINPREFIXLEN,\n and the prefix must be long enough to identify\n a unique object in all the backends; the\n method will fail otherwise.
\n\nThe returned object is reference counted and\n internally cached, so it should be closed\n by the user once it's no longer in use.
\n", - "group": "odb" + "argline": "git_index *index, const git_index_entry *entry, const void *buffer, size_t len", + "sig": "git_index *::const git_index_entry *::const void *::size_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Add or update an index entry from a buffer in memory
\n", + "comments": "This method will create a blob in the repository that owns the index and then add the index entry to the index. The path of the entry represents the position of the blob relative to the repository's root folder.
If a previous index entry exists that has the same path as the given 'entry', it will be replaced. Otherwise, the 'entry' will be added.
\n\nThis forces the file to be added to the index, not looking at gitignore rules. Those rules can be evaluated through the git_status APIs (in status.h) before calling this.
\n\nIf this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.
\n", + "group": "index" }, - "git_odb_read_header": { + "git_index_remove_bypath": { "type": "function", - "file": "git2/odb.h", - "line": 149, - "lineto": 149, + "file": "git2/index.h", + "line": 690, + "lineto": 690, "args": [ { - "name": "len_out", - "type": "size_t *", - "comment": "pointer where to store the length" - }, - { - "name": "type_out", - "type": "git_object_t *", - "comment": "pointer where to store the type" - }, - { - "name": "db", - "type": "git_odb *", - "comment": "database to search for the object in." + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "id", - "type": "const git_oid *", - "comment": "identity of the object to read." + "name": "path", + "type": "const char *", + "comment": "filename to remove" } ], - "argline": "size_t *len_out, git_object_t *type_out, git_odb *db, const git_oid *id", - "sig": "size_t *::git_object_t *::git_odb *::const git_oid *", - "return": { - "type": "int", - "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." - }, - "description": "Read the header of an object from the database, without\n reading its full contents.
\n", - "comments": "The header includes the length and the type of an object.
\n\nNote that most backends do not support reading only the header\n of an object, so the whole object will be read and then the\n header will be returned.
\n", - "group": "odb" + "argline": "git_index *index, const char *path", + "sig": "git_index *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Remove an index entry corresponding to a file on disk
\n", + "comments": "The file path must be relative to the repository's working folder. It may exist.
If this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.
\n", + "group": "index" }, - "git_odb_exists": { + "git_index_add_all": { "type": "function", - "file": "git2/odb.h", - "line": 160, - "lineto": 160, + "file": "git2/index.h", + "line": 738, + "lineto": 743, "args": [ { - "name": "db", - "type": "git_odb *", - "comment": "database to be searched for the given object." + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "id", - "type": "const git_oid *", - "comment": "the object to search for." - } - ], - "argline": "git_odb *db, const git_oid *id", - "sig": "git_odb *::const git_oid *", - "return": { - "type": "int", - "comment": " - 1, if the object was found\n - 0, otherwise" - }, - "description": "Determine if the given object can be found in the object database.
\n", - "comments": "", - "group": "odb" - }, - "git_odb_exists_prefix": { - "type": "function", - "file": "git2/odb.h", - "line": 173, - "lineto": 174, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "The full OID of the found object if just one is found." + "name": "pathspec", + "type": "const git_strarray *", + "comment": "array of path patterns" }, { - "name": "db", - "type": "git_odb *", - "comment": "The database to be searched for the given object." + "name": "flags", + "type": "unsigned int", + "comment": "combination of git_index_add_option_t flags" }, { - "name": "short_id", - "type": "const git_oid *", - "comment": "A prefix of the id of the object to read." + "name": "callback", + "type": "git_index_matched_path_cb", + "comment": "notification callback for each added/updated path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan." }, { - "name": "len", - "type": "size_t", - "comment": "The length of the prefix." + "name": "payload", + "type": "void *", + "comment": "payload passed through to callback function" } ], - "argline": "git_oid *out, git_odb *db, const git_oid *short_id, size_t len", - "sig": "git_oid *::git_odb *::const git_oid *::size_t", + "argline": "git_index *index, const git_strarray *pathspec, unsigned int flags, git_index_matched_path_cb callback, void *payload", + "sig": "git_index *::const git_strarray *::unsigned int::git_index_matched_path_cb::void *", "return": { "type": "int", - "comment": " 0 if found, GIT_ENOTFOUND if not found, GIT_EAMBIGUOUS if multiple\n matches were found, other value \n<\n 0 if there was a read error." + "comment": " 0 on success, negative callback return value, or error code" }, - "description": "Determine if an object can be found in the object database by an\n abbreviated object ID.
\n", - "comments": "", - "group": "odb" + "description": "Add or update index entries matching files in the working directory.
\n", + "comments": "This method will fail in bare index instances.
\n\nThe pathspec is a list of file names or shell glob patterns that will be matched against files in the repository's working directory. Each file that matches will be added to the index (either updating an existing entry or adding a new entry). You can disable glob expansion and force exact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH flag.
Files that are ignored will be skipped (unlike git_index_add_bypath). If a file is already tracked in the index, then it will be updated even if it is ignored. Pass the GIT_INDEX_ADD_FORCE flag to skip the checking of ignore rules.
To emulate git add -A and generate an error if the pathspec contains the exact path of an ignored file (when not using FORCE), add the GIT_INDEX_ADD_CHECK_PATHSPEC flag. This checks that each entry in the pathspec that is an exact match to a filename on disk is either not ignored or already in the index. If this check fails, the function will return GIT_EINVALIDSPEC.
To emulate git add -A with the "dry-run" option, just use a callback function that always returns a positive value. See below for details.
If any files are currently the result of a merge conflict, those files will no longer be marked as conflicting. The data about the conflicts will be moved to the "resolve undo" (REUC) section.
\n\nIf you provide a callback function, it will be invoked on each matching item in the working directory immediately before it is added to / updated in the index. Returning zero will add the item to the index, greater than zero will skip the item, and less than zero will abort the scan and return that value to the caller.
\n", + "group": "index", + "examples": { "add.c": ["ex/v1.9.1/add.html#git_index_add_all-3"] } }, - "git_odb_expand_ids": { + "git_index_remove_all": { "type": "function", - "file": "git2/odb.h", - "line": 215, - "lineto": 218, + "file": "git2/index.h", + "line": 760, + "lineto": 764, "args": [ { - "name": "db", - "type": "git_odb *", - "comment": "The database to be searched for the given objects." + "name": "index", + "type": "git_index *", + "comment": "An existing index object" }, { - "name": "ids", - "type": "git_odb_expand_id *", - "comment": "An array of short object IDs to search for" + "name": "pathspec", + "type": "const git_strarray *", + "comment": "array of path patterns" }, { - "name": "count", - "type": "size_t", - "comment": "The length of the `ids` array" - } - ], - "argline": "git_odb *db, git_odb_expand_id *ids, size_t count", - "sig": "git_odb *::git_odb_expand_id *::size_t", - "return": { - "type": "int", - "comment": " 0 on success or an error code on failure" - }, - "description": "Determine if one or more objects can be found in the object database\n by their abbreviated object ID and type. The given array will be\n updated in place: for each abbreviated ID that is unique in the\n database, and of the given type (if specified), the full object ID,\n object ID length (GIT_OID_HEXSZ) and type will be written back to\n the array. For IDs that are not found (or are ambiguous), the\n array entry will be zeroed.
Note that since this function operates on multiple objects, the\n underlying database will not be asked to be reloaded if an object is\n not found (which is unlike other object database operations.)
\n", - "group": "odb" - }, - "git_odb_refresh": { - "type": "function", - "file": "git2/odb.h", - "line": 238, - "lineto": 238, - "args": [ + "name": "callback", + "type": "git_index_matched_path_cb", + "comment": "notification callback for each removed path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan." + }, { - "name": "db", - "type": "struct git_odb *", - "comment": "database to refresh" + "name": "payload", + "type": "void *", + "comment": "payload passed through to callback function" } ], - "argline": "struct git_odb *db", - "sig": "struct git_odb *", + "argline": "git_index *index, const git_strarray *pathspec, git_index_matched_path_cb callback, void *payload", + "sig": "git_index *::const git_strarray *::git_index_matched_path_cb::void *", "return": { "type": "int", - "comment": " 0 on success, error code otherwise" + "comment": " 0 on success, negative callback return value, or error code" }, - "description": "Refresh the object database to load newly added files.
\n", - "comments": "If the object databases have changed on disk while the library\n is running, this function will force a reload of the underlying\n indexes.
\n\nUse this function when you're confident that an external\n application has tampered with the ODB.
\n\nNOTE that it is not necessary to call this function at all. The\n library will automatically attempt to refresh the ODB\n when a lookup fails, to see if the looked up object exists\n on disk but hasn't been loaded yet.
\n", - "group": "odb" + "description": "Remove all matching index entries.
\n", + "comments": "If you provide a callback function, it will be invoked on each matching item in the index immediately before it is removed. Return 0 to remove the item, > 0 to skip the item, and < 0 to abort the scan.
\n", + "group": "index" }, - "git_odb_foreach": { + "git_index_update_all": { "type": "function", - "file": "git2/odb.h", - "line": 253, - "lineto": 253, + "file": "git2/index.h", + "line": 789, + "lineto": 793, "args": [ { - "name": "db", - "type": "git_odb *", - "comment": "database to use" + "name": "index", + "type": "git_index *", + "comment": "An existing index object" }, { - "name": "cb", - "type": "git_odb_foreach_cb", - "comment": "the callback to call for each object" + "name": "pathspec", + "type": "const git_strarray *", + "comment": "array of path patterns" + }, + { + "name": "callback", + "type": "git_index_matched_path_cb", + "comment": "notification callback for each updated path (also\n gets index of matching pathspec entry); can be NULL;\n return 0 to add, >0 to skip, \n<\n0 to abort scan." }, { "name": "payload", "type": "void *", - "comment": "data to pass to the callback" + "comment": "payload passed through to callback function" } ], - "argline": "git_odb *db, git_odb_foreach_cb cb, void *payload", - "sig": "git_odb *::git_odb_foreach_cb::void *", + "argline": "git_index *index, const git_strarray *pathspec, git_index_matched_path_cb callback, void *payload", + "sig": "git_index *::const git_strarray *::git_index_matched_path_cb::void *", "return": { "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" + "comment": " 0 on success, negative callback return value, or error code" }, - "description": "List all objects available in the database
\n", - "comments": "The callback will be called for each object available in the\n database. Note that the objects are likely to be returned in the index\n order, which would make accessing the objects in that order inefficient.\n Return a non-zero value from the callback to stop looping.
\n", - "group": "odb" + "description": "Update all index entries to match the working directory
\n", + "comments": "This method will fail in bare index instances.
\n\nThis scans the existing index entries and synchronizes them with the working directory, deleting them if the corresponding working directory file no longer exists otherwise updating the information (including adding the latest version of file to the ODB if needed).
\n\nIf you provide a callback function, it will be invoked on each matching item in the index immediately before it is updated (either refreshed or removed depending on working directory state). Return 0 to proceed with updating the item, > 0 to skip the item, and < 0 to abort the scan.
\n", + "group": "index", + "examples": { "add.c": ["ex/v1.9.1/add.html#git_index_update_all-4"] } }, - "git_odb_write": { + "git_index_find": { "type": "function", - "file": "git2/odb.h", - "line": 273, - "lineto": 273, + "file": "git2/index.h", + "line": 804, + "lineto": 804, "args": [ { - "name": "out", - "type": "git_oid *", - "comment": "pointer to store the OID result of the write" + "name": "at_pos", + "type": "size_t *", + "comment": "the address to which the position of the index entry is written (optional)" }, { - "name": "odb", - "type": "git_odb *", - "comment": "object database where to store the object" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, + { "name": "path", "type": "const char *", "comment": "path to search" } + ], + "argline": "size_t *at_pos, git_index *index, const char *path", + "sig": "size_t *::git_index *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Find the first position of any entries which point to given\n path in the Git index.
\n", + "comments": "", + "group": "index" + }, + "git_index_find_prefix": { + "type": "function", + "file": "git2/index.h", + "line": 815, + "lineto": 815, + "args": [ { - "name": "data", - "type": "const void *", - "comment": "buffer with the data to store" + "name": "at_pos", + "type": "size_t *", + "comment": "the address to which the position of the index entry is written (optional)" }, { - "name": "len", - "type": "size_t", - "comment": "size of the buffer" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "type", - "type": "git_object_t", - "comment": "type of the data to store" + "name": "prefix", + "type": "const char *", + "comment": "the prefix to search for" } ], - "argline": "git_oid *out, git_odb *odb, const void *data, size_t len, git_object_t type", - "sig": "git_oid *::git_odb *::const void *::size_t::git_object_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Write an object directly into the ODB
\n", - "comments": "This method writes a full object straight into the ODB.\n For most cases, it is preferred to write objects through a write\n stream, which is both faster and less memory intensive, specially\n for big objects.
\n\nThis method is provided for compatibility with custom backends\n which are not able to support streaming writes
\n", - "group": "odb", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_odb_write-43" - ] - } + "argline": "size_t *at_pos, git_index *index, const char *prefix", + "sig": "size_t *::git_index *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Find the first position of any entries matching a prefix. To find the first position\n of a path inside a given folder, suffix the prefix with a '/'.
\n", + "comments": "", + "group": "index" }, - "git_odb_open_wstream": { + "git_index_conflict_add": { "type": "function", - "file": "git2/odb.h", - "line": 296, - "lineto": 296, + "file": "git2/index.h", + "line": 840, + "lineto": 844, "args": [ { - "name": "out", - "type": "git_odb_stream **", - "comment": "pointer where to store the stream" + "name": "index", + "type": "git_index *", + "comment": "an existing index object" }, { - "name": "db", - "type": "git_odb *", - "comment": "object database where the stream will write" + "name": "ancestor_entry", + "type": "const git_index_entry *", + "comment": "the entry data for the ancestor of the conflict" }, { - "name": "size", - "type": "git_off_t", - "comment": "final size of the object that will be written" + "name": "our_entry", + "type": "const git_index_entry *", + "comment": "the entry data for our side of the merge conflict" }, { - "name": "type", - "type": "git_object_t", - "comment": "type of the object that will be written" + "name": "their_entry", + "type": "const git_index_entry *", + "comment": "the entry data for their side of the merge conflict" } ], - "argline": "git_odb_stream **out, git_odb *db, git_off_t size, git_object_t type", - "sig": "git_odb_stream **::git_odb *::git_off_t::git_object_t", - "return": { - "type": "int", - "comment": " 0 if the stream was created; error code otherwise" - }, - "description": "Open a stream to write an object into the ODB
\n", - "comments": "The type and final length of the object must be specified\n when opening the stream.
\n\nThe returned stream will be of type GIT_STREAM_WRONLY, and it\n won't be effective until git_odb_stream_finalize_write is called\n and returns without an error
The stream must always be freed when done with git_odb_stream_free or\n will leak memory.
Add or update index entries to represent a conflict. Any staged\n entries that exist at the given paths will be removed.
\n", + "comments": "The entries are the entries from the tree included in the merge. Any entry may be null to indicate that that file was not present in the trees during the merge. For example, ancestor_entry may be NULL to indicate that a file was added in both branches and must be resolved.
\n", + "group": "index" }, - "git_odb_stream_write": { + "git_index_conflict_get": { "type": "function", - "file": "git2/odb.h", - "line": 309, - "lineto": 309, + "file": "git2/index.h", + "line": 860, + "lineto": 865, "args": [ { - "name": "stream", - "type": "git_odb_stream *", - "comment": "the stream" + "name": "ancestor_out", + "type": "const git_index_entry **", + "comment": "Pointer to store the ancestor entry" }, { - "name": "buffer", - "type": "const char *", - "comment": "the data to write" + "name": "our_out", + "type": "const git_index_entry **", + "comment": "Pointer to store the our entry" }, { - "name": "len", - "type": "size_t", - "comment": "the buffer's length" - } + "name": "their_out", + "type": "const git_index_entry **", + "comment": "Pointer to store the their entry" + }, + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { "name": "path", "type": "const char *", "comment": "path to search" } ], - "argline": "git_odb_stream *stream, const char *buffer, size_t len", - "sig": "git_odb_stream *::const char *::size_t", - "return": { - "type": "int", - "comment": " 0 if the write succeeded; error code otherwise" - }, - "description": "Write to an odb stream
\n", - "comments": "This method will fail if the total number of received bytes exceeds the\n size declared with git_odb_open_wstream()
Get the index entries that represent a conflict of a single file.
\n", + "comments": "The entries are not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.
Finish writing to an odb stream
\n", - "comments": "The object will take its final name and will be available to the\n odb.
\n\nThis method will fail if the total number of received bytes\n differs from the size declared with git_odb_open_wstream()
Removes the index entries that represent a conflict of a single file.
\n", + "comments": "", + "group": "index" }, - "git_odb_stream_read": { + "git_index_conflict_cleanup": { "type": "function", - "file": "git2/odb.h", - "line": 331, - "lineto": 331, + "file": "git2/index.h", + "line": 882, + "lineto": 882, "args": [ { - "name": "stream", - "type": "git_odb_stream *", - "comment": null - }, - { - "name": "buffer", - "type": "char *", - "comment": null - }, - { - "name": "len", - "type": "size_t", - "comment": null + "name": "index", + "type": "git_index *", + "comment": "an existing index object" } ], - "argline": "git_odb_stream *stream, char *buffer, size_t len", - "sig": "git_odb_stream *::char *::size_t", - "return": { - "type": "int", - "comment": null - }, - "description": "Read from an odb stream
\n", - "comments": "Most backends don't implement streaming reads
\n", - "group": "odb" + "argline": "git_index *index", + "sig": "git_index *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Remove all conflicts in the index (entries with a stage greater than 0).
\n", + "comments": "", + "group": "index" }, - "git_odb_stream_free": { + "git_index_has_conflicts": { "type": "function", - "file": "git2/odb.h", - "line": 338, - "lineto": 338, + "file": "git2/index.h", + "line": 890, + "lineto": 890, "args": [ { - "name": "stream", - "type": "git_odb_stream *", - "comment": "the stream to free" + "name": "index", + "type": "const git_index *", + "comment": "An existing index object." } ], - "argline": "git_odb_stream *stream", - "sig": "git_odb_stream *", + "argline": "const git_index *index", + "sig": "const git_index *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 1 if at least one conflict is found, 0 otherwise." }, - "description": "Free an odb stream
\n", + "description": "Determine if the index contains entries representing file conflicts.
\n", "comments": "", - "group": "odb" + "group": "index", + "examples": { + "merge.c": ["ex/v1.9.1/merge.html#git_index_has_conflicts-11"] + } }, - "git_odb_open_rstream": { + "git_index_conflict_iterator_new": { "type": "function", - "file": "git2/odb.h", - "line": 366, - "lineto": 371, + "file": "git2/index.h", + "line": 901, + "lineto": 903, "args": [ { - "name": "out", - "type": "git_odb_stream **", - "comment": "pointer where to store the stream" - }, - { - "name": "len", - "type": "size_t *", - "comment": "pointer where to store the length of the object" - }, - { - "name": "type", - "type": "git_object_t *", - "comment": "pointer where to store the type of the object" - }, - { - "name": "db", - "type": "git_odb *", - "comment": "object database where the stream will read from" + "name": "iterator_out", + "type": "git_index_conflict_iterator **", + "comment": "The newly created conflict iterator" }, { - "name": "oid", - "type": "const git_oid *", - "comment": "oid of the object the stream will read from" + "name": "index", + "type": "git_index *", + "comment": "The index to scan" } ], - "argline": "git_odb_stream **out, size_t *len, git_object_t *type, git_odb *db, const git_oid *oid", - "sig": "git_odb_stream **::size_t *::git_object_t *::git_odb *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 if the stream was created; error code otherwise" - }, - "description": "Open a stream to read an object from the ODB
\n", - "comments": "Note that most backends do not support streaming reads\n because they store their objects as compressed/delta'ed blobs.
\n\nIt's recommended to use git_odb_read instead, which is\n assured to work on all backends.
The returned stream will be of type GIT_STREAM_RDONLY and\n will have the following methods:
- stream->read: read `n` bytes from the stream\n - stream->free: free the stream\n\n\nThe stream must always be free'd or will leak memory.
\n", - "group": "odb" + "argline": "git_index_conflict_iterator **iterator_out, git_index *index", + "sig": "git_index_conflict_iterator **::git_index *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create an iterator for the conflicts in the index.
\n", + "comments": "The index must not be modified while iterating; the results are undefined.
\n", + "group": "index", + "examples": { + "merge.c": ["ex/v1.9.1/merge.html#git_index_conflict_iterator_new-12"] + } }, - "git_odb_write_pack": { + "git_index_conflict_next": { "type": "function", - "file": "git2/odb.h", - "line": 391, - "lineto": 395, + "file": "git2/index.h", + "line": 916, + "lineto": 920, "args": [ { - "name": "out", - "type": "git_odb_writepack **", - "comment": "pointer to the writepack functions" + "name": "ancestor_out", + "type": "const git_index_entry **", + "comment": "Pointer to store the ancestor side of the conflict" }, { - "name": "db", - "type": "git_odb *", - "comment": "object database where the stream will read from" + "name": "our_out", + "type": "const git_index_entry **", + "comment": "Pointer to store our side of the conflict" }, { - "name": "progress_cb", - "type": "git_transfer_progress_cb", - "comment": "function to call with progress information.\n Be aware that this is called inline with network and indexing operations,\n so performance may be affected." + "name": "their_out", + "type": "const git_index_entry **", + "comment": "Pointer to store their side of the conflict" }, { - "name": "progress_payload", - "type": "void *", - "comment": "payload for the progress callback" + "name": "iterator", + "type": "git_index_conflict_iterator *", + "comment": "The conflict iterator." } ], - "argline": "git_odb_writepack **out, git_odb *db, git_transfer_progress_cb progress_cb, void *progress_payload", - "sig": "git_odb_writepack **::git_odb *::git_transfer_progress_cb::void *", + "argline": "const git_index_entry **ancestor_out, const git_index_entry **our_out, const git_index_entry **their_out, git_index_conflict_iterator *iterator", + "sig": "const git_index_entry **::const git_index_entry **::const git_index_entry **::git_index_conflict_iterator *", "return": { "type": "int", - "comment": null + "comment": " 0 (no error), GIT_ITEROVER (iteration is done) or an error code\n (negative value)" }, - "description": "Open a stream for writing a pack file to the ODB.
\n", - "comments": "If the ODB layer understands pack files, then the given\n packfile will likely be streamed directly to disk (and a\n corresponding index created). If the ODB layer does not\n understand pack files, the objects will be stored in whatever\n format the ODB layer uses.
\n", - "group": "odb" + "description": "Returns the current conflict (ancestor, ours and theirs entry) and\n advance the iterator internally to the next value.
\n", + "comments": "", + "group": "index", + "examples": { + "merge.c": ["ex/v1.9.1/merge.html#git_index_conflict_next-13"] + } }, - "git_odb_hash": { + "git_index_conflict_iterator_free": { "type": "function", - "file": "git2/odb.h", - "line": 409, - "lineto": 409, + "file": "git2/index.h", + "line": 927, + "lineto": 928, "args": [ { - "name": "out", - "type": "git_oid *", - "comment": "the resulting object-ID." - }, - { - "name": "data", - "type": "const void *", - "comment": "data to hash" - }, + "name": "iterator", + "type": "git_index_conflict_iterator *", + "comment": "pointer to the iterator" + } + ], + "argline": "git_index_conflict_iterator *iterator", + "sig": "git_index_conflict_iterator *", + "return": { "type": "void", "comment": null }, + "description": "Frees a git_index_conflict_iterator.
Determine the object-ID (sha1 hash) of a data buffer
\n", - "comments": "The resulting SHA-1 OID will be the identifier for the data\n buffer as if the data buffer it were to written to the ODB.
\n", - "group": "odb" + "description": "Initializes a git_indexer_options with default values. Equivalent to\n creating an instance with GIT_INDEXER_OPTIONS_INIT.
Read a file from disk and fill a git_oid with the object id\n that the file would have if it were written to the Object\n Database as an object of the given type (w/o applying filters).\n Similar functionality to git.git's git hash-object without\n the -w flag, however, with the --no-filters flag.\n If you need filters, see git_repository_hashfile.
Create a new indexer instance
\n", "comments": "", - "group": "odb" + "group": "indexer" }, - "git_odb_object_dup": { + "git_indexer_append": { "type": "function", - "file": "git2/odb.h", - "line": 438, - "lineto": 438, + "file": "git2/indexer.h", + "line": 164, + "lineto": 164, "args": [ + { "name": "idx", "type": "git_indexer *", "comment": "the indexer" }, { - "name": "dest", - "type": "git_odb_object **", - "comment": "pointer where to store the copy" + "name": "data", + "type": "const void *", + "comment": "the data to add" }, { - "name": "source", - "type": "git_odb_object *", - "comment": "object to copy" + "name": "size", + "type": "size_t", + "comment": "the size of the data in bytes" + }, + { + "name": "stats", + "type": "git_indexer_progress *", + "comment": "stat storage" } ], - "argline": "git_odb_object **dest, git_odb_object *source", - "sig": "git_odb_object **::git_odb_object *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a copy of an odb_object
\n", - "comments": "The returned copy must be manually freed with git_odb_object_free.\n Note that because of an implementation detail, the returned copy will be\n the same pointer as source: the object is internally refcounted, so the\n copy still needs to be freed twice.
Add data to the indexer
\n", + "comments": "", + "group": "indexer" }, - "git_odb_object_free": { + "git_indexer_commit": { "type": "function", - "file": "git2/odb.h", - "line": 448, - "lineto": 448, + "file": "git2/indexer.h", + "line": 175, + "lineto": 175, "args": [ + { "name": "idx", "type": "git_indexer *", "comment": "the indexer" }, { - "name": "object", - "type": "git_odb_object *", - "comment": "object to close" + "name": "stats", + "type": "git_indexer_progress *", + "comment": "Stat storage." } ], - "argline": "git_odb_object *object", - "sig": "git_odb_object *", - "return": { - "type": "void", - "comment": null - }, - "description": "Close an ODB object
\n", - "comments": "This method must always be called once a git_odb_object is no\n longer needed, otherwise memory will leak.
Finalize the pack and index
\n", + "comments": "Resolve any pending deltas and write out the index file
\n", + "group": "indexer" }, - "git_odb_object_id": { + "git_indexer_hash": { "type": "function", - "file": "git2/odb.h", - "line": 458, - "lineto": 458, + "file": "git2/indexer.h", + "line": 188, + "lineto": 188, "args": [ { - "name": "object", - "type": "git_odb_object *", - "comment": "the object" + "name": "idx", + "type": "const git_indexer *", + "comment": "the indexer instance" } ], - "argline": "git_odb_object *object", - "sig": "git_odb_object *", + "argline": "const git_indexer *idx", + "sig": "const git_indexer *", "return": { "type": "const git_oid *", - "comment": " a pointer to the OID" + "comment": " the packfile's hash" }, - "description": "Return the OID of an ODB object
\n", - "comments": "This is the OID from which the object was read from
\n", - "group": "odb" + "description": "Get the packfile's hash
\n", + "comments": "A packfile's name is derived from the sorted hashing of all object names. This is only correct after the index has been finalized.
\n", + "group": "indexer" }, - "git_odb_object_data": { + "git_indexer_name": { "type": "function", - "file": "git2/odb.h", - "line": 471, - "lineto": 471, + "file": "git2/indexer.h", + "line": 200, + "lineto": 200, "args": [ { - "name": "object", - "type": "git_odb_object *", - "comment": "the object" + "name": "idx", + "type": "const git_indexer *", + "comment": "the indexer instance" } ], - "argline": "git_odb_object *object", - "sig": "git_odb_object *", + "argline": "const git_indexer *idx", + "sig": "const git_indexer *", "return": { - "type": "const void *", - "comment": " a pointer to the data" + "type": "const char *", + "comment": " a NUL terminated string for the packfile name" }, - "description": "Return the data of an ODB object
\n", - "comments": "This is the uncompressed, raw data as read from the ODB,\n without the leading header.
\n\nThis pointer is owned by the object and shall not be free'd.
\n", - "group": "odb", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_odb_object_data-45" - ] - } + "description": "Get the unique name for the resulting packfile.
\n", + "comments": "The packfile's name is derived from the packfile's content. This is only correct after the index has been finalized.
\n", + "group": "indexer" }, - "git_odb_object_size": { + "git_indexer_free": { "type": "function", - "file": "git2/odb.h", - "line": 482, - "lineto": 482, + "file": "git2/indexer.h", + "line": 207, + "lineto": 207, "args": [ { - "name": "object", - "type": "git_odb_object *", - "comment": "the object" + "name": "idx", + "type": "git_indexer *", + "comment": "the indexer to free" } ], - "argline": "git_odb_object *object", - "sig": "git_odb_object *", - "return": { - "type": "size_t", - "comment": " the size" - }, - "description": "Return the size of an ODB object
\n", - "comments": "This is the real size of the data buffer, not the\n actual size of the object.
Free the indexer and its resources
\n", + "comments": "", + "group": "indexer" }, - "git_odb_object_type": { + "git_mailmap_new": { "type": "function", - "file": "git2/odb.h", - "line": 490, - "lineto": 490, + "file": "git2/mailmap.h", + "line": 37, + "lineto": 37, "args": [ { - "name": "object", - "type": "git_odb_object *", - "comment": "the object" + "name": "out", + "type": "git_mailmap **", + "comment": "pointer to store the new mailmap" } ], - "argline": "git_odb_object *object", - "sig": "git_odb_object *", - "return": { - "type": "git_object_t", - "comment": " the type" - }, - "description": "Return the type of an ODB object
\n", - "comments": "", - "group": "odb", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_odb_object_type-47" - ] - } + "argline": "git_mailmap **out", + "sig": "git_mailmap **", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Allocate a new mailmap object.
\n", + "comments": "This object is empty, so you'll have to add a mailmap file before you can do anything with it. The mailmap must be freed with 'git_mailmap_free'.
\n", + "group": "mailmap" }, - "git_odb_add_backend": { + "git_mailmap_free": { "type": "function", - "file": "git2/odb.h", - "line": 505, - "lineto": 505, - "args": [ - { - "name": "odb", - "type": "git_odb *", - "comment": "database to add the backend to" - }, - { - "name": "backend", - "type": "git_odb_backend *", - "comment": "pointer to a git_odb_backend instance" - }, + "file": "git2/mailmap.h", + "line": 44, + "lineto": 44, + "args": [ { - "name": "priority", - "type": "int", - "comment": "Value for ordering the backends queue" + "name": "mm", + "type": "git_mailmap *", + "comment": "the mailmap to free" } ], - "argline": "git_odb *odb, git_odb_backend *backend, int priority", - "sig": "git_odb *::git_odb_backend *::int", - "return": { - "type": "int", - "comment": " 0 on success; error code otherwise" - }, - "description": "Add a custom backend to an existing Object DB
\n", - "comments": "The backends are checked in relative ordering, based on the\n value of the priority parameter.
Read \n
Free the mailmap and its associated memory.
\n", + "comments": "", + "group": "mailmap" }, - "git_odb_add_alternate": { + "git_mailmap_add_entry": { "type": "function", - "file": "git2/odb.h", - "line": 526, - "lineto": 526, + "file": "git2/mailmap.h", + "line": 57, + "lineto": 59, "args": [ { - "name": "odb", - "type": "git_odb *", - "comment": "database to add the backend to" + "name": "mm", + "type": "git_mailmap *", + "comment": "mailmap to add the entry to" }, { - "name": "backend", - "type": "git_odb_backend *", - "comment": "pointer to a git_odb_backend instance" + "name": "real_name", + "type": "const char *", + "comment": "the real name to use, or NULL" }, { - "name": "priority", - "type": "int", - "comment": "Value for ordering the backends queue" - } - ], - "argline": "git_odb *odb, git_odb_backend *backend, int priority", - "sig": "git_odb *::git_odb_backend *::int", - "return": { - "type": "int", - "comment": " 0 on success; error code otherwise" - }, - "description": "Add a custom backend to an existing Object DB; this\n backend will work as an alternate.
\n", - "comments": "Alternate backends are always checked for objects after\n all the main backends have been exhausted.
\n\nThe backends are checked in relative ordering, based on the\n value of the priority parameter.
Writing is disabled on alternate backends.
\n\nRead \n
Get the number of ODB backend objects
\n", + "argline": "git_mailmap *mm, const char *real_name, const char *real_email, const char *replace_name, const char *replace_email", + "sig": "git_mailmap *::const char *::const char *::const char *::const char *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Add a single entry to the given mailmap object. If the entry already exists,\n it will be replaced with the new entry.
\n", "comments": "", - "group": "odb" + "group": "mailmap" }, - "git_odb_get_backend": { + "git_mailmap_from_buffer": { "type": "function", - "file": "git2/odb.h", - "line": 544, - "lineto": 544, + "file": "git2/mailmap.h", + "line": 69, + "lineto": 70, "args": [ { "name": "out", - "type": "git_odb_backend **", - "comment": "output pointer to ODB backend at pos" + "type": "git_mailmap **", + "comment": "pointer to store the new mailmap" }, { - "name": "odb", - "type": "git_odb *", - "comment": "object database" + "name": "buf", + "type": "const char *", + "comment": "buffer to parse the mailmap from" }, { - "name": "pos", + "name": "len", "type": "size_t", - "comment": "index into object database backend list" + "comment": "the length of the input buffer" } ], - "argline": "git_odb_backend **out, git_odb *odb, size_t pos", - "sig": "git_odb_backend **::git_odb *::size_t", - "return": { - "type": "int", - "comment": " 0 on success; GIT_ENOTFOUND if pos is invalid; other errors \n<\n 0" - }, - "description": "Lookup an ODB backend object by index
\n", + "argline": "git_mailmap **out, const char *buf, size_t len", + "sig": "git_mailmap **::const char *::size_t", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Create a new mailmap instance containing a single mailmap file
\n", "comments": "", - "group": "odb" + "group": "mailmap" }, - "git_odb_backend_pack": { + "git_mailmap_from_repository": { "type": "function", - "file": "git2/odb_backend.h", - "line": 34, - "lineto": 34, + "file": "git2/mailmap.h", + "line": 86, + "lineto": 87, "args": [ { "name": "out", - "type": "git_odb_backend **", - "comment": "location to store the odb backend pointer" + "type": "git_mailmap **", + "comment": "pointer to store the new mailmap" }, { - "name": "objects_dir", - "type": "const char *", - "comment": "the Git repository's objects directory" + "name": "repo", + "type": "git_repository *", + "comment": "repository to load mailmap information from" } ], - "argline": "git_odb_backend **out, const char *objects_dir", - "sig": "git_odb_backend **::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a backend for the packfiles.
\n", - "comments": "", - "group": "odb" + "argline": "git_mailmap **out, git_repository *repo", + "sig": "git_mailmap **::git_repository *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Create a new mailmap instance from a repository, loading mailmap files based\n on the repository's configuration.
\n", + "comments": "Mailmaps are loaded in the following order: 1. '.mailmap' in the root of the repository's working directory, if present. 2. The blob object identified by the 'mailmap.blob' config entry, if set. [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories] 3. The path in the 'mailmap.file' config entry, if set.
\n", + "group": "mailmap" }, - "git_odb_backend_loose": { + "git_mailmap_resolve": { "type": "function", - "file": "git2/odb_backend.h", - "line": 48, - "lineto": 54, + "file": "git2/mailmap.h", + "line": 101, + "lineto": 103, "args": [ { - "name": "out", - "type": "git_odb_backend **", - "comment": "location to store the odb backend pointer" + "name": "real_name", + "type": "const char **", + "comment": "pointer to store the real name" }, { - "name": "objects_dir", - "type": "const char *", - "comment": "the Git repository's objects directory" + "name": "real_email", + "type": "const char **", + "comment": "pointer to store the real email" }, { - "name": "compression_level", - "type": "int", - "comment": "zlib compression level to use" + "name": "mm", + "type": "const git_mailmap *", + "comment": "the mailmap to perform a lookup with (may be NULL)" }, { - "name": "do_fsync", - "type": "int", - "comment": "whether to do an fsync() after writing" + "name": "name", + "type": "const char *", + "comment": "the name to look up" }, { - "name": "dir_mode", - "type": "unsigned int", - "comment": "permissions to use creating a directory or 0 for defaults" + "name": "email", + "type": "const char *", + "comment": "the email to look up" + } + ], + "argline": "const char **real_name, const char **real_email, const git_mailmap *mm, const char *name, const char *email", + "sig": "const char **::const char **::const git_mailmap *::const char *::const char *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Resolve a name and email to the corresponding real name and email.
\n", + "comments": "The lifetime of the strings are tied to mm, name, and email parameters.
Create a backend for loose objects
\n", - "comments": "", - "group": "odb" + "argline": "git_signature **out, const git_mailmap *mm, const git_signature *sig", + "sig": "git_signature **::const git_mailmap *::const git_signature *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Resolve a signature to use real names and emails with a mailmap.
\n", + "comments": "Call git_signature_free() to free the data.
Create a backend out of a single packfile
\n", - "comments": "This can be useful for inspecting the contents of a single\n packfile.
\n", - "group": "odb" + "description": "Initializes a git_merge_file_input with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_INPUT_INIT.
Parse a hex formatted object id into a git_oid.
\n", - "comments": "", - "group": "oid", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_oid_fromstr-48", - "ex/v0.28.0/general.html#git_oid_fromstr-49", - "ex/v0.28.0/general.html#git_oid_fromstr-50", - "ex/v0.28.0/general.html#git_oid_fromstr-51", - "ex/v0.28.0/general.html#git_oid_fromstr-52", - "ex/v0.28.0/general.html#git_oid_fromstr-53", - "ex/v0.28.0/general.html#git_oid_fromstr-54", - "ex/v0.28.0/general.html#git_oid_fromstr-55" - ] - } + "description": "Initialize git_merge_file_options structure
\n", + "comments": "Initializes a git_merge_file_options with default values. Equivalent to creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.
Parse a hex formatted null-terminated string into a git_oid.
\n", - "comments": "", - "group": "oid" + "description": "Initialize git_merge_options structure
\n", + "comments": "Initializes a git_merge_options with default values. Equivalent to creating an instance with GIT_MERGE_OPTIONS_INIT.
Parse N characters of a hex formatted object id into a git_oid.
\n", - "comments": "If N is odd, the last byte's high nibble will be read in and the\n low nibble set to zero.
\n", - "group": "oid" + "argline": "git_merge_analysis_t *analysis_out, git_merge_preference_t *preference_out, git_repository *repo, const git_annotated_commit **their_heads, size_t their_heads_len", + "sig": "git_merge_analysis_t *::git_merge_preference_t *::git_repository *::const git_annotated_commit **::size_t", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Analyzes the given branch(es) and determines the opportunities for\n merging them into the HEAD of the repository.
\n", + "comments": "", + "group": "merge", + "examples": { "merge.c": ["ex/v1.9.1/merge.html#git_merge_analysis-15"] } }, - "git_oid_fromraw": { + "git_merge_analysis_for_ref": { "type": "function", - "file": "git2/oid.h", - "line": 77, - "lineto": 77, + "file": "git2/merge.h", + "line": 431, + "lineto": 437, "args": [ { - "name": "out", - "type": "git_oid *", - "comment": "oid structure the result is written into." + "name": "analysis_out", + "type": "git_merge_analysis_t *", + "comment": "analysis enumeration that the result is written into" }, { - "name": "raw", - "type": "const unsigned char *", - "comment": "the raw input bytes to be copied." + "name": "preference_out", + "type": "git_merge_preference_t *", + "comment": "One of the `git_merge_preference_t` flag." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository to merge" + }, + { + "name": "our_ref", + "type": "git_reference *", + "comment": "the reference to perform the analysis from" + }, + { + "name": "their_heads", + "type": "const git_annotated_commit **", + "comment": "the heads to merge into" + }, + { + "name": "their_heads_len", + "type": "size_t", + "comment": "the number of heads to merge" } ], - "argline": "git_oid *out, const unsigned char *raw", - "sig": "git_oid *::const unsigned char *", - "return": { - "type": "void", - "comment": null - }, - "description": "Copy an already raw oid into a git_oid structure.
\n", + "argline": "git_merge_analysis_t *analysis_out, git_merge_preference_t *preference_out, git_repository *repo, git_reference *our_ref, const git_annotated_commit **their_heads, size_t their_heads_len", + "sig": "git_merge_analysis_t *::git_merge_preference_t *::git_repository *::git_reference *::const git_annotated_commit **::size_t", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Analyzes the given branch(es) and determines the opportunities for\n merging them into a reference.
\n", "comments": "", - "group": "oid" + "group": "merge" }, - "git_oid_fmt": { + "git_merge_base": { "type": "function", - "file": "git2/oid.h", - "line": 89, - "lineto": 89, + "file": "git2/merge.h", + "line": 448, + "lineto": 452, "args": [ { "name": "out", - "type": "char *", - "comment": "output hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (40 bytes). Only the\n\t\toid digits are written; a '\n\\\n0' terminator must be added\n\t\tby the caller if it is required." + "type": "git_oid *", + "comment": "the OID of a merge base between 'one' and 'two'" }, { - "name": "id", + "name": "repo", + "type": "git_repository *", + "comment": "the repository where the commits exist" + }, + { + "name": "one", "type": "const git_oid *", - "comment": "oid structure to format." + "comment": "one of the commits" + }, + { + "name": "two", + "type": "const git_oid *", + "comment": "the other commit" } ], - "argline": "char *out, const git_oid *id", - "sig": "char *::const git_oid *", + "argline": "git_oid *out, git_repository *repo, const git_oid *one, const git_oid *two", + "sig": "git_oid *::git_repository *::const git_oid *::const git_oid *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success, GIT_ENOTFOUND if not found or error code" }, - "description": "Format a git_oid into a hex string.
\n", + "description": "Find a merge base between two commits
\n", "comments": "", - "group": "oid", + "group": "merge", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_oid_fmt-56", - "ex/v0.28.0/general.html#git_oid_fmt-57", - "ex/v0.28.0/general.html#git_oid_fmt-58", - "ex/v0.28.0/general.html#git_oid_fmt-59", - "ex/v0.28.0/general.html#git_oid_fmt-60", - "ex/v0.28.0/general.html#git_oid_fmt-61" - ], - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_oid_fmt-1", - "ex/v0.28.0/network/fetch.html#git_oid_fmt-2" - ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_oid_fmt-1" - ] + "log.c": ["ex/v1.9.1/log.html#git_merge_base-31"], + "rev-parse.c": ["ex/v1.9.1/rev-parse.html#git_merge_base-1"] } }, - "git_oid_nfmt": { + "git_merge_bases": { "type": "function", - "file": "git2/oid.h", - "line": 100, - "lineto": 100, + "file": "git2/merge.h", + "line": 463, + "lineto": 467, "args": [ { "name": "out", - "type": "char *", - "comment": "output hex string; you say how many bytes to write.\n\t\tIf the number of bytes is > GIT_OID_HEXSZ, extra bytes\n\t\twill be zeroed; if not, a '\n\\\n0' terminator is NOT added." + "type": "git_oidarray *", + "comment": "array in which to store the resulting ids" }, { - "name": "n", - "type": "size_t", - "comment": "number of characters to write into out string" + "name": "repo", + "type": "git_repository *", + "comment": "the repository where the commits exist" }, { - "name": "id", + "name": "one", "type": "const git_oid *", - "comment": "oid structure to format." + "comment": "one of the commits" + }, + { + "name": "two", + "type": "const git_oid *", + "comment": "the other commit" } ], - "argline": "char *out, size_t n, const git_oid *id", - "sig": "char *::size_t::const git_oid *", + "argline": "git_oidarray *out, git_repository *repo, const git_oid *one, const git_oid *two", + "sig": "git_oidarray *::git_repository *::const git_oid *::const git_oid *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success, GIT_ENOTFOUND if not found or error code" }, - "description": "Format a git_oid into a partial hex string.
\n", + "description": "Find merge bases between two commits
\n", "comments": "", - "group": "oid" + "group": "merge" }, - "git_oid_pathfmt": { + "git_merge_base_many": { "type": "function", - "file": "git2/oid.h", - "line": 115, - "lineto": 115, + "file": "git2/merge.h", + "line": 478, + "lineto": 482, "args": [ { "name": "out", - "type": "char *", - "comment": "output hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (41 bytes). Only the\n\t\toid digits are written; a '\n\\\n0' terminator must be added\n\t\tby the caller if it is required." + "type": "git_oid *", + "comment": "the OID of a merge base considering all the commits" }, { - "name": "id", - "type": "const git_oid *", - "comment": "oid structure to format." - } - ], - "argline": "char *out, const git_oid *id", - "sig": "char *::const git_oid *", - "return": { - "type": "void", - "comment": null - }, - "description": "Format a git_oid into a loose-object path string.
\n", - "comments": "The resulting string is "aa/...", where "aa" is the first two\n hex digits of the oid and "..." is the remaining 38 digits.
\n", - "group": "oid" - }, - "git_oid_tostr_s": { - "type": "function", - "file": "git2/oid.h", - "line": 128, - "lineto": 128, - "args": [ + "name": "repo", + "type": "git_repository *", + "comment": "the repository where the commits exist" + }, { - "name": "oid", - "type": "const git_oid *", - "comment": "The oid structure to format" + "name": "length", + "type": "size_t", + "comment": "The number of commits in the provided `input_array`" + }, + { + "name": "input_array", + "type": "const git_oid []", + "comment": "oids of the commits" } ], - "argline": "const git_oid *oid", - "sig": "const git_oid *", + "argline": "git_oid *out, git_repository *repo, size_t length, const git_oid [] input_array", + "sig": "git_oid *::git_repository *::size_t::const git_oid []", "return": { - "type": "char *", - "comment": " the c-string" + "type": "int", + "comment": " Zero on success; GIT_ENOTFOUND or -1 on failure." }, - "description": "Format a git_oid into a statically allocated c-string.
\n", - "comments": "The c-string is owned by the library and should not be freed\n by the user. If libgit2 is built with thread support, the string\n will be stored in TLS (i.e. one buffer per thread) to allow for\n concurrent calls of the function.
\n", - "group": "oid", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_oid_tostr_s-21", - "ex/v0.28.0/merge.html#git_oid_tostr_s-22" - ] - } + "description": "Find a merge base given a list of commits
\n", + "comments": "", + "group": "merge" }, - "git_oid_tostr": { + "git_merge_bases_many": { "type": "function", - "file": "git2/oid.h", - "line": 147, - "lineto": 147, + "file": "git2/merge.h", + "line": 524, + "lineto": 528, "args": [ { "name": "out", - "type": "char *", - "comment": "the buffer into which the oid string is output." + "type": "git_oidarray *", + "comment": "array in which to store the resulting ids" }, { - "name": "n", + "name": "repo", + "type": "git_repository *", + "comment": "the repository where the commits exist" + }, + { + "name": "length", "type": "size_t", - "comment": "the size of the out buffer." + "comment": "The number of commits in the provided `input_array`" }, { - "name": "id", - "type": "const git_oid *", - "comment": "the oid structure to format." + "name": "input_array", + "type": "const git_oid []", + "comment": "oids of the commits" } ], - "argline": "char *out, size_t n, const git_oid *id", - "sig": "char *::size_t::const git_oid *", + "argline": "git_oidarray *out, git_repository *repo, size_t length, const git_oid [] input_array", + "sig": "git_oidarray *::git_repository *::size_t::const git_oid []", "return": { - "type": "char *", - "comment": " the out buffer pointer, assuming no input parameter\n\t\t\terrors, otherwise a pointer to an empty string." + "type": "int", + "comment": " Zero on success; GIT_ENOTFOUND or -1 on failure." }, - "description": "Format a git_oid into a buffer as a hex format c-string.
\n", - "comments": "If the buffer is smaller than GIT_OID_HEXSZ+1, then the resulting\n oid c-string will be truncated to n-1 characters (but will still be\n NUL-byte terminated).
\n\nIf there are any input parameter errors (out == NULL, n == 0, oid ==\n NULL), then a pointer to an empty string is returned, so that the\n return value can always be printed.
\n", - "group": "oid", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_oid_tostr-18", - "ex/v0.28.0/blame.html#git_oid_tostr-19" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_oid_tostr-26", - "ex/v0.28.0/cat-file.html#git_oid_tostr-27", - "ex/v0.28.0/cat-file.html#git_oid_tostr-28", - "ex/v0.28.0/cat-file.html#git_oid_tostr-29", - "ex/v0.28.0/cat-file.html#git_oid_tostr-30" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_oid_tostr-40", - "ex/v0.28.0/log.html#git_oid_tostr-41" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_oid_tostr-12", - "ex/v0.28.0/rev-parse.html#git_oid_tostr-13", - "ex/v0.28.0/rev-parse.html#git_oid_tostr-14", - "ex/v0.28.0/rev-parse.html#git_oid_tostr-15" - ] - } + "description": "Find all merge bases given a list of commits
\n", + "comments": "This behaves similar to git merge-base.
Given three commits a, b, and c, merge_base_many will compute a hypothetical commit m, which is a merge between b and c.
For example, with the following topology: text o---o---o---o---C / / o---o---o---B / / ---2---1---o---o---o---A
the result of merge_base_many given a, b, and c is 1. This is because the equivalent topology with the imaginary merge commit m between b and c is: text o---o---o---o---o / \\ / o---o---o---o---M / / ---2---1---o---o---o---A
and the result of merge_base_many given a and m is 1.
If you're looking to recieve the common ancestor between all the given commits, use merge_base_octopus.
Copy an oid from one structure to another.
\n", + "description": "Find a merge base in preparation for an octopus merge
\n", "comments": "", - "group": "oid", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_oid_cpy-20", - "ex/v0.28.0/blame.html#git_oid_cpy-21", - "ex/v0.28.0/blame.html#git_oid_cpy-22" - ] - } + "group": "merge" }, - "git_oid_cmp": { + "git_merge_file": { "type": "function", - "file": "git2/oid.h", - "line": 164, - "lineto": 164, + "file": "git2/merge.h", + "line": 561, + "lineto": 566, "args": [ { - "name": "a", - "type": "const git_oid *", - "comment": "first oid structure." + "name": "out", + "type": "git_merge_file_result *", + "comment": "The git_merge_file_result to be filled in" }, { - "name": "b", - "type": "const git_oid *", - "comment": "second oid structure." + "name": "ancestor", + "type": "const git_merge_file_input *", + "comment": "The contents of the ancestor file" + }, + { + "name": "ours", + "type": "const git_merge_file_input *", + "comment": "The contents of the file in \"our\" side" + }, + { + "name": "theirs", + "type": "const git_merge_file_input *", + "comment": "The contents of the file in \"their\" side" + }, + { + "name": "opts", + "type": "const git_merge_file_options *", + "comment": "The merge file options or `NULL` for defaults" } ], - "argline": "const git_oid *a, const git_oid *b", - "sig": "const git_oid *::const git_oid *", - "return": { - "type": "int", - "comment": " \n<\n0, 0, >0 if a \n<\n b, a == b, a > b." - }, - "description": "Compare two oid structures.
\n", - "comments": "", - "group": "oid" + "argline": "git_merge_file_result *out, const git_merge_file_input *ancestor, const git_merge_file_input *ours, const git_merge_file_input *theirs, const git_merge_file_options *opts", + "sig": "git_merge_file_result *::const git_merge_file_input *::const git_merge_file_input *::const git_merge_file_input *::const git_merge_file_options *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Merge two files as they exist in the in-memory data structures, using\n the given common ancestor as the baseline, producing a\n git_merge_file_result that reflects the merge result. The\n git_merge_file_result must be freed with git_merge_file_result_free.
Note that this function does not reference a repository and any configuration must be passed as git_merge_file_options.
Compare two oid structures for equality
\n", + "argline": "git_merge_file_result *out, git_repository *repo, const git_index_entry *ancestor, const git_index_entry *ours, const git_index_entry *theirs, const git_merge_file_options *opts", + "sig": "git_merge_file_result *::git_repository *::const git_index_entry *::const git_index_entry *::const git_index_entry *::const git_merge_file_options *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Merge two files as they exist in the index, using the given common\n ancestor as the baseline, producing a git_merge_file_result that\n reflects the merge result. The git_merge_file_result must be freed with\n git_merge_file_result_free.
Compare the first 'len' hexadecimal characters (packets of 4 bits)\n of two oid structures.
\n", + "argline": "git_merge_file_result *result", + "sig": "git_merge_file_result *", + "return": { "type": "void", "comment": null }, + "description": "Frees a git_merge_file_result.
Check if an oid equals an hex formatted object id.
\n", - "comments": "", - "group": "oid" + "argline": "git_index **out, git_repository *repo, const git_tree *ancestor_tree, const git_tree *our_tree, const git_tree *their_tree, const git_merge_options *opts", + "sig": "git_index **::git_repository *::const git_tree *::const git_tree *::const git_tree *::const git_merge_options *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Merge two trees, producing a git_index that reflects the result of\n the merge. The index may be written as-is to the working directory\n or checked out. If the index is to be converted to a tree, the caller\n should resolve any conflicts that arose as part of the merge.
The returned index must be freed explicitly with git_index_free.
Compare an oid to an hex formatted object id.
\n", - "comments": "", - "group": "oid" + "argline": "git_index **out, git_repository *repo, const git_commit *our_commit, const git_commit *their_commit, const git_merge_options *opts", + "sig": "git_index **::git_repository *::const git_commit *::const git_commit *::const git_merge_options *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Merge two commits, producing a git_index that reflects the result of\n the merge. The index may be written as-is to the working directory\n or checked out. If the index is to be converted to a tree, the caller\n should resolve any conflicts that arose as part of the merge.
The returned index must be freed explicitly with git_index_free.
Check is an oid is all zeros.
\n", - "comments": "", - "group": "oid", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_oid_iszero-23" - ], - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_oid_iszero-3" - ] - } + "argline": "git_repository *repo, const git_annotated_commit **their_heads, size_t their_heads_len, const git_merge_options *merge_opts, const git_checkout_options *checkout_opts", + "sig": "git_repository *::const git_annotated_commit **::size_t::const git_merge_options *::const git_checkout_options *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Merges the given commit(s) into HEAD, writing the results into the working\n directory. Any changes are staged for commit and any conflicts are written\n to the index. Callers should inspect the repository's index after this\n completes, resolve any conflicts and prepare a commit.
\n", + "comments": "For compatibility with git, the repository is put into a merging state. Once the commit is done (or if the user wishes to abort), you should clear this state by calling git_repository_state_cleanup().
Create a new OID shortener.
\n", - "comments": "The OID shortener is used to process a list of OIDs\n in text form and return the shortest length that would\n uniquely identify all of them.
\n\nE.g. look at the result of git log --abbrev.
Clean up excess whitespace and make sure there is a trailing newline in the message.
\n", + "comments": "Optionally, it can remove lines which start with the comment character.
\n", + "group": "message" }, - "git_oid_shorten_add": { + "git_message_trailers": { "type": "function", - "file": "git2/oid.h", - "line": 257, - "lineto": 257, + "file": "git2/message.h", + "line": 73, + "lineto": 73, "args": [ { - "name": "os", - "type": "git_oid_shorten *", - "comment": "a `git_oid_shorten` instance" + "name": "arr", + "type": "git_message_trailer_array *", + "comment": "A pre-allocated git_message_trailer_array struct to be filled in\n with any trailers found during parsing." }, { - "name": "text_id", + "name": "message", "type": "const char *", - "comment": "an OID in text form" + "comment": "The message to be parsed" } ], - "argline": "git_oid_shorten *os, const char *text_id", - "sig": "git_oid_shorten *::const char *", + "argline": "git_message_trailer_array *arr, const char *message", + "sig": "git_message_trailer_array *::const char *", "return": { "type": "int", - "comment": " the minimal length to uniquely identify all OIDs\n\t\tadded so far to the set; or an error code (\n<\n0) if an\n\t\terror occurs." + "comment": " 0 on success, or non-zero on error." }, - "description": "Add a new OID to set of shortened OIDs and calculate\n the minimal length to uniquely identify all the OIDs in\n the set.
\n", - "comments": "The OID is expected to be a 40-char hexadecimal string.\n The OID is owned by the user and will not be modified\n or freed.
\n\nFor performance reasons, there is a hard-limit of how many\n OIDs can be added to a single set (around ~32000, assuming\n a mostly randomized distribution), which should be enough\n for any kind of program, and keeps the algorithm fast and\n memory-efficient.
\n\nAttempting to add more than those OIDs will result in a\n GIT_ERROR_INVALID error
\n", - "group": "oid" + "description": "Parse trailers out of a message, filling the array pointed to by +arr+.
\n", + "comments": "Trailers are key/value pairs in the last paragraph of a message, not including any patches or conflicts that may be present.
\n", + "group": "message" }, - "git_oid_shorten_free": { + "git_message_trailer_array_free": { "type": "function", - "file": "git2/oid.h", - "line": 264, - "lineto": 264, + "file": "git2/message.h", + "line": 81, + "lineto": 81, "args": [ { - "name": "os", - "type": "git_oid_shorten *", - "comment": "a `git_oid_shorten` instance" + "name": "arr", + "type": "git_message_trailer_array *", + "comment": "The trailer to free." } ], - "argline": "git_oid_shorten *os", - "sig": "git_oid_shorten *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free an OID shortener instance
\n", + "argline": "git_message_trailer_array *arr", + "sig": "git_message_trailer_array *", + "return": { "type": "void", "comment": null }, + "description": "Clean's up any allocated memory in the git_message_trailer_array filled by\n a call to git_message_trailers.
\n", "comments": "", - "group": "oid" + "group": "message" }, - "git_oidarray_free": { + "git_note_iterator_free": { "type": "function", - "file": "git2/oidarray.h", - "line": 34, - "lineto": 34, + "file": "git2/notes.h", + "line": 75, + "lineto": 75, "args": [ { - "name": "array", - "type": "git_oidarray *", - "comment": "git_oidarray from which to free oid data" + "name": "it", + "type": "git_note_iterator *", + "comment": "pointer to the iterator" } ], - "argline": "git_oidarray *array", - "sig": "git_oidarray *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free the OID array
\n", - "comments": "This method must (and must only) be called on git_oidarray\n objects where the array is allocated by the library. Not doing so,\n will result in a memory leak.
This does not free the git_oidarray itself, since the library will\n never allocate that object directly itself (it is more commonly embedded\n inside another struct or created on the stack).
Frees an git_note_iterator
\n", + "comments": "", + "group": "note" }, - "git_packbuilder_new": { + "git_note_next": { "type": "function", - "file": "git2/pack.h", - "line": 64, - "lineto": 64, + "file": "git2/notes.h", + "line": 88, + "lineto": 91, "args": [ { - "name": "out", - "type": "git_packbuilder **", - "comment": "The new packbuilder object" + "name": "note_id", + "type": "git_oid *", + "comment": "id of blob containing the message" }, { - "name": "repo", - "type": "git_repository *", - "comment": "The repository" + "name": "annotated_id", + "type": "git_oid *", + "comment": "id of the git object being annotated" + }, + { + "name": "it", + "type": "git_note_iterator *", + "comment": "pointer to the iterator" } ], - "argline": "git_packbuilder **out, git_repository *repo", - "sig": "git_packbuilder **::git_repository *", + "argline": "git_oid *note_id, git_oid *annotated_id, git_note_iterator *it", + "sig": "git_oid *::git_oid *::git_note_iterator *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 (no error), GIT_ITEROVER (iteration is done) or an error code\n (negative value)" }, - "description": "Initialize a new packbuilder
\n", + "description": "Return the current item (note_id and annotated_id) and advance the iterator\n internally to the next value
\n", "comments": "", - "group": "packbuilder" + "group": "note" }, - "git_packbuilder_set_threads": { + "git_object_lookup": { "type": "function", - "file": "git2/pack.h", - "line": 77, - "lineto": 77, + "file": "git2/object.h", + "line": 45, + "lineto": 49, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder" + "name": "object", + "type": "git_object **", + "comment": "pointer to the looked-up object" }, { - "name": "n", - "type": "unsigned int", - "comment": "Number of threads to spawn" + "name": "repo", + "type": "git_repository *", + "comment": "the repository to look up the object" + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "the unique identifier for the object" + }, + { + "name": "type", + "type": "git_object_t", + "comment": "the type of the object" } ], - "argline": "git_packbuilder *pb, unsigned int n", - "sig": "git_packbuilder *::unsigned int", - "return": { - "type": "unsigned int", - "comment": " number of actual threads to be used" - }, - "description": "Set number of threads to spawn
\n", - "comments": "By default, libgit2 won't spawn any threads at all;\n when set to 0, libgit2 will autodetect the number of\n CPUs.
\n", - "group": "packbuilder" + "argline": "git_object **object, git_repository *repo, const git_oid *id, git_object_t type", + "sig": "git_object **::git_repository *::const git_oid *::git_object_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Lookup a reference to one of the objects in a repository.
\n", + "comments": "The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.
The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'GIT_OBJECT_ANY' may be passed to let the method guess the object's type.
\n", + "group": "object", + "examples": { + "log.c": ["ex/v1.9.1/log.html#git_object_lookup-32"], + "merge.c": ["ex/v1.9.1/merge.html#git_object_lookup-17"] + } }, - "git_packbuilder_insert": { + "git_object_lookup_prefix": { "type": "function", - "file": "git2/pack.h", - "line": 91, - "lineto": 91, + "file": "git2/object.h", + "line": 78, + "lineto": 83, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder" + "name": "object_out", + "type": "git_object **", + "comment": "pointer where to store the looked-up object" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository to look up the object" }, { "name": "id", "type": "const git_oid *", - "comment": "The oid of the commit" + "comment": "a short identifier for the object" }, { - "name": "name", - "type": "const char *", - "comment": "The name; might be NULL" + "name": "len", + "type": "size_t", + "comment": "the length of the short identifier" + }, + { + "name": "type", + "type": "git_object_t", + "comment": "the type of the object" } ], - "argline": "git_packbuilder *pb, const git_oid *id, const char *name", - "sig": "git_packbuilder *::const git_oid *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Insert a single object
\n", - "comments": "For an optimal pack it's mandatory to insert objects in recency order,\n commits followed by trees and blobs.
\n", - "group": "packbuilder" + "argline": "git_object **object_out, git_repository *repo, const git_oid *id, size_t len, git_object_t type", + "sig": "git_object **::git_repository *::const git_oid *::size_t::git_object_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Lookup a reference to one of the objects in a repository,\n given a prefix of its identifier (short id).
\n", + "comments": "The object obtained will be so that its identifier matches the first 'len' hexadecimal characters (packets of 4 bits) of the given id. len must be at least GIT_OID_MINPREFIXLEN, and long enough to identify a unique object matching the prefix; otherwise the method will fail.
The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.
The type parameter must match the type of the object in the odb; the method will fail otherwise. The special value GIT_OBJECT_ANY may be passed to let the method guess the object's type.
Insert a root tree object
\n", - "comments": "This will add the tree as well as all referenced trees and blobs.
\n", - "group": "packbuilder" + "argline": "git_object **out, const git_object *treeish, const char *path, git_object_t type", + "sig": "git_object **::const git_object *::const char *::git_object_t", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Lookup an object that represents a tree entry.
\n", + "comments": "", + "group": "object" }, - "git_packbuilder_insert_commit": { + "git_object_id": { "type": "function", - "file": "git2/pack.h", - "line": 115, - "lineto": 115, + "file": "git2/object.h", + "line": 108, + "lineto": 108, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder" - }, - { - "name": "id", - "type": "const git_oid *", - "comment": "The oid of the commit" + "name": "obj", + "type": "const git_object *", + "comment": "the repository object" } ], - "argline": "git_packbuilder *pb, const git_oid *id", - "sig": "git_packbuilder *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Insert a commit object
\n", - "comments": "This will add a commit as well as the completed referenced tree.
\n", - "group": "packbuilder" + "argline": "const git_object *obj", + "sig": "const git_object *", + "return": { "type": "const git_oid *", "comment": " the SHA1 id" }, + "description": "Get the id (SHA1) of a repository object
\n", + "comments": "", + "group": "object", + "examples": { + "blame.c": [ + "ex/v1.9.1/blame.html#git_object_id-7", + "ex/v1.9.1/blame.html#git_object_id-8", + "ex/v1.9.1/blame.html#git_object_id-9", + "ex/v1.9.1/blame.html#git_object_id-10" + ], + "cat-file.c": [ + "ex/v1.9.1/cat-file.html#git_object_id-10", + "ex/v1.9.1/cat-file.html#git_object_id-11" + ], + "log.c": [ + "ex/v1.9.1/log.html#git_object_id-33", + "ex/v1.9.1/log.html#git_object_id-34", + "ex/v1.9.1/log.html#git_object_id-35", + "ex/v1.9.1/log.html#git_object_id-36" + ], + "rev-parse.c": [ + "ex/v1.9.1/rev-parse.html#git_object_id-2", + "ex/v1.9.1/rev-parse.html#git_object_id-3", + "ex/v1.9.1/rev-parse.html#git_object_id-4", + "ex/v1.9.1/rev-parse.html#git_object_id-5", + "ex/v1.9.1/rev-parse.html#git_object_id-6" + ] + } }, - "git_packbuilder_insert_walk": { + "git_object_short_id": { "type": "function", - "file": "git2/pack.h", - "line": 128, - "lineto": 128, + "file": "git2/object.h", + "line": 122, + "lineto": 122, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "the packbuilder" + "name": "out", + "type": "git_buf *", + "comment": "Buffer to write string into" }, { - "name": "walk", - "type": "git_revwalk *", - "comment": "the revwalk to use to fill the packbuilder" + "name": "obj", + "type": "const git_object *", + "comment": "The object to get an ID for" } ], - "argline": "git_packbuilder *pb, git_revwalk *walk", - "sig": "git_packbuilder *::git_revwalk *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Insert objects as given by the walk
\n", - "comments": "Those commits and all objects they reference will be inserted into\n the packbuilder.
\n", - "group": "packbuilder" + "argline": "git_buf *out, const git_object *obj", + "sig": "git_buf *::const git_object *", + "return": { "type": "int", "comment": " 0 on success, \n<\n0 for error" }, + "description": "Get a short abbreviated OID string for the object
\n", + "comments": "This starts at the "core.abbrev" length (default 7 characters) and iteratively extends to a longer string if that length is ambiguous. The result will be unambiguous (at least until new objects are added to the repository).
\n", + "group": "object", + "examples": { "tag.c": ["ex/v1.9.1/tag.html#git_object_short_id-3"] } }, - "git_packbuilder_insert_recur": { + "git_object_type": { "type": "function", - "file": "git2/pack.h", - "line": 140, - "lineto": 140, + "file": "git2/object.h", + "line": 130, + "lineto": 130, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "the packbuilder" - }, - { - "name": "id", - "type": "const git_oid *", - "comment": "the id of the root object to insert" - }, - { - "name": "name", - "type": "const char *", - "comment": "optional name for the object" + "name": "obj", + "type": "const git_object *", + "comment": "the repository object" } ], - "argline": "git_packbuilder *pb, const git_oid *id, const char *name", - "sig": "git_packbuilder *::const git_oid *::const char *", + "argline": "const git_object *obj", + "sig": "const git_object *", + "return": { "type": "git_object_t", "comment": " the object's type" }, + "description": "Get the object type of an object
\n", + "comments": "", + "group": "object", + "examples": { + "cat-file.c": [ + "ex/v1.9.1/cat-file.html#git_object_type-12", + "ex/v1.9.1/cat-file.html#git_object_type-13", + "ex/v1.9.1/cat-file.html#git_object_type-14" + ], + "tag.c": ["ex/v1.9.1/tag.html#git_object_type-4"] + } + }, + "git_object_owner": { + "type": "function", + "file": "git2/object.h", + "line": 144, + "lineto": 144, + "args": [ + { "name": "obj", "type": "const git_object *", "comment": "the object" } + ], + "argline": "const git_object *obj", + "sig": "const git_object *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "git_repository *", + "comment": " the repository who owns this object" }, - "description": "Recursively insert an object and its referenced objects
\n", - "comments": "Insert the object as well as any object it references.
\n", - "group": "packbuilder" + "description": "Get the repository that owns this object
\n", + "comments": "Freeing or calling git_repository_close on the returned pointer will invalidate the actual object.
Any other operation may be run on the repository without affecting the object.
\n", + "group": "object" }, - "git_packbuilder_write_buf": { + "git_object_free": { "type": "function", - "file": "git2/pack.h", - "line": 151, - "lineto": 151, + "file": "git2/object.h", + "line": 161, + "lineto": 161, "args": [ { - "name": "buf", - "type": "git_buf *", - "comment": "Buffer where to write the packfile" - }, + "name": "object", + "type": "git_object *", + "comment": "the object to close" + } + ], + "argline": "git_object *object", + "sig": "git_object *", + "return": { "type": "void", "comment": null }, + "description": "Close an open object
\n", + "comments": "This method instructs the library to close an existing object; note that git_objects are owned and cached by the repository so the object may or may not be freed after this library call, depending on how aggressive is the caching mechanism used by the repository.
\n\nIMPORTANT: It is necessary to call this method when you stop using an object. Failure to do so will cause a memory leak.
\n", + "group": "object", + "examples": { + "blame.c": [ + "ex/v1.9.1/blame.html#git_object_free-11", + "ex/v1.9.1/blame.html#git_object_free-12", + "ex/v1.9.1/blame.html#git_object_free-13", + "ex/v1.9.1/blame.html#git_object_free-14" + ], + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_object_free-15"], + "commit.c": ["ex/v1.9.1/commit.html#git_object_free-6"], + "general.c": ["ex/v1.9.1/general.html#git_object_free-38"], + "log.c": ["ex/v1.9.1/log.html#git_object_free-37"], + "merge.c": ["ex/v1.9.1/merge.html#git_object_free-18"], + "rev-parse.c": [ + "ex/v1.9.1/rev-parse.html#git_object_free-7", + "ex/v1.9.1/rev-parse.html#git_object_free-8", + "ex/v1.9.1/rev-parse.html#git_object_free-9" + ], + "tag.c": [ + "ex/v1.9.1/tag.html#git_object_free-5", + "ex/v1.9.1/tag.html#git_object_free-6", + "ex/v1.9.1/tag.html#git_object_free-7", + "ex/v1.9.1/tag.html#git_object_free-8" + ] + } + }, + "git_object_type2string": { + "type": "function", + "file": "git2/object.h", + "line": 172, + "lineto": 172, + "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder" + "name": "type", + "type": "git_object_t", + "comment": "object type to convert." } ], - "argline": "git_buf *buf, git_packbuilder *pb", - "sig": "git_buf *::git_packbuilder *", + "argline": "git_object_t type", + "sig": "git_object_t", "return": { - "type": "int", - "comment": null + "type": "const char *", + "comment": " the corresponding string representation." }, - "description": "Write the contents of the packfile to an in-memory buffer
\n", - "comments": "The contents of the buffer will become a valid packfile, even though there\n will be no attached index
\n", - "group": "packbuilder" + "description": "Convert an object type to its string representation.
\n", + "comments": "The result is a pointer to a string in static memory and should not be free()'ed.
\n", + "group": "object", + "examples": { + "cat-file.c": [ + "ex/v1.9.1/cat-file.html#git_object_type2string-16", + "ex/v1.9.1/cat-file.html#git_object_type2string-17", + "ex/v1.9.1/cat-file.html#git_object_type2string-18", + "ex/v1.9.1/cat-file.html#git_object_type2string-19" + ], + "general.c": [ + "ex/v1.9.1/general.html#git_object_type2string-39", + "ex/v1.9.1/general.html#git_object_type2string-40" + ] + } }, - "git_packbuilder_write": { + "git_object_string2type": { "type": "function", - "file": "git2/pack.h", - "line": 164, - "lineto": 169, + "file": "git2/object.h", + "line": 180, + "lineto": 180, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder" - }, - { - "name": "path", + "name": "str", "type": "const char *", - "comment": "to the directory where the packfile and index should be stored" - }, - { - "name": "mode", - "type": "unsigned int", - "comment": "permissions to use creating a packfile or 0 for defaults" - }, - { - "name": "progress_cb", - "type": "git_transfer_progress_cb", - "comment": "function to call with progress information from the indexer (optional)" - }, - { - "name": "progress_cb_payload", - "type": "void *", - "comment": "payload for the progress callback (optional)" + "comment": "the string to convert." } ], - "argline": "git_packbuilder *pb, const char *path, unsigned int mode, git_transfer_progress_cb progress_cb, void *progress_cb_payload", - "sig": "git_packbuilder *::const char *::unsigned int::git_transfer_progress_cb::void *", + "argline": "const char *str", + "sig": "const char *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "git_object_t", + "comment": " the corresponding git_object_t." }, - "description": "Write the new pack and corresponding index file to path.
\n", + "description": "Convert a string object type representation to it's git_object_t.
\n", "comments": "", - "group": "packbuilder" + "group": "object" }, - "git_packbuilder_hash": { + "git_object_typeisloose": { "type": "function", - "file": "git2/pack.h", - "line": 179, - "lineto": 179, + "file": "git2/object.h", + "line": 189, + "lineto": 189, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder object" + "name": "type", + "type": "git_object_t", + "comment": "object type to test." } ], - "argline": "git_packbuilder *pb", - "sig": "git_packbuilder *", + "argline": "git_object_t type", + "sig": "git_object_t", "return": { - "type": "const git_oid *", - "comment": null + "type": "int", + "comment": " true if the type represents a valid loose object type,\n false otherwise." }, - "description": "Get the packfile's hash
\n", - "comments": "A packfile's name is derived from the sorted hashing of all object\n names. This is only correct after the packfile has been written.
\n", - "group": "packbuilder" + "description": "Determine if the given git_object_t is a valid loose object type.
\n", + "comments": "", + "group": "object" }, - "git_packbuilder_foreach": { + "git_object_peel": { "type": "function", - "file": "git2/pack.h", - "line": 191, - "lineto": 191, + "file": "git2/object.h", + "line": 214, + "lineto": 217, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "the packbuilder" + "name": "peeled", + "type": "git_object **", + "comment": "Pointer to the peeled git_object" }, { - "name": "cb", - "type": "git_packbuilder_foreach_cb", - "comment": "the callback to call with each packed object's buffer" + "name": "object", + "type": "const git_object *", + "comment": "The object to be processed" }, { - "name": "payload", - "type": "void *", - "comment": "the callback's data" + "name": "target_type", + "type": "git_object_t", + "comment": "The type of the requested object (a GIT_OBJECT_ value)" } ], - "argline": "git_packbuilder *pb, git_packbuilder_foreach_cb cb, void *payload", - "sig": "git_packbuilder *::git_packbuilder_foreach_cb::void *", + "argline": "git_object **peeled, const git_object *object, git_object_t target_type", + "sig": "git_object **::const git_object *::git_object_t", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EPEEL, or an error code" }, - "description": "Create the new pack and pass each object to the callback
\n", - "comments": "", - "group": "packbuilder" + "description": "Recursively peel an object until an object of the specified type is met.
\n", + "comments": "If the query cannot be satisfied due to the object model, GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a tree).
\n\nIf you pass GIT_OBJECT_ANY as the target type, then the object will be peeled until the type changes. A tag will be peeled until the referenced object is no longer a tag, and a commit will be peeled to a tree. Any other object type will return GIT_EINVALIDSPEC.
If peeling a tag we discover an object which cannot be peeled to the target type due to the object model, GIT_EPEEL will be returned.
\n\nYou must free the returned object.
\n", + "group": "object" }, - "git_packbuilder_object_count": { + "git_object_dup": { "type": "function", - "file": "git2/pack.h", - "line": 199, - "lineto": 199, + "file": "git2/object.h", + "line": 227, + "lineto": 227, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "the packbuilder" + "name": "dest", + "type": "git_object **", + "comment": "Pointer to store the copy of the object" + }, + { + "name": "source", + "type": "git_object *", + "comment": "Original object to copy" } ], - "argline": "git_packbuilder *pb", - "sig": "git_packbuilder *", - "return": { - "type": "size_t", - "comment": " the number of objects in the packfile" - }, - "description": "Get the total number of objects the packbuilder will write out
\n", + "argline": "git_object **dest, git_object *source", + "sig": "git_object **::git_object *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create an in-memory copy of a Git object. The copy must be\n explicitly free'd or it will leak.
\n", "comments": "", - "group": "packbuilder" + "group": "object" }, - "git_packbuilder_written": { + "git_object_rawcontent_is_valid": { "type": "function", - "file": "git2/pack.h", - "line": 207, - "lineto": 207, + "file": "git2/object.h", + "line": 270, + "lineto": 274, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "the packbuilder" + "name": "valid", + "type": "int *", + "comment": "Output pointer to set with validity of the object content" + }, + { + "name": "buf", + "type": "const char *", + "comment": "The contents to validate" + }, + { + "name": "len", + "type": "size_t", + "comment": "The length of the buffer" + }, + { + "name": "object_type", + "type": "git_object_t", + "comment": "The type of the object in the buffer" } ], - "argline": "git_packbuilder *pb", - "sig": "git_packbuilder *", - "return": { - "type": "size_t", - "comment": " the number of objects which have already been written" - }, - "description": "Get the number of objects the packbuilder has already written out
\n", + "argline": "int *valid, const char *buf, size_t len, git_object_t object_type", + "sig": "int *::const char *::size_t::git_object_t", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Analyzes a buffer of raw object content and determines its validity.\n Tree, commit, and tag objects will be parsed and ensured that they\n are valid, parseable content. (Blobs are always valid by definition.)\n An error message will be set with an informative message if the object\n is not valid.
\n", "comments": "", - "group": "packbuilder" + "group": "object" }, - "git_packbuilder_set_callbacks": { + "git_odb_new": { "type": "function", - "file": "git2/pack.h", - "line": 226, - "lineto": 229, + "file": "git2/odb.h", + "line": 102, + "lineto": 102, "args": [ { - "name": "pb", - "type": "git_packbuilder *", - "comment": "The packbuilder object" - }, - { - "name": "progress_cb", - "type": "git_packbuilder_progress", - "comment": "Function to call with progress information during\n pack building. Be aware that this is called inline with pack building\n operations, so performance may be affected." - }, - { - "name": "progress_cb_payload", - "type": "void *", - "comment": "Payload for progress callback." + "name": "odb", + "type": "git_odb **", + "comment": "location to store the database pointer, if opened." } ], - "argline": "git_packbuilder *pb, git_packbuilder_progress progress_cb, void *progress_cb_payload", - "sig": "git_packbuilder *::git_packbuilder_progress::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Set the callbacks for a packbuilder
\n", - "comments": "", - "group": "packbuilder" + "argline": "git_odb **odb", + "sig": "git_odb **", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new object database with no backends.
\n", + "comments": "Before the ODB can be used for read/writing, a custom database backend must be manually added using git_odb_add_backend()
Free the packbuilder and all associated data
\n", - "comments": "", - "group": "packbuilder" + "argline": "git_odb **odb_out, const char *objects_dir", + "sig": "git_odb **::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new object database and automatically add\n the two default backends:
\n", + "comments": "- git_odb_backend_loose: read and write loose object files from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles, assuming `objects_dir` as the Objects folder which contains a 'pack/' folder with the corresponding data\n\n",
+ "group": "odb"
},
- "git_patch_from_diff": {
+ "git_odb_add_disk_alternate": {
"type": "function",
- "file": "git2/patch.h",
- "line": 51,
- "lineto": 52,
+ "file": "git2/odb.h",
+ "line": 138,
+ "lineto": 138,
"args": [
{
- "name": "out",
- "type": "git_patch **",
- "comment": "Output parameter for the delta patch object"
- },
- {
- "name": "diff",
- "type": "git_diff *",
- "comment": "Diff list object"
+ "name": "odb",
+ "type": "git_odb *",
+ "comment": "database to add the backend to"
},
{
- "name": "idx",
- "type": "size_t",
- "comment": "Index into diff list"
+ "name": "path",
+ "type": "const char *",
+ "comment": "path to the objects folder for the alternate"
}
],
- "argline": "git_patch **out, git_diff *diff, size_t idx",
- "sig": "git_patch **::git_diff *::size_t",
+ "argline": "git_odb *odb, const char *path",
+ "sig": "git_odb *::const char *",
"return": {
"type": "int",
- "comment": " 0 on success, other value \n<\n 0 on error"
+ "comment": " 0 on success, error code otherwise"
},
- "description": "Return a patch for an entry in the diff list.
\n", - "comments": "The git_patch is a newly created object contains the text diffs\n for the delta. You have to call git_patch_free() when you are\n done with it. You can use the patch object to loop over all the hunks\n and lines in the diff of the one delta.
For an unchanged file or a binary file, no git_patch will be\n created, the output will be set to NULL, and the binary flag will be\n set true in the git_diff_delta structure.
It is okay to pass NULL for either of the output parameters; if you pass\n NULL for the git_patch, then the text diff will not be calculated.
Add an on-disk alternate to an existing Object DB.
\n", + "comments": "Note that the added path must point to an objects, not to a full repository, to use it as an alternate store.
Alternate backends are always checked for objects after all the main backends have been exhausted.
\n\nWriting is disabled on alternate backends.
\n", + "group": "odb" }, - "git_patch_from_blobs": { + "git_odb_free": { "type": "function", - "file": "git2/patch.h", - "line": 70, - "lineto": 76, + "file": "git2/odb.h", + "line": 145, + "lineto": 145, "args": [ { - "name": "out", - "type": "git_patch **", - "comment": "The generated patch; NULL on error" - }, - { - "name": "old_blob", - "type": "const git_blob *", - "comment": "Blob for old side of diff, or NULL for empty blob" - }, - { - "name": "old_as_path", - "type": "const char *", - "comment": "Treat old blob as if it had this filename; can be NULL" - }, + "name": "db", + "type": "git_odb *", + "comment": "database pointer to close. If NULL no action is taken." + } + ], + "argline": "git_odb *db", + "sig": "git_odb *", + "return": { "type": "void", "comment": null }, + "description": "Close an open object database.
\n", + "comments": "", + "group": "odb", + "examples": { + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_odb_free-20"], + "general.c": ["ex/v1.9.1/general.html#git_odb_free-41"] + } + }, + "git_odb_read": { + "type": "function", + "file": "git2/odb.h", + "line": 163, + "lineto": 163, + "args": [ { - "name": "new_blob", - "type": "const git_blob *", - "comment": "Blob for new side of diff, or NULL for empty blob" + "name": "obj", + "type": "git_odb_object **", + "comment": "pointer where to store the read object" }, { - "name": "new_as_path", - "type": "const char *", - "comment": "Treat new blob as if it had this filename; can be NULL" + "name": "db", + "type": "git_odb *", + "comment": "database to search for the object in." }, { - "name": "opts", - "type": "const git_diff_options *", - "comment": "Options for diff, or NULL for default options" + "name": "id", + "type": "const git_oid *", + "comment": "identity of the object to read." } ], - "argline": "git_patch **out, const git_blob *old_blob, const char *old_as_path, const git_blob *new_blob, const char *new_as_path, const git_diff_options *opts", - "sig": "git_patch **::const git_blob *::const char *::const git_blob *::const char *::const git_diff_options *", + "argline": "git_odb_object **obj, git_odb *db, const git_oid *id", + "sig": "git_odb_object **::git_odb *::const git_oid *", "return": { "type": "int", - "comment": " 0 on success or error code \n<\n 0" + "comment": " 0 if the object was read, GIT_ENOTFOUND if the object is\n not in the database." }, - "description": "Directly generate a patch from the difference between two blobs.
\n", - "comments": "This is just like git_diff_blobs() except it generates a patch object\n for the difference instead of directly making callbacks. You can use the\n standard git_patch accessor functions to read the patch data, and\n you must call git_patch_free() on the patch when done.
Read an object from the database.
\n", + "comments": "This method queries all available ODB backends trying to read the given OID.
\n\nThe returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use.
\n", + "group": "odb", + "examples": { + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_odb_read-21"], + "general.c": ["ex/v1.9.1/general.html#git_odb_read-42"] + } }, - "git_patch_from_blob_and_buffer": { + "git_odb_read_prefix": { "type": "function", - "file": "git2/patch.h", - "line": 95, - "lineto": 102, + "file": "git2/odb.h", + "line": 191, + "lineto": 191, "args": [ { - "name": "out", - "type": "git_patch **", - "comment": "The generated patch; NULL on error" - }, - { - "name": "old_blob", - "type": "const git_blob *", - "comment": "Blob for old side of diff, or NULL for empty blob" + "name": "obj", + "type": "git_odb_object **", + "comment": "pointer where to store the read object" }, { - "name": "old_as_path", - "type": "const char *", - "comment": "Treat old blob as if it had this filename; can be NULL" + "name": "db", + "type": "git_odb *", + "comment": "database to search for the object in." }, { - "name": "buffer", - "type": "const void *", - "comment": "Raw data for new side of diff, or NULL for empty" + "name": "short_id", + "type": "const git_oid *", + "comment": "a prefix of the id of the object to read." }, { - "name": "buffer_len", + "name": "len", "type": "size_t", - "comment": "Length of raw data for new side of diff" - }, - { - "name": "buffer_as_path", - "type": "const char *", - "comment": "Treat buffer as if it had this filename; can be NULL" - }, - { - "name": "opts", - "type": "const git_diff_options *", - "comment": "Options for diff, or NULL for default options" + "comment": "the length of the prefix" } ], - "argline": "git_patch **out, const git_blob *old_blob, const char *old_as_path, const void *buffer, size_t buffer_len, const char *buffer_as_path, const git_diff_options *opts", - "sig": "git_patch **::const git_blob *::const char *::const void *::size_t::const char *::const git_diff_options *", + "argline": "git_odb_object **obj, git_odb *db, const git_oid *short_id, size_t len", + "sig": "git_odb_object **::git_odb *::const git_oid *::size_t", "return": { "type": "int", - "comment": " 0 on success or error code \n<\n 0" + "comment": " 0 if the object was read, GIT_ENOTFOUND if the object is not in the\n database. GIT_EAMBIGUOUS if the prefix is ambiguous\n (several objects match the prefix)" }, - "description": "Directly generate a patch from the difference between a blob and a buffer.
\n", - "comments": "This is just like git_diff_blob_to_buffer() except it generates a patch\n object for the difference instead of directly making callbacks. You can\n use the standard git_patch accessor functions to read the patch\n data, and you must call git_patch_free() on the patch when done.
Read an object from the database, given a prefix\n of its identifier.
\n", + "comments": "This method queries all available ODB backends trying to match the 'len' first hexadecimal characters of the 'short_id'. The remaining (GIT_OID_SHA1_HEXSIZE-len)*4 bits of 'short_id' must be 0s. 'len' must be at least GIT_OID_MINPREFIXLEN, and the prefix must be long enough to identify a unique object in all the backends; the method will fail otherwise.
\n\nThe returned object is reference counted and internally cached, so it should be closed by the user once it's no longer in use.
\n", + "group": "odb" }, - "git_patch_from_buffers": { + "git_odb_read_header": { "type": "function", - "file": "git2/patch.h", - "line": 122, - "lineto": 130, + "file": "git2/odb.h", + "line": 210, + "lineto": 210, "args": [ { - "name": "out", - "type": "git_patch **", - "comment": "The generated patch; NULL on error" - }, - { - "name": "old_buffer", - "type": "const void *", - "comment": "Raw data for old side of diff, or NULL for empty" - }, - { - "name": "old_len", - "type": "size_t", - "comment": "Length of the raw data for old side of the diff" - }, - { - "name": "old_as_path", - "type": "const char *", - "comment": "Treat old buffer as if it had this filename; can be NULL" - }, - { - "name": "new_buffer", - "type": "const void *", - "comment": "Raw data for new side of diff, or NULL for empty" + "name": "len_out", + "type": "size_t *", + "comment": "pointer where to store the length" }, { - "name": "new_len", - "type": "size_t", - "comment": "Length of raw data for new side of diff" + "name": "type_out", + "type": "git_object_t *", + "comment": "pointer where to store the type" }, { - "name": "new_as_path", - "type": "const char *", - "comment": "Treat buffer as if it had this filename; can be NULL" + "name": "db", + "type": "git_odb *", + "comment": "database to search for the object in." }, { - "name": "opts", - "type": "const git_diff_options *", - "comment": "Options for diff, or NULL for default options" + "name": "id", + "type": "const git_oid *", + "comment": "identity of the object to read." } ], - "argline": "git_patch **out, const void *old_buffer, size_t old_len, const char *old_as_path, const void *new_buffer, size_t new_len, const char *new_as_path, const git_diff_options *opts", - "sig": "git_patch **::const void *::size_t::const char *::const void *::size_t::const char *::const git_diff_options *", + "argline": "size_t *len_out, git_object_t *type_out, git_odb *db, const git_oid *id", + "sig": "size_t *::git_object_t *::git_odb *::const git_oid *", "return": { "type": "int", - "comment": " 0 on success or error code \n<\n 0" + "comment": " 0 if the object was read, GIT_ENOTFOUND if the object is not\n in the database." }, - "description": "Directly generate a patch from the difference between two buffers.
\n", - "comments": "This is just like git_diff_buffers() except it generates a patch\n object for the difference instead of directly making callbacks. You can\n use the standard git_patch accessor functions to read the patch\n data, and you must call git_patch_free() on the patch when done.
Read the header of an object from the database, without\n reading its full contents.
\n", + "comments": "The header includes the length and the type of an object.
\n\nNote that most backends do not support reading only the header of an object, so the whole object will be read and then the header will be returned.
\n", + "group": "odb" }, - "git_patch_free": { + "git_odb_exists": { "type": "function", - "file": "git2/patch.h", - "line": 135, - "lineto": 135, + "file": "git2/odb.h", + "line": 219, + "lineto": 219, "args": [ { - "name": "patch", - "type": "git_patch *", - "comment": null - } - ], - "argline": "git_patch *patch", - "sig": "git_patch *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free a git_patch object.
\n", - "comments": "", - "group": "patch" - }, - "git_patch_get_delta": { - "type": "function", - "file": "git2/patch.h", - "line": 141, - "lineto": 141, - "args": [ + "name": "db", + "type": "git_odb *", + "comment": "database to be searched for the given object." + }, { - "name": "patch", - "type": "const git_patch *", - "comment": null + "name": "id", + "type": "const git_oid *", + "comment": "the object to search for." } ], - "argline": "const git_patch *patch", - "sig": "const git_patch *", + "argline": "git_odb *db, const git_oid *id", + "sig": "git_odb *::const git_oid *", "return": { - "type": "const git_diff_delta *", - "comment": null + "type": "int", + "comment": " 1 if the object was found, 0 otherwise" }, - "description": "Get the delta associated with a patch. This delta points to internal\n data and you do not have to release it when you are done with it.
\n", + "description": "Determine if the given object can be found in the object database.
\n", "comments": "", - "group": "patch" + "group": "odb" }, - "git_patch_num_hunks": { + "git_odb_exists_ext": { "type": "function", - "file": "git2/patch.h", - "line": 146, - "lineto": 146, + "file": "git2/odb.h", + "line": 230, + "lineto": 230, "args": [ { - "name": "patch", - "type": "const git_patch *", - "comment": null + "name": "db", + "type": "git_odb *", + "comment": "database to be searched for the given object." + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "the object to search for." + }, + { + "name": "flags", + "type": "unsigned int", + "comment": "flags affecting the lookup (see `git_odb_lookup_flags_t`)" } ], - "argline": "const git_patch *patch", - "sig": "const git_patch *", + "argline": "git_odb *db, const git_oid *id, unsigned int flags", + "sig": "git_odb *::const git_oid *::unsigned int", "return": { - "type": "size_t", - "comment": null + "type": "int", + "comment": " 1 if the object was found, 0 otherwise" }, - "description": "Get the number of hunks in a patch
\n", + "description": "Determine if the given object can be found in the object database, with\n extended options.
\n", "comments": "", - "group": "patch" + "group": "odb" }, - "git_patch_line_stats": { + "git_odb_exists_prefix": { "type": "function", - "file": "git2/patch.h", - "line": 164, - "lineto": 168, + "file": "git2/odb.h", + "line": 243, + "lineto": 244, "args": [ { - "name": "total_context", - "type": "size_t *", - "comment": "Count of context lines in output, can be NULL." + "name": "out", + "type": "git_oid *", + "comment": "The full OID of the found object if just one is found." }, { - "name": "total_additions", - "type": "size_t *", - "comment": "Count of addition lines in output, can be NULL." + "name": "db", + "type": "git_odb *", + "comment": "The database to be searched for the given object." }, { - "name": "total_deletions", - "type": "size_t *", - "comment": "Count of deletion lines in output, can be NULL." + "name": "short_id", + "type": "const git_oid *", + "comment": "A prefix of the id of the object to read." }, { - "name": "patch", - "type": "const git_patch *", - "comment": "The git_patch object" + "name": "len", + "type": "size_t", + "comment": "The length of the prefix." } ], - "argline": "size_t *total_context, size_t *total_additions, size_t *total_deletions, const git_patch *patch", - "sig": "size_t *::size_t *::size_t *::const git_patch *", + "argline": "git_oid *out, git_odb *db, const git_oid *short_id, size_t len", + "sig": "git_oid *::git_odb *::const git_oid *::size_t", "return": { "type": "int", - "comment": " 0 on success, \n<\n0 on error" + "comment": " 0 if found, GIT_ENOTFOUND if not found, GIT_EAMBIGUOUS if multiple\n matches were found, other value \n<\n 0 if there was a read error." }, - "description": "Get line counts of each type in a patch.
\n", - "comments": "This helps imitate a diff --numstat type of output. For that purpose,\n you only need the total_additions and total_deletions values, but we\n include the total_context line count in case you want the total number\n of lines of diff output that will be generated.
All outputs are optional. Pass NULL if you don't need a particular count.
\n", - "group": "patch" + "description": "Determine if an object can be found in the object database by an\n abbreviated object ID.
\n", + "comments": "", + "group": "odb" }, - "git_patch_get_hunk": { + "git_odb_expand_ids": { "type": "function", - "file": "git2/patch.h", - "line": 183, - "lineto": 187, + "file": "git2/odb.h", + "line": 286, + "lineto": 289, "args": [ { - "name": "out", - "type": "const git_diff_hunk **", - "comment": "Output pointer to git_diff_hunk of hunk" - }, - { - "name": "lines_in_hunk", - "type": "size_t *", - "comment": "Output count of total lines in this hunk" + "name": "db", + "type": "git_odb *", + "comment": "The database to be searched for the given objects." }, { - "name": "patch", - "type": "git_patch *", - "comment": "Input pointer to patch object" + "name": "ids", + "type": "git_odb_expand_id *", + "comment": "An array of short object IDs to search for" }, { - "name": "hunk_idx", + "name": "count", "type": "size_t", - "comment": "Input index of hunk to get information about" + "comment": "The length of the `ids` array" } ], - "argline": "const git_diff_hunk **out, size_t *lines_in_hunk, git_patch *patch, size_t hunk_idx", - "sig": "const git_diff_hunk **::size_t *::git_patch *::size_t", + "argline": "git_odb *db, git_odb_expand_id *ids, size_t count", + "sig": "git_odb *::git_odb_expand_id *::size_t", "return": { "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if hunk_idx out of range, \n<\n0 on error" + "comment": " 0 on success or an error code on failure" }, - "description": "Get the information about a hunk in a patch
\n", - "comments": "Given a patch and a hunk index into the patch, this returns detailed\n information about that hunk. Any of the output pointers can be passed\n as NULL if you don't care about that particular piece of information.
\n", - "group": "patch" + "description": "Determine if one or more objects can be found in the object database\n by their abbreviated object ID and type.
\n", + "comments": "The given array will be updated in place: for each abbreviated ID that is unique in the database, and of the given type (if specified), the full object ID, object ID length (GIT_OID_SHA1_HEXSIZE) and type will be written back to the array. For IDs that are not found (or are ambiguous), the array entry will be zeroed.
Note that since this function operates on multiple objects, the underlying database will not be asked to be reloaded if an object is not found (which is unlike other object database operations.)
\n", + "group": "odb" }, - "git_patch_num_lines_in_hunk": { + "git_odb_refresh": { "type": "function", - "file": "git2/patch.h", - "line": 196, - "lineto": 198, + "file": "git2/odb.h", + "line": 309, + "lineto": 309, "args": [ - { - "name": "patch", - "type": "const git_patch *", - "comment": "The git_patch object" - }, - { - "name": "hunk_idx", - "type": "size_t", - "comment": "Index of the hunk" - } + { "name": "db", "type": "git_odb *", "comment": "database to refresh" } ], - "argline": "const git_patch *patch, size_t hunk_idx", - "sig": "const git_patch *::size_t", + "argline": "git_odb *db", + "sig": "git_odb *", "return": { "type": "int", - "comment": " Number of lines in hunk or GIT_ENOTFOUND if invalid hunk index" + "comment": " 0 on success, error code otherwise" }, - "description": "Get the number of lines in a hunk.
\n", - "comments": "", - "group": "patch" + "description": "Refresh the object database to load newly added files.
\n", + "comments": "If the object databases have changed on disk while the library is running, this function will force a reload of the underlying indexes.
\n\nUse this function when you're confident that an external application has tampered with the ODB.
\n\nNOTE that it is not necessary to call this function at all. The library will automatically attempt to refresh the ODB when a lookup fails, to see if the looked up object exists on disk but hasn't been loaded yet.
\n", + "group": "odb" }, - "git_patch_get_line_in_hunk": { + "git_odb_foreach": { "type": "function", - "file": "git2/patch.h", - "line": 214, - "lineto": 218, + "file": "git2/odb.h", + "line": 324, + "lineto": 327, "args": [ + { "name": "db", "type": "git_odb *", "comment": "database to use" }, { - "name": "out", - "type": "const git_diff_line **", - "comment": "The git_diff_line data for this line" - }, - { - "name": "patch", - "type": "git_patch *", - "comment": "The patch to look in" - }, - { - "name": "hunk_idx", - "type": "size_t", - "comment": "The index of the hunk" + "name": "cb", + "type": "git_odb_foreach_cb", + "comment": "the callback to call for each object" }, { - "name": "line_of_hunk", - "type": "size_t", - "comment": "The index of the line in the hunk" + "name": "payload", + "type": "void *", + "comment": "data to pass to the callback" } ], - "argline": "const git_diff_line **out, git_patch *patch, size_t hunk_idx, size_t line_of_hunk", - "sig": "const git_diff_line **::git_patch *::size_t::size_t", + "argline": "git_odb *db, git_odb_foreach_cb cb, void *payload", + "sig": "git_odb *::git_odb_foreach_cb::void *", "return": { "type": "int", - "comment": " 0 on success, \n<\n0 on failure" + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "Get data about a line in a hunk of a patch.
\n", - "comments": "Given a patch, a hunk index, and a line index in the hunk, this\n will return a lot of details about that line. If you pass a hunk\n index larger than the number of hunks or a line index larger than\n the number of lines in the hunk, this will return -1.
\n", - "group": "patch" + "description": "List all objects available in the database
\n", + "comments": "The callback will be called for each object available in the database. Note that the objects are likely to be returned in the index order, which would make accessing the objects in that order inefficient. Return a non-zero value from the callback to stop looping.
\n", + "group": "odb" }, - "git_patch_size": { + "git_odb_write": { "type": "function", - "file": "git2/patch.h", - "line": 236, - "lineto": 240, + "file": "git2/odb.h", + "line": 347, + "lineto": 347, "args": [ { - "name": "patch", - "type": "git_patch *", - "comment": "A git_patch representing changes to one file" + "name": "out", + "type": "git_oid *", + "comment": "pointer to store the OID result of the write" }, { - "name": "include_context", - "type": "int", - "comment": "Include context lines in size if non-zero" + "name": "odb", + "type": "git_odb *", + "comment": "object database where to store the object" }, { - "name": "include_hunk_headers", - "type": "int", - "comment": "Include hunk header lines if non-zero" + "name": "data", + "type": "const void *", + "comment": "`const unsigned char *` buffer with the data to store" }, + { "name": "len", "type": "size_t", "comment": "size of the buffer" }, { - "name": "include_file_headers", - "type": "int", - "comment": "Include file header lines if non-zero" + "name": "type", + "type": "git_object_t", + "comment": "type of the data to store" } ], - "argline": "git_patch *patch, int include_context, int include_hunk_headers, int include_file_headers", - "sig": "git_patch *::int::int::int", - "return": { - "type": "size_t", - "comment": " The number of bytes of data" - }, - "description": "Look up size of patch diff data in bytes
\n", - "comments": "This returns the raw size of the patch data. This only includes the\n actual data from the lines of the diff, not the file or hunk headers.
\n\nIf you pass include_context as true (non-zero), this will be the size\n of all of the diff output; if you pass it as false (zero), this will\n only include the actual changed lines (as if context_lines was 0).
Write an object directly into the ODB
\n", + "comments": "This method writes a full object straight into the ODB. For most cases, it is preferred to write objects through a write stream, which is both faster and less memory intensive, specially for big objects.
\n\nThis method is provided for compatibility with custom backends which are not able to support streaming writes
\n", + "group": "odb", + "examples": { "general.c": ["ex/v1.9.1/general.html#git_odb_write-43"] } }, - "git_patch_print": { + "git_odb_open_wstream": { "type": "function", - "file": "git2/patch.h", - "line": 254, - "lineto": 257, + "file": "git2/odb.h", + "line": 370, + "lineto": 370, "args": [ { - "name": "patch", - "type": "git_patch *", - "comment": "A git_patch representing changes to one file" + "name": "out", + "type": "git_odb_stream **", + "comment": "pointer where to store the stream" + }, + { + "name": "db", + "type": "git_odb *", + "comment": "object database where the stream will write" }, { - "name": "print_cb", - "type": "git_diff_line_cb", - "comment": "Callback function to output lines of the patch. Will be\n called for file headers, hunk headers, and diff lines." + "name": "size", + "type": "git_object_size_t", + "comment": "final size of the object that will be written" }, { - "name": "payload", - "type": "void *", - "comment": "Reference pointer that will be passed to your callbacks." + "name": "type", + "type": "git_object_t", + "comment": "type of the object that will be written" } ], - "argline": "git_patch *patch, git_diff_line_cb print_cb, void *payload", - "sig": "git_patch *::git_diff_line_cb::void *", + "argline": "git_odb_stream **out, git_odb *db, git_object_size_t size, git_object_t type", + "sig": "git_odb_stream **::git_odb *::git_object_size_t::git_object_t", "return": { "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" + "comment": " 0 if the stream was created; error code otherwise" }, - "description": "Serialize the patch to text via callback.
\n", - "comments": "Returning a non-zero value from the callback will terminate the iteration\n and return that value to the caller.
\n", - "group": "patch" + "description": "Open a stream to write an object into the ODB
\n", + "comments": "The type and final length of the object must be specified when opening the stream.
\n\nThe returned stream will be of type GIT_STREAM_WRONLY, and it won't be effective until git_odb_stream_finalize_write is called and returns without an error
The stream must always be freed when done with git_odb_stream_free or will leak memory.
Get the content of a patch as a single diff text.
\n", - "comments": "", - "group": "patch" + "description": "Write to an odb stream
\n", + "comments": "This method will fail if the total number of received bytes exceeds the size declared with git_odb_open_wstream()
Compile a pathspec
\n", - "comments": "", - "group": "pathspec", - "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_pathspec_new-42" - ] - } - }, - "git_pathspec_free": { - "type": "function", - "file": "git2/pathspec.h", - "line": 90, - "lineto": 90, - "args": [ - { - "name": "ps", - "type": "git_pathspec *", - "comment": "The compiled pathspec" - } - ], - "argline": "git_pathspec *ps", - "sig": "git_pathspec *", - "return": { - "type": "void", - "comment": null + "comment": " 0 on success, an error code otherwise" }, - "description": "Free a pathspec
\n", - "comments": "", - "group": "pathspec", - "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_pathspec_free-43" - ] - } + "description": "Finish writing to an odb stream
\n", + "comments": "The object will take its final name and will be available to the odb.
\n\nThis method will fail if the total number of received bytes differs from the size declared with git_odb_open_wstream()
Read from an odb stream
\n", + "comments": "Most backends don't implement streaming reads
\n", + "group": "odb" }, - "git_pathspec_match_workdir": { + "git_odb_stream_free": { "type": "function", - "file": "git2/pathspec.h", - "line": 130, - "lineto": 134, + "file": "git2/odb.h", + "line": 417, + "lineto": 417, "args": [ { - "name": "out", - "type": "git_pathspec_match_list **", - "comment": null - }, - { - "name": "repo", - "type": "git_repository *", - "comment": null - }, - { - "name": "flags", - "type": "int", - "comment": null - }, - { - "name": "ps", - "type": "git_pathspec *", - "comment": null + "name": "stream", + "type": "git_odb_stream *", + "comment": "the stream to free" } ], - "argline": "git_pathspec_match_list **out, git_repository *repo, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_repository *::int::git_pathspec *", - "return": { - "type": "int", - "comment": null - }, - "description": "", + "argline": "git_odb_stream *stream", + "sig": "git_odb_stream *", + "return": { "type": "void", "comment": null }, + "description": "Free an odb stream
\n", "comments": "", - "group": "pathspec" + "group": "odb" }, - "git_pathspec_match_index": { + "git_odb_open_rstream": { "type": "function", - "file": "git2/pathspec.h", - "line": 159, - "lineto": 163, + "file": "git2/odb.h", + "line": 445, + "lineto": 450, "args": [ { "name": "out", - "type": "git_pathspec_match_list **", - "comment": null + "type": "git_odb_stream **", + "comment": "pointer where to store the stream" }, { - "name": "index", - "type": "git_index *", - "comment": null + "name": "len", + "type": "size_t *", + "comment": "pointer where to store the length of the object" }, { - "name": "flags", - "type": "int", - "comment": null + "name": "type", + "type": "git_object_t *", + "comment": "pointer where to store the type of the object" }, { - "name": "ps", - "type": "git_pathspec *", - "comment": null + "name": "db", + "type": "git_odb *", + "comment": "object database where the stream will read from" + }, + { + "name": "oid", + "type": "const git_oid *", + "comment": "oid of the object the stream will read from" } ], - "argline": "git_pathspec_match_list **out, git_index *index, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_index *::int::git_pathspec *", + "argline": "git_odb_stream **out, size_t *len, git_object_t *type, git_odb *db, const git_oid *oid", + "sig": "git_odb_stream **::size_t *::git_object_t *::git_odb *::const git_oid *", "return": { "type": "int", - "comment": null + "comment": " 0 if the stream was created, error code otherwise" }, - "description": "", - "comments": "", - "group": "pathspec" + "description": "Open a stream to read an object from the ODB
\n", + "comments": "Note that most backends do not support streaming reads because they store their objects as compressed/delta'ed blobs.
\n\nIt's recommended to use git_odb_read instead, which is assured to work on all backends.
The returned stream will be of type GIT_STREAM_RDONLY and will have the following methods:
- stream->read: read `n` bytes from the stream - stream->free: free the stream\n\n\nThe stream must always be free'd or will leak memory.
\n", + "group": "odb" }, - "git_pathspec_match_tree": { + "git_odb_write_pack": { "type": "function", - "file": "git2/pathspec.h", - "line": 183, - "lineto": 187, + "file": "git2/odb.h", + "line": 471, + "lineto": 475, "args": [ { "name": "out", - "type": "git_pathspec_match_list **", - "comment": null + "type": "git_odb_writepack **", + "comment": "pointer to the writepack functions" }, { - "name": "tree", - "type": "git_tree *", - "comment": null + "name": "db", + "type": "git_odb *", + "comment": "object database where the stream will read from" }, { - "name": "flags", - "type": "int", - "comment": null + "name": "progress_cb", + "type": "git_indexer_progress_cb", + "comment": "function to call with progress information.\n Be aware that this is called inline with network and indexing operations,\n so performance may be affected." }, { - "name": "ps", - "type": "git_pathspec *", - "comment": null + "name": "progress_payload", + "type": "void *", + "comment": "payload for the progress callback" } ], - "argline": "git_pathspec_match_list **out, git_tree *tree, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_tree *::int::git_pathspec *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "pathspec", - "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_pathspec_match_tree-44" - ] - } + "argline": "git_odb_writepack **out, git_odb *db, git_indexer_progress_cb progress_cb, void *progress_payload", + "sig": "git_odb_writepack **::git_odb *::git_indexer_progress_cb::void *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Open a stream for writing a pack file to the ODB.
\n", + "comments": "If the ODB layer understands pack files, then the given packfile will likely be streamed directly to disk (and a corresponding index created). If the ODB layer does not understand pack files, the objects will be stored in whatever format the ODB layer uses.
\n", + "group": "odb" }, - "git_pathspec_match_diff": { + "git_odb_write_multi_pack_index": { "type": "function", - "file": "git2/pathspec.h", - "line": 207, - "lineto": 211, + "file": "git2/odb.h", + "line": 489, + "lineto": 490, "args": [ { - "name": "out", - "type": "git_pathspec_match_list **", - "comment": null - }, - { - "name": "diff", - "type": "git_diff *", - "comment": null - }, - { - "name": "flags", - "type": "int", - "comment": null - }, - { - "name": "ps", - "type": "git_pathspec *", - "comment": null + "name": "db", + "type": "git_odb *", + "comment": "object database where the `multi-pack-index` file will be written." } ], - "argline": "git_pathspec_match_list **out, git_diff *diff, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_diff *::int::git_pathspec *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "pathspec" + "argline": "git_odb *db", + "sig": "git_odb *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Write a multi-pack-index file from all the .pack files in the ODB.
If the ODB layer understands pack files, then this will create a file called multi-pack-index next to the .pack and .idx files, which will contain an index of all objects stored in .pack files. This will allow for O(log n) lookup for n objects (regardless of how many packfiles there exist).
Free memory associates with a git_pathspec_match_list
\n", - "comments": "", - "group": "pathspec" + "argline": "git_oid *oid, const void *data, size_t len, git_object_t object_type", + "sig": "git_oid *::const void *::size_t::git_object_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Determine the object-ID (sha1 or sha256 hash) of a data buffer
\n", + "comments": "The resulting OID will be the identifier for the data buffer as if the data buffer it were to written to the ODB.
\n", + "group": "odb" }, - "git_pathspec_match_list_entrycount": { + "git_odb_hashfile": { "type": "function", - "file": "git2/pathspec.h", - "line": 226, - "lineto": 227, + "file": "git2/odb.h", + "line": 554, + "lineto": 554, "args": [ { - "name": "m", - "type": "const git_pathspec_match_list *", - "comment": "The git_pathspec_match_list object" + "name": "oid", + "type": "git_oid *", + "comment": "oid structure the result is written into." + }, + { + "name": "path", + "type": "const char *", + "comment": "file to read and determine object id for" + }, + { + "name": "object_type", + "type": "git_object_t", + "comment": "of the data to hash" } ], - "argline": "const git_pathspec_match_list *m", - "sig": "const git_pathspec_match_list *", - "return": { - "type": "size_t", - "comment": " Number of items in match list" - }, - "description": "Get the number of items in a match list.
\n", + "argline": "git_oid *oid, const char *path, git_object_t object_type", + "sig": "git_oid *::const char *::git_object_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Read a file from disk and fill a git_oid with the object id\n that the file would have if it were written to the Object\n Database as an object of the given type (w/o applying filters).\n Similar functionality to git.git's git hash-object without\n the -w flag, however, with the --no-filters flag.\n If you need filters, see git_repository_hashfile.
Get a matching filename by position.
\n", - "comments": "This routine cannot be used if the match list was generated by\n git_pathspec_match_diff. If so, it will always return NULL.
Create a copy of an odb_object
\n", + "comments": "The returned copy must be manually freed with git_odb_object_free. Note that because of an implementation detail, the returned copy will be the same pointer as source: the object is internally refcounted, so the copy still needs to be freed twice.
Get a matching diff delta by position.
\n", - "comments": "This routine can only be used if the match list was generated by\n git_pathspec_match_diff. Otherwise it will always return NULL.
Close an ODB object
\n", + "comments": "This method must always be called once a git_odb_object is no longer needed, otherwise memory will leak.
Get the number of pathspec items that did not match.
\n", - "comments": "This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when\n generating the git_pathspec_match_list.
\n", - "group": "pathspec" + "description": "Return the OID of an ODB object
\n", + "comments": "This is the OID from which the object was read from
\n", + "group": "odb" }, - "git_pathspec_match_list_failed_entry": { + "git_odb_object_data": { "type": "function", - "file": "git2/pathspec.h", - "line": 276, - "lineto": 277, + "file": "git2/odb.h", + "line": 603, + "lineto": 603, "args": [ { - "name": "m", - "type": "const git_pathspec_match_list *", - "comment": "The git_pathspec_match_list object" - }, - { - "name": "pos", - "type": "size_t", - "comment": "The index into the failed items" + "name": "object", + "type": "git_odb_object *", + "comment": "the object" } ], - "argline": "const git_pathspec_match_list *m, size_t pos", - "sig": "const git_pathspec_match_list *::size_t", + "argline": "git_odb_object *object", + "sig": "git_odb_object *", "return": { - "type": "const char *", - "comment": " The pathspec pattern that didn't match anything" + "type": "const void *", + "comment": " \n\n `const unsigned char *` a pointer to the data" }, - "description": "Get an original pathspec string that had no matches.
\n", - "comments": "This will be return NULL for positions out of range.
\n", - "group": "pathspec" + "description": "Return the data of an ODB object
\n", + "comments": "This is the uncompressed, raw data as read from the ODB, without the leading header.
\n\nThis pointer is owned by the object and shall not be free'd.
\n", + "group": "odb", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_odb_object_data-45"] + } }, - "git_proxy_init_options": { + "git_odb_object_size": { "type": "function", - "file": "git2/proxy.h", - "line": 92, - "lineto": 92, + "file": "git2/odb.h", + "line": 614, + "lineto": 614, "args": [ { - "name": "opts", - "type": "git_proxy_options *", - "comment": "The `git_proxy_options` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_PROXY_OPTIONS_VERSION`." + "name": "object", + "type": "git_odb_object *", + "comment": "the object" } ], - "argline": "git_proxy_options *opts, unsigned int version", - "sig": "git_proxy_options *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initialize git_proxy_options structure
\n", - "comments": "Initializes a git_proxy_options with default values. Equivalent to\n creating an instance with GIT_PROXY_OPTIONS_INIT.
Return the size of an ODB object
\n", + "comments": "This is the real size of the data buffer, not the actual size of the object.
Initialize git_rebase_options structure
\n", - "comments": "Initializes a git_rebase_options with default values. Equivalent to\n creating an instance with GIT_REBASE_OPTIONS_INIT.
Return the type of an ODB object
\n", + "comments": "", + "group": "odb", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_odb_object_type-47"] + } }, - "git_rebase_init": { + "git_odb_add_backend": { "type": "function", - "file": "git2/rebase.h", - "line": 180, - "lineto": 186, + "file": "git2/odb.h", + "line": 637, + "lineto": 637, "args": [ { - "name": "out", - "type": "git_rebase **", - "comment": "Pointer to store the rebase object" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "The repository to perform the rebase" - }, - { - "name": "branch", - "type": "const git_annotated_commit *", - "comment": "The terminal commit to rebase, or NULL to rebase the\n current branch" - }, - { - "name": "upstream", - "type": "const git_annotated_commit *", - "comment": "The commit to begin rebasing from, or NULL to rebase all\n reachable commits" + "name": "odb", + "type": "git_odb *", + "comment": "database to add the backend to" }, { - "name": "onto", - "type": "const git_annotated_commit *", - "comment": "The branch to rebase onto, or NULL to rebase onto the given\n upstream" + "name": "backend", + "type": "git_odb_backend *", + "comment": "pointer to a git_odb_backend instance" }, { - "name": "opts", - "type": "const git_rebase_options *", - "comment": "Options to specify how rebase is performed, or NULL" + "name": "priority", + "type": "int", + "comment": "Value for ordering the backends queue" } ], - "argline": "git_rebase **out, git_repository *repo, const git_annotated_commit *branch, const git_annotated_commit *upstream, const git_annotated_commit *onto, const git_rebase_options *opts", - "sig": "git_rebase **::git_repository *::const git_annotated_commit *::const git_annotated_commit *::const git_annotated_commit *::const git_rebase_options *", + "argline": "git_odb *odb, git_odb_backend *backend, int priority", + "sig": "git_odb *::git_odb_backend *::int", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0 on success, error code otherwise" }, - "description": "Initializes a rebase operation to rebase the changes in branch\n relative to upstream onto another branch. To begin the rebase\n process, call git_rebase_next. When you have finished with this\n object, call git_rebase_free.
Add a custom backend to an existing Object DB
\n", + "comments": "The backends are checked in relative ordering, based on the value of the priority parameter.
Read
Opens an existing rebase that was previously started by either an\n invocation of git_rebase_init or by another client.
Add a custom backend to an existing Object DB; this\n backend will work as an alternate.
\n", + "comments": "Alternate backends are always checked for objects after all the main backends have been exhausted.
\n\nThe backends are checked in relative ordering, based on the value of the priority parameter.
Writing is disabled on alternate backends.
\n\nRead
Gets the count of rebase operations that are to be applied.
\n", + "description": "Get the number of ODB backend objects
\n", "comments": "", - "group": "rebase" + "group": "odb" }, - "git_rebase_operation_current": { + "git_odb_get_backend": { "type": "function", - "file": "git2/rebase.h", - "line": 219, - "lineto": 219, + "file": "git2/odb.h", + "line": 676, + "lineto": 676, "args": [ { - "name": "rebase", - "type": "git_rebase *", - "comment": "The in-progress rebase" + "name": "out", + "type": "git_odb_backend **", + "comment": "output pointer to ODB backend at pos" + }, + { "name": "odb", "type": "git_odb *", "comment": "object database" }, + { + "name": "pos", + "type": "size_t", + "comment": "index into object database backend list" } ], - "argline": "git_rebase *rebase", - "sig": "git_rebase *", + "argline": "git_odb_backend **out, git_odb *odb, size_t pos", + "sig": "git_odb_backend **::git_odb *::size_t", "return": { - "type": "size_t", - "comment": " The index of the rebase operation currently being applied." + "type": "int", + "comment": " 0 on success, GIT_ENOTFOUND if pos is invalid, other errors \n<\n 0" }, - "description": "Gets the index of the rebase operation that is currently being applied.\n If the first operation has not yet been applied (because you have\n called init but not yet next) then this returns\n GIT_REBASE_NO_OPERATION.
Lookup an ODB backend object by index
\n", "comments": "", - "group": "rebase" + "group": "odb" }, - "git_rebase_operation_byindex": { + "git_odb_set_commit_graph": { "type": "function", - "file": "git2/rebase.h", - "line": 228, - "lineto": 230, + "file": "git2/odb.h", + "line": 691, + "lineto": 691, "args": [ + { "name": "odb", "type": "git_odb *", "comment": "object database" }, { - "name": "rebase", - "type": "git_rebase *", - "comment": "The in-progress rebase" - }, - { - "name": "idx", - "type": "size_t", - "comment": "The index of the rebase operation to retrieve" + "name": "cgraph", + "type": "git_commit_graph *", + "comment": "the git commit-graph" } ], - "argline": "git_rebase *rebase, size_t idx", - "sig": "git_rebase *::size_t", + "argline": "git_odb *odb, git_commit_graph *cgraph", + "sig": "git_odb *::git_commit_graph *", "return": { - "type": "git_rebase_operation *", - "comment": " The rebase operation or NULL if `idx` was out of bounds" + "type": "int", + "comment": " 0 on success; error code otherwise" }, - "description": "Gets the rebase operation specified by the given index.
\n", - "comments": "", - "group": "rebase" + "description": "Set the git commit-graph for the ODB.
\n", + "comments": "After a successful call, the ownership of the cgraph parameter will be transferred to libgit2, and the caller should not free it.
\n\nThe commit-graph can also be unset by explicitly passing NULL as the cgraph parameter.
\n", + "group": "odb" }, - "git_rebase_next": { + "git_odb_backend_pack": { "type": "function", - "file": "git2/rebase.h", - "line": 243, - "lineto": 245, + "file": "git2/odb_backend.h", + "line": 142, + "lineto": 144, "args": [ { - "name": "operation", - "type": "git_rebase_operation **", - "comment": "Pointer to store the rebase operation that is to be performed next" + "name": "out", + "type": "git_odb_backend **", + "comment": "location to store the odb backend pointer" }, { - "name": "rebase", - "type": "git_rebase *", - "comment": "The rebase in progress" + "name": "objects_dir", + "type": "const char *", + "comment": "the Git repository's objects directory" } ], - "argline": "git_rebase_operation **operation, git_rebase *rebase", - "sig": "git_rebase_operation **::git_rebase *", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Performs the next rebase operation and returns the information about it.\n If the operation is one that applies a patch (which is any operation except\n GIT_REBASE_OPERATION_EXEC) then the patch will be applied and the index and\n working directory will be updated with the changes. If there are conflicts,\n you will need to address those before committing the changes.
\n", + "argline": "git_odb_backend **out, const char *objects_dir", + "sig": "git_odb_backend **::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a backend for a directory containing packfiles.
\n", "comments": "", - "group": "rebase" + "group": "odb" }, - "git_rebase_inmemory_index": { + "git_odb_backend_one_pack": { "type": "function", - "file": "git2/rebase.h", - "line": 258, - "lineto": 260, + "file": "git2/odb_backend.h", + "line": 156, + "lineto": 158, "args": [ { - "name": "index", - "type": "git_index **", - "comment": null + "name": "out", + "type": "git_odb_backend **", + "comment": "location to store the odb backend pointer" }, { - "name": "rebase", - "type": "git_rebase *", - "comment": null + "name": "index_file", + "type": "const char *", + "comment": "path to the packfile's .idx file" } ], - "argline": "git_index **index, git_rebase *rebase", - "sig": "git_index **::git_rebase *", - "return": { - "type": "int", - "comment": null - }, - "description": "Gets the index produced by the last operation, which is the result\n of git_rebase_next and which will be committed by the next\n invocation of git_rebase_commit. This is useful for resolving\n conflicts in an in-memory rebase before committing them. You must\n call git_index_free when you are finished with this.
This is only applicable for in-memory rebases; for rebases within\n a working directory, the changes were applied to the repository's\n index.
\n", - "group": "rebase" + "argline": "git_odb_backend **out, const char *index_file", + "sig": "git_odb_backend **::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a backend out of a single packfile
\n", + "comments": "This can be useful for inspecting the contents of a single packfile.
\n", + "group": "odb" }, - "git_rebase_commit": { + "git_odb_backend_loose": { "type": "function", - "file": "git2/rebase.h", - "line": 284, - "lineto": 290, + "file": "git2/odb_backend.h", + "line": 171, + "lineto": 177, "args": [ { - "name": "id", - "type": "git_oid *", - "comment": "Pointer in which to store the OID of the newly created commit" + "name": "out", + "type": "git_odb_backend **", + "comment": "location to store the odb backend pointer" }, { - "name": "rebase", - "type": "git_rebase *", - "comment": "The rebase that is in-progress" + "name": "objects_dir", + "type": "const char *", + "comment": "the Git repository's objects directory" }, { - "name": "author", - "type": "const git_signature *", - "comment": "The author of the updated commit, or NULL to keep the\n author from the original commit" + "name": "compression_level", + "type": "int", + "comment": "zlib compression level (0-9), or -1 for the default" }, { - "name": "committer", - "type": "const git_signature *", - "comment": "The committer of the rebase" + "name": "do_fsync", + "type": "int", + "comment": "if non-zero, perform an fsync on write" }, { - "name": "message_encoding", - "type": "const char *", - "comment": "The encoding for the message in the commit,\n represented with a standard encoding name. If message is NULL,\n this should also be NULL, and the encoding from the original\n commit will be maintained. If message is specified, this may be\n NULL to indicate that \"UTF-8\" is to be used." + "name": "dir_mode", + "type": "unsigned int", + "comment": "permission to use when creating directories, or 0 for default" }, { - "name": "message", - "type": "const char *", - "comment": "The message for this commit, or NULL to use the message\n from the original commit." - } - ], - "argline": "git_oid *id, git_rebase *rebase, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message", - "sig": "git_oid *::git_rebase *::const git_signature *::const git_signature *::const char *::const char *", - "return": { - "type": "int", - "comment": " Zero on success, GIT_EUNMERGED if there are unmerged changes in\n the index, GIT_EAPPLIED if the current commit has already\n been applied to the upstream and there is nothing to commit,\n -1 on failure." - }, - "description": "Commits the current patch. You must have resolved any conflicts that\n were introduced during the patch application from the git_rebase_next\n invocation.
Aborts a rebase that is currently in progress, resetting the repository\n and working directory to their state before rebase began.
\n", + "argline": "git_odb_backend **out, const char *objects_dir, int compression_level, int do_fsync, unsigned int dir_mode, unsigned int file_mode", + "sig": "git_odb_backend **::const char *::int::int::unsigned int::unsigned int", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a backend for loose objects
\n", "comments": "", - "group": "rebase" + "group": "odb" }, - "git_rebase_finish": { + "git_oid_fromstr": { "type": "function", - "file": "git2/rebase.h", - "line": 310, - "lineto": 312, + "file": "git2/oid.h", + "line": 137, + "lineto": 137, "args": [ { - "name": "rebase", - "type": "git_rebase *", - "comment": "The rebase that is in-progress" + "name": "out", + "type": "git_oid *", + "comment": "oid structure the result is written into." }, { - "name": "signature", - "type": "const git_signature *", - "comment": "The identity that is finishing the rebase (optional)" + "name": "str", + "type": "const char *", + "comment": "input hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (40 bytes for sha1,\n\t\t256 bytes for sha256)." } ], - "argline": "git_rebase *rebase, const git_signature *signature", - "sig": "git_rebase *::const git_signature *", - "return": { - "type": "int", - "comment": " Zero on success; -1 on error" - }, - "description": "Finishes a rebase that is currently in progress once all patches have\n been applied.
\n", - "comments": "", - "group": "rebase" + "argline": "git_oid *out, const char *str", + "sig": "git_oid *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Parse a hex formatted object id into a git_oid.
\n", + "comments": "The appropriate number of bytes for the given object ID type will be read from the string - 40 bytes for SHA1, 64 bytes for SHA256. The given string need not be NUL terminated.
\n", + "group": "oid", + "examples": { + "general.c": [ + "ex/v1.9.1/general.html#git_oid_fromstr-48", + "ex/v1.9.1/general.html#git_oid_fromstr-49", + "ex/v1.9.1/general.html#git_oid_fromstr-50", + "ex/v1.9.1/general.html#git_oid_fromstr-51", + "ex/v1.9.1/general.html#git_oid_fromstr-52", + "ex/v1.9.1/general.html#git_oid_fromstr-53", + "ex/v1.9.1/general.html#git_oid_fromstr-54", + "ex/v1.9.1/general.html#git_oid_fromstr-55", + "ex/v1.9.1/general.html#git_oid_fromstr-56", + "ex/v1.9.1/general.html#git_oid_fromstr-57", + "ex/v1.9.1/general.html#git_oid_fromstr-58", + "ex/v1.9.1/general.html#git_oid_fromstr-59", + "ex/v1.9.1/general.html#git_oid_fromstr-60", + "ex/v1.9.1/general.html#git_oid_fromstr-61", + "ex/v1.9.1/general.html#git_oid_fromstr-62", + "ex/v1.9.1/general.html#git_oid_fromstr-63" + ] + } }, - "git_rebase_free": { + "git_oid_fromstrp": { "type": "function", - "file": "git2/rebase.h", - "line": 319, - "lineto": 319, + "file": "git2/oid.h", + "line": 146, + "lineto": 146, "args": [ { - "name": "rebase", - "type": "git_rebase *", - "comment": "The rebase object" + "name": "out", + "type": "git_oid *", + "comment": "oid structure the result is written into." + }, + { + "name": "str", + "type": "const char *", + "comment": "input hex string; must be null-terminated." } ], - "argline": "git_rebase *rebase", - "sig": "git_rebase *", - "return": { - "type": "void", - "comment": null - }, - "description": "Frees the git_rebase object.
Parse a hex formatted NUL-terminated string into a git_oid.
\n", "comments": "", - "group": "rebase" + "group": "oid" }, - "git_refdb_new": { + "git_oid_fromstrn": { "type": "function", - "file": "git2/refdb.h", - "line": 35, - "lineto": 35, + "file": "git2/oid.h", + "line": 159, + "lineto": 159, "args": [ { "name": "out", - "type": "git_refdb **", - "comment": "location to store the database pointer, if opened.\n\t\t\tSet to NULL if the open failed." + "type": "git_oid *", + "comment": "oid structure the result is written into." }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository" + "name": "str", + "type": "const char *", + "comment": "input hex string of at least size `length`" + }, + { + "name": "length", + "type": "size_t", + "comment": "length of the input string" } ], - "argline": "git_refdb **out, git_repository *repo", - "sig": "git_refdb **::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a new reference database with no backends.
\n", - "comments": "Before the Ref DB can be used for read/writing, a custom database\n backend must be manually set using git_refdb_set_backend()
Parse N characters of a hex formatted object id into a git_oid.
\n", + "comments": "If N is odd, the last byte's high nibble will be read in and the low nibble set to zero.
\n", + "group": "oid" }, - "git_refdb_open": { + "git_oid_fromraw": { "type": "function", - "file": "git2/refdb.h", - "line": 49, - "lineto": 49, + "file": "git2/oid.h", + "line": 168, + "lineto": 168, "args": [ { "name": "out", - "type": "git_refdb **", - "comment": "location to store the database pointer, if opened.\n\t\t\tSet to NULL if the open failed." + "type": "git_oid *", + "comment": "oid structure the result is written into." }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository" - } - ], - "argline": "git_refdb **out, git_repository *repo", - "sig": "git_refdb **::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a new reference database and automatically add\n the default backends:
\n", - "comments": "Suggests that the given refdb compress or optimize its references.\n This mechanism is implementation specific. For on-disk reference\n databases, for example, this may pack all loose references.
\n", + "argline": "git_oid *out, const unsigned char *raw", + "sig": "git_oid *::const unsigned char *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Copy an already raw oid into a git_oid structure.
\n", "comments": "", - "group": "refdb" + "group": "oid" }, - "git_refdb_free": { + "git_oid_fmt": { "type": "function", - "file": "git2/refdb.h", - "line": 63, - "lineto": 63, + "file": "git2/oid.h", + "line": 184, + "lineto": 184, "args": [ { - "name": "refdb", - "type": "git_refdb *", - "comment": "reference database pointer or NULL" + "name": "out", + "type": "char *", + "comment": "output hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (40 bytes for SHA1,\n\t\t64 bytes for SHA256). Only the oid digits are written;\n\t\ta '\n\\\n0' terminator must be added by the caller if it is\n\t\trequired." + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "oid structure to format." } ], - "argline": "git_refdb *refdb", - "sig": "git_refdb *", - "return": { - "type": "void", - "comment": null - }, - "description": "Close an open reference database.
\n", + "argline": "char *out, const git_oid *id", + "sig": "char *::const git_oid *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Format a git_oid into a hex string.
\n", "comments": "", - "group": "refdb" + "group": "oid", + "examples": { + "fetch.c": [ + "ex/v1.9.1/fetch.html#git_oid_fmt-1", + "ex/v1.9.1/fetch.html#git_oid_fmt-2" + ], + "general.c": [ + "ex/v1.9.1/general.html#git_oid_fmt-64", + "ex/v1.9.1/general.html#git_oid_fmt-65", + "ex/v1.9.1/general.html#git_oid_fmt-66", + "ex/v1.9.1/general.html#git_oid_fmt-67", + "ex/v1.9.1/general.html#git_oid_fmt-68" + ], + "ls-remote.c": ["ex/v1.9.1/ls-remote.html#git_oid_fmt-1"] + } }, - "git_reflog_read": { + "git_oid_nfmt": { "type": "function", - "file": "git2/reflog.h", - "line": 38, - "lineto": 38, + "file": "git2/oid.h", + "line": 196, + "lineto": 196, "args": [ { "name": "out", - "type": "git_reflog **", - "comment": "pointer to reflog" + "type": "char *", + "comment": "output hex string; you say how many bytes to write.\n\t\tIf the number of bytes is > GIT_OID_SHA1_HEXSIZE, extra bytes\n\t\twill be zeroed; if not, a '\n\\\n0' terminator is NOT added." }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repostiory" + "name": "n", + "type": "size_t", + "comment": "number of characters to write into out string" }, { - "name": "name", - "type": "const char *", - "comment": "reference to look up" + "name": "id", + "type": "const git_oid *", + "comment": "oid structure to format." } ], - "argline": "git_reflog **out, git_repository *repo, const char *name", - "sig": "git_reflog **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Read the reflog for the given reference
\n", - "comments": "If there is no reflog file for the given\n reference yet, an empty reflog object will\n be returned.
\n\nThe reflog must be freed manually by using\n git_reflog_free().
\n", - "group": "reflog" + "argline": "char *out, size_t n, const git_oid *id", + "sig": "char *::size_t::const git_oid *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Format a git_oid into a partial hex string.
\n", + "comments": "", + "group": "oid" }, - "git_reflog_write": { + "git_oid_pathfmt": { "type": "function", - "file": "git2/reflog.h", - "line": 47, - "lineto": 47, + "file": "git2/oid.h", + "line": 213, + "lineto": 213, "args": [ { - "name": "reflog", - "type": "git_reflog *", - "comment": "an existing reflog object" + "name": "out", + "type": "char *", + "comment": "output hex string; must be pointing at the start of\n\t\tthe hex sequence and have at least the number of bytes\n\t\tneeded for an oid encoded in hex (41 bytes for SHA1,\n\t\t65 bytes for SHA256). Only the oid digits are written;\n\t\ta '\n\\\n0' terminator must be added by the caller if it\n\t\tis required." + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "oid structure to format." } ], - "argline": "git_reflog *reflog", - "sig": "git_reflog *", + "argline": "char *out, const git_oid *id", + "sig": "char *::const git_oid *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "Write an existing in-memory reflog object back to disk\n using an atomic file lock.
\n", - "comments": "", - "group": "reflog" + "description": "Format a git_oid into a loose-object path string.
\n", + "comments": "The resulting string is "aa/...", where "aa" is the first two hex digits of the oid and "..." is the remaining 38 digits.
\n", + "group": "oid" }, - "git_reflog_append": { + "git_oid_tostr_s": { "type": "function", - "file": "git2/reflog.h", - "line": 60, - "lineto": 60, + "file": "git2/oid.h", + "line": 226, + "lineto": 226, "args": [ { - "name": "reflog", - "type": "git_reflog *", - "comment": "an existing reflog object" - }, - { - "name": "id", + "name": "oid", "type": "const git_oid *", - "comment": "the OID the reference is now pointing to" - }, - { - "name": "committer", - "type": "const git_signature *", - "comment": "the signature of the committer" - }, - { - "name": "msg", - "type": "const char *", - "comment": "the reflog message" + "comment": "The oid structure to format" } ], - "argline": "git_reflog *reflog, const git_oid *id, const git_signature *committer, const char *msg", - "sig": "git_reflog *::const git_oid *::const git_signature *::const char *", + "argline": "const git_oid *oid", + "sig": "const git_oid *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "char *", + "comment": " the c-string or NULL on failure" }, - "description": "Add a new entry to the in-memory reflog.
\n", - "comments": "msg is optional and can be NULL.
Format a git_oid into a statically allocated c-string.
\n", + "comments": "The c-string is owned by the library and should not be freed by the user. If libgit2 is built with thread support, the string will be stored in TLS (i.e. one buffer per thread) to allow for concurrent calls of the function.
\n", + "group": "oid", + "examples": { + "merge.c": [ + "ex/v1.9.1/merge.html#git_oid_tostr_s-19", + "ex/v1.9.1/merge.html#git_oid_tostr_s-20" + ] + } }, - "git_reflog_rename": { + "git_oid_tostr": { "type": "function", - "file": "git2/reflog.h", - "line": 75, - "lineto": 75, + "file": "git2/oid.h", + "line": 247, + "lineto": 247, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository" + "name": "out", + "type": "char *", + "comment": "the buffer into which the oid string is output." }, { - "name": "old_name", - "type": "const char *", - "comment": "the old name of the reference" + "name": "n", + "type": "size_t", + "comment": "the size of the out buffer." }, { - "name": "name", - "type": "const char *", - "comment": "the new name of the reference" + "name": "id", + "type": "const git_oid *", + "comment": "the oid structure to format." } ], - "argline": "git_repository *repo, const char *old_name, const char *name", - "sig": "git_repository *::const char *::const char *", + "argline": "char *out, size_t n, const git_oid *id", + "sig": "char *::size_t::const git_oid *", "return": { - "type": "int", - "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" + "type": "char *", + "comment": " the out buffer pointer, assuming no input parameter\n\t\t\terrors, otherwise a pointer to an empty string." }, - "description": "Rename a reflog
\n", - "comments": "The reflog to be renamed is expected to already exist
\n\nThe new name will be checked for validity.\n See git_reference_create_symbolic() for rules about valid names.
Format a git_oid into a buffer as a hex format c-string.
\n", + "comments": "If the buffer is smaller than the size of a hex-formatted oid string plus an additional byte (GIT_OID_SHA_HEXSIZE + 1 for SHA1 or GIT_OID_SHA256_HEXSIZE + 1 for SHA256), then the resulting oid c-string will be truncated to n-1 characters (but will still be NUL-byte terminated).
\n\nIf there are any input parameter errors (out == NULL, n == 0, oid == NULL), then a pointer to an empty string is returned, so that the return value can always be printed.
\n", + "group": "oid", + "examples": { + "blame.c": [ + "ex/v1.9.1/blame.html#git_oid_tostr-15", + "ex/v1.9.1/blame.html#git_oid_tostr-16" + ], + "cat-file.c": [ + "ex/v1.9.1/cat-file.html#git_oid_tostr-24", + "ex/v1.9.1/cat-file.html#git_oid_tostr-25", + "ex/v1.9.1/cat-file.html#git_oid_tostr-26", + "ex/v1.9.1/cat-file.html#git_oid_tostr-27", + "ex/v1.9.1/cat-file.html#git_oid_tostr-28" + ], + "log.c": [ + "ex/v1.9.1/log.html#git_oid_tostr-38", + "ex/v1.9.1/log.html#git_oid_tostr-39" + ], + "rev-parse.c": [ + "ex/v1.9.1/rev-parse.html#git_oid_tostr-10", + "ex/v1.9.1/rev-parse.html#git_oid_tostr-11", + "ex/v1.9.1/rev-parse.html#git_oid_tostr-12", + "ex/v1.9.1/rev-parse.html#git_oid_tostr-13" + ] + } }, - "git_reflog_delete": { + "git_oid_cpy": { "type": "function", - "file": "git2/reflog.h", - "line": 84, - "lineto": 84, + "file": "git2/oid.h", + "line": 256, + "lineto": 256, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository" + "name": "out", + "type": "git_oid *", + "comment": "oid structure the result is written into." }, { - "name": "name", - "type": "const char *", - "comment": "the reflog to delete" + "name": "src", + "type": "const git_oid *", + "comment": "oid structure to copy from." } ], - "argline": "git_repository *repo, const char *name", - "sig": "git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Delete the reflog for the given reference
\n", + "argline": "git_oid *out, const git_oid *src", + "sig": "git_oid *::const git_oid *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Copy an oid from one structure to another.
\n", "comments": "", - "group": "reflog" + "group": "oid", + "examples": { + "blame.c": [ + "ex/v1.9.1/blame.html#git_oid_cpy-17", + "ex/v1.9.1/blame.html#git_oid_cpy-18", + "ex/v1.9.1/blame.html#git_oid_cpy-19" + ] + } }, - "git_reflog_entrycount": { + "git_oid_cmp": { "type": "function", - "file": "git2/reflog.h", - "line": 92, - "lineto": 92, + "file": "git2/oid.h", + "line": 265, + "lineto": 265, "args": [ { - "name": "reflog", - "type": "git_reflog *", - "comment": "the previously loaded reflog" + "name": "a", + "type": "const git_oid *", + "comment": "first oid structure." + }, + { + "name": "b", + "type": "const git_oid *", + "comment": "second oid structure." } ], - "argline": "git_reflog *reflog", - "sig": "git_reflog *", + "argline": "const git_oid *a, const git_oid *b", + "sig": "const git_oid *::const git_oid *", "return": { - "type": "size_t", - "comment": " the number of log entries" + "type": "int", + "comment": " \n<\n0, 0, >0 if a \n<\n b, a == b, a > b." }, - "description": "Get the number of log entries in a reflog
\n", + "description": "Compare two oid structures.
\n", "comments": "", - "group": "reflog" + "group": "oid" }, - "git_reflog_entry_byindex": { + "git_oid_equal": { "type": "function", - "file": "git2/reflog.h", - "line": 105, - "lineto": 105, + "file": "git2/oid.h", + "line": 274, + "lineto": 274, "args": [ { - "name": "reflog", - "type": "const git_reflog *", - "comment": "a previously loaded reflog" + "name": "a", + "type": "const git_oid *", + "comment": "first oid structure." }, { - "name": "idx", - "type": "size_t", - "comment": "the position of the entry to lookup. Should be greater than or\n equal to 0 (zero) and less than `git_reflog_entrycount()`." + "name": "b", + "type": "const git_oid *", + "comment": "second oid structure." } ], - "argline": "const git_reflog *reflog, size_t idx", - "sig": "const git_reflog *::size_t", - "return": { - "type": "const git_reflog_entry *", - "comment": " the entry; NULL if not found" - }, - "description": "Lookup an entry by its index
\n", - "comments": "Requesting the reflog entry with an index of 0 (zero) will\n return the most recently created entry.
\n", - "group": "reflog" + "argline": "const git_oid *a, const git_oid *b", + "sig": "const git_oid *::const git_oid *", + "return": { "type": "int", "comment": " true if equal, false otherwise" }, + "description": "Compare two oid structures for equality
\n", + "comments": "", + "group": "oid" }, - "git_reflog_drop": { + "git_oid_ncmp": { "type": "function", - "file": "git2/reflog.h", - "line": 124, - "lineto": 127, + "file": "git2/oid.h", + "line": 285, + "lineto": 285, "args": [ { - "name": "reflog", - "type": "git_reflog *", - "comment": "a previously loaded reflog." + "name": "a", + "type": "const git_oid *", + "comment": "first oid structure." }, { - "name": "idx", - "type": "size_t", - "comment": "the position of the entry to remove. Should be greater than or\n equal to 0 (zero) and less than `git_reflog_entrycount()`." + "name": "b", + "type": "const git_oid *", + "comment": "second oid structure." }, { - "name": "rewrite_previous_entry", - "type": "int", - "comment": "1 to rewrite the history; 0 otherwise." - } - ], - "argline": "git_reflog *reflog, size_t idx, int rewrite_previous_entry", - "sig": "git_reflog *::size_t::int", - "return": { - "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if the entry doesn't exist\n or an error code." - }, - "description": "Remove an entry from the reflog by its index
\n", - "comments": "To ensure there's no gap in the log history, set rewrite_previous_entry\n param value to 1. When deleting entry n, member old_oid of entry n-1\n (if any) will be updated with the value of member new_oid of entry n+1.
Get the old oid
\n", + "argline": "const git_oid *a, const git_oid *b, size_t len", + "sig": "const git_oid *::const git_oid *::size_t", + "return": { "type": "int", "comment": " 0 in case of a match" }, + "description": "Compare the first 'len' hexadecimal characters (packets of 4 bits)\n of two oid structures.
\n", "comments": "", - "group": "reflog" + "group": "oid" }, - "git_reflog_entry_id_new": { + "git_oid_streq": { "type": "function", - "file": "git2/reflog.h", - "line": 143, - "lineto": 143, + "file": "git2/oid.h", + "line": 294, + "lineto": 294, "args": [ { - "name": "entry", - "type": "const git_reflog_entry *", - "comment": "a reflog entry" + "name": "id", + "type": "const git_oid *", + "comment": "oid structure." + }, + { + "name": "str", + "type": "const char *", + "comment": "input hex string of an object id." } ], - "argline": "const git_reflog_entry *entry", - "sig": "const git_reflog_entry *", + "argline": "const git_oid *id, const char *str", + "sig": "const git_oid *::const char *", "return": { - "type": "const git_oid *", - "comment": " the new oid at this time" + "type": "int", + "comment": " 0 in case of a match, -1 otherwise." }, - "description": "Get the new oid
\n", + "description": "Check if an oid equals an hex formatted object id.
\n", "comments": "", - "group": "reflog" + "group": "oid" }, - "git_reflog_entry_committer": { + "git_oid_strcmp": { "type": "function", - "file": "git2/reflog.h", - "line": 151, - "lineto": 151, + "file": "git2/oid.h", + "line": 304, + "lineto": 304, "args": [ { - "name": "entry", - "type": "const git_reflog_entry *", - "comment": "a reflog entry" + "name": "id", + "type": "const git_oid *", + "comment": "oid structure." + }, + { + "name": "str", + "type": "const char *", + "comment": "input hex string of an object id." } ], - "argline": "const git_reflog_entry *entry", - "sig": "const git_reflog_entry *", + "argline": "const git_oid *id, const char *str", + "sig": "const git_oid *::const char *", "return": { - "type": "const git_signature *", - "comment": " the committer" + "type": "int", + "comment": " -1 if str is not valid, \n<\n0 if id sorts before str,\n 0 if id matches str, >0 if id sorts after str." }, - "description": "Get the committer of this entry
\n", + "description": "Compare an oid to an hex formatted object id.
\n", "comments": "", - "group": "reflog" + "group": "oid" }, - "git_reflog_entry_message": { + "git_oid_is_zero": { "type": "function", - "file": "git2/reflog.h", - "line": 159, - "lineto": 159, + "file": "git2/oid.h", + "line": 312, + "lineto": 312, "args": [ { - "name": "entry", - "type": "const git_reflog_entry *", - "comment": "a reflog entry" + "name": "id", + "type": "const git_oid *", + "comment": "the object ID to check" } ], - "argline": "const git_reflog_entry *entry", - "sig": "const git_reflog_entry *", - "return": { - "type": "const char *", - "comment": " the log msg" - }, - "description": "Get the log message
\n", + "argline": "const git_oid *id", + "sig": "const git_oid *", + "return": { "type": "int", "comment": " 1 if all zeros, 0 otherwise." }, + "description": "Check is an oid is all zeros.
\n", "comments": "", - "group": "reflog" + "group": "oid", + "examples": { + "blame.c": ["ex/v1.9.1/blame.html#git_oid_is_zero-20"], + "fetch.c": ["ex/v1.9.1/fetch.html#git_oid_is_zero-3"] + } }, - "git_reflog_free": { + "git_oid_shorten_new": { "type": "function", - "file": "git2/reflog.h", - "line": 166, - "lineto": 166, + "file": "git2/oid.h", + "line": 333, + "lineto": 333, "args": [ { - "name": "reflog", - "type": "git_reflog *", - "comment": "reflog to free" + "name": "min_length", + "type": "size_t", + "comment": "The minimal length for all identifiers,\n\t\twhich will be used even if shorter OIDs would still\n\t\tbe unique." } ], - "argline": "git_reflog *reflog", - "sig": "git_reflog *", + "argline": "size_t min_length", + "sig": "size_t", "return": { - "type": "void", - "comment": null + "type": "git_oid_shorten *", + "comment": " a `git_oid_shorten` instance, NULL if OOM" }, - "description": "Free the reflog
\n", - "comments": "", - "group": "reflog" + "description": "Create a new OID shortener.
\n", + "comments": "The OID shortener is used to process a list of OIDs in text form and return the shortest length that would uniquely identify all of them.
\n\nE.g. look at the result of git log --abbrev.
Lookup a reference by name in a repository.
\n", - "comments": "The returned reference must be freed by the user.
\n\nThe name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.
Add a new OID to set of shortened OIDs and calculate\n the minimal length to uniquely identify all the OIDs in\n the set.
\n", + "comments": "The OID is expected to be a 40-char hexadecimal string. The OID is owned by the user and will not be modified or freed.
\n\nFor performance reasons, there is a hard-limit of how many OIDs can be added to a single set (around ~32000, assuming a mostly randomized distribution), which should be enough for any kind of program, and keeps the algorithm fast and memory-efficient.
\n\nAttempting to add more than those OIDs will result in a GIT_ERROR_INVALID error
\n", + "group": "oid" }, - "git_reference_name_to_id": { + "git_oid_shorten_free": { "type": "function", - "file": "git2/refs.h", - "line": 54, - "lineto": 55, + "file": "git2/oid.h", + "line": 366, + "lineto": 366, "args": [ { - "name": "out", - "type": "git_oid *", - "comment": "Pointer to oid to be filled in" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "The repository in which to look up the reference" - }, - { - "name": "name", - "type": "const char *", - "comment": "The long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)" + "name": "os", + "type": "git_oid_shorten *", + "comment": "a `git_oid_shorten` instance" } ], - "argline": "git_oid *out, git_repository *repo, const char *name", - "sig": "git_oid *::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code." - }, - "description": "Lookup a reference by name and resolve immediately to OID.
\n", - "comments": "This function provides a quick way to resolve a reference name straight\n through to the object id that it refers to. This avoids having to\n allocate or free any git_reference objects for simple situations.
The name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.
Free an OID shortener instance
\n", + "comments": "", + "group": "oid" }, - "git_reference_dwim": { + "git_oidarray_dispose": { "type": "function", - "file": "git2/refs.h", - "line": 68, - "lineto": 68, + "file": "git2/oidarray.h", + "line": 38, + "lineto": 38, "args": [ { - "name": "out", - "type": "git_reference **", - "comment": "pointer in which to store the reference" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to look" - }, - { - "name": "shorthand", - "type": "const char *", - "comment": "the short name for the reference" + "name": "array", + "type": "git_oidarray *", + "comment": "git_oidarray from which to free oid data" } ], - "argline": "git_reference **out, git_repository *repo, const char *shorthand", - "sig": "git_reference **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Lookup a reference by DWIMing its short name
\n", - "comments": "Apply the git precendence rules to the given shorthand to determine\n which reference the user is referring to.
\n", - "group": "reference", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_dwim-24" - ] - } + "argline": "git_oidarray *array", + "sig": "git_oidarray *", + "return": { "type": "void", "comment": null }, + "description": "Free the object IDs contained in an oid_array. This method should\n be called on git_oidarray objects that were provided by the\n library. Not doing so will result in a memory leak.
This does not free the git_oidarray itself, since the library will never allocate that object directly itself.
Initialize a new packbuilder
\n", + "comments": "", + "group": "packbuilder" + }, + "git_packbuilder_set_threads": { + "type": "function", + "file": "git2/pack.h", + "line": 78, + "lineto": 78, + "args": [ { - "name": "current_value", - "type": "const char *", - "comment": "The expected value of the reference when updating" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" }, { - "name": "log_message", - "type": "const char *", - "comment": "The one line long message to be appended to the reflog" + "name": "n", + "type": "unsigned int", + "comment": "Number of threads to spawn" } ], - "argline": "git_reference **out, git_repository *repo, const char *name, const char *target, int force, const char *current_value, const char *log_message", - "sig": "git_reference **::git_repository *::const char *::const char *::int::const char *::const char *", + "argline": "git_packbuilder *pb, unsigned int n", + "sig": "git_packbuilder *::unsigned int", "return": { - "type": "int", - "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC, GIT_EMODIFIED or an error code" + "type": "unsigned int", + "comment": " number of actual threads to be used" }, - "description": "Conditionally create a new symbolic reference.
\n", - "comments": "A symbolic reference is a reference name that refers to another\n reference name. If the other name moves, the symbolic name will move,\n too. As a simple example, the "HEAD" reference might refer to\n "refs/heads/master" while on the "master" branch of a repository.
\n\nThe symbolic reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and it does not have a reflog.
\n\nIt will return GIT_EMODIFIED if the reference's value at the time\n of updating does not match the one passed through current_value\n (i.e. if the ref has changed since the user read it).
Set number of threads to spawn
\n", + "comments": "By default, libgit2 won't spawn any threads at all; when set to 0, libgit2 will autodetect the number of CPUs.
\n", + "group": "packbuilder" }, - "git_reference_symbolic_create": { + "git_packbuilder_insert": { "type": "function", - "file": "git2/refs.h", - "line": 145, - "lineto": 145, + "file": "git2/pack.h", + "line": 92, + "lineto": 92, "args": [ { - "name": "out", - "type": "git_reference **", - "comment": "Pointer to the newly created reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" }, { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where that reference will live" + "name": "id", + "type": "const git_oid *", + "comment": "The oid of the commit" }, { "name": "name", "type": "const char *", - "comment": "The name of the reference" - }, + "comment": "The name; might be NULL" + } + ], + "argline": "git_packbuilder *pb, const git_oid *id, const char *name", + "sig": "git_packbuilder *::const git_oid *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Insert a single object
\n", + "comments": "For an optimal pack it's mandatory to insert objects in recency order, commits followed by trees and blobs.
\n", + "group": "packbuilder" + }, + "git_packbuilder_insert_tree": { + "type": "function", + "file": "git2/pack.h", + "line": 104, + "lineto": 104, + "args": [ { - "name": "target", - "type": "const char *", - "comment": "The target of the reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" }, { - "name": "force", - "type": "int", - "comment": "Overwrite existing references" + "name": "id", + "type": "const git_oid *", + "comment": "The oid of the root tree" + } + ], + "argline": "git_packbuilder *pb, const git_oid *id", + "sig": "git_packbuilder *::const git_oid *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Insert a root tree object
\n", + "comments": "This will add the tree as well as all referenced trees and blobs.
\n", + "group": "packbuilder" + }, + "git_packbuilder_insert_commit": { + "type": "function", + "file": "git2/pack.h", + "line": 116, + "lineto": 116, + "args": [ + { + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" }, { - "name": "log_message", - "type": "const char *", - "comment": "The one line long message to be appended to the reflog" + "name": "id", + "type": "const git_oid *", + "comment": "The oid of the commit" } ], - "argline": "git_reference **out, git_repository *repo, const char *name, const char *target, int force, const char *log_message", - "sig": "git_reference **::git_repository *::const char *::const char *::int::const char *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" - }, - "description": "Create a new symbolic reference.
\n", - "comments": "A symbolic reference is a reference name that refers to another\n reference name. If the other name moves, the symbolic name will move,\n too. As a simple example, the "HEAD" reference might refer to\n "refs/heads/master" while on the "master" branch of a repository.
\n\nThe symbolic reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and it does not have a reflog.
\n", - "group": "reference" + "argline": "git_packbuilder *pb, const git_oid *id", + "sig": "git_packbuilder *::const git_oid *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Insert a commit object
\n", + "comments": "This will add a commit as well as the completed referenced tree.
\n", + "group": "packbuilder" }, - "git_reference_create": { + "git_packbuilder_insert_walk": { "type": "function", - "file": "git2/refs.h", - "line": 182, - "lineto": 182, + "file": "git2/pack.h", + "line": 129, + "lineto": 129, "args": [ { - "name": "out", - "type": "git_reference **", - "comment": "Pointer to the newly created reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder" }, { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where that reference will live" - }, + "name": "walk", + "type": "git_revwalk *", + "comment": "the revwalk to use to fill the packbuilder" + } + ], + "argline": "git_packbuilder *pb, git_revwalk *walk", + "sig": "git_packbuilder *::git_revwalk *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Insert objects as given by the walk
\n", + "comments": "Those commits and all objects they reference will be inserted into the packbuilder.
\n", + "group": "packbuilder" + }, + "git_packbuilder_insert_recur": { + "type": "function", + "file": "git2/pack.h", + "line": 141, + "lineto": 141, + "args": [ { - "name": "name", - "type": "const char *", - "comment": "The name of the reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder" }, { "name": "id", "type": "const git_oid *", - "comment": "The object id pointed to by the reference." - }, - { - "name": "force", - "type": "int", - "comment": "Overwrite existing references" + "comment": "the id of the root object to insert" }, { - "name": "log_message", + "name": "name", "type": "const char *", - "comment": "The one line long message to be appended to the reflog" + "comment": "optional name for the object" } ], - "argline": "git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force, const char *log_message", - "sig": "git_reference **::git_repository *::const char *::const git_oid *::int::const char *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" - }, - "description": "Create a new direct reference.
\n", - "comments": "A direct reference (also called an object id reference) refers directly\n to a specific object id (a.k.a. OID or SHA) in the repository. The id\n permanently refers to the object (although the reference itself can be\n moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\n refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
\n\nThe direct reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.
\n", - "group": "reference", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_create-25" - ] - } + "argline": "git_packbuilder *pb, const git_oid *id, const char *name", + "sig": "git_packbuilder *::const git_oid *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Recursively insert an object and its referenced objects
\n", + "comments": "Insert the object as well as any object it references.
\n", + "group": "packbuilder" }, - "git_reference_create_matching": { + "git_packbuilder_write_buf": { "type": "function", - "file": "git2/refs.h", - "line": 225, - "lineto": 225, + "file": "git2/pack.h", + "line": 153, + "lineto": 153, "args": [ { - "name": "out", - "type": "git_reference **", - "comment": "Pointer to the newly created reference" + "name": "buf", + "type": "git_buf *", + "comment": "Buffer where to write the packfile" }, { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where that reference will live" - }, + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" + } + ], + "argline": "git_buf *buf, git_packbuilder *pb", + "sig": "git_buf *::git_packbuilder *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Write the contents of the packfile to an in-memory buffer
\n", + "comments": "The contents of the buffer will become a valid packfile, even though there will be no attached index
\n", + "group": "packbuilder" + }, + "git_packbuilder_write": { + "type": "function", + "file": "git2/pack.h", + "line": 166, + "lineto": 171, + "args": [ { - "name": "name", - "type": "const char *", - "comment": "The name of the reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" }, { - "name": "id", - "type": "const git_oid *", - "comment": "The object id pointed to by the reference." + "name": "path", + "type": "const char *", + "comment": "Path to the directory where the packfile and index should be stored, or NULL for default location" }, { - "name": "force", - "type": "int", - "comment": "Overwrite existing references" + "name": "mode", + "type": "unsigned int", + "comment": "permissions to use creating a packfile or 0 for defaults" }, { - "name": "current_id", - "type": "const git_oid *", - "comment": "The expected value of the reference at the time of update" + "name": "progress_cb", + "type": "git_indexer_progress_cb", + "comment": "function to call with progress information from the indexer (optional)" }, { - "name": "log_message", - "type": "const char *", - "comment": "The one line long message to be appended to the reflog" + "name": "progress_cb_payload", + "type": "void *", + "comment": "payload for the progress callback (optional)" } ], - "argline": "git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force, const git_oid *current_id, const char *log_message", - "sig": "git_reference **::git_repository *::const char *::const git_oid *::int::const git_oid *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EMODIFIED if the value of the reference\n has changed, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" - }, - "description": "Conditionally create new direct reference
\n", - "comments": "A direct reference (also called an object id reference) refers directly\n to a specific object id (a.k.a. OID or SHA) in the repository. The id\n permanently refers to the object (although the reference itself can be\n moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\n refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
\n\nThe direct reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.
\n\nIt will return GIT_EMODIFIED if the reference's value at the time\n of updating does not match the one passed through current_id\n (i.e. if the ref has changed since the user read it).
Write the new pack and corresponding index file to path.
\n", + "comments": "", + "group": "packbuilder" }, - "git_reference_target": { + "git_packbuilder_hash": { "type": "function", - "file": "git2/refs.h", - "line": 240, - "lineto": 240, + "file": "git2/pack.h", + "line": 184, + "lineto": 184, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder object" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", - "return": { - "type": "const git_oid *", - "comment": " a pointer to the oid if available, NULL otherwise" - }, - "description": "Get the OID pointed to by a direct reference.
\n", - "comments": "Only available if the reference is direct (i.e. an object id reference,\n not a symbolic one).
\n\nTo find the OID of a symbolic ref, call git_reference_resolve() and\n then this function (or maybe use git_reference_name_to_id() to\n directly resolve a reference name all the way through to an OID).
Get the packfile's hash
\n", + "comments": "A packfile's name is derived from the sorted hashing of all object names. This is only correct after the packfile has been written.
\n", + "group": "packbuilder" }, - "git_reference_target_peel": { + "git_packbuilder_name": { "type": "function", - "file": "git2/refs.h", - "line": 251, - "lineto": 251, + "file": "git2/pack.h", + "line": 196, + "lineto": 196, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder instance" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", + "argline": "git_packbuilder *pb", + "sig": "git_packbuilder *", "return": { - "type": "const git_oid *", - "comment": " a pointer to the oid if available, NULL otherwise" + "type": "const char *", + "comment": " a NUL terminated string for the packfile name" }, - "description": "Return the peeled OID target of this reference.
\n", - "comments": "This peeled OID only applies to direct references that point to\n a hard Tag object: it is the result of peeling such Tag.
\n", - "group": "reference" + "description": "Get the unique name for the resulting packfile.
\n", + "comments": "The packfile's name is derived from the packfile's content. This is only correct after the packfile has been written.
\n", + "group": "packbuilder" }, - "git_reference_symbolic_target": { + "git_packbuilder_foreach": { "type": "function", - "file": "git2/refs.h", - "line": 261, - "lineto": 261, + "file": "git2/pack.h", + "line": 218, + "lineto": 218, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder" + }, + { + "name": "cb", + "type": "git_packbuilder_foreach_cb", + "comment": "the callback to call with each packed object's buffer" + }, + { + "name": "payload", + "type": "void *", + "comment": "the callback's data" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", - "return": { - "type": "const char *", - "comment": " a pointer to the name if available, NULL otherwise" - }, - "description": "Get full name to the reference pointed to by a symbolic reference.
\n", - "comments": "Only available if the reference is symbolic.
\n", - "group": "reference", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_reference_symbolic_target-64" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_symbolic_target-26" - ] - } + "argline": "git_packbuilder *pb, git_packbuilder_foreach_cb cb, void *payload", + "sig": "git_packbuilder *::git_packbuilder_foreach_cb::void *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create the new pack and pass each object to the callback
\n", + "comments": "", + "group": "packbuilder" }, - "git_reference_type": { + "git_packbuilder_object_count": { "type": "function", - "file": "git2/refs.h", - "line": 271, - "lineto": 271, + "file": "git2/pack.h", + "line": 226, + "lineto": 226, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", + "argline": "git_packbuilder *pb", + "sig": "git_packbuilder *", "return": { - "type": "git_reference_t", - "comment": " the type" + "type": "size_t", + "comment": " the number of objects in the packfile" }, - "description": "Get the type of a reference.
\n", - "comments": "Either direct (GIT_REFERENCE_DIRECT) or symbolic (GIT_REFERENCE_SYMBOLIC)
\n", - "group": "reference", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_reference_type-65" - ] - } + "description": "Get the total number of objects the packbuilder will write out
\n", + "comments": "", + "group": "packbuilder" }, - "git_reference_name": { + "git_packbuilder_written": { "type": "function", - "file": "git2/refs.h", - "line": 281, - "lineto": 281, + "file": "git2/pack.h", + "line": 234, + "lineto": 234, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", + "argline": "git_packbuilder *pb", + "sig": "git_packbuilder *", "return": { - "type": "const char *", - "comment": " the full name for the ref" + "type": "size_t", + "comment": " the number of objects which have already been written" }, - "description": "Get the full name of a reference.
\n", - "comments": "See git_reference_symbolic_create() for rules about valid names.
Get the number of objects the packbuilder has already written out
\n", + "comments": "", + "group": "packbuilder" }, - "git_reference_resolve": { + "git_packbuilder_set_callbacks": { "type": "function", - "file": "git2/refs.h", - "line": 299, - "lineto": 299, + "file": "git2/pack.h", + "line": 264, + "lineto": 267, "args": [ { - "name": "out", - "type": "git_reference **", - "comment": "Pointer to the peeled reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder object" }, { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "progress_cb", + "type": "git_packbuilder_progress", + "comment": "Function to call with progress information during\n pack building. Be aware that this is called inline with pack building\n operations, so performance may be affected.\n When progress_cb returns an error, the pack building process will be\n aborted and the error will be returned from the invoked function.\n `pb` must then be freed." + }, + { + "name": "progress_cb_payload", + "type": "void *", + "comment": "Payload for progress callback." } ], - "argline": "git_reference **out, const git_reference *ref", - "sig": "git_reference **::const git_reference *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Resolve a symbolic reference to a direct reference.
\n", - "comments": "This method iteratively peels a symbolic reference until it resolves to\n a direct reference to an OID.
\n\nThe peeled reference is returned in the resolved_ref argument, and\n must be freed manually once it's no longer needed.
If a direct reference is passed as an argument, a copy of that\n reference is returned. This copy must be manually freed too.
\n", - "group": "reference" + "argline": "git_packbuilder *pb, git_packbuilder_progress progress_cb, void *progress_cb_payload", + "sig": "git_packbuilder *::git_packbuilder_progress::void *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Set the callbacks for a packbuilder
\n", + "comments": "", + "group": "packbuilder" }, - "git_reference_owner": { + "git_packbuilder_free": { "type": "function", - "file": "git2/refs.h", - "line": 307, - "lineto": 307, + "file": "git2/pack.h", + "line": 274, + "lineto": 274, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "The reference" + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", + "argline": "git_packbuilder *pb", + "sig": "git_packbuilder *", + "return": { "type": "void", "comment": null }, + "description": "Free the packbuilder and all associated data
\n", + "comments": "", + "group": "packbuilder" + }, + "git_patch_owner": { + "type": "function", + "file": "git2/patch.h", + "line": 37, + "lineto": 37, + "args": [ + { "name": "patch", "type": "const git_patch *", "comment": "the patch" } + ], + "argline": "const git_patch *patch", + "sig": "const git_patch *", + "return": { + "type": "git_repository *", + "comment": " a pointer to the repository" + }, + "description": "Get the repository associated with this patch. May be NULL.
\n", + "comments": "", + "group": "patch" + }, + "git_patch_from_diff": { + "type": "function", + "file": "git2/patch.h", + "line": 59, + "lineto": 60, + "args": [ + { + "name": "out", + "type": "git_patch **", + "comment": "Output parameter for the delta patch object" + }, + { "name": "diff", "type": "git_diff *", "comment": "Diff list object" }, + { "name": "idx", "type": "size_t", "comment": "Index into diff list" } + ], + "argline": "git_patch **out, git_diff *diff, size_t idx", + "sig": "git_patch **::git_diff *::size_t", "return": { - "type": "git_repository *", - "comment": " a pointer to the repo" + "type": "int", + "comment": " 0 on success, other value \n<\n 0 on error" }, - "description": "Get the repository where a reference resides.
\n", - "comments": "", - "group": "reference" + "description": "Return a patch for an entry in the diff list.
\n", + "comments": "The git_patch is a newly created object contains the text diffs for the delta. You have to call git_patch_free() when you are done with it. You can use the patch object to loop over all the hunks and lines in the diff of the one delta.
For an unchanged file or a binary file, no git_patch will be created, the output will be set to NULL, and the binary flag will be set true in the git_diff_delta structure.
It is okay to pass NULL for either of the output parameters; if you pass NULL for the git_patch, then the text diff will not be calculated.
Create a new reference with the same name as the given reference but a\n different symbolic target. The reference must be a symbolic reference,\n otherwise this will fail.
\n", - "comments": "The new reference will be written to disk, overwriting the given reference.
\n\nThe target name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.
The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.
\n", - "group": "reference" + "description": "Directly generate a patch from the difference between two blobs.
\n", + "comments": "This is just like git_diff_blobs() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.
Conditionally create a new reference with the same name as the given reference but a\n different OID target. The reference must be a direct reference, otherwise\n this will fail.
\n", - "comments": "The new reference will be written to disk, overwriting the given reference.
\n", - "group": "reference", - "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_set_target-28" - ] - } + "description": "Directly generate a patch from the difference between a blob and a buffer.
\n", + "comments": "This is just like git_diff_blob_to_buffer() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.
Rename an existing reference.
\n", - "comments": "This method works for both direct and symbolic references.
\n\nThe new name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.
If the force flag is not enabled, and there's already\n a reference with the given name, the renaming will fail.
IMPORTANT:\n The user needs to write a proper reflog entry if the\n reflog is enabled for the repository. We only rename\n the reflog if it exists.
\n", - "group": "reference" + "description": "Directly generate a patch from the difference between two buffers.
\n", + "comments": "This is just like git_diff_buffers() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.
Delete an existing reference.
\n", - "comments": "This method works for both direct and symbolic references. The reference\n will be immediately removed on disk but the memory will not be freed.\n Callers must call git_reference_free.
This function will return an error if the reference has changed\n from the time it was looked up.
\n", - "group": "reference" + "argline": "git_patch *patch", + "sig": "git_patch *", + "return": { "type": "void", "comment": null }, + "description": "Free a git_patch object.
\n", + "comments": "", + "group": "patch", + "examples": { "diff.c": ["ex/v1.9.1/diff.html#git_patch_free-17"] } }, - "git_reference_remove": { + "git_patch_get_delta": { "type": "function", - "file": "git2/refs.h", - "line": 409, - "lineto": 409, + "file": "git2/patch.h", + "line": 154, + "lineto": 154, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": null - }, - { - "name": "name", - "type": "const char *", - "comment": "The reference to remove" + "name": "patch", + "type": "const git_patch *", + "comment": "The patch in which to get the delta." } ], - "argline": "git_repository *repo, const char *name", - "sig": "git_repository *::const char *", + "argline": "const git_patch *patch", + "sig": "const git_patch *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "const git_diff_delta *", + "comment": " The delta associated with the patch." }, - "description": "Delete an existing reference by name
\n", - "comments": "This method removes the named reference from the repository without\n looking at its old value.
\n", - "group": "reference" + "description": "Get the delta associated with a patch. This delta points to internal\n data and you do not have to release it when you are done with it.
\n", + "comments": "", + "group": "patch" }, - "git_reference_list": { + "git_patch_num_hunks": { "type": "function", - "file": "git2/refs.h", - "line": 423, - "lineto": 423, + "file": "git2/patch.h", + "line": 162, + "lineto": 162, "args": [ { - "name": "array", - "type": "git_strarray *", - "comment": "Pointer to a git_strarray structure where\n\t\tthe reference names will be stored" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where to find the refs" + "name": "patch", + "type": "const git_patch *", + "comment": "The patch in which to get the number of hunks." } ], - "argline": "git_strarray *array, git_repository *repo", - "sig": "git_strarray *::git_repository *", + "argline": "const git_patch *patch", + "sig": "const git_patch *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "size_t", + "comment": " The number of hunks of the patch." }, - "description": "Fill a list with all the references that can be found in a repository.
\n", - "comments": "The string array will be filled with the names of all references; these\n values are owned by the user and should be free'd manually when no\n longer needed, using git_strarray_free().
Get the number of hunks in a patch
\n", + "comments": "", + "group": "patch" }, - "git_reference_foreach": { + "git_patch_line_stats": { "type": "function", - "file": "git2/refs.h", - "line": 444, - "lineto": 447, + "file": "git2/patch.h", + "line": 180, + "lineto": 184, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where to find the refs" + "name": "total_context", + "type": "size_t *", + "comment": "Count of context lines in output, can be NULL." }, { - "name": "callback", - "type": "git_reference_foreach_cb", - "comment": "Function which will be called for every listed ref" + "name": "total_additions", + "type": "size_t *", + "comment": "Count of addition lines in output, can be NULL." }, { - "name": "payload", - "type": "void *", - "comment": "Additional data to pass to the callback" + "name": "total_deletions", + "type": "size_t *", + "comment": "Count of deletion lines in output, can be NULL." + }, + { + "name": "patch", + "type": "const git_patch *", + "comment": "The git_patch object" } ], - "argline": "git_repository *repo, git_reference_foreach_cb callback, void *payload", - "sig": "git_repository *::git_reference_foreach_cb::void *", - "return": { - "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" - }, - "description": "Perform a callback on each reference in the repository.
\n", - "comments": "The callback function will be called for each reference in the\n repository, receiving the reference object and the payload value\n passed to this method. Returning a non-zero value from the callback\n will terminate the iteration.
Note that the callback function is responsible to call git_reference_free\n on each reference passed to it.
Get line counts of each type in a patch.
\n", + "comments": "This helps imitate a diff --numstat type of output. For that purpose, you only need the total_additions and total_deletions values, but we include the total_context line count in case you want the total number of lines of diff output that will be generated.
All outputs are optional. Pass NULL if you don't need a particular count.
\n", + "group": "patch" }, - "git_reference_foreach_name": { + "git_patch_get_hunk": { "type": "function", - "file": "git2/refs.h", - "line": 462, - "lineto": 465, + "file": "git2/patch.h", + "line": 199, + "lineto": 203, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where to find the refs" + "name": "out", + "type": "const git_diff_hunk **", + "comment": "Output pointer to git_diff_hunk of hunk" }, { - "name": "callback", - "type": "git_reference_foreach_name_cb", - "comment": "Function which will be called for every listed ref name" + "name": "lines_in_hunk", + "type": "size_t *", + "comment": "Output count of total lines in this hunk" }, { - "name": "payload", - "type": "void *", - "comment": "Additional data to pass to the callback" - } - ], - "argline": "git_repository *repo, git_reference_foreach_name_cb callback, void *payload", - "sig": "git_repository *::git_reference_foreach_name_cb::void *", - "return": { - "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" - }, - "description": "Perform a callback on the fully-qualified name of each reference.
\n", - "comments": "The callback function will be called for each reference in the\n repository, receiving the name of the reference and the payload value\n passed to this method. Returning a non-zero value from the callback\n will terminate the iteration.
Create a copy of an existing reference.
\n", - "comments": "Call git_reference_free to free the data.
Get the information about a hunk in a patch
\n", + "comments": "Given a patch and a hunk index into the patch, this returns detailed information about that hunk. Any of the output pointers can be passed as NULL if you don't care about that particular piece of information.
\n", + "group": "patch" }, - "git_reference_free": { + "git_patch_num_lines_in_hunk": { "type": "function", - "file": "git2/refs.h", - "line": 483, - "lineto": 483, + "file": "git2/patch.h", + "line": 212, + "lineto": 214, "args": [ { - "name": "ref", - "type": "git_reference *", - "comment": "git_reference" - } + "name": "patch", + "type": "const git_patch *", + "comment": "The git_patch object" + }, + { "name": "hunk_idx", "type": "size_t", "comment": "Index of the hunk" } ], - "argline": "git_reference *ref", - "sig": "git_reference *", + "argline": "const git_patch *patch, size_t hunk_idx", + "sig": "const git_patch *::size_t", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " Number of lines in hunk or GIT_ENOTFOUND if invalid hunk index" }, - "description": "Free the given reference.
\n", + "description": "Get the number of lines in a hunk.
\n", "comments": "", - "group": "reference", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_reference_free-67" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_free-29", - "ex/v0.28.0/merge.html#git_reference_free-30", - "ex/v0.28.0/merge.html#git_reference_free-31" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_reference_free-3" - ] - } + "group": "patch" }, - "git_reference_cmp": { + "git_patch_get_line_in_hunk": { "type": "function", - "file": "git2/refs.h", - "line": 492, - "lineto": 494, + "file": "git2/patch.h", + "line": 230, + "lineto": 234, "args": [ { - "name": "ref1", - "type": "const git_reference *", - "comment": "The first git_reference" + "name": "out", + "type": "const git_diff_line **", + "comment": "The git_diff_line data for this line" }, { - "name": "ref2", - "type": "const git_reference *", - "comment": "The second git_reference" + "name": "patch", + "type": "git_patch *", + "comment": "The patch to look in" + }, + { + "name": "hunk_idx", + "type": "size_t", + "comment": "The index of the hunk" + }, + { + "name": "line_of_hunk", + "type": "size_t", + "comment": "The index of the line in the hunk" } ], - "argline": "const git_reference *ref1, const git_reference *ref2", - "sig": "const git_reference *::const git_reference *", + "argline": "const git_diff_line **out, git_patch *patch, size_t hunk_idx, size_t line_of_hunk", + "sig": "const git_diff_line **::git_patch *::size_t::size_t", "return": { "type": "int", - "comment": " 0 if the same, else a stable but meaningless ordering." + "comment": " 0 on success, \n<\n0 on failure" }, - "description": "Compare two references.
\n", - "comments": "", - "group": "reference" + "description": "Get data about a line in a hunk of a patch.
\n", + "comments": "Given a patch, a hunk index, and a line index in the hunk, this will return a lot of details about that line. If you pass a hunk index larger than the number of hunks or a line index larger than the number of lines in the hunk, this will return -1.
\n", + "group": "patch" }, - "git_reference_iterator_new": { + "git_patch_size": { "type": "function", - "file": "git2/refs.h", - "line": 503, - "lineto": 505, + "file": "git2/patch.h", + "line": 252, + "lineto": 256, "args": [ { - "name": "out", - "type": "git_reference_iterator **", - "comment": "pointer in which to store the iterator" + "name": "patch", + "type": "git_patch *", + "comment": "A git_patch representing changes to one file" }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository" + "name": "include_context", + "type": "int", + "comment": "Include context lines in size if non-zero" + }, + { + "name": "include_hunk_headers", + "type": "int", + "comment": "Include hunk header lines if non-zero" + }, + { + "name": "include_file_headers", + "type": "int", + "comment": "Include file header lines if non-zero" } ], - "argline": "git_reference_iterator **out, git_repository *repo", - "sig": "git_reference_iterator **::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create an iterator for the repo's references
\n", - "comments": "", - "group": "reference" + "argline": "git_patch *patch, int include_context, int include_hunk_headers, int include_file_headers", + "sig": "git_patch *::int::int::int", + "return": { "type": "size_t", "comment": " The number of bytes of data" }, + "description": "Look up size of patch diff data in bytes
\n", + "comments": "This returns the raw size of the patch data. This only includes the actual data from the lines of the diff, not the file or hunk headers.
\n\nIf you pass include_context as true (non-zero), this will be the size of all of the diff output; if you pass it as false (zero), this will only include the actual changed lines (as if context_lines was 0).
Create an iterator for the repo's references that match the\n specified glob
\n", - "comments": "", - "group": "reference" + "description": "Serialize the patch to text via callback.
\n", + "comments": "Returning a non-zero value from the callback will terminate the iteration and return that value to the caller.
\n", + "group": "patch" }, - "git_reference_next": { + "git_patch_to_buf": { "type": "function", - "file": "git2/refs.h", - "line": 528, - "lineto": 528, + "file": "git2/patch.h", + "line": 282, + "lineto": 284, "args": [ { "name": "out", - "type": "git_reference **", - "comment": "pointer in which to store the reference" + "type": "git_buf *", + "comment": "The git_buf to be filled in" }, { - "name": "iter", - "type": "git_reference_iterator *", - "comment": "the iterator" + "name": "patch", + "type": "git_patch *", + "comment": "A git_patch representing changes to one file" } ], - "argline": "git_reference **out, git_reference_iterator *iter", - "sig": "git_reference **::git_reference_iterator *", + "argline": "git_buf *out, git_patch *patch", + "sig": "git_buf *::git_patch *", "return": { "type": "int", - "comment": " 0, GIT_ITEROVER if there are no more; or an error code" + "comment": " 0 on success, \n<\n0 on failure." }, - "description": "Get the next reference
\n", + "description": "Get the content of a patch as a single diff text.
\n", "comments": "", - "group": "reference" + "group": "patch", + "examples": { "diff.c": ["ex/v1.9.1/diff.html#git_patch_to_buf-18"] } }, - "git_reference_next_name": { + "git_pathspec_new": { "type": "function", - "file": "git2/refs.h", - "line": 541, - "lineto": 541, + "file": "git2/pathspec.h", + "line": 89, + "lineto": 90, "args": [ { "name": "out", - "type": "const char **", - "comment": "pointer in which to store the string" + "type": "git_pathspec **", + "comment": "Output of the compiled pathspec" }, { - "name": "iter", - "type": "git_reference_iterator *", - "comment": "the iterator" + "name": "pathspec", + "type": "const git_strarray *", + "comment": "A git_strarray of the paths to match" } ], - "argline": "const char **out, git_reference_iterator *iter", - "sig": "const char **::git_reference_iterator *", + "argline": "git_pathspec **out, const git_strarray *pathspec", + "sig": "git_pathspec **::const git_strarray *", "return": { "type": "int", - "comment": " 0, GIT_ITEROVER if there are no more; or an error code" + "comment": " 0 on success, \n<\n0 on failure" }, - "description": "Get the next reference's name
\n", - "comments": "This function is provided for convenience in case only the names\n are interesting as it avoids the allocation of the git_reference\n object which git_reference_next() needs.
Compile a pathspec
\n", + "comments": "", + "group": "pathspec", + "examples": { "log.c": ["ex/v1.9.1/log.html#git_pathspec_new-40"] } }, - "git_reference_iterator_free": { + "git_pathspec_free": { "type": "function", - "file": "git2/refs.h", - "line": 548, - "lineto": 548, + "file": "git2/pathspec.h", + "line": 97, + "lineto": 97, "args": [ { - "name": "iter", - "type": "git_reference_iterator *", - "comment": "the iterator to free" + "name": "ps", + "type": "git_pathspec *", + "comment": "The compiled pathspec" } ], - "argline": "git_reference_iterator *iter", - "sig": "git_reference_iterator *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free the iterator and its associated resources
\n", + "argline": "git_pathspec *ps", + "sig": "git_pathspec *", + "return": { "type": "void", "comment": null }, + "description": "Free a pathspec
\n", "comments": "", - "group": "reference" + "group": "pathspec", + "examples": { "log.c": ["ex/v1.9.1/log.html#git_pathspec_free-41"] } }, - "git_reference_foreach_glob": { + "git_pathspec_matches_path": { "type": "function", - "file": "git2/refs.h", - "line": 568, - "lineto": 572, + "file": "git2/pathspec.h", + "line": 112, + "lineto": 113, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repository where to find the refs" - }, - { - "name": "glob", - "type": "const char *", - "comment": "Pattern to match (fnmatch-style) against reference name." + "name": "ps", + "type": "const git_pathspec *", + "comment": "The compiled pathspec" }, { - "name": "callback", - "type": "git_reference_foreach_name_cb", - "comment": "Function which will be called for every listed ref" + "name": "flags", + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" }, { - "name": "payload", - "type": "void *", - "comment": "Additional data to pass to the callback" + "name": "path", + "type": "const char *", + "comment": "The pathname to attempt to match" } ], - "argline": "git_repository *repo, const char *glob, git_reference_foreach_name_cb callback, void *payload", - "sig": "git_repository *::const char *::git_reference_foreach_name_cb::void *", + "argline": "const git_pathspec *ps, uint32_t flags, const char *path", + "sig": "const git_pathspec *::uint32_t::const char *", "return": { "type": "int", - "comment": " 0 on success, GIT_EUSER on non-zero callback, or error code" + "comment": " 1 is path matches spec, 0 if it does not" }, - "description": "Perform a callback on each reference in the repository whose name\n matches the given pattern.
\n", - "comments": "This function acts like git_reference_foreach() with an additional\n pattern match being applied to the reference name before issuing the\n callback function. See that function for more information.
The pattern is matched using fnmatch or "glob" style where a '*' matches\n any sequence of letters, a '?' matches any letter, and square brackets\n can be used to define character ranges (such as "[0-9]" for digits).
\n", - "group": "reference" + "description": "Try to match a path against a pathspec
\n", + "comments": "Unlike most of the other pathspec matching functions, this will not fall back on the native case-sensitivity for your platform. You must explicitly pass flags to control case sensitivity or else this will fall back on being case sensitive.
\n", + "group": "pathspec" }, - "git_reference_has_log": { + "git_pathspec_match_workdir": { "type": "function", - "file": "git2/refs.h", - "line": 582, - "lineto": 582, + "file": "git2/pathspec.h", + "line": 137, + "lineto": 141, "args": [ + { + "name": "out", + "type": "git_pathspec_match_list **", + "comment": "Output list of matches; pass NULL to just get return value" + }, { "name": "repo", "type": "git_repository *", - "comment": "the repository" + "comment": "The repository in which to match; bare repo is an error" }, { - "name": "refname", - "type": "const char *", - "comment": "the reference's name" + "name": "flags", + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" + }, + { + "name": "ps", + "type": "git_pathspec *", + "comment": "Pathspec to be matched" } ], - "argline": "git_repository *repo, const char *refname", - "sig": "git_repository *::const char *", + "argline": "git_pathspec_match_list **out, git_repository *repo, uint32_t flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_repository *::uint32_t::git_pathspec *", "return": { "type": "int", - "comment": " 0 when no reflog can be found, 1 when it exists;\n otherwise an error code." + "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag was given" }, - "description": "Check if a reflog exists for the specified reference.
\n", - "comments": "", - "group": "reference" + "description": "Match a pathspec against the working directory of a repository.
\n", + "comments": "This matches the pathspec against the current files in the working directory of the repository. It is an error to invoke this on a bare repo. This handles git ignores (i.e. ignored files will not be considered to match the pathspec unless the file is tracked in the index).
If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.
Ensure there is a reflog for a particular reference.
\n", - "comments": "Make sure that successive updates to the reference will append to\n its log.
\n", - "group": "reference" + "description": "Match a pathspec against entries in an index.
\n", + "comments": "This matches the pathspec against the files in the repository index.
\n\nNOTE: At the moment, the case sensitivity of this match is controlled by the current case-sensitivity of the index object itself and the USE_CASE and IGNORE_CASE flags will have no effect. This behavior will be corrected in a future release.
\n\nIf out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.
Check if a reference is a local branch.
\n", - "comments": "", - "group": "reference" + "description": "Match a pathspec against files in a tree.
\n", + "comments": "This matches the pathspec against the files in the given tree.
\n\nIf out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.
Check if a reference is a remote tracking branch
\n", - "comments": "", - "group": "reference" + "description": "Match a pathspec against files in a diff list.
\n", + "comments": "This matches the pathspec against the files in the given diff list.
\n\nIf out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.
Check if a reference is a tag
\n", + "argline": "git_pathspec_match_list *m", + "sig": "git_pathspec_match_list *", + "return": { "type": "void", "comment": null }, + "description": "Free memory associates with a git_pathspec_match_list
\n", "comments": "", - "group": "reference" + "group": "pathspec" }, - "git_reference_is_note": { + "git_pathspec_match_list_entrycount": { "type": "function", - "file": "git2/refs.h", - "line": 634, - "lineto": 634, + "file": "git2/pathspec.h", + "line": 233, + "lineto": 234, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "A git reference" + "name": "m", + "type": "const git_pathspec_match_list *", + "comment": "The git_pathspec_match_list object" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", + "argline": "const git_pathspec_match_list *m", + "sig": "const git_pathspec_match_list *", "return": { - "type": "int", - "comment": " 1 when the reference lives in the refs/notes\n namespace; 0 otherwise." + "type": "size_t", + "comment": " Number of items in match list" }, - "description": "Check if a reference is a note
\n", + "description": "Get the number of items in a match list.
\n", "comments": "", - "group": "reference" + "group": "pathspec" }, - "git_reference_normalize_name": { + "git_pathspec_match_list_entry": { "type": "function", - "file": "git2/refs.h", - "line": 690, - "lineto": 694, + "file": "git2/pathspec.h", + "line": 246, + "lineto": 247, "args": [ { - "name": "buffer_out", - "type": "char *", - "comment": "User allocated buffer to store normalized name" + "name": "m", + "type": "const git_pathspec_match_list *", + "comment": "The git_pathspec_match_list object" }, { - "name": "buffer_size", + "name": "pos", "type": "size_t", - "comment": "Size of buffer_out" - }, - { - "name": "name", - "type": "const char *", - "comment": "Reference name to be checked." - }, - { - "name": "flags", - "type": "unsigned int", - "comment": "Flags to constrain name validation rules - see the\n GIT_REFERENCE_FORMAT constants above." + "comment": "The index into the list" } ], - "argline": "char *buffer_out, size_t buffer_size, const char *name, unsigned int flags", - "sig": "char *::size_t::const char *::unsigned int", + "argline": "const git_pathspec_match_list *m, size_t pos", + "sig": "const git_pathspec_match_list *::size_t", "return": { - "type": "int", - "comment": " 0 on success, GIT_EBUFS if buffer is too small, GIT_EINVALIDSPEC\n or an error code." + "type": "const char *", + "comment": " The filename of the match" }, - "description": "Normalize reference name and check validity.
\n", - "comments": "This will normalize the reference name by removing any leading slash\n '/' characters and collapsing runs of adjacent slashes between name\n components into a single slash.
\n\nOnce normalized, if the reference name is valid, it will be returned in\n the user allocated buffer.
\n\nSee git_reference_symbolic_create() for rules about valid names.
Get a matching filename by position.
\n", + "comments": "This routine cannot be used if the match list was generated by git_pathspec_match_diff. If so, it will always return NULL.
Recursively peel reference until object of the specified type is found.
\n", - "comments": "The retrieved peeled object is owned by the repository\n and should be closed with the git_object_free method.
If you pass GIT_OBJECT_ANY as the target type, then the object\n will be peeled until a non-tag object is met.
Get a matching diff delta by position.
\n", + "comments": "This routine can only be used if the match list was generated by git_pathspec_match_diff. Otherwise it will always return NULL.
Ensure the reference name is well-formed.
\n", - "comments": "Valid reference names must follow one of two patterns:
\n\nGet the number of pathspec items that did not match.
\n", + "comments": "This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when generating the git_pathspec_match_list.
\n", + "group": "pathspec" }, - "git_reference_shorthand": { + "git_pathspec_match_list_failed_entry": { "type": "function", - "file": "git2/refs.h", - "line": 744, - "lineto": 744, + "file": "git2/pathspec.h", + "line": 283, + "lineto": 284, "args": [ { - "name": "ref", - "type": "const git_reference *", - "comment": "a reference" + "name": "m", + "type": "const git_pathspec_match_list *", + "comment": "The git_pathspec_match_list object" + }, + { + "name": "pos", + "type": "size_t", + "comment": "The index into the failed items" } ], - "argline": "const git_reference *ref", - "sig": "const git_reference *", + "argline": "const git_pathspec_match_list *m, size_t pos", + "sig": "const git_pathspec_match_list *::size_t", "return": { "type": "const char *", - "comment": " the human-readable version of the name" + "comment": " The pathspec pattern that didn't match anything" }, - "description": "Get the reference's short name
\n", - "comments": "This will transform the reference name into a name "human-readable"\n version. If no shortname is appropriate, it will return the full\n name.
\n\nThe memory is owned by the reference and must not be freed.
\n", - "group": "reference", - "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_reference_shorthand-4" - ] - } + "description": "Get an original pathspec string that had no matches.
\n", + "comments": "This will be return NULL for positions out of range.
\n", + "group": "pathspec" }, - "git_refspec_parse": { + "git_proxy_options_init": { "type": "function", - "file": "git2/refspec.h", - "line": 32, - "lineto": 32, + "file": "git2/proxy.h", + "line": 103, + "lineto": 103, "args": [ { - "name": "refspec", - "type": "git_refspec **", - "comment": "a pointer to hold the refspec handle" - }, - { - "name": "input", - "type": "const char *", - "comment": "the refspec string" + "name": "opts", + "type": "git_proxy_options *", + "comment": "The `git_proxy_options` struct to initialize." }, { - "name": "is_fetch", - "type": "int", - "comment": "is this a refspec for a fetch" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_PROXY_OPTIONS_VERSION`." } ], - "argline": "git_refspec **refspec, const char *input, int is_fetch", - "sig": "git_refspec **::const char *::int", + "argline": "git_proxy_options *opts, unsigned int version", + "sig": "git_proxy_options *::unsigned int", "return": { "type": "int", - "comment": " 0 if the refspec string could be parsed, -1 otherwise" + "comment": " Zero on success; -1 on failure." }, - "description": "Parse a given refspec string
\n", - "comments": "", - "group": "refspec" + "description": "Initialize git_proxy_options structure
\n", + "comments": "Initializes a git_proxy_options with default values. Equivalent to creating an instance with GIT_PROXY_OPTIONS_INIT.
Free a refspec object which has been created by git_refspec_parse
\n", - "comments": "", - "group": "refspec" - }, - "git_refspec_src": { - "type": "function", - "file": "git2/refspec.h", - "line": 47, - "lineto": 47, - "args": [ + "name": "opts", + "type": "git_rebase_options *", + "comment": "The `git_rebase_options` struct to initialize." + }, { - "name": "refspec", - "type": "const git_refspec *", - "comment": "the refspec" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_REBASE_OPTIONS_VERSION`." } ], - "argline": "const git_refspec *refspec", - "sig": "const git_refspec *", + "argline": "git_rebase_options *opts, unsigned int version", + "sig": "git_rebase_options *::unsigned int", "return": { - "type": "const char *", - "comment": " the refspec's source specifier" + "type": "int", + "comment": " Zero on success; -1 on failure." }, - "description": "Get the source specifier
\n", - "comments": "", - "group": "refspec" + "description": "Initialize git_rebase_options structure
\n", + "comments": "Initializes a git_rebase_options with default values. Equivalent to creating an instance with GIT_REBASE_OPTIONS_INIT.
Get the destination specifier
\n", + "description": "Initializes a rebase operation to rebase the changes in branch\n relative to upstream onto another branch. To begin the rebase\n process, call git_rebase_next. When you have finished with this\n object, call git_rebase_free.
Get the refspec's string
\n", + "description": "Opens an existing rebase that was previously started by either an\n invocation of git_rebase_init or by another client.
Get the force update setting
\n", + "description": "Gets the original HEAD ref name for merge rebases.
Get the refspec's direction.
\n", + "description": "Gets the original HEAD id for merge rebases.
Check if a refspec's source descriptor matches a reference
\n", + "argline": "git_rebase *rebase", + "sig": "git_rebase *", + "return": { "type": "const char *", "comment": " The `onto` ref name" }, + "description": "Gets the onto ref name for merge rebases.
Check if a refspec's destination descriptor matches a reference
\n", + "argline": "git_rebase *rebase", + "sig": "git_rebase *", + "return": { "type": "const git_oid *", "comment": " The `onto` id" }, + "description": "Gets the onto id for merge rebases.
Transform a reference to its target following the refspec's rules
\n", + "description": "Gets the count of rebase operations that are to be applied.
\n", "comments": "", - "group": "refspec" + "group": "rebase" }, - "git_refspec_rtransform": { + "git_rebase_operation_current": { "type": "function", - "file": "git2/refspec.h", - "line": 117, - "lineto": 117, + "file": "git2/rebase.h", + "line": 293, + "lineto": 293, "args": [ { - "name": "out", - "type": "git_buf *", - "comment": "where to store the source reference name" - }, - { - "name": "spec", - "type": "const git_refspec *", - "comment": "the refspec" - }, - { - "name": "name", - "type": "const char *", - "comment": "the name of the reference to transform" + "name": "rebase", + "type": "git_rebase *", + "comment": "The in-progress rebase" } ], - "argline": "git_buf *out, const git_refspec *spec, const char *name", - "sig": "git_buf *::const git_refspec *::const char *", + "argline": "git_rebase *rebase", + "sig": "git_rebase *", "return": { - "type": "int", - "comment": " 0, GIT_EBUFS or another error" + "type": "size_t", + "comment": " The index of the rebase operation currently being applied." }, - "description": "Transform a target reference to its source reference following the refspec's rules
\n", + "description": "Gets the index of the rebase operation that is currently being applied.\n If the first operation has not yet been applied (because you have\n called init but not yet next) then this returns\n GIT_REBASE_NO_OPERATION.
Add a remote with the default fetch refspec to the repository's configuration.
\n", + "description": "Gets the rebase operation specified by the given index.
\n", "comments": "", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_create-4" - ] - } + "group": "rebase" }, - "git_remote_create_init_options": { + "git_rebase_next": { "type": "function", - "file": "git2/remote.h", - "line": 97, - "lineto": 99, + "file": "git2/rebase.h", + "line": 317, + "lineto": 319, "args": [ { - "name": "opts", - "type": "git_remote_create_options *", - "comment": "The `git_remote_create_options` struct to initialize." + "name": "operation", + "type": "git_rebase_operation **", + "comment": "Pointer to store the rebase operation that is to be performed next" }, { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_REMOTE_CREATE_OPTIONS_VERSION`." + "name": "rebase", + "type": "git_rebase *", + "comment": "The rebase in progress" } ], - "argline": "git_remote_create_options *opts, unsigned int version", - "sig": "git_remote_create_options *::unsigned int", + "argline": "git_rebase_operation **operation, git_rebase *rebase", + "sig": "git_rebase_operation **::git_rebase *", "return": { "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "Initialize git_remote_create_options structure
\n", - "comments": "Initializes a git_remote_create_options with default values. Equivalent to\n creating an instance with GIT_REMOTE_CREATE_OPTIONS_INIT.
Performs the next rebase operation and returns the information about it.\n If the operation is one that applies a patch (which is any operation except\n GIT_REBASE_OPERATION_EXEC) then the patch will be applied and the index and\n working directory will be updated with the changes. If there are conflicts,\n you will need to address those before committing the changes.
\n", + "comments": "", + "group": "rebase" }, - "git_remote_create_with_opts": { + "git_rebase_inmemory_index": { "type": "function", - "file": "git2/remote.h", - "line": 113, - "lineto": 116, + "file": "git2/rebase.h", + "line": 336, + "lineto": 338, "args": [ { - "name": "out", - "type": "git_remote **", - "comment": "the resulting remote" - }, - { - "name": "url", - "type": "const char *", - "comment": "the remote's url" + "name": "index", + "type": "git_index **", + "comment": "The result index of the last operation." }, { - "name": "opts", - "type": "const git_remote_create_options *", - "comment": "the remote creation options" + "name": "rebase", + "type": "git_rebase *", + "comment": "The in-progress rebase." } ], - "argline": "git_remote **out, const char *url, const git_remote_create_options *opts", - "sig": "git_remote **::const char *::const git_remote_create_options *", - "return": { - "type": "int", - "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" - }, - "description": "Create a remote, with options.
\n", - "comments": "This function allows more fine-grained control over the remote creation.
\n\nPassing NULL as the opts argument will result in a detached remote.
\n", - "group": "remote" + "argline": "git_index **index, git_rebase *rebase", + "sig": "git_index **::git_rebase *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Gets the index produced by the last operation, which is the result\n of git_rebase_next and which will be committed by the next\n invocation of git_rebase_commit. This is useful for resolving\n conflicts in an in-memory rebase before committing them. You must\n call git_index_free when you are finished with this.
This is only applicable for in-memory rebases; for rebases within a working directory, the changes were applied to the repository's index.
\n", + "group": "rebase" }, - "git_remote_create_with_fetchspec": { + "git_rebase_commit": { "type": "function", - "file": "git2/remote.h", - "line": 129, - "lineto": 134, + "file": "git2/rebase.h", + "line": 362, + "lineto": 368, "args": [ { - "name": "out", - "type": "git_remote **", - "comment": "the resulting remote" + "name": "id", + "type": "git_oid *", + "comment": "Pointer in which to store the OID of the newly created commit" }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to create the remote" + "name": "rebase", + "type": "git_rebase *", + "comment": "The rebase that is in-progress" }, { - "name": "name", - "type": "const char *", - "comment": "the remote's name" + "name": "author", + "type": "const git_signature *", + "comment": "The author of the updated commit, or NULL to keep the\n author from the original commit" }, { - "name": "url", - "type": "const char *", - "comment": "the remote's url" + "name": "committer", + "type": "const git_signature *", + "comment": "The committer of the rebase" }, { - "name": "fetch", + "name": "message_encoding", "type": "const char *", - "comment": "the remote fetch value" - } - ], - "argline": "git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch", - "sig": "git_remote **::git_repository *::const char *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" - }, - "description": "Add a remote with the provided fetch refspec (or default if NULL) to the repository's\n configuration.
\n", - "comments": "", - "group": "remote" - }, - "git_remote_create_anonymous": { - "type": "function", - "file": "git2/remote.h", - "line": 147, - "lineto": 150, - "args": [ - { - "name": "out", - "type": "git_remote **", - "comment": "pointer to the new remote objects" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the associated repository" + "comment": "The encoding for the message in the commit,\n represented with a standard encoding name. If message is NULL,\n this should also be NULL, and the encoding from the original\n commit will be maintained. If message is specified, this may be\n NULL to indicate that \"UTF-8\" is to be used." }, { - "name": "url", + "name": "message", "type": "const char *", - "comment": "the remote repository's URL" + "comment": "The message for this commit, or NULL to use the message\n from the original commit." } ], - "argline": "git_remote **out, git_repository *repo, const char *url", - "sig": "git_remote **::git_repository *::const char *", + "argline": "git_oid *id, git_rebase *rebase, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message", + "sig": "git_oid *::git_rebase *::const git_signature *::const git_signature *::const char *::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " Zero on success, GIT_EUNMERGED if there are unmerged changes in\n the index, GIT_EAPPLIED if the current commit has already\n been applied to the upstream and there is nothing to commit,\n -1 on failure." }, - "description": "Create an anonymous remote
\n", - "comments": "Create a remote with the given url in-memory. You can use this when\n you have a URL instead of a remote's name.
\n", - "group": "remote", - "examples": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_create_anonymous-4" - ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_create_anonymous-2" - ] - } + "description": "Commits the current patch. You must have resolved any conflicts that\n were introduced during the patch application from the git_rebase_next\n invocation.
Create a remote without a connected local repo
\n", - "comments": "Create a remote with the given url in-memory. You can use this when\n you have a URL instead of a remote's name.
\n\nContrasted with git_remote_create_anonymous, a detached remote\n will not consider any repo configuration values (such as insteadof url\n substitutions).
\n", - "group": "remote" + "description": "Aborts a rebase that is currently in progress, resetting the repository\n and working directory to their state before rebase began.
\n", + "comments": "", + "group": "rebase" }, - "git_remote_lookup": { + "git_rebase_finish": { "type": "function", - "file": "git2/remote.h", - "line": 181, - "lineto": 181, + "file": "git2/rebase.h", + "line": 388, + "lineto": 390, "args": [ { - "name": "out", - "type": "git_remote **", - "comment": "pointer to the new remote object" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the associated repository" + "name": "rebase", + "type": "git_rebase *", + "comment": "The rebase that is in-progress" }, { - "name": "name", - "type": "const char *", - "comment": "the remote's name" + "name": "signature", + "type": "const git_signature *", + "comment": "The identity that is finishing the rebase (optional)" } ], - "argline": "git_remote **out, git_repository *repo, const char *name", - "sig": "git_remote **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code" - }, - "description": "Get the information for a particular remote
\n", - "comments": "The name will be checked for validity.\n See git_tag_create() for rules about valid names.
Finishes a rebase that is currently in progress once all patches have\n been applied.
\n", + "comments": "", + "group": "rebase" }, - "git_remote_dup": { + "git_rebase_free": { "type": "function", - "file": "git2/remote.h", - "line": 193, - "lineto": 193, + "file": "git2/rebase.h", + "line": 397, + "lineto": 397, "args": [ { - "name": "dest", - "type": "git_remote **", - "comment": "pointer where to store the copy" - }, - { - "name": "source", - "type": "git_remote *", - "comment": "object to copy" + "name": "rebase", + "type": "git_rebase *", + "comment": "The rebase object" } ], - "argline": "git_remote **dest, git_remote *source", - "sig": "git_remote **::git_remote *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a copy of an existing remote. All internal strings are also\n duplicated. Callbacks are not duplicated.
\n", - "comments": "Call git_remote_free to free the data.
Frees the git_rebase object.
Get the remote's repository
\n", - "comments": "", - "group": "remote" + "argline": "git_refdb **out, git_repository *repo", + "sig": "git_refdb **::git_repository *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new reference database with no backends.
\n", + "comments": "Before the Ref DB can be used for read/writing, a custom database backend must be manually set using git_refdb_set_backend()
Get the remote's name
\n", - "comments": "", - "group": "remote" + "argline": "git_refdb **out, git_repository *repo", + "sig": "git_refdb **::git_repository *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new reference database and automatically add\n the default backends:
\n", + "comments": "Get the remote's url
\n", - "comments": "If url.*.insteadOf has been configured for this URL, it will\n return the modified URL.
\n", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_url-6" - ] - } + "argline": "git_refdb *refdb", + "sig": "git_refdb *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Suggests that the given refdb compress or optimize its references.\n This mechanism is implementation specific. For on-disk reference\n databases, for example, this may pack all loose references.
\n", + "comments": "", + "group": "refdb" }, - "git_remote_pushurl": { + "git_refdb_free": { "type": "function", - "file": "git2/remote.h", - "line": 231, - "lineto": 231, + "file": "git2/refdb.h", + "line": 66, + "lineto": 66, "args": [ { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote" + "name": "refdb", + "type": "git_refdb *", + "comment": "reference database pointer or NULL" } ], - "argline": "const git_remote *remote", - "sig": "const git_remote *", - "return": { - "type": "const char *", - "comment": " a pointer to the url or NULL if no special url for pushing is set" - }, - "description": "Get the remote's url for pushing
\n", - "comments": "If url.*.pushInsteadOf has been configured for this URL, it\n will return the modified URL.
\n", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_pushurl-7" - ] - } + "argline": "git_refdb *refdb", + "sig": "git_refdb *", + "return": { "type": "void", "comment": null }, + "description": "Close an open reference database.
\n", + "comments": "", + "group": "refdb" }, - "git_remote_set_url": { + "git_reflog_read": { "type": "function", - "file": "git2/remote.h", - "line": 244, - "lineto": 244, + "file": "git2/reflog.h", + "line": 38, + "lineto": 38, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to perform the change" + "name": "out", + "type": "git_reflog **", + "comment": "pointer to reflog" }, { - "name": "remote", - "type": "const char *", - "comment": "the remote's name" + "name": "repo", + "type": "git_repository *", + "comment": "the repository" }, { - "name": "url", + "name": "name", "type": "const char *", - "comment": "the url to set" + "comment": "reference to look up" } ], - "argline": "git_repository *repo, const char *remote, const char *url", - "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error value" - }, - "description": "Set the remote's url in the configuration
\n", - "comments": "Remote objects already in memory will not be affected. This assumes\n the common case of a single-url remote and will otherwise return an error.
\n", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_set_url-8" - ] - } + "argline": "git_reflog **out, git_repository *repo, const char *name", + "sig": "git_reflog **::git_repository *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Read the reflog for the given reference
\n", + "comments": "If there is no reflog file for the given reference yet, an empty reflog object will be returned.
\n\nThe reflog must be freed manually by using git_reflog_free().
\n", + "group": "reflog" }, - "git_remote_set_pushurl": { + "git_reflog_write": { "type": "function", - "file": "git2/remote.h", - "line": 257, - "lineto": 257, + "file": "git2/reflog.h", + "line": 47, + "lineto": 47, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to perform the change" - }, - { - "name": "remote", - "type": "const char *", - "comment": "the remote's name" - }, - { - "name": "url", - "type": "const char *", - "comment": "the url to set" + "name": "reflog", + "type": "git_reflog *", + "comment": "an existing reflog object" } ], - "argline": "git_repository *repo, const char *remote, const char *url", - "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "Set the remote's url for pushing in the configuration.
\n", - "comments": "Remote objects already in memory will not be affected. This assumes\n the common case of a single-url remote and will otherwise return an error.
\n", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_set_pushurl-9" - ] - } + "argline": "git_reflog *reflog", + "sig": "git_reflog *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Write an existing in-memory reflog object back to disk\n using an atomic file lock.
\n", + "comments": "", + "group": "reflog" }, - "git_remote_add_fetch": { + "git_reflog_append": { "type": "function", - "file": "git2/remote.h", - "line": 270, - "lineto": 270, + "file": "git2/reflog.h", + "line": 60, + "lineto": 60, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to change the configuration" + "name": "reflog", + "type": "git_reflog *", + "comment": "an existing reflog object" }, { - "name": "remote", - "type": "const char *", - "comment": "the name of the remote to change" + "name": "id", + "type": "const git_oid *", + "comment": "the OID the reference is now pointing to" }, { - "name": "refspec", - "type": "const char *", - "comment": "the new fetch refspec" - } - ], - "argline": "git_repository *repo, const char *remote, const char *refspec", - "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0, GIT_EINVALIDSPEC if refspec is invalid or an error value" - }, - "description": "Add a fetch refspec to the remote's configuration
\n", - "comments": "Add the given refspec to the fetch list in the configuration. No\n loaded remote instances will be affected.
\n", - "group": "remote" - }, - "git_remote_get_fetch_refspecs": { - "type": "function", - "file": "git2/remote.h", - "line": 281, - "lineto": 281, - "args": [ - { - "name": "array", - "type": "git_strarray *", - "comment": "pointer to the array in which to store the strings" + "name": "committer", + "type": "const git_signature *", + "comment": "the signature of the committer" }, { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote to query" + "name": "msg", + "type": "const char *", + "comment": "the reflog message" } ], - "argline": "git_strarray *array, const git_remote *remote", - "sig": "git_strarray *::const git_remote *", - "return": { - "type": "int", - "comment": null - }, - "description": "Get the remote's list of fetch refspecs
\n", - "comments": "The memory is owned by the user and should be freed with\n git_strarray_free.
Add a new entry to the in-memory reflog.
\n", + "comments": "msg is optional and can be NULL.
Add a push refspec to the remote's configuration
\n", - "comments": "Add the given refspec to the push list in the configuration. No\n loaded remote instances will be affected.
\n", - "group": "remote" + "description": "Rename a reflog
\n", + "comments": "The reflog to be renamed is expected to already exist
\n\nThe new name will be checked for validity. See git_reference_create_symbolic() for rules about valid names.
Get the remote's list of push refspecs
\n", - "comments": "The memory is owned by the user and should be freed with\n git_strarray_free.
Delete the reflog for the given reference
\n", + "comments": "", + "group": "reflog" }, - "git_remote_refspec_count": { + "git_reflog_entrycount": { "type": "function", - "file": "git2/remote.h", - "line": 313, - "lineto": 313, + "file": "git2/reflog.h", + "line": 92, + "lineto": 92, "args": [ { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote" + "name": "reflog", + "type": "git_reflog *", + "comment": "the previously loaded reflog" } ], - "argline": "const git_remote *remote", - "sig": "const git_remote *", - "return": { - "type": "size_t", - "comment": " the amount of refspecs configured in this remote" - }, - "description": "Get the number of refspecs for a remote
\n", + "argline": "git_reflog *reflog", + "sig": "git_reflog *", + "return": { "type": "size_t", "comment": " the number of log entries" }, + "description": "Get the number of log entries in a reflog
\n", "comments": "", - "group": "remote" + "group": "reflog" }, - "git_remote_get_refspec": { + "git_reflog_entry_byindex": { "type": "function", - "file": "git2/remote.h", - "line": 322, - "lineto": 322, + "file": "git2/reflog.h", + "line": 105, + "lineto": 105, "args": [ { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote to query" + "name": "reflog", + "type": "const git_reflog *", + "comment": "a previously loaded reflog" }, { - "name": "n", + "name": "idx", "type": "size_t", - "comment": "the refspec to get" + "comment": "the position of the entry to lookup. Should be greater than or\n equal to 0 (zero) and less than `git_reflog_entrycount()`." } ], - "argline": "const git_remote *remote, size_t n", - "sig": "const git_remote *::size_t", + "argline": "const git_reflog *reflog, size_t idx", + "sig": "const git_reflog *::size_t", "return": { - "type": "const git_refspec *", - "comment": " the nth refspec" + "type": "const git_reflog_entry *", + "comment": " the entry; NULL if not found" }, - "description": "Get a refspec from the remote
\n", - "comments": "", - "group": "remote" + "description": "Lookup an entry by its index
\n", + "comments": "Requesting the reflog entry with an index of 0 (zero) will return the most recently created entry.
\n", + "group": "reflog" }, - "git_remote_connect": { + "git_reflog_drop": { "type": "function", - "file": "git2/remote.h", - "line": 339, - "lineto": 339, + "file": "git2/reflog.h", + "line": 124, + "lineto": 127, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote to connect to" - }, - { - "name": "direction", - "type": "git_direction", - "comment": "GIT_DIRECTION_FETCH if you want to fetch or\n GIT_DIRECTION_PUSH if you want to push" - }, - { - "name": "callbacks", - "type": "const git_remote_callbacks *", - "comment": "the callbacks to use for this connection" + "name": "reflog", + "type": "git_reflog *", + "comment": "a previously loaded reflog." }, { - "name": "proxy_opts", - "type": "const git_proxy_options *", - "comment": "proxy settings" + "name": "idx", + "type": "size_t", + "comment": "the position of the entry to remove. Should be greater than or\n equal to 0 (zero) and less than `git_reflog_entrycount()`." }, { - "name": "custom_headers", - "type": "const git_strarray *", - "comment": "extra HTTP headers to use in this connection" + "name": "rewrite_previous_entry", + "type": "int", + "comment": "1 to rewrite the history; 0 otherwise." } ], - "argline": "git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_proxy_options *proxy_opts, const git_strarray *custom_headers", - "sig": "git_remote *::git_direction::const git_remote_callbacks *::const git_proxy_options *::const git_strarray *", + "argline": "git_reflog *reflog, size_t idx, int rewrite_previous_entry", + "sig": "git_reflog *::size_t::int", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, GIT_ENOTFOUND if the entry doesn't exist\n or an error code." }, - "description": "Open a connection to a remote
\n", - "comments": "The transport is selected based on the URL. The direction argument\n is due to a limitation of the git protocol (over TCP or SSH) which\n starts up a specific binary which can only do the one or the other.
\n", - "group": "remote", - "examples": { - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_connect-4" - ] - } + "description": "Remove an entry from the reflog by its index
\n", + "comments": "To ensure there's no gap in the log history, set rewrite_previous_entry param value to 1. When deleting entry n, member old_oid of entry n-1 (if any) will be updated with the value of member new_oid of entry n+1.
Get the remote repository's reference advertisement list
\n", - "comments": "Get the list of references with which the server responds to a new\n connection.
\n\nThe remote (or more exactly its transport) must have connected to\n the remote repository. This list is available as soon as the\n connection to the remote is initiated and it remains available\n after disconnecting.
\n\nThe memory belongs to the remote. The pointer will be valid as long\n as a new connection is not initiated, but it is recommended that\n you make a copy in order to make use of the data.
\n", - "group": "remote", - "examples": { - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_ls-5" - ] - } + "argline": "const git_reflog_entry *entry", + "sig": "const git_reflog_entry *", + "return": { "type": "const git_oid *", "comment": " the old oid" }, + "description": "Get the old oid
\n", + "comments": "", + "group": "reflog" }, - "git_remote_connected": { + "git_reflog_entry_id_new": { "type": "function", - "file": "git2/remote.h", - "line": 372, - "lineto": 372, + "file": "git2/reflog.h", + "line": 143, + "lineto": 143, "args": [ { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote" + "name": "entry", + "type": "const git_reflog_entry *", + "comment": "a reflog entry" } ], - "argline": "const git_remote *remote", - "sig": "const git_remote *", + "argline": "const git_reflog_entry *entry", + "sig": "const git_reflog_entry *", "return": { - "type": "int", - "comment": " 1 if it's connected, 0 otherwise." + "type": "const git_oid *", + "comment": " the new oid at this time" }, - "description": "Check whether the remote is connected
\n", - "comments": "Check whether the remote's underlying transport is connected to the\n remote host.
\n", - "group": "remote" + "description": "Get the new oid
\n", + "comments": "", + "group": "reflog" }, - "git_remote_stop": { + "git_reflog_entry_committer": { "type": "function", - "file": "git2/remote.h", - "line": 382, - "lineto": 382, + "file": "git2/reflog.h", + "line": 151, + "lineto": 151, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" + "name": "entry", + "type": "const git_reflog_entry *", + "comment": "a reflog entry" } ], - "argline": "git_remote *remote", - "sig": "git_remote *", + "argline": "const git_reflog_entry *entry", + "sig": "const git_reflog_entry *", "return": { - "type": "void", - "comment": null + "type": "const git_signature *", + "comment": " the committer" }, - "description": "Cancel the operation
\n", - "comments": "At certain points in its operation, the network code checks whether\n the operation has been cancelled and if so stops the operation.
\n", - "group": "remote" + "description": "Get the committer of this entry
\n", + "comments": "", + "group": "reflog" }, - "git_remote_disconnect": { + "git_reflog_entry_message": { "type": "function", - "file": "git2/remote.h", - "line": 391, - "lineto": 391, + "file": "git2/reflog.h", + "line": 159, + "lineto": 159, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote to disconnect from" + "name": "entry", + "type": "const git_reflog_entry *", + "comment": "a reflog entry" } ], - "argline": "git_remote *remote", - "sig": "git_remote *", - "return": { - "type": "void", - "comment": null - }, - "description": "Disconnect from the remote
\n", - "comments": "Close the connection to the remote.
\n", - "group": "remote" + "argline": "const git_reflog_entry *entry", + "sig": "const git_reflog_entry *", + "return": { "type": "const char *", "comment": " the log msg" }, + "description": "Get the log message
\n", + "comments": "", + "group": "reflog" }, - "git_remote_free": { + "git_reflog_free": { "type": "function", - "file": "git2/remote.h", - "line": 401, - "lineto": 401, + "file": "git2/reflog.h", + "line": 166, + "lineto": 166, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote to free" + "name": "reflog", + "type": "git_reflog *", + "comment": "reflog to free" } ], - "argline": "git_remote *remote", - "sig": "git_remote *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free the memory associated with a remote
\n", - "comments": "This also disconnects from the remote, if the connection\n has not been closed yet (using git_remote_disconnect).
\n", - "group": "remote", - "examples": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_free-6", - "ex/v0.28.0/network/fetch.html#git_remote_free-7" - ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_free-6" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_free-10" - ] - } + "argline": "git_reflog *reflog", + "sig": "git_reflog *", + "return": { "type": "void", "comment": null }, + "description": "Free the reflog
\n", + "comments": "", + "group": "reflog" }, - "git_remote_list": { + "git_reference_lookup": { "type": "function", - "file": "git2/remote.h", - "line": 412, - "lineto": 412, + "file": "git2/refs.h", + "line": 37, + "lineto": 37, "args": [ { "name": "out", - "type": "git_strarray *", - "comment": "a string array which receives the names of the remotes" + "type": "git_reference **", + "comment": "pointer to the looked-up reference" }, { "name": "repo", "type": "git_repository *", - "comment": "the repository to query" + "comment": "the repository to look up the reference" + }, + { + "name": "name", + "type": "const char *", + "comment": "the long name for the reference (e.g. HEAD, refs/heads/master, refs/tags/v0.1.0, ...)" } ], - "argline": "git_strarray *out, git_repository *repo", - "sig": "git_strarray *::git_repository *", + "argline": "git_reference **out, git_repository *repo, const char *name", + "sig": "git_reference **::git_repository *::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code." }, - "description": "Get a list of the configured remotes for a repo
\n", - "comments": "The string array must be freed by the user.
\n", - "group": "remote", + "description": "Lookup a reference by name in a repository.
\n", + "comments": "The returned reference must be freed by the user.
\n\nThe name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.
Initializes a git_remote_callbacks with default values. Equivalent to\n creating an instance with GIT_REMOTE_CALLBACKS_INIT.
Lookup a reference by name and resolve immediately to OID.
\n", + "comments": "This function provides a quick way to resolve a reference name straight through to the object id that it refers to. This avoids having to allocate or free any git_reference objects for simple situations.
The name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.
Initialize git_fetch_options structure
\n", - "comments": "Initializes a git_fetch_options with default values. Equivalent to\n creating an instance with GIT_FETCH_OPTIONS_INIT.
Lookup a reference by DWIMing its short name
\n", + "comments": "Apply the git precedence rules to the given shorthand to determine which reference the user is referring to.
\n", + "group": "reference", + "examples": { "merge.c": ["ex/v1.9.1/merge.html#git_reference_dwim-22"] } }, - "git_push_init_options": { + "git_reference_symbolic_create_matching": { "type": "function", - "file": "git2/remote.h", - "line": 732, - "lineto": 734, + "file": "git2/refs.h", + "line": 112, + "lineto": 112, "args": [ { - "name": "opts", - "type": "git_push_options *", - "comment": "The `git_push_options` struct to initialize." + "name": "out", + "type": "git_reference **", + "comment": "Pointer to the newly created reference" }, { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_PUSH_OPTIONS_VERSION`." + "name": "repo", + "type": "git_repository *", + "comment": "Repository where that reference will live" + }, + { + "name": "name", + "type": "const char *", + "comment": "The name of the reference" + }, + { + "name": "target", + "type": "const char *", + "comment": "The target of the reference" + }, + { + "name": "force", + "type": "int", + "comment": "Overwrite existing references" + }, + { + "name": "current_value", + "type": "const char *", + "comment": "The expected value of the reference when updating" + }, + { + "name": "log_message", + "type": "const char *", + "comment": "The one line long message to be appended to the reflog" } ], - "argline": "git_push_options *opts, unsigned int version", - "sig": "git_push_options *::unsigned int", + "argline": "git_reference **out, git_repository *repo, const char *name, const char *target, int force, const char *current_value, const char *log_message", + "sig": "git_reference **::git_repository *::const char *::const char *::int::const char *::const char *", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC, GIT_EMODIFIED or an error code" }, - "description": "Initialize git_push_options structure
\n", - "comments": "Initializes a git_push_options with default values. Equivalent to\n creating an instance with GIT_PUSH_OPTIONS_INIT.
Conditionally create a new symbolic reference.
\n", + "comments": "A symbolic reference is a reference name that refers to another reference name. If the other name moves, the symbolic name will move, too. As a simple example, the "HEAD" reference might refer to "refs/heads/master" while on the "master" branch of a repository.
\n\nThe symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n\nIt will return GIT_EMODIFIED if the reference's value at the time of updating does not match the one passed through current_value (i.e. if the ref has changed since the user read it).
If current_value is all zeros, this function will return GIT_EMODIFIED if the ref already exists.
Download and index the packfile
\n", - "comments": "Connect to the remote if it hasn't been done yet, negotiate with\n the remote git which objects are missing, download and index the\n packfile.
\n\nThe .idx file will be created and both it and the packfile with be\n renamed to their final name.
\n", - "group": "remote" + "description": "Create a new symbolic reference.
\n", + "comments": "A symbolic reference is a reference name that refers to another reference name. If the other name moves, the symbolic name will move, too. As a simple example, the "HEAD" reference might refer to "refs/heads/master" while on the "master" branch of a repository.
\n\nThe symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n", + "group": "reference" }, - "git_remote_upload": { + "git_reference_create": { "type": "function", - "file": "git2/remote.h", - "line": 766, - "lineto": 766, + "file": "git2/refs.h", + "line": 185, + "lineto": 185, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" + "name": "out", + "type": "git_reference **", + "comment": "Pointer to the newly created reference" }, { - "name": "refspecs", - "type": "const git_strarray *", - "comment": "the refspecs to use for this negotiation and\n upload. Use NULL or an empty array to use the base refspecs" + "name": "repo", + "type": "git_repository *", + "comment": "Repository where that reference will live" }, { - "name": "opts", - "type": "const git_push_options *", - "comment": "the options to use for this push" + "name": "name", + "type": "const char *", + "comment": "The name of the reference" + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "The object id pointed to by the reference." + }, + { + "name": "force", + "type": "int", + "comment": "Overwrite existing references" + }, + { + "name": "log_message", + "type": "const char *", + "comment": "The one line long message to be appended to the reflog" } ], - "argline": "git_remote *remote, const git_strarray *refspecs, const git_push_options *opts", - "sig": "git_remote *::const git_strarray *::const git_push_options *", + "argline": "git_reference **out, git_repository *repo, const char *name, const git_oid *id, int force, const char *log_message", + "sig": "git_reference **::git_repository *::const char *::const git_oid *::int::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" }, - "description": "Create a packfile and send it to the server
\n", - "comments": "Connect to the remote if it hasn't been done yet, negotiate with\n the remote git which objects are missing, create a packfile with the missing objects and send it.
\n", - "group": "remote" + "description": "Create a new direct reference.
\n", + "comments": "A direct reference (also called an object id reference) refers directly to a specific object id (a.k.a. OID or SHA) in the repository. The id permanently refers to the object (although the reference itself can be moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0" refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
\n\nThe direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n", + "group": "reference", + "examples": { + "merge.c": ["ex/v1.9.1/merge.html#git_reference_create-23"] + } }, - "git_remote_update_tips": { + "git_reference_create_matching": { "type": "function", - "file": "git2/remote.h", - "line": 782, - "lineto": 787, + "file": "git2/refs.h", + "line": 228, + "lineto": 228, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote to update" + "name": "out", + "type": "git_reference **", + "comment": "Pointer to the newly created reference" }, { - "name": "callbacks", - "type": "const git_remote_callbacks *", - "comment": "pointer to the callback structure to use" + "name": "repo", + "type": "git_repository *", + "comment": "Repository where that reference will live" + }, + { + "name": "name", + "type": "const char *", + "comment": "The name of the reference" + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "The object id pointed to by the reference." }, { - "name": "update_fetchhead", + "name": "force", "type": "int", - "comment": "whether to write to FETCH_HEAD. Pass 1 to behave like git." + "comment": "Overwrite existing references" }, { - "name": "download_tags", - "type": "git_remote_autotag_option_t", - "comment": "what the behaviour for downloading tags is for this fetch. This is\n ignored for push. This must be the same value passed to `git_remote_download()`." + "name": "current_id", + "type": "const git_oid *", + "comment": "The expected value of the reference at the time of update" }, { - "name": "reflog_message", + "name": "log_message", "type": "const char *", - "comment": "The message to insert into the reflogs. If\n NULL and fetching, the default is \"fetch \nUpdate the tips to the new state
\n", - "comments": "", - "group": "remote" + "description": "Conditionally create new direct reference
\n", + "comments": "A direct reference (also called an object id reference) refers directly to a specific object id (a.k.a. OID or SHA) in the repository. The id permanently refers to the object (although the reference itself can be moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0" refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.
\n\nThe direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.
\n\nValid reference names must follow one of two patterns:
\n\nThis function will return an error if a reference already exists with the given name unless force is true, in which case it will be overwritten.
The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n\nIt will return GIT_EMODIFIED if the reference's value at the time of updating does not match the one passed through current_id (i.e. if the ref has changed since the user read it).
Download new data and update tips
\n", - "comments": "Convenience function to connect to a remote, download the data,\n disconnect and update the remote-tracking branches.
\n", - "group": "remote", + "description": "Get the OID pointed to by a direct reference.
\n", + "comments": "Only available if the reference is direct (i.e. an object id reference, not a symbolic one).
\n\nTo find the OID of a symbolic ref, call git_reference_resolve() and then this function (or maybe use git_reference_name_to_id() to directly resolve a reference name all the way through to an OID).
Prune tracking refs that are no longer present on remote
\n", - "comments": "", - "group": "remote" + "description": "Return the peeled OID target of this reference.
\n", + "comments": "This peeled OID only applies to direct references that point to a hard Tag object: it is the result of peeling such Tag.
\n", + "group": "reference" }, - "git_remote_push": { + "git_reference_symbolic_target": { "type": "function", - "file": "git2/remote.h", - "line": 828, - "lineto": 830, + "file": "git2/refs.h", + "line": 264, + "lineto": 264, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": "the remote to push to" - }, - { - "name": "refspecs", - "type": "const git_strarray *", - "comment": "the refspecs to use for pushing. If NULL or an empty\n array, the configured refspecs will be used" - }, - { - "name": "opts", - "type": "const git_push_options *", - "comment": "options to use for this push" + "name": "ref", + "type": "const git_reference *", + "comment": "The reference" } ], - "argline": "git_remote *remote, const git_strarray *refspecs, const git_push_options *opts", - "sig": "git_remote *::const git_strarray *::const git_push_options *", + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { - "type": "int", - "comment": null + "type": "const char *", + "comment": " a pointer to the name if available, NULL otherwise" }, - "description": "Perform a push
\n", - "comments": "Peform all the steps from a push.
\n", - "group": "remote" + "description": "Get full name to the reference pointed to by a symbolic reference.
\n", + "comments": "Only available if the reference is symbolic.
\n", + "group": "reference", + "examples": { + "general.c": [ + "ex/v1.9.1/general.html#git_reference_symbolic_target-71" + ], + "merge.c": ["ex/v1.9.1/merge.html#git_reference_symbolic_target-24"] + } }, - "git_remote_stats": { + "git_reference_type": { "type": "function", - "file": "git2/remote.h", - "line": 835, - "lineto": 835, + "file": "git2/refs.h", + "line": 274, + "lineto": 274, "args": [ { - "name": "remote", - "type": "git_remote *", - "comment": null + "name": "ref", + "type": "const git_reference *", + "comment": "The reference" } ], - "argline": "git_remote *remote", - "sig": "git_remote *", + "argline": "const git_reference *ref", + "sig": "const git_reference *", + "return": { "type": "git_reference_t", "comment": " the type" }, + "description": "Get the type of a reference.
\n", + "comments": "Either direct (GIT_REFERENCE_DIRECT) or symbolic (GIT_REFERENCE_SYMBOLIC)
\n", + "group": "reference", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_reference_type-72"] + } + }, + "git_reference_name": { + "type": "function", + "file": "git2/refs.h", + "line": 284, + "lineto": 284, + "args": [ + { + "name": "ref", + "type": "const git_reference *", + "comment": "The reference" + } + ], + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { - "type": "const git_transfer_progress *", - "comment": null + "type": "const char *", + "comment": " the full name for the ref" }, - "description": "Get the statistics structure that is filled in by the fetch operation.
\n", - "comments": "", - "group": "remote", + "description": "Get the full name of a reference.
\n", + "comments": "See git_reference_symbolic_create() for rules about valid names.
Resolve a symbolic reference to a direct reference.
\n", + "comments": "This method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.
\n\nThe peeled reference is returned in the resolved_ref argument, and must be freed manually once it's no longer needed.
If a direct reference is passed as an argument, a copy of that reference is returned. This copy must be manually freed too.
\n", + "group": "reference" + }, + "git_reference_owner": { "type": "function", - "file": "git2/remote.h", - "line": 843, - "lineto": 843, + "file": "git2/refs.h", + "line": 310, + "lineto": 310, "args": [ { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote to query" + "name": "ref", + "type": "const git_reference *", + "comment": "The reference" } ], - "argline": "const git_remote *remote", - "sig": "const git_remote *", + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { - "type": "git_remote_autotag_option_t", - "comment": " the auto-follow setting" + "type": "git_repository *", + "comment": " a pointer to the repo" }, - "description": "Retrieve the tag auto-follow setting
\n", + "description": "Get the repository where a reference resides.
\n", "comments": "", - "group": "remote" + "group": "reference" }, - "git_remote_set_autotag": { + "git_reference_symbolic_set_target": { "type": "function", - "file": "git2/remote.h", - "line": 855, - "lineto": 855, + "file": "git2/refs.h", + "line": 332, + "lineto": 336, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to make the change" + "name": "out", + "type": "git_reference **", + "comment": "Pointer to the newly created reference" }, { - "name": "remote", + "name": "ref", + "type": "git_reference *", + "comment": "The reference" + }, + { + "name": "target", "type": "const char *", - "comment": "the name of the remote" + "comment": "The new target for the reference" }, { - "name": "value", - "type": "git_remote_autotag_option_t", - "comment": "the new value to take." + "name": "log_message", + "type": "const char *", + "comment": "The one line long message to be appended to the reflog" } ], - "argline": "git_repository *repo, const char *remote, git_remote_autotag_option_t value", - "sig": "git_repository *::const char *::git_remote_autotag_option_t", + "argline": "git_reference **out, git_reference *ref, const char *target, const char *log_message", + "sig": "git_reference **::git_reference *::const char *::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" }, - "description": "Set the remote's tag following setting.
\n", - "comments": "The change will be made in the configuration. No loaded remotes\n will be affected.
\n", - "group": "remote" + "description": "Create a new reference with the same name as the given reference but a\n different symbolic target. The reference must be a symbolic reference,\n otherwise this will fail.
\n", + "comments": "The new reference will be written to disk, overwriting the given reference.
\n\nThe target name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.
The message for the reflog will be ignored if the reference does not belong in the standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
\n", + "group": "reference" }, - "git_remote_prune_refs": { + "git_reference_set_target": { "type": "function", - "file": "git2/remote.h", - "line": 862, - "lineto": 862, + "file": "git2/refs.h", + "line": 352, + "lineto": 356, "args": [ { - "name": "remote", - "type": "const git_remote *", - "comment": "the remote to query" + "name": "out", + "type": "git_reference **", + "comment": "Pointer to the newly created reference" + }, + { + "name": "ref", + "type": "git_reference *", + "comment": "The reference" + }, + { + "name": "id", + "type": "const git_oid *", + "comment": "The new target OID for the reference" + }, + { + "name": "log_message", + "type": "const char *", + "comment": "The one line long message to be appended to the reflog" } ], - "argline": "const git_remote *remote", - "sig": "const git_remote *", + "argline": "git_reference **out, git_reference *ref, const git_oid *id, const char *log_message", + "sig": "git_reference **::git_reference *::const git_oid *::const char *", "return": { "type": "int", - "comment": " the ref-prune setting" + "comment": " 0 on success, GIT_EMODIFIED if the value of the reference\n has changed since it was read, or an error code" }, - "description": "Retrieve the ref-prune setting
\n", - "comments": "", - "group": "remote" + "description": "Conditionally create a new reference with the same name as the given reference but a\n different OID target. The reference must be a direct reference, otherwise\n this will fail.
\n", + "comments": "The new reference will be written to disk, overwriting the given reference.
\n", + "group": "reference", + "examples": { + "merge.c": ["ex/v1.9.1/merge.html#git_reference_set_target-26"] + } }, - "git_remote_rename": { + "git_reference_rename": { "type": "function", - "file": "git2/remote.h", - "line": 884, - "lineto": 888, + "file": "git2/refs.h", + "line": 382, + "lineto": 387, "args": [ { - "name": "problems", - "type": "git_strarray *", - "comment": "non-default refspecs cannot be renamed and will be\n stored here for further processing by the caller. Always free this\n strarray on successful return." + "name": "new_ref", + "type": "git_reference **", + "comment": "The new reference" }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to rename" + "name": "ref", + "type": "git_reference *", + "comment": "The reference to rename" }, { - "name": "name", + "name": "new_name", "type": "const char *", - "comment": "the current name of the remote" + "comment": "The new name for the reference" }, { - "name": "new_name", + "name": "force", + "type": "int", + "comment": "Overwrite an existing reference" + }, + { + "name": "log_message", "type": "const char *", - "comment": "the new name the remote should bear" + "comment": "The one line long message to be appended to the reflog" } ], - "argline": "git_strarray *problems, git_repository *repo, const char *name, const char *new_name", - "sig": "git_strarray *::git_repository *::const char *::const char *", + "argline": "git_reference **new_ref, git_reference *ref, const char *new_name, int force, const char *log_message", + "sig": "git_reference **::git_reference *::const char *::int::const char *", "return": { "type": "int", - "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" + "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, - "description": "Give the remote a new name
\n", - "comments": "All remote-tracking branches and configuration settings\n for the remote are updated.
\n\nThe new name will be checked for validity.\n See git_tag_create() for rules about valid names.
No loaded instances of a the remote with the old name will change\n their name or their list of refspecs.
\n", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_rename-12" - ] - } + "description": "Rename an existing reference.
\n", + "comments": "This method works for both direct and symbolic references.
\n\nThe new name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.
If the force flag is not enabled, and there's already a reference with the given name, the renaming will fail.
IMPORTANT: The user needs to write a proper reflog entry if the reflog is enabled for the repository. We only rename the reflog if it exists.
\n", + "group": "reference" }, - "git_remote_is_valid_name": { + "git_reference_delete": { "type": "function", - "file": "git2/remote.h", - "line": 896, - "lineto": 896, + "file": "git2/refs.h", + "line": 402, + "lineto": 402, "args": [ { - "name": "remote_name", - "type": "const char *", - "comment": "name to be checked." + "name": "ref", + "type": "git_reference *", + "comment": "The reference to remove" } ], - "argline": "const char *remote_name", - "sig": "const char *", + "argline": "git_reference *ref", + "sig": "git_reference *", "return": { "type": "int", - "comment": " 1 if the reference name is acceptable; 0 if it isn't" + "comment": " 0, GIT_EMODIFIED or an error code" }, - "description": "Ensure the remote name is well-formed.
\n", - "comments": "", - "group": "remote" + "description": "Delete an existing reference.
\n", + "comments": "This method works for both direct and symbolic references. The reference will be immediately removed on disk but the memory will not be freed. Callers must call git_reference_free.
This function will return an error if the reference has changed from the time it was looked up.
\n", + "group": "reference" }, - "git_remote_delete": { + "git_reference_remove": { "type": "function", - "file": "git2/remote.h", - "line": 908, - "lineto": 908, + "file": "git2/refs.h", + "line": 414, + "lineto": 414, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository in which to act" + "comment": "The repository to remove the reference from" }, { "name": "name", "type": "const char *", - "comment": "the name of the remote to delete" + "comment": "The reference to remove" } ], "argline": "git_repository *repo, const char *name", "sig": "git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code." - }, - "description": "Delete an existing persisted remote.
\n", - "comments": "All remote-tracking branches and configuration settings\n for the remote will be removed.
\n", - "group": "remote", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_delete-13" - ] - } + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Delete an existing reference by name
\n", + "comments": "This method removes the named reference from the repository without looking at its old value.
\n", + "group": "reference" }, - "git_remote_default_branch": { + "git_reference_list": { "type": "function", - "file": "git2/remote.h", - "line": 926, - "lineto": 926, + "file": "git2/refs.h", + "line": 428, + "lineto": 428, "args": [ { - "name": "out", - "type": "git_buf *", - "comment": "the buffern in which to store the reference name" + "name": "array", + "type": "git_strarray *", + "comment": "Pointer to a git_strarray structure where\n\t\tthe reference names will be stored" }, { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" + "name": "repo", + "type": "git_repository *", + "comment": "Repository where to find the refs" } ], - "argline": "git_buf *out, git_remote *remote", - "sig": "git_buf *::git_remote *", - "return": { - "type": "int", - "comment": " 0, GIT_ENOTFOUND if the remote does not have any references\n or none of them point to HEAD's commit, or an error message." - }, - "description": "Retrieve the name of the remote's default branch
\n", - "comments": "The default branch of a repository is the branch which HEAD points\n to. If the remote does not support reporting this information\n directly, it performs the guess as git does; that is, if there are\n multiple branches which point to the same commit, the first one is\n chosen. If the master branch is a candidate, it wins.
\n\nThis function must only be called after connecting.
\n", - "group": "remote" + "argline": "git_strarray *array, git_repository *repo", + "sig": "git_strarray *::git_repository *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Fill a list with all the references that can be found in a repository.
\n", + "comments": "The string array will be filled with the names of all references; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free().
Open a git repository.
\n", - "comments": "The 'path' argument must point to either a git repository\n folder, or an existing work dir.
\n\nThe method will automatically detect if 'path' is a normal\n or bare repository or fail is 'path' is neither.
\n", - "group": "repository", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_repository_open-68" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_repository_open-14" - ] - } + "description": "Perform a callback on each reference in the repository.
\n", + "comments": "The callback function will be called for each reference in the repository, receiving the reference object and the payload value passed to this method. Returning a non-zero value from the callback will terminate the iteration.
Note that the callback function is responsible to call git_reference_free on each reference passed to it.
Open working tree as a repository
\n", - "comments": "Open the working directory of the working tree as a normal\n repository that can then be worked on.
\n", - "group": "repository" + "description": "Perform a callback on the fully-qualified name of each reference.
\n", + "comments": "The callback function will be called for each reference in the repository, receiving the name of the reference and the payload value passed to this method. Returning a non-zero value from the callback will terminate the iteration.
Create a "fake" repository to wrap an object database
\n", - "comments": "Create a repository object to wrap an object database to be used\n with the API when all you have is an object database. This doesn't\n have any paths associated with it, so use with care.
\n", - "group": "repository" + "argline": "git_reference **dest, git_reference *source", + "sig": "git_reference **::git_reference *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a copy of an existing reference.
\n", + "comments": "Call git_reference_free to free the data.
Look for a git repository and copy its path in the given buffer.\n The lookup start from base_path and walk across parent directories\n if nothing has been found. The lookup ends when the first repository\n is found, or when reaching a directory referenced in ceiling_dirs\n or when the filesystem changes (in case across_fs is true).
\n", - "comments": "The method will automatically detect if the repository is bare\n (if there is a repository).
\n", - "group": "repository", + "argline": "git_reference *ref", + "sig": "git_reference *", + "return": { "type": "void", "comment": null }, + "description": "Free the given reference.
\n", + "comments": "", + "group": "reference", "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_repository_discover-15" - ] + "checkout.c": [ + "ex/v1.9.1/checkout.html#git_reference_free-18", + "ex/v1.9.1/checkout.html#git_reference_free-19", + "ex/v1.9.1/checkout.html#git_reference_free-20" + ], + "commit.c": ["ex/v1.9.1/commit.html#git_reference_free-7"], + "general.c": ["ex/v1.9.1/general.html#git_reference_free-74"], + "merge.c": [ + "ex/v1.9.1/merge.html#git_reference_free-27", + "ex/v1.9.1/merge.html#git_reference_free-28", + "ex/v1.9.1/merge.html#git_reference_free-29" + ], + "status.c": ["ex/v1.9.1/status.html#git_reference_free-1"] } }, - "git_repository_open_ext": { + "git_reference_cmp": { "type": "function", - "file": "git2/repository.h", - "line": 165, - "lineto": 169, + "file": "git2/refs.h", + "line": 516, + "lineto": 518, "args": [ { - "name": "out", - "type": "git_repository **", - "comment": "Pointer to the repo which will be opened. This can\n actually be NULL if you only want to use the error code to\n see if a repo at this path could be opened." - }, - { - "name": "path", - "type": "const char *", - "comment": "Path to open as git repository. If the flags\n permit \"searching\", then this can be a path to a subdirectory\n inside the working directory of the repository. May be NULL if\n flags is GIT_REPOSITORY_OPEN_FROM_ENV." - }, - { - "name": "flags", - "type": "unsigned int", - "comment": "A combination of the GIT_REPOSITORY_OPEN flags above." + "name": "ref1", + "type": "const git_reference *", + "comment": "The first git_reference" }, { - "name": "ceiling_dirs", - "type": "const char *", - "comment": "A GIT_PATH_LIST_SEPARATOR delimited list of path\n prefixes at which the search for a containing repository should\n terminate." + "name": "ref2", + "type": "const git_reference *", + "comment": "The second git_reference" } ], - "argline": "git_repository **out, const char *path, unsigned int flags, const char *ceiling_dirs", - "sig": "git_repository **::const char *::unsigned int::const char *", + "argline": "const git_reference *ref1, const git_reference *ref2", + "sig": "const git_reference *::const git_reference *", "return": { "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if no repository could be found,\n or -1 if there was a repository but open failed for some reason\n (such as repo corruption or system errors)." + "comment": " 0 if the same, else a stable but meaningless ordering." }, - "description": "Find and open a repository with extended controls.
\n", + "description": "Compare two references.
\n", "comments": "", - "group": "repository", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_repository_open_ext-24" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_repository_open_ext-31" - ], - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_open_ext-14" - ], - "describe.c": [ - "ex/v0.28.0/describe.html#git_repository_open_ext-8" - ], - "diff.c": [ - "ex/v0.28.0/diff.html#git_repository_open_ext-15" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_repository_open_ext-45", - "ex/v0.28.0/log.html#git_repository_open_ext-46" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_repository_open_ext-7" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_open_ext-33" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_repository_open_ext-16" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_repository_open_ext-5" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_repository_open_ext-11" - ] - } + "group": "reference" }, - "git_repository_open_bare": { + "git_reference_iterator_new": { "type": "function", - "file": "git2/repository.h", - "line": 182, - "lineto": 182, + "file": "git2/refs.h", + "line": 527, + "lineto": 529, "args": [ { "name": "out", - "type": "git_repository **", - "comment": "Pointer to the repo which will be opened." + "type": "git_reference_iterator **", + "comment": "pointer in which to store the iterator" }, { - "name": "bare_path", - "type": "const char *", - "comment": "Direct path to the bare repository" + "name": "repo", + "type": "git_repository *", + "comment": "the repository" } ], - "argline": "git_repository **out, const char *bare_path", - "sig": "git_repository **::const char *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, - "description": "Open a bare repository on the serverside.
\n", - "comments": "This is a fast open for bare repositories that will come in handy\n if you're e.g. hosting git repositories and need to access them\n efficiently
\n", - "group": "repository" + "argline": "git_reference_iterator **out, git_repository *repo", + "sig": "git_reference_iterator **::git_repository *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create an iterator for the repo's references
\n", + "comments": "", + "group": "reference" }, - "git_repository_free": { + "git_reference_iterator_glob_new": { "type": "function", - "file": "git2/repository.h", - "line": 195, - "lineto": 195, + "file": "git2/refs.h", + "line": 540, + "lineto": 543, "args": [ + { + "name": "out", + "type": "git_reference_iterator **", + "comment": "pointer in which to store the iterator" + }, { "name": "repo", "type": "git_repository *", - "comment": "repository handle to close. If NULL nothing occurs." + "comment": "the repository" + }, + { + "name": "glob", + "type": "const char *", + "comment": "the glob to match against the reference names" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free a previously allocated repository
\n", - "comments": "Note that after a repository is free'd, all the objects it has spawned\n will still exist until they are manually closed by the user\n with git_object_free, but accessing any of the attributes of\n an object without a backing repository will result in undefined\n behavior
Create an iterator for the repo's references that match the\n specified glob
\n", + "comments": "", + "group": "reference" }, - "git_repository_init": { + "git_reference_next": { "type": "function", - "file": "git2/repository.h", - "line": 212, - "lineto": 215, + "file": "git2/refs.h", + "line": 552, + "lineto": 552, "args": [ { "name": "out", - "type": "git_repository **", - "comment": "pointer to the repo which will be created or reinitialized" - }, - { - "name": "path", - "type": "const char *", - "comment": "the path to the repository" + "type": "git_reference **", + "comment": "pointer in which to store the reference" }, { - "name": "is_bare", - "type": "unsigned int", - "comment": "if true, a Git repository without a working directory is\n\t\tcreated at the pointed path. If false, provided path will be\n\t\tconsidered as the working directory into which the .git directory\n\t\twill be created." + "name": "iter", + "type": "git_reference_iterator *", + "comment": "the iterator" } ], - "argline": "git_repository **out, const char *path, unsigned int is_bare", - "sig": "git_repository **::const char *::unsigned int", + "argline": "git_reference **out, git_reference_iterator *iter", + "sig": "git_reference **::git_reference_iterator *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0, GIT_ITEROVER if there are no more; or an error code" }, - "description": "Creates a new Git repository in the given folder.
\n", - "comments": "TODO:\n - Reinit the repository
\n", - "group": "repository", - "examples": { - "init.c": [ - "ex/v0.28.0/init.html#git_repository_init-7" - ] - } + "description": "Get the next reference
\n", + "comments": "", + "group": "reference" }, - "git_repository_init_init_options": { + "git_reference_next_name": { "type": "function", - "file": "git2/repository.h", - "line": 326, - "lineto": 328, + "file": "git2/refs.h", + "line": 565, + "lineto": 565, "args": [ { - "name": "opts", - "type": "git_repository_init_options *", - "comment": "The `git_repository_init_options` struct to initialize." + "name": "out", + "type": "const char **", + "comment": "pointer in which to store the string" }, { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`." + "name": "iter", + "type": "git_reference_iterator *", + "comment": "the iterator" } ], - "argline": "git_repository_init_options *opts, unsigned int version", - "sig": "git_repository_init_options *::unsigned int", + "argline": "const char **out, git_reference_iterator *iter", + "sig": "const char **::git_reference_iterator *", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0, GIT_ITEROVER if there are no more; or an error code" }, - "description": "Initialize git_repository_init_options structure
\n", - "comments": "Initializes a git_repository_init_options with default values. Equivalent to\n creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.
Get the next reference's name
\n", + "comments": "This function is provided for convenience in case only the names are interesting as it avoids the allocation of the git_reference object which git_reference_next() needs.
Free the iterator and its associated resources
\n", + "comments": "", + "group": "reference" + }, + "git_reference_foreach_glob": { + "type": "function", + "file": "git2/refs.h", + "line": 592, + "lineto": 596, + "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "Repository where to find the refs" }, { - "name": "repo_path", + "name": "glob", "type": "const char *", - "comment": "The path to the repository." + "comment": "Pattern to match (fnmatch-style) against reference name." }, { - "name": "opts", - "type": "git_repository_init_options *", - "comment": "Pointer to git_repository_init_options struct." + "name": "callback", + "type": "git_reference_foreach_name_cb", + "comment": "Function which will be called for every listed ref" + }, + { + "name": "payload", + "type": "void *", + "comment": "Additional data to pass to the callback" } ], - "argline": "git_repository **out, const char *repo_path, git_repository_init_options *opts", - "sig": "git_repository **::const char *::git_repository_init_options *", + "argline": "git_repository *repo, const char *glob, git_reference_foreach_name_cb callback, void *payload", + "sig": "git_repository *::const char *::git_reference_foreach_name_cb::void *", "return": { "type": "int", - "comment": " 0 or an error code on failure." + "comment": " 0 on success, GIT_EUSER on non-zero callback, or error code" }, - "description": "Create a new Git repository in the given folder with extended controls.
\n", - "comments": "This will initialize a new git repository (creating the repo_path\n if requested by flags) and working directory as needed. It will\n auto-detect the case sensitivity of the file system and if the\n file system supports file mode bits correctly.
\n", - "group": "repository", - "examples": { - "init.c": [ - "ex/v0.28.0/init.html#git_repository_init_ext-8" - ] - } + "description": "Perform a callback on each reference in the repository whose name\n matches the given pattern.
\n", + "comments": "This function acts like git_reference_foreach() with an additional pattern match being applied to the reference name before issuing the callback function. See that function for more information.
The pattern is matched using fnmatch or "glob" style where a '*' matches any sequence of letters, a '?' matches any letter, and square brackets can be used to define character ranges (such as "[0-9]" for digits).
\n", + "group": "reference" }, - "git_repository_head": { + "git_reference_has_log": { "type": "function", - "file": "git2/repository.h", - "line": 361, - "lineto": 361, + "file": "git2/refs.h", + "line": 606, + "lineto": 606, "args": [ - { - "name": "out", - "type": "git_reference **", - "comment": "pointer to the reference which will be retrieved" - }, { "name": "repo", "type": "git_repository *", - "comment": "a repository object" + "comment": "the repository" + }, + { + "name": "refname", + "type": "const char *", + "comment": "the reference's name" } ], - "argline": "git_reference **out, git_repository *repo", - "sig": "git_reference **::git_repository *", + "argline": "git_repository *repo, const char *refname", + "sig": "git_repository *::const char *", "return": { "type": "int", - "comment": " 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise" + "comment": " 0 when no reflog can be found, 1 when it exists;\n otherwise an error code." }, - "description": "Retrieve and resolve the reference pointed at by HEAD.
\n", - "comments": "The returned git_reference will be owned by caller and\n git_reference_free() must be called when done with it to release the\n allocated memory and prevent a leak.
Check if a reflog exists for the specified reference.
\n", + "comments": "", + "group": "reference" }, - "git_repository_head_for_worktree": { + "git_reference_ensure_log": { "type": "function", - "file": "git2/repository.h", - "line": 371, - "lineto": 372, + "file": "git2/refs.h", + "line": 618, + "lineto": 618, "args": [ - { - "name": "out", - "type": "git_reference **", - "comment": "pointer to the reference which will be retrieved" - }, { "name": "repo", "type": "git_repository *", - "comment": "a repository object" + "comment": "the repository" }, { - "name": "name", + "name": "refname", "type": "const char *", - "comment": "name of the worktree to retrieve HEAD for" + "comment": "the reference's name" } ], - "argline": "git_reference **out, git_repository *repo, const char *name", - "sig": "git_reference **::git_repository *::const char *", + "argline": "git_repository *repo, const char *refname", + "sig": "git_repository *::const char *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Ensure there is a reflog for a particular reference.
\n", + "comments": "Make sure that successive updates to the reference will append to its log.
\n", + "group": "reference" + }, + "git_reference_is_branch": { + "type": "function", + "file": "git2/refs.h", + "line": 628, + "lineto": 628, + "args": [ + { + "name": "ref", + "type": "const git_reference *", + "comment": "A git reference" + } + ], + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { "type": "int", - "comment": " 0 when successful, error-code otherwise" + "comment": " 1 when the reference lives in the refs/heads\n namespace; 0 otherwise." }, - "description": "Retrieve the referenced HEAD for the worktree
\n", + "description": "Check if a reference is a local branch.
\n", "comments": "", - "group": "repository" + "group": "reference" }, - "git_repository_head_detached": { + "git_reference_is_remote": { "type": "function", - "file": "git2/repository.h", - "line": 384, - "lineto": 384, + "file": "git2/refs.h", + "line": 638, + "lineto": 638, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repo to test" + "name": "ref", + "type": "const git_reference *", + "comment": "A git reference" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { "type": "int", - "comment": " 1 if HEAD is detached, 0 if it's not; error code if there\n was an error." + "comment": " 1 when the reference lives in the refs/remotes\n namespace; 0 otherwise." }, - "description": "Check if a repository's HEAD is detached
\n", - "comments": "A repository's HEAD is detached when it points directly to a commit\n instead of a branch.
\n", - "group": "repository" + "description": "Check if a reference is a remote tracking branch
\n", + "comments": "", + "group": "reference", + "examples": { + "checkout.c": ["ex/v1.9.1/checkout.html#git_reference_is_remote-21"] + } }, - "git_repository_head_detached_for_worktree": { + "git_reference_is_tag": { "type": "function", - "file": "git2/repository.h", - "line": 397, - "lineto": 398, + "file": "git2/refs.h", + "line": 648, + "lineto": 648, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "a repository object" - }, - { - "name": "name", - "type": "const char *", - "comment": "name of the worktree to retrieve HEAD for" + "name": "ref", + "type": "const git_reference *", + "comment": "A git reference" } ], - "argline": "git_repository *repo, const char *name", - "sig": "git_repository *::const char *", + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { "type": "int", - "comment": " 1 if HEAD is detached, 0 if its not; error code if\n there was an error" + "comment": " 1 when the reference lives in the refs/tags\n namespace; 0 otherwise." }, - "description": "Check if a worktree's HEAD is detached
\n", - "comments": "A worktree's HEAD is detached when it points directly to a\n commit instead of a branch.
\n", - "group": "repository" + "description": "Check if a reference is a tag
\n", + "comments": "", + "group": "reference" }, - "git_repository_head_unborn": { + "git_reference_is_note": { "type": "function", - "file": "git2/repository.h", - "line": 410, - "lineto": 410, + "file": "git2/refs.h", + "line": 658, + "lineto": 658, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repo to test" + "name": "ref", + "type": "const git_reference *", + "comment": "A git reference" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", + "argline": "const git_reference *ref", + "sig": "const git_reference *", "return": { "type": "int", - "comment": " 1 if the current branch is unborn, 0 if it's not; error\n code if there was an error" + "comment": " 1 when the reference lives in the refs/notes\n namespace; 0 otherwise." }, - "description": "Check if the current branch is unborn
\n", - "comments": "An unborn branch is one named from HEAD but which doesn't exist in\n the refs namespace, because it doesn't have any commit to point to.
\n", - "group": "repository" + "description": "Check if a reference is a note
\n", + "comments": "", + "group": "reference" }, - "git_repository_is_empty": { + "git_reference_normalize_name": { "type": "function", - "file": "git2/repository.h", - "line": 422, - "lineto": 422, + "file": "git2/refs.h", + "line": 714, + "lineto": 718, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repo to test" + "name": "buffer_out", + "type": "char *", + "comment": "User allocated buffer to store normalized name" + }, + { + "name": "buffer_size", + "type": "size_t", + "comment": "Size of buffer_out" + }, + { + "name": "name", + "type": "const char *", + "comment": "Reference name to be checked." + }, + { + "name": "flags", + "type": "unsigned int", + "comment": "Flags to constrain name validation rules - see the\n GIT_REFERENCE_FORMAT constants above." } ], - "argline": "git_repository *repo", - "sig": "git_repository *", + "argline": "char *buffer_out, size_t buffer_size, const char *name, unsigned int flags", + "sig": "char *::size_t::const char *::unsigned int", "return": { "type": "int", - "comment": " 1 if the repository is empty, 0 if it isn't, error code\n if the repository is corrupted" + "comment": " 0 on success, GIT_EBUFS if buffer is too small, GIT_EINVALIDSPEC\n or an error code." }, - "description": "Check if a repository is empty
\n", - "comments": "An empty repository has just been initialized and contains no references\n apart from HEAD, which must be pointing to the unborn master branch.
\n", - "group": "repository" + "description": "Normalize reference name and check validity.
\n", + "comments": "This will normalize the reference name by removing any leading slash '/' characters and collapsing runs of adjacent slashes between name components into a single slash.
\n\nOnce normalized, if the reference name is valid, it will be returned in the user allocated buffer.
\n\nSee git_reference_symbolic_create() for rules about valid names.
Get the location of a specific repository file or directory
\n", - "comments": "This function will retrieve the path of a specific repository\n item. It will thereby honor things like the repository's\n common directory, gitdir, etc. In case a file path cannot\n exist for a given item (e.g. the working directory of a bare\n repository), GIT_ENOTFOUND is returned.
\n", - "group": "repository" + "description": "Recursively peel reference until object of the specified type is found.
\n", + "comments": "The retrieved peeled object is owned by the repository and should be closed with the git_object_free method.
If you pass GIT_OBJECT_ANY as the target type, then the object will be peeled until a non-tag object is met.
Get the path of this repository
\n", - "comments": "This is the path of the .git folder for normal repositories,\n or of the repository itself for bare repositories.
Ensure the reference name is well-formed.
\n", + "comments": "Valid reference names must follow one of two patterns:
\n\nGet the path of the working directory for this repository
\n", - "comments": "If the repository is bare, this function will always return\n NULL.
\n", - "group": "repository", + "description": "Get the reference's short name
\n", + "comments": "This will transform the reference name into a name "human-readable" version. If no shortname is appropriate, it will return the full name.
\n\nThe memory is owned by the reference and must not be freed.
\n", + "group": "reference", "examples": { - "init.c": [ - "ex/v0.28.0/init.html#git_repository_workdir-10" - ] + "status.c": ["ex/v1.9.1/status.html#git_reference_shorthand-2"] } }, - "git_repository_commondir": { + "git_refspec_parse": { "type": "function", - "file": "git2/repository.h", - "line": 491, - "lineto": 491, + "file": "git2/refspec.h", + "line": 32, + "lineto": 32, "args": [ { - "name": "repo", - "type": "const git_repository *", - "comment": "A repository object" + "name": "refspec", + "type": "git_refspec **", + "comment": "a pointer to hold the refspec handle" + }, + { + "name": "input", + "type": "const char *", + "comment": "the refspec string" + }, + { + "name": "is_fetch", + "type": "int", + "comment": "is this a refspec for a fetch" } ], - "argline": "const git_repository *repo", - "sig": "const git_repository *", + "argline": "git_refspec **refspec, const char *input, int is_fetch", + "sig": "git_refspec **::const char *::int", "return": { - "type": "const char *", - "comment": " the path to the common dir" + "type": "int", + "comment": " 0 if the refspec string could be parsed, -1 otherwise" }, - "description": "Get the path of the shared common directory for this repository
\n", - "comments": "If the repository is bare is not a worktree, the git directory\n path is returned.
\n", - "group": "repository" + "description": "Parse a given refspec string
\n", + "comments": "", + "group": "refspec" }, - "git_repository_set_workdir": { + "git_refspec_free": { "type": "function", - "file": "git2/repository.h", - "line": 510, - "lineto": 511, + "file": "git2/refspec.h", + "line": 39, + "lineto": 39, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "workdir", - "type": "const char *", - "comment": "The path to a working directory" - }, + "name": "refspec", + "type": "git_refspec *", + "comment": "the refspec object" + } + ], + "argline": "git_refspec *refspec", + "sig": "git_refspec *", + "return": { "type": "void", "comment": null }, + "description": "Free a refspec object which has been created by git_refspec_parse
\n", + "comments": "", + "group": "refspec" + }, + "git_refspec_src": { + "type": "function", + "file": "git2/refspec.h", + "line": 47, + "lineto": 47, + "args": [ { - "name": "update_gitlink", - "type": "int", - "comment": "Create/update gitlink in workdir and set config\n \"core.worktree\" (if workdir is not the parent of the .git directory)" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" } ], - "argline": "git_repository *repo, const char *workdir, int update_gitlink", - "sig": "git_repository *::const char *::int", + "argline": "const git_refspec *refspec", + "sig": "const git_refspec *", "return": { - "type": "int", - "comment": " 0, or an error code" + "type": "const char *", + "comment": " the refspec's source specifier" }, - "description": "Set the path to the working directory for this repository
\n", - "comments": "The working directory doesn't need to be the same one\n that contains the .git folder for this repository.
If this repository is bare, setting its working directory\n will turn it into a normal repository, capable of performing\n all the common workdir operations (checkout, status, index\n manipulation, etc).
\n", - "group": "repository" + "description": "Get the source specifier
\n", + "comments": "", + "group": "refspec" }, - "git_repository_is_bare": { + "git_refspec_dst": { "type": "function", - "file": "git2/repository.h", - "line": 519, - "lineto": 519, + "file": "git2/refspec.h", + "line": 55, + "lineto": 55, "args": [ { - "name": "repo", - "type": "const git_repository *", - "comment": "Repo to test" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" } ], - "argline": "const git_repository *repo", - "sig": "const git_repository *", + "argline": "const git_refspec *refspec", + "sig": "const git_refspec *", "return": { - "type": "int", - "comment": " 1 if the repository is bare, 0 otherwise." + "type": "const char *", + "comment": " the refspec's destination specifier" }, - "description": "Check if a repository is bare
\n", + "description": "Get the destination specifier
\n", "comments": "", - "group": "repository", - "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_repository_is_bare-9" - ] - } + "group": "refspec" }, - "git_repository_is_worktree": { + "git_refspec_string": { "type": "function", - "file": "git2/repository.h", - "line": 527, - "lineto": 527, + "file": "git2/refspec.h", + "line": 63, + "lineto": 63, "args": [ { - "name": "repo", - "type": "const git_repository *", - "comment": "Repo to test" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" } ], - "argline": "const git_repository *repo", - "sig": "const git_repository *", + "argline": "const git_refspec *refspec", + "sig": "const git_refspec *", "return": { - "type": "int", - "comment": " 1 if the repository is a linked work tree, 0 otherwise." + "type": "const char *", + "comment": " the refspec's original string" }, - "description": "Check if a repository is a linked work tree
\n", + "description": "Get the refspec's string
\n", "comments": "", - "group": "repository" + "group": "refspec" }, - "git_repository_config": { + "git_refspec_force": { "type": "function", - "file": "git2/repository.h", - "line": 543, - "lineto": 543, + "file": "git2/refspec.h", + "line": 71, + "lineto": 71, "args": [ { - "name": "out", - "type": "git_config **", - "comment": "Pointer to store the loaded configuration" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" } ], - "argline": "git_config **out, git_repository *repo", - "sig": "git_config **::git_repository *", + "argline": "const git_refspec *refspec", + "sig": "const git_refspec *", "return": { "type": "int", - "comment": " 0, or an error code" + "comment": " 1 if force update has been set, 0 otherwise" }, - "description": "Get the configuration file for this repository.
\n", - "comments": "If a configuration file has not been set, the default\n config set for the repository will be returned, including\n global and system configurations (if they are available).
\n\nThe configuration file must be freed once it's no longer\n being used by the user.
\n", - "group": "repository" + "description": "Get the force update setting
\n", + "comments": "", + "group": "refspec" }, - "git_repository_config_snapshot": { + "git_refspec_direction": { "type": "function", - "file": "git2/repository.h", - "line": 559, - "lineto": 559, + "file": "git2/refspec.h", + "line": 79, + "lineto": 79, "args": [ - { - "name": "out", - "type": "git_config **", - "comment": "Pointer to store the loaded configuration" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository" - } + { "name": "spec", "type": "const git_refspec *", "comment": "refspec" } ], - "argline": "git_config **out, git_repository *repo", - "sig": "git_config **::git_repository *", + "argline": "const git_refspec *spec", + "sig": "const git_refspec *", "return": { - "type": "int", - "comment": " 0, or an error code" + "type": "git_direction", + "comment": " GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH" }, - "description": "Get a snapshot of the repository's configuration
\n", - "comments": "Convenience function to take a snapshot from the repository's\n configuration. The contents of this snapshot will not change,\n even if the underlying config files are modified.
\n\nThe configuration file must be freed once it's no longer\n being used by the user.
\n", - "group": "repository", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_repository_config_snapshot-70", - "ex/v0.28.0/general.html#git_repository_config_snapshot-71" - ] - } + "description": "Get the refspec's direction.
\n", + "comments": "", + "group": "refspec" }, - "git_repository_odb": { + "git_refspec_src_matches_negative": { "type": "function", - "file": "git2/repository.h", - "line": 575, - "lineto": 575, + "file": "git2/refspec.h", + "line": 88, + "lineto": 88, "args": [ { - "name": "out", - "type": "git_odb **", - "comment": "Pointer to store the loaded ODB" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" }, { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" + "name": "refname", + "type": "const char *", + "comment": "the name of the reference to check" } ], - "argline": "git_odb **out, git_repository *repo", - "sig": "git_odb **::git_repository *", + "argline": "const git_refspec *refspec, const char *refname", + "sig": "const git_refspec *::const char *", "return": { "type": "int", - "comment": " 0, or an error code" + "comment": " 1 if the refspec matches, 0 otherwise" }, - "description": "Get the Object Database for this repository.
\n", - "comments": "If a custom ODB has not been set, the default\n database for the repository will be returned (the one\n located in .git/objects).
The ODB must be freed once it's no longer being used by\n the user.
\n", - "group": "repository", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_repository_odb-33" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_repository_odb-72" - ] - } + "description": "Check if a refspec's source descriptor matches a negative reference
\n", + "comments": "", + "group": "refspec" }, - "git_repository_refdb": { + "git_refspec_src_matches": { "type": "function", - "file": "git2/repository.h", - "line": 591, - "lineto": 591, + "file": "git2/refspec.h", + "line": 97, + "lineto": 97, "args": [ { - "name": "out", - "type": "git_refdb **", - "comment": "Pointer to store the loaded refdb" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" }, { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" + "name": "refname", + "type": "const char *", + "comment": "the name of the reference to check" } ], - "argline": "git_refdb **out, git_repository *repo", - "sig": "git_refdb **::git_repository *", + "argline": "const git_refspec *refspec, const char *refname", + "sig": "const git_refspec *::const char *", "return": { "type": "int", - "comment": " 0, or an error code" + "comment": " 1 if the refspec matches, 0 otherwise" }, - "description": "Get the Reference Database Backend for this repository.
\n", - "comments": "If a custom refsdb has not been set, the default database for\n the repository will be returned (the one that manipulates loose\n and packed references in the .git directory).
The refdb must be freed once it's no longer being used by\n the user.
\n", - "group": "repository" + "description": "Check if a refspec's source descriptor matches a reference
\n", + "comments": "", + "group": "refspec" }, - "git_repository_index": { + "git_refspec_dst_matches": { "type": "function", - "file": "git2/repository.h", - "line": 607, - "lineto": 607, + "file": "git2/refspec.h", + "line": 106, + "lineto": 106, "args": [ { - "name": "out", - "type": "git_index **", - "comment": "Pointer to store the loaded index" + "name": "refspec", + "type": "const git_refspec *", + "comment": "the refspec" }, { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" + "name": "refname", + "type": "const char *", + "comment": "the name of the reference to check" } ], - "argline": "git_index **out, git_repository *repo", - "sig": "git_index **::git_repository *", + "argline": "const git_refspec *refspec, const char *refname", + "sig": "const git_refspec *::const char *", "return": { "type": "int", - "comment": " 0, or an error code" + "comment": " 1 if the refspec matches, 0 otherwise" }, - "description": "Get the Index file for this repository.
\n", - "comments": "If a custom index has not been set, the default\n index for the repository will be returned (the one\n located in .git/index).
The index must be freed once it's no longer being used by\n the user.
\n", - "group": "repository", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_repository_index-73" - ], - "init.c": [ - "ex/v0.28.0/init.html#git_repository_index-11" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_repository_index-9" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_index-37" - ] - } + "description": "Check if a refspec's destination descriptor matches a reference
\n", + "comments": "", + "group": "refspec" }, - "git_repository_message": { + "git_refspec_transform": { "type": "function", - "file": "git2/repository.h", - "line": 625, - "lineto": 625, + "file": "git2/refspec.h", + "line": 116, + "lineto": 116, "args": [ { "name": "out", "type": "git_buf *", - "comment": "git_buf to write data into" + "comment": "where to store the target name" }, { - "name": "repo", - "type": "git_repository *", - "comment": "Repository to read prepared message from" - } - ], - "argline": "git_buf *out, git_repository *repo", - "sig": "git_buf *::git_repository *", - "return": { - "type": "int", - "comment": " 0, GIT_ENOTFOUND if no message exists or an error code" - }, - "description": "Retrieve git's prepared message
\n", - "comments": "Operations such as git revert/cherry-pick/merge with the -n option\n stop just short of creating a commit with the changes and save\n their prepared message in .git/MERGE_MSG so the next git-commit\n execution can present it to the user for them to amend if they\n wish.
\n\nUse this function to get the contents of this file. Don't forget to\n remove the file after you create the commit.
\n", - "group": "repository" - }, - "git_repository_message_remove": { - "type": "function", - "file": "git2/repository.h", - "line": 632, - "lineto": 632, - "args": [ + "name": "spec", + "type": "const git_refspec *", + "comment": "the refspec" + }, { - "name": "repo", - "type": "git_repository *", - "comment": null + "name": "name", + "type": "const char *", + "comment": "the name of the reference to transform" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": null - }, - "description": "Remove git's prepared message.
\n", - "comments": "Remove the message that git_repository_message retrieves.
Transform a reference to its target following the refspec's rules
\n", + "comments": "", + "group": "refspec" }, - "git_repository_state_cleanup": { + "git_refspec_rtransform": { "type": "function", - "file": "git2/repository.h", - "line": 641, - "lineto": 641, + "file": "git2/refspec.h", + "line": 126, + "lineto": 126, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" + "name": "out", + "type": "git_buf *", + "comment": "where to store the source reference name" + }, + { + "name": "spec", + "type": "const git_refspec *", + "comment": "the refspec" + }, + { + "name": "name", + "type": "const char *", + "comment": "the name of the reference to transform" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, or error" - }, - "description": "Remove all the metadata associated with an ongoing command like merge,\n revert, cherry-pick, etc. For example: MERGE_HEAD, MERGE_MSG, etc.
\n", + "argline": "git_buf *out, const git_refspec *spec, const char *name", + "sig": "git_buf *::const git_refspec *::const char *", + "return": { "type": "int", "comment": " 0, GIT_EBUFS or another error" }, + "description": "Transform a target reference to its source reference following the refspec's rules
\n", "comments": "", - "group": "repository", + "group": "refspec", "examples": { - "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_state_cleanup-38" - ] + "fetch.c": ["ex/v1.9.1/fetch.html#git_refspec_rtransform-4"] } }, - "git_repository_fetchhead_foreach": { + "git_remote_create": { "type": "function", - "file": "git2/repository.h", - "line": 660, - "lineto": 663, + "file": "git2/remote.h", + "line": 38, + "lineto": 42, "args": [ + { + "name": "out", + "type": "git_remote **", + "comment": "the resulting remote" + }, { "name": "repo", "type": "git_repository *", - "comment": "A repository object" + "comment": "the repository in which to create the remote" }, { - "name": "callback", - "type": "git_repository_fetchhead_foreach_cb", - "comment": "Callback function" + "name": "name", + "type": "const char *", + "comment": "the remote's name" }, - { - "name": "payload", - "type": "void *", - "comment": "Pointer to callback data (optional)" - } + { "name": "url", "type": "const char *", "comment": "the remote's url" } ], - "argline": "git_repository *repo, git_repository_fetchhead_foreach_cb callback, void *payload", - "sig": "git_repository *::git_repository_fetchhead_foreach_cb::void *", + "argline": "git_remote **out, git_repository *repo, const char *name, const char *url", + "sig": "git_remote **::git_repository *::const char *::const char *", "return": { "type": "int", - "comment": " 0 on success, non-zero callback return value, GIT_ENOTFOUND if\n there is no FETCH_HEAD file, or other error code." + "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, - "description": "Invoke 'callback' for each entry in the given FETCH_HEAD file.
\n", - "comments": "Return a non-zero value from the callback to stop the loop.
\n", - "group": "repository" + "description": "Add a remote with the default fetch refspec to the repository's configuration.
\n", + "comments": "", + "group": "remote", + "examples": { "remote.c": ["ex/v1.9.1/remote.html#git_remote_create-1"] } }, - "git_repository_mergehead_foreach": { + "git_remote_create_options_init": { "type": "function", - "file": "git2/repository.h", - "line": 680, - "lineto": 683, + "file": "git2/remote.h", + "line": 135, + "lineto": 137, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "callback", - "type": "git_repository_mergehead_foreach_cb", - "comment": "Callback function" + "name": "opts", + "type": "git_remote_create_options *", + "comment": "The `git_remote_create_options` struct to initialize." }, { - "name": "payload", - "type": "void *", - "comment": "Pointer to callback data (optional)" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_REMOTE_CREATE_OPTIONS_VERSION`." } ], - "argline": "git_repository *repo, git_repository_mergehead_foreach_cb callback, void *payload", - "sig": "git_repository *::git_repository_mergehead_foreach_cb::void *", + "argline": "git_remote_create_options *opts, unsigned int version", + "sig": "git_remote_create_options *::unsigned int", "return": { "type": "int", - "comment": " 0 on success, non-zero callback return value, GIT_ENOTFOUND if\n there is no MERGE_HEAD file, or other error code." + "comment": " Zero on success; -1 on failure." }, - "description": "If a merge is in progress, invoke 'callback' for each commit ID in the\n MERGE_HEAD file.
\n", - "comments": "Return a non-zero value from the callback to stop the loop.
\n", - "group": "repository" + "description": "Initialize git_remote_create_options structure
\n", + "comments": "Initializes a git_remote_create_options with default values. Equivalent to creating an instance with GIT_REMOTE_CREATE_OPTIONS_INIT.
Calculate hash of file using repository filtering rules.
\n", - "comments": "If you simply want to calculate the hash of a file on disk with no filters,\n you can just use the git_odb_hashfile() API. However, if you want to\n hash a file in the repository and you want to apply filtering rules (e.g.\n crlf filters) before generating the SHA, then use this function.
Note: if the repository has core.safecrlf set to fail and the\n filtering triggers that failure, then this function will return an\n error and not calculate the hash of the file.
Create a remote, with options.
\n", + "comments": "This function allows more fine-grained control over the remote creation.
\n\nPassing NULL as the opts argument will result in a detached remote.
\n", + "group": "remote" }, - "git_repository_set_head": { + "git_remote_create_with_fetchspec": { "type": "function", - "file": "git2/repository.h", - "line": 733, - "lineto": 735, + "file": "git2/remote.h", + "line": 167, + "lineto": 172, "args": [ + { + "name": "out", + "type": "git_remote **", + "comment": "the resulting remote" + }, { "name": "repo", "type": "git_repository *", - "comment": "Repository pointer" + "comment": "the repository in which to create the remote" }, { - "name": "refname", + "name": "name", "type": "const char *", - "comment": "Canonical name of the reference the HEAD should point at" - } - ], - "argline": "git_repository *repo, const char *refname", - "sig": "git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, - "description": "Make the repository HEAD point to the specified reference.
\n", - "comments": "If the provided reference points to a Tree or a Blob, the HEAD is\n unaltered and -1 is returned.
\n\nIf the provided reference points to a branch, the HEAD will point\n to that branch, staying attached, or become attached if it isn't yet.\n If the branch doesn't exist yet, no error will be return. The HEAD\n will then be attached to an unborn branch.
\n\nOtherwise, the HEAD will be detached and will directly point to\n the Commit.
\n", - "group": "repository", - "examples": { - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_set_head-16" - ] - } - }, - "git_repository_set_head_detached": { - "type": "function", - "file": "git2/repository.h", - "line": 753, - "lineto": 755, - "args": [ + "comment": "the remote's name" + }, { - "name": "repo", - "type": "git_repository *", - "comment": "Repository pointer" + "name": "url", + "type": "const char *", + "comment": "the remote's url" }, { - "name": "commitish", - "type": "const git_oid *", - "comment": "Object id of the Commit the HEAD should point to" + "name": "fetch", + "type": "const char *", + "comment": "the remote fetch value" } ], - "argline": "git_repository *repo, const git_oid *commitish", - "sig": "git_repository *::const git_oid *", + "argline": "git_remote **out, git_repository *repo, const char *name, const char *url, const char *fetch", + "sig": "git_remote **::git_repository *::const char *::const char *::const char *", "return": { "type": "int", - "comment": " 0 on success, or an error code" + "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, - "description": "Make the repository HEAD directly point to the Commit.
\n", - "comments": "If the provided committish cannot be found in the repository, the HEAD\n is unaltered and GIT_ENOTFOUND is returned.
\n\nIf the provided commitish cannot be peeled into a commit, the HEAD\n is unaltered and -1 is returned.
\n\nOtherwise, the HEAD will eventually be detached and will directly point to\n the peeled Commit.
\n", - "group": "repository" + "description": "Add a remote with the provided fetch refspec (or default if NULL) to the repository's\n configuration.
\n", + "comments": "", + "group": "remote" }, - "git_repository_set_head_detached_from_annotated": { + "git_remote_create_anonymous": { "type": "function", - "file": "git2/repository.h", - "line": 769, - "lineto": 771, + "file": "git2/remote.h", + "line": 185, + "lineto": 188, "args": [ + { + "name": "out", + "type": "git_remote **", + "comment": "pointer to the new remote objects" + }, { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "the associated repository" }, { - "name": "commitish", - "type": "const git_annotated_commit *", - "comment": null + "name": "url", + "type": "const char *", + "comment": "the remote repository's URL" } ], - "argline": "git_repository *repo, const git_annotated_commit *commitish", - "sig": "git_repository *::const git_annotated_commit *", - "return": { - "type": "int", - "comment": null - }, - "description": "Make the repository HEAD directly point to the Commit.
\n", - "comments": "This behaves like git_repository_set_head_detached() but takes an\n annotated commit, which lets you specify which extended sha syntax\n string was specified by a user, allowing for more exact reflog\n messages.
See the documentation for git_repository_set_head_detached().
Create an anonymous remote
\n", + "comments": "Create a remote with the given url in-memory. You can use this when you have a URL instead of a remote's name.
\n", + "group": "remote", "examples": { - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_set_head_detached_from_annotated-17" + "fetch.c": ["ex/v1.9.1/fetch.html#git_remote_create_anonymous-5"], + "ls-remote.c": [ + "ex/v1.9.1/ls-remote.html#git_remote_create_anonymous-2" ] } }, - "git_repository_detach_head": { + "git_remote_create_detached": { "type": "function", - "file": "git2/repository.h", - "line": 790, - "lineto": 791, + "file": "git2/remote.h", + "line": 204, + "lineto": 206, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "Repository pointer" - } - ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch or an error code" - }, - "description": "Detach the HEAD.
\n", - "comments": "If the HEAD is already detached and points to a Commit, 0 is returned.
\n\nIf the HEAD is already detached and points to a Tag, the HEAD is\n updated into making it point to the peeled Commit, and 0 is returned.
\n\nIf the HEAD is already detached and points to a non commitish, the HEAD is\n unaltered, and -1 is returned.
\n\nOtherwise, the HEAD will be detached and point to the peeled Commit.
\n", - "group": "repository" - }, - "git_repository_state": { - "type": "function", - "file": "git2/repository.h", - "line": 821, - "lineto": 821, - "args": [ + "name": "out", + "type": "git_remote **", + "comment": "pointer to the new remote objects" + }, { - "name": "repo", - "type": "git_repository *", - "comment": "Repository pointer" + "name": "url", + "type": "const char *", + "comment": "the remote repository's URL" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": " The state of the repository" - }, - "description": "Determines the status of a git repository - ie, whether an operation\n (merge, cherry-pick, etc) is in progress.
\n", - "comments": "", - "group": "repository", - "examples": { - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_state-18" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_state-39" - ] - } + "argline": "git_remote **out, const char *url", + "sig": "git_remote **::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a remote without a connected local repo
\n", + "comments": "Create a remote with the given url in-memory. You can use this when you have a URL instead of a remote's name.
\n\nContrasted with git_remote_create_anonymous, a detached remote will not consider any repo configuration values (such as insteadof url substitutions).
\n", + "group": "remote" }, - "git_repository_set_namespace": { + "git_remote_lookup": { "type": "function", - "file": "git2/repository.h", - "line": 835, - "lineto": 835, + "file": "git2/remote.h", + "line": 219, + "lineto": 219, "args": [ + { + "name": "out", + "type": "git_remote **", + "comment": "pointer to the new remote object" + }, { "name": "repo", "type": "git_repository *", - "comment": "The repo" + "comment": "the associated repository" }, { - "name": "nmspace", + "name": "name", "type": "const char *", - "comment": "The namespace. This should not include the refs\n\tfolder, e.g. to namespace all references under `refs/namespaces/foo/`,\n\tuse `foo` as the namespace." + "comment": "the remote's name" } ], - "argline": "git_repository *repo, const char *nmspace", - "sig": "git_repository *::const char *", + "argline": "git_remote **out, git_repository *repo, const char *name", + "sig": "git_remote **::git_repository *::const char *", "return": { "type": "int", - "comment": " 0 on success, -1 on error" + "comment": " 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code" }, - "description": "Sets the active namespace for this Git Repository
\n", - "comments": "This namespace affects all reference operations for the repo.\n See man gitnamespaces
Get the information for a particular remote
\n", + "comments": "The name will be checked for validity. See git_tag_create() for rules about valid names.
Get the currently active namespace for this repository
\n", - "comments": "", - "group": "repository" + "argline": "git_remote **dest, git_remote *source", + "sig": "git_remote **::git_remote *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a copy of an existing remote. All internal strings are also\n duplicated. Callbacks are not duplicated.
\n", + "comments": "Call git_remote_free to free the data.
Determine if the repository was a shallow clone
\n", + "description": "Get the remote's repository
\n", "comments": "", - "group": "repository" + "group": "remote" }, - "git_repository_ident": { + "git_remote_name": { "type": "function", - "file": "git2/repository.h", - "line": 864, - "lineto": 864, + "file": "git2/remote.h", + "line": 247, + "lineto": 247, "args": [ { - "name": "name", - "type": "const char **", - "comment": "where to store the pointer to the name" - }, - { - "name": "email", - "type": "const char **", - "comment": "where to store the pointer to the email" - }, - { - "name": "repo", - "type": "const git_repository *", - "comment": "the repository" + "name": "remote", + "type": "const git_remote *", + "comment": "the remote" } ], - "argline": "const char **name, const char **email, const git_repository *repo", - "sig": "const char **::const char **::const git_repository *", + "argline": "const git_remote *remote", + "sig": "const git_remote *", "return": { - "type": "int", - "comment": null + "type": "const char *", + "comment": " a pointer to the name or NULL for in-memory remotes" }, - "description": "Retrieve the configured identity to use for reflogs
\n", - "comments": "The memory is owned by the repository and must not be freed by the\n user.
\n", - "group": "repository" + "description": "Get the remote's name
\n", + "comments": "", + "group": "remote" }, - "git_repository_set_ident": { + "git_remote_url": { "type": "function", - "file": "git2/repository.h", - "line": 877, - "lineto": 877, + "file": "git2/remote.h", + "line": 259, + "lineto": 259, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to configure" - }, - { - "name": "name", - "type": "const char *", - "comment": "the name to use for the reflog entries" - }, - { - "name": "email", - "type": "const char *", - "comment": "the email to use for the reflog entries" + "name": "remote", + "type": "const git_remote *", + "comment": "the remote" } ], - "argline": "git_repository *repo, const char *name, const char *email", - "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "Set the identity to be used for writing reflogs
\n", - "comments": "If both are set, this name and email will be used to write to the\n reflog. Pass NULL to unset. When unset, the identity will be taken\n from the repository's configuration.
\n", - "group": "repository" + "argline": "const git_remote *remote", + "sig": "const git_remote *", + "return": { "type": "const char *", "comment": " a pointer to the url" }, + "description": "Get the remote's url
\n", + "comments": "If url.*.insteadOf has been configured for this URL, it will return the modified URL. This function does not consider if a push url has been configured for this remote (use git_remote_pushurl if needed).
Sets the current head to the specified commit oid and optionally\n resets the index and working tree to match.
\n", - "comments": "SOFT reset means the Head will be moved to the commit.
\n\nMIXED reset will trigger a SOFT reset, plus the index will be replaced\n with the content of the commit tree.
\n\nHARD reset will trigger a MIXED reset and the working directory will be\n replaced with the content of the index. (Untracked and ignored files\n will be left alone, however.)
\n\nTODO: Implement remaining kinds of resets.
\n", - "group": "reset" + "description": "Get the remote's url for pushing.
\n", + "comments": "If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL. If git_remote_set_instance_pushurl has been called for this remote, then that URL will be returned.
Sets the current head to the specified commit oid and optionally\n resets the index and working tree to match.
\n", - "comments": "This behaves like git_reset() but takes an annotated commit,\n which lets you specify which extended sha syntax string was\n specified by a user, allowing for more exact reflog messages.
See the documentation for git_reset().
Set the remote's url in the configuration
\n", + "comments": "Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.
\n", + "group": "remote", + "examples": { "remote.c": ["ex/v1.9.1/remote.html#git_remote_set_url-5"] } }, - "git_reset_default": { + "git_remote_set_pushurl": { "type": "function", - "file": "git2/reset.h", - "line": 104, - "lineto": 107, + "file": "git2/remote.h", + "line": 298, + "lineto": 298, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "Repository where to perform the reset operation." + "comment": "the repository in which to perform the change" }, { - "name": "target", - "type": "const git_object *", - "comment": "The committish which content will be used to reset the content\n of the index." + "name": "remote", + "type": "const char *", + "comment": "the remote's name" }, - { - "name": "pathspecs", - "type": "const git_strarray *", - "comment": "List of pathspecs to operate on." - } + { "name": "url", "type": "const char *", "comment": "the url to set" } ], - "argline": "git_repository *repo, const git_object *target, const git_strarray *pathspecs", - "sig": "git_repository *::const git_object *::const git_strarray *", - "return": { - "type": "int", - "comment": " 0 on success or an error code \n<\n 0" - }, - "description": "Updates some entries in the index from the target commit tree.
\n", - "comments": "The scope of the updated entries is determined by the paths\n being passed in the pathspec parameters.
Passing a NULL target will result in removing\n entries in the index matching the provided pathspecs.
Set the remote's url for pushing in the configuration.
\n", + "comments": "Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.
\n", + "group": "remote", + "examples": { + "remote.c": ["ex/v1.9.1/remote.html#git_remote_set_pushurl-6"] + } }, - "git_revert_init_options": { + "git_remote_set_instance_url": { "type": "function", - "file": "git2/revert.h", - "line": 49, - "lineto": 51, + "file": "git2/remote.h", + "line": 308, + "lineto": 308, "args": [ { - "name": "opts", - "type": "git_revert_options *", - "comment": "The `git_revert_options` struct to initialize." + "name": "remote", + "type": "git_remote *", + "comment": "the remote's name" }, - { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_REVERT_OPTIONS_VERSION`." - } + { "name": "url", "type": "const char *", "comment": "the url to set" } ], - "argline": "git_revert_options *opts, unsigned int version", - "sig": "git_revert_options *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initialize git_revert_options structure
\n", - "comments": "Initializes a git_revert_options with default values. Equivalent to\n creating an instance with GIT_REVERT_OPTIONS_INIT.
Set the url for this particular url instance. The URL in the\n configuration will be ignored, and will not be changed.
\n", + "comments": "", + "group": "remote" }, - "git_revert_commit": { + "git_remote_set_instance_pushurl": { "type": "function", - "file": "git2/revert.h", - "line": 67, - "lineto": 73, + "file": "git2/remote.h", + "line": 318, + "lineto": 318, "args": [ { - "name": "out", - "type": "git_index **", - "comment": "pointer to store the index result in" + "name": "remote", + "type": "git_remote *", + "comment": "the remote's name" }, + { "name": "url", "type": "const char *", "comment": "the url to set" } + ], + "argline": "git_remote *remote, const char *url", + "sig": "git_remote *::const char *", + "return": { "type": "int", "comment": " 0 or an error value" }, + "description": "Set the push url for this particular url instance. The URL in the\n configuration will be ignored, and will not be changed.
\n", + "comments": "", + "group": "remote" + }, + "git_remote_add_fetch": { + "type": "function", + "file": "git2/remote.h", + "line": 331, + "lineto": 331, + "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository that contains the given commits" - }, - { - "name": "revert_commit", - "type": "git_commit *", - "comment": "the commit to revert" - }, - { - "name": "our_commit", - "type": "git_commit *", - "comment": "the commit to revert against (eg, HEAD)" + "comment": "the repository in which to change the configuration" }, { - "name": "mainline", - "type": "unsigned int", - "comment": "the parent of the revert commit, if it is a merge" + "name": "remote", + "type": "const char *", + "comment": "the name of the remote to change" }, { - "name": "merge_options", - "type": "const git_merge_options *", - "comment": "the merge options (or null for defaults)" + "name": "refspec", + "type": "const char *", + "comment": "the new fetch refspec" } ], - "argline": "git_index **out, git_repository *repo, git_commit *revert_commit, git_commit *our_commit, unsigned int mainline, const git_merge_options *merge_options", - "sig": "git_index **::git_repository *::git_commit *::git_commit *::unsigned int::const git_merge_options *", + "argline": "git_repository *repo, const char *remote, const char *refspec", + "sig": "git_repository *::const char *::const char *", "return": { "type": "int", - "comment": " zero on success, -1 on failure." + "comment": " 0, GIT_EINVALIDSPEC if refspec is invalid or an error value" }, - "description": "Reverts the given commit against the given "our" commit, producing an\n index that reflects the result of the revert.
\n", - "comments": "The returned index must be freed explicitly with git_index_free.
Add a fetch refspec to the remote's configuration
\n", + "comments": "Add the given refspec to the fetch list in the configuration. No loaded remote instances will be affected.
\n", + "group": "remote" }, - "git_revert": { + "git_remote_get_fetch_refspecs": { "type": "function", - "file": "git2/revert.h", - "line": 83, - "lineto": 86, + "file": "git2/remote.h", + "line": 343, + "lineto": 343, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to revert" - }, - { - "name": "commit", - "type": "git_commit *", - "comment": "the commit to revert" + "name": "array", + "type": "git_strarray *", + "comment": "pointer to the array in which to store the strings" }, { - "name": "given_opts", - "type": "const git_revert_options *", - "comment": "the revert options (or null for defaults)" + "name": "remote", + "type": "const git_remote *", + "comment": "the remote to query" } ], - "argline": "git_repository *repo, git_commit *commit, const git_revert_options *given_opts", - "sig": "git_repository *::git_commit *::const git_revert_options *", - "return": { - "type": "int", - "comment": " zero on success, -1 on failure." - }, - "description": "Reverts the given commit, producing changes in the index and working directory.
\n", - "comments": "", - "group": "revert" + "argline": "git_strarray *array, const git_remote *remote", + "sig": "git_strarray *::const git_remote *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Get the remote's list of fetch refspecs
\n", + "comments": "The memory is owned by the user and should be freed with git_strarray_free.
Find a single object, as specified by a revision string.
\n", - "comments": "See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.
The returned object should be released with git_object_free when no\n longer needed.
Add a push refspec to the remote's configuration
\n", + "comments": "Add the given refspec to the push list in the configuration. No loaded remote instances will be affected.
\n", + "group": "remote" }, - "git_revparse_ext": { + "git_remote_get_push_refspecs": { "type": "function", - "file": "git2/revparse.h", - "line": 61, - "lineto": 65, + "file": "git2/remote.h", + "line": 368, + "lineto": 368, "args": [ { - "name": "object_out", - "type": "git_object **", - "comment": "pointer to output object" - }, - { - "name": "reference_out", - "type": "git_reference **", - "comment": "pointer to output reference or NULL" + "name": "array", + "type": "git_strarray *", + "comment": "pointer to the array in which to store the strings" }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to search in" - }, + "name": "remote", + "type": "const git_remote *", + "comment": "the remote to query" + } + ], + "argline": "git_strarray *array, const git_remote *remote", + "sig": "git_strarray *::const git_remote *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Get the remote's list of push refspecs
\n", + "comments": "The memory is owned by the user and should be freed with git_strarray_free.
Find a single object and intermediate reference by a revision string.
\n", - "comments": "See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.
In some cases (\n@\n{\n<\n-n>} or `\n<branchname
\n\n\n@\n{upstream}
\n), the expression may\n point to an intermediate reference. When such expressions are being passed\n in,reference_out` will be valued as well.
The returned object should be released with git_object_free and the\n returned reference with git_reference_free when no longer needed.
Get the number of refspecs for a remote
\n", + "comments": "", + "group": "remote" }, - "git_revparse": { + "git_remote_get_refspec": { "type": "function", - "file": "git2/revparse.h", - "line": 105, - "lineto": 108, + "file": "git2/remote.h", + "line": 385, + "lineto": 385, "args": [ { - "name": "revspec", - "type": "git_revspec *", - "comment": "Pointer to an user-allocated git_revspec struct where\n\t the result of the rev-parse will be stored" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository to search in" + "name": "remote", + "type": "const git_remote *", + "comment": "the remote to query" }, - { - "name": "spec", - "type": "const char *", - "comment": "the rev-parse spec to parse" - } + { "name": "n", "type": "size_t", "comment": "the refspec to get" } ], - "argline": "git_revspec *revspec, git_repository *repo, const char *spec", - "sig": "git_revspec *::git_repository *::const char *", + "argline": "const git_remote *remote, size_t n", + "sig": "const git_remote *::size_t", "return": { - "type": "int", - "comment": " 0 on success, GIT_INVALIDSPEC, GIT_ENOTFOUND, GIT_EAMBIGUOUS or an error code" + "type": "const git_refspec *", + "comment": " the nth refspec" }, - "description": "Parse a revision string for from, to, and intent.
See man gitrevisions or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.
Get a refspec from the remote
\n", + "comments": "", + "group": "remote" }, - "git_revwalk_new": { + "git_remote_ls": { "type": "function", - "file": "git2/revwalk.h", - "line": 73, - "lineto": 73, + "file": "git2/remote.h", + "line": 407, + "lineto": 407, "args": [ { "name": "out", - "type": "git_revwalk **", - "comment": "pointer to the new revision walker" + "type": "const git_remote_head ***", + "comment": "pointer to the array" }, { - "name": "repo", - "type": "git_repository *", - "comment": "the repo to walk through" - } + "name": "size", + "type": "size_t *", + "comment": "the number of remote heads" + }, + { "name": "remote", "type": "git_remote *", "comment": "the remote" } ], - "argline": "git_revwalk **out, git_repository *repo", - "sig": "git_revwalk **::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Allocate a new revision walker to iterate through a repo.
\n", - "comments": "This revision walker uses a custom memory pool and an internal\n commit cache, so it is relatively expensive to allocate.
\n\nFor maximum performance, this revision walker should be\n reused for different walks.
\n\nThis revision walker is not thread safe: it may only be\n used to walk a repository on a single thread; however,\n it is possible to have several revision walkers in\n several different threads walking the same repository.
\n", - "group": "revwalk", + "argline": "const git_remote_head ***out, size_t *size, git_remote *remote", + "sig": "const git_remote_head ***::size_t *::git_remote *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Get the remote repository's reference advertisement list
\n", + "comments": "Get the list of references with which the server responds to a new connection.
\n\nThe remote (or more exactly its transport) must have connected to the remote repository. This list is available as soon as the connection to the remote is initiated and it remains available after disconnecting.
\n\nThe memory belongs to the remote. The pointer will be valid as long as a new connection is not initiated, but it is recommended that you make a copy in order to make use of the data.
\n", + "group": "remote", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_new-74" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_new-50", - "ex/v0.28.0/log.html#git_revwalk_new-51" - ] + "ls-remote.c": ["ex/v1.9.1/ls-remote.html#git_remote_ls-4"] } }, - "git_revwalk_reset": { + "git_remote_connected": { "type": "function", - "file": "git2/revwalk.h", - "line": 88, - "lineto": 88, + "file": "git2/remote.h", + "line": 418, + "lineto": 418, "args": [ { - "name": "walker", - "type": "git_revwalk *", - "comment": "handle to reset." + "name": "remote", + "type": "const git_remote *", + "comment": "the remote" } ], - "argline": "git_revwalk *walker", - "sig": "git_revwalk *", + "argline": "const git_remote *remote", + "sig": "const git_remote *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 1 if it's connected, 0 otherwise." }, - "description": "Reset the revision walker for reuse.
\n", - "comments": "This will clear all the pushed and hidden commits, and\n leave the walker in a blank state (just like at\n creation) ready to receive new commit pushes and\n start a new walk.
\n\nThe revision walk is automatically reset when a walk\n is over.
\n", - "group": "revwalk" + "description": "Check whether the remote is connected
\n", + "comments": "Check whether the remote's underlying transport is connected to the remote host.
\n", + "group": "remote" }, - "git_revwalk_push": { + "git_remote_stop": { "type": "function", - "file": "git2/revwalk.h", - "line": 107, - "lineto": 107, + "file": "git2/remote.h", + "line": 429, + "lineto": 429, + "args": [ + { "name": "remote", "type": "git_remote *", "comment": "the remote" } + ], + "argline": "git_remote *remote", + "sig": "git_remote *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Cancel the operation
\n", + "comments": "At certain points in its operation, the network code checks whether the operation has been cancelled and if so stops the operation.
\n", + "group": "remote" + }, + "git_remote_disconnect": { + "type": "function", + "file": "git2/remote.h", + "line": 439, + "lineto": 439, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": "the walker being used for the traversal." - }, + "name": "remote", + "type": "git_remote *", + "comment": "the remote to disconnect from" + } + ], + "argline": "git_remote *remote", + "sig": "git_remote *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Disconnect from the remote
\n", + "comments": "Close the connection to the remote.
\n", + "group": "remote" + }, + "git_remote_free": { + "type": "function", + "file": "git2/remote.h", + "line": 449, + "lineto": 449, + "args": [ { - "name": "id", - "type": "const git_oid *", - "comment": "the oid of the commit to start from." + "name": "remote", + "type": "git_remote *", + "comment": "the remote to free" } ], - "argline": "git_revwalk *walk, const git_oid *id", - "sig": "git_revwalk *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Add a new root for the traversal
\n", - "comments": "The pushed commit will be marked as one of the roots from which to\n start the walk. This commit may not be walked if it or a child is\n hidden.
\n\nAt least one commit must be pushed onto the walker before a walk\n can be started.
\n\nThe given id must belong to a committish on the walked\n repository.
\n", - "group": "revwalk", + "argline": "git_remote *remote", + "sig": "git_remote *", + "return": { "type": "void", "comment": null }, + "description": "Free the memory associated with a remote
\n", + "comments": "This also disconnects from the remote, if the connection has not been closed yet (using git_remote_disconnect).
\n", + "group": "remote", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_push-75" + "fetch.c": [ + "ex/v1.9.1/fetch.html#git_remote_free-7", + "ex/v1.9.1/fetch.html#git_remote_free-8" ], - "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_push-52" - ] + "ls-remote.c": ["ex/v1.9.1/ls-remote.html#git_remote_free-5"], + "remote.c": ["ex/v1.9.1/remote.html#git_remote_free-7"] } }, - "git_revwalk_push_glob": { + "git_remote_list": { "type": "function", - "file": "git2/revwalk.h", - "line": 125, - "lineto": 125, + "file": "git2/remote.h", + "line": 460, + "lineto": 460, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": "the walker being used for the traversal" + "name": "out", + "type": "git_strarray *", + "comment": "a string array which receives the names of the remotes" }, { - "name": "glob", - "type": "const char *", - "comment": "the glob pattern references should match" + "name": "repo", + "type": "git_repository *", + "comment": "the repository to query" } ], - "argline": "git_revwalk *walk, const char *glob", - "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Push matching references
\n", - "comments": "The OIDs pointed to by the references that match the given glob\n pattern will be pushed to the revision walker.
\n\nA leading 'refs/' is implied if not present as well as a trailing\n '/\n\\\n*' if the glob lacks '?', '\n\\\n*' or '['.
\n\nAny references matching this glob which do not point to a\n committish will be ignored.
\n", - "group": "revwalk" + "argline": "git_strarray *out, git_repository *repo", + "sig": "git_strarray *::git_repository *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Get a list of the configured remotes for a repo
\n", + "comments": "The string array must be freed by the user.
\n", + "group": "remote", + "examples": { + "checkout.c": ["ex/v1.9.1/checkout.html#git_remote_list-22"], + "remote.c": ["ex/v1.9.1/remote.html#git_remote_list-8"] + } }, - "git_revwalk_push_head": { + "git_remote_init_callbacks": { "type": "function", - "file": "git2/revwalk.h", - "line": 133, - "lineto": 133, + "file": "git2/remote.h", + "line": 714, + "lineto": 716, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": "the walker being used for the traversal" + "name": "opts", + "type": "git_remote_callbacks *", + "comment": "the `git_remote_callbacks` struct to initialize" + }, + { + "name": "version", + "type": "unsigned int", + "comment": "Version of struct; pass `GIT_REMOTE_CALLBACKS_VERSION`" } ], - "argline": "git_revwalk *walk", - "sig": "git_revwalk *", + "argline": "git_remote_callbacks *opts, unsigned int version", + "sig": "git_remote_callbacks *::unsigned int", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " Zero on success; -1 on failure." }, - "description": "Push the repository's HEAD
\n", + "description": "Initializes a git_remote_callbacks with default values. Equivalent to\n creating an instance with GIT_REMOTE_CALLBACKS_INIT.
Mark a commit (and its ancestors) uninteresting for the output.
\n", - "comments": "The given id must belong to a committish on the walked\n repository.
\n\nThe resolved commit and all its parents will be hidden from the\n output on the revision walk.
\n", - "group": "revwalk", - "examples": { - "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_hide-54" - ] - } + "description": "Initialize git_fetch_options structure
\n", + "comments": "Initializes a git_fetch_options with default values. Equivalent to creating an instance with GIT_FETCH_OPTIONS_INIT.
Hide matching references.
\n", - "comments": "The OIDs pointed to by the references that match the given glob\n pattern and their ancestors will be hidden from the output on the\n revision walk.
\n\nA leading 'refs/' is implied if not present as well as a trailing\n '/\n\\\n*' if the glob lacks '?', '\n\\\n*' or '['.
\n\nAny references matching this glob which do not point to a\n committish will be ignored.
\n", - "group": "revwalk" + "description": "Initialize git_push_options structure
\n", + "comments": "Initializes a git_push_options with default values. Equivalent to creating an instance with GIT_PUSH_OPTIONS_INIT.
Hide the repository's HEAD
\n", - "comments": "", - "group": "revwalk" + "description": "Initialize git_remote_connect_options structure.
\n", + "comments": "Initializes a git_remote_connect_options with default values. Equivalent to creating an instance with GIT_REMOTE_CONNECT_OPTIONS_INIT.
Push the OID pointed to by a reference
\n", - "comments": "The reference must point to a committish.
\n", - "group": "revwalk" + "argline": "git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_proxy_options *proxy_opts, const git_strarray *custom_headers", + "sig": "git_remote *::git_direction::const git_remote_callbacks *::const git_proxy_options *::const git_strarray *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Open a connection to a remote.
\n", + "comments": "The transport is selected based on the URL; the direction argument is due to a limitation of the git protocol which starts up a specific binary which can only do the one or the other.
\n", + "group": "remote", + "examples": { + "ls-remote.c": ["ex/v1.9.1/ls-remote.html#git_remote_connect-6"] + } }, - "git_revwalk_hide_ref": { + "git_remote_connect_ext": { "type": "function", - "file": "git2/revwalk.h", - "line": 197, - "lineto": 197, + "file": "git2/remote.h", + "line": 1012, + "lineto": 1015, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": "the walker being used for the traversal" + "name": "remote", + "type": "git_remote *", + "comment": "the remote to connect to" }, { - "name": "refname", - "type": "const char *", - "comment": "the reference to hide" + "name": "direction", + "type": "git_direction", + "comment": "GIT_DIRECTION_FETCH if you want to fetch or\n GIT_DIRECTION_PUSH if you want to push" + }, + { + "name": "opts", + "type": "const git_remote_connect_options *", + "comment": "the remote connection options" } ], - "argline": "git_revwalk *walk, const char *refname", - "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Hide the OID pointed to by a reference
\n", - "comments": "The reference must point to a committish.
\n", - "group": "revwalk" + "argline": "git_remote *remote, git_direction direction, const git_remote_connect_options *opts", + "sig": "git_remote *::git_direction::const git_remote_connect_options *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Open a connection to a remote with extended options.
\n", + "comments": "The transport is selected based on the URL; the direction argument is due to a limitation of the git protocol which starts up a specific binary which can only do the one or the other.
\n\nThe given options structure will form the defaults for connection options and callback setup. Callers may override these defaults by specifying git_fetch_options or git_push_options in subsequent calls.
Get the next commit from the revision walk.
\n", - "comments": "The initial call to this method is not blocking when\n iterating through a repo with a time-sorting mode.
\n\nIterating with Topological or inverted modes makes the initial\n call blocking to preprocess the commit list, but this block should be\n mostly unnoticeable on most repositories (topological preprocessing\n times at 0.3s on the git.git repo).
\n\nThe revision walker is reset when the walk is over.
\n", - "group": "revwalk", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_next-76" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_next-55" - ] - } + "argline": "git_remote *remote, const git_strarray *refspecs, const git_fetch_options *opts", + "sig": "git_remote *::const git_strarray *::const git_fetch_options *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Download and index the packfile.
\n", + "comments": "Connect to the remote if it hasn't been done yet, negotiate with the remote git which objects are missing, download and index the packfile.
\n\nThe .idx file will be created and both it and the packfile with be renamed to their final name.
\n\nIf options are specified and this remote is already connected then the existing remote connection options will be discarded and the remote will now use the new options.
\n", + "group": "remote" }, - "git_revwalk_sorting": { + "git_remote_upload": { "type": "function", - "file": "git2/revwalk.h", - "line": 228, - "lineto": 228, + "file": "git2/remote.h", + "line": 1059, + "lineto": 1062, "args": [ + { "name": "remote", "type": "git_remote *", "comment": "the remote" }, { - "name": "walk", - "type": "git_revwalk *", - "comment": "the walker being used for the traversal." + "name": "refspecs", + "type": "const git_strarray *", + "comment": "the refspecs to use for this negotiation and\n upload. Use NULL or an empty array to use the base refspecs" }, { - "name": "sort_mode", + "name": "opts", + "type": "const git_push_options *", + "comment": "the options to use for this push" + } + ], + "argline": "git_remote *remote, const git_strarray *refspecs, const git_push_options *opts", + "sig": "git_remote *::const git_strarray *::const git_push_options *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a packfile and send it to the server
\n", + "comments": "Connect to the remote if it hasn't been done yet, negotiate with the remote git which objects are missing, create a packfile with the missing objects and send it.
\n\nIf options are specified and this remote is already connected then the existing remote connection options will be discarded and the remote will now use the new options.
\n", + "group": "remote" + }, + "git_remote_update_tips": { + "type": "function", + "file": "git2/remote.h", + "line": 1081, + "lineto": 1086, + "args": [ + { + "name": "remote", + "type": "git_remote *", + "comment": "the remote to update" + }, + { + "name": "callbacks", + "type": "const git_remote_callbacks *", + "comment": "pointer to the callback structure to use or NULL" + }, + { + "name": "update_flags", "type": "unsigned int", - "comment": "combination of GIT_SORT_XXX flags" + "comment": "the git_remote_update_flags for these tips." + }, + { + "name": "download_tags", + "type": "git_remote_autotag_option_t", + "comment": "what the behaviour for downloading tags is for this fetch. This is\n ignored for push. This must be the same value passed to `git_remote_download()`." + }, + { + "name": "reflog_message", + "type": "const char *", + "comment": "The message to insert into the reflogs. If\n NULL and fetching, the default is \"fetch \nChange the sorting mode when iterating through the\n repository's contents.
\n", - "comments": "Changing the sorting mode resets the walker.
\n", - "group": "revwalk", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_sorting-77" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_sorting-56", - "ex/v0.28.0/log.html#git_revwalk_sorting-57" - ] - } + "argline": "git_remote *remote, const git_remote_callbacks *callbacks, unsigned int update_flags, git_remote_autotag_option_t download_tags, const char *reflog_message", + "sig": "git_remote *::const git_remote_callbacks *::unsigned int::git_remote_autotag_option_t::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Update the tips to the new state.
\n", + "comments": "If callbacks are not specified then the callbacks specified to git_remote_connect will be used (if it was called).
Push and hide the respective endpoints of the given range.
\n", - "comments": "The range should be of the form
\n\n<commit
\n\n\n\n", - "group": "revwalk" + "argline": "git_remote *remote, const git_strarray *refspecs, const git_fetch_options *opts, const char *reflog_message", + "sig": "git_remote *::const git_strarray *::const git_fetch_options *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "..\n<commit
\n\nwhere each \n<commit\nis in the form accepted by 'git_revparse_single'.\n The left-hand commit will be hidden and the right-hand commit pushed.
\n
Download new data and update tips.
\n", + "comments": "Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.
\n\nIf options are specified and this remote is already connected then the existing remote connection options will be discarded and the remote will now use the new options.
\n", + "group": "remote", + "examples": { "fetch.c": ["ex/v1.9.1/fetch.html#git_remote_fetch-9"] } }, - "git_revwalk_simplify_first_parent": { + "git_remote_prune": { "type": "function", - "file": "git2/revwalk.h", - "line": 250, - "lineto": 250, + "file": "git2/remote.h", + "line": 1122, + "lineto": 1124, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": null + "name": "remote", + "type": "git_remote *", + "comment": "the remote to prune" + }, + { + "name": "callbacks", + "type": "const git_remote_callbacks *", + "comment": "callbacks to use for this prune" } ], - "argline": "git_revwalk *walk", - "sig": "git_revwalk *", - "return": { - "type": "void", - "comment": null - }, - "description": "Simplify the history by first-parent
\n", - "comments": "No parents other than the first for each commit will be enqueued.
\n", - "group": "revwalk" + "argline": "git_remote *remote, const git_remote_callbacks *callbacks", + "sig": "git_remote *::const git_remote_callbacks *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Prune tracking refs that are no longer present on remote.
\n", + "comments": "If callbacks are not specified then the callbacks specified to git_remote_connect will be used (if it was called).
Free a revision walker previously allocated.
\n", - "comments": "", - "group": "revwalk", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_free-78" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_free-58" - ] - } + "argline": "git_remote *remote, const git_strarray *refspecs, const git_push_options *opts", + "sig": "git_remote *::const git_strarray *::const git_push_options *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Perform a push.
\n", + "comments": "If options are specified and this remote is already connected then the existing remote connection options will be discarded and the remote will now use the new options.
\n", + "group": "remote", + "examples": { "push.c": ["ex/v1.9.1/push.html#git_remote_push-4"] } }, - "git_revwalk_repository": { + "git_remote_stats": { "type": "function", - "file": "git2/revwalk.h", - "line": 267, - "lineto": 267, + "file": "git2/remote.h", + "line": 1150, + "lineto": 1150, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": "the revision walker" + "name": "remote", + "type": "git_remote *", + "comment": "the remote to get statistics for" } ], - "argline": "git_revwalk *walk", - "sig": "git_revwalk *", + "argline": "git_remote *remote", + "sig": "git_remote *", "return": { - "type": "git_repository *", - "comment": " the repository being walked" + "type": "const git_indexer_progress *", + "comment": " the git_indexer_progress for the remote" }, - "description": "Return the repository on which this walker\n is operating.
\n", + "description": "Get the statistics structure that is filled in by the fetch operation.
\n", "comments": "", - "group": "revwalk" + "group": "remote", + "examples": { "fetch.c": ["ex/v1.9.1/fetch.html#git_remote_stats-10"] } }, - "git_revwalk_add_hide_cb": { + "git_remote_autotag": { "type": "function", - "file": "git2/revwalk.h", - "line": 288, - "lineto": 291, + "file": "git2/remote.h", + "line": 1158, + "lineto": 1158, "args": [ { - "name": "walk", - "type": "git_revwalk *", - "comment": "the revision walker" - }, - { - "name": "hide_cb", - "type": "git_revwalk_hide_cb", - "comment": "callback function to hide a commit and its parents" - }, - { - "name": "payload", - "type": "void *", - "comment": "data payload to be passed to callback function" + "name": "remote", + "type": "const git_remote *", + "comment": "the remote to query" } ], - "argline": "git_revwalk *walk, git_revwalk_hide_cb hide_cb, void *payload", - "sig": "git_revwalk *::git_revwalk_hide_cb::void *", + "argline": "const git_remote *remote", + "sig": "const git_remote *", "return": { - "type": "int", - "comment": null + "type": "git_remote_autotag_option_t", + "comment": " the auto-follow setting" }, - "description": "Adds, changes or removes a callback function to hide a commit and its parents
\n", + "description": "Retrieve the tag auto-follow setting
\n", "comments": "", - "group": "revwalk" + "group": "remote" }, - "git_signature_new": { + "git_remote_set_autotag": { "type": "function", - "file": "git2/signature.h", - "line": 37, - "lineto": 37, + "file": "git2/remote.h", + "line": 1171, + "lineto": 1171, "args": [ { - "name": "out", - "type": "git_signature **", - "comment": "new signature, in case of error NULL" - }, - { - "name": "name", - "type": "const char *", - "comment": "name of the person" + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to make the change" }, { - "name": "email", + "name": "remote", "type": "const char *", - "comment": "email of the person" + "comment": "the name of the remote" }, { - "name": "time", - "type": "git_time_t", - "comment": "time (in seconds from epoch) when the action happened" - }, + "name": "value", + "type": "git_remote_autotag_option_t", + "comment": "the new value to take." + } + ], + "argline": "git_repository *repo, const char *remote, git_remote_autotag_option_t value", + "sig": "git_repository *::const char *::git_remote_autotag_option_t", + "return": { "type": "int", "comment": " 0, or an error code." }, + "description": "Set the remote's tag following setting.
\n", + "comments": "The change will be made in the configuration. No loaded remotes will be affected.
\n", + "group": "remote" + }, + "git_remote_prune_refs": { + "type": "function", + "file": "git2/remote.h", + "line": 1179, + "lineto": 1179, + "args": [ { - "name": "offset", - "type": "int", - "comment": "timezone offset (in minutes) for the time" + "name": "remote", + "type": "const git_remote *", + "comment": "the remote to query" } ], - "argline": "git_signature **out, const char *name, const char *email, git_time_t time, int offset", - "sig": "git_signature **::const char *::const char *::git_time_t::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create a new action signature.
\n", - "comments": "Call git_signature_free() to free the data.
Note: angle brackets ('\n<\n' and '>') characters are not allowed\n to be used in either the name or the email parameter.
Retrieve the ref-prune setting
\n", + "comments": "", + "group": "remote" }, - "git_signature_now": { + "git_remote_rename": { "type": "function", - "file": "git2/signature.h", - "line": 49, - "lineto": 49, + "file": "git2/remote.h", + "line": 1201, + "lineto": 1205, "args": [ { - "name": "out", - "type": "git_signature **", - "comment": "new signature, in case of error NULL" + "name": "problems", + "type": "git_strarray *", + "comment": "non-default refspecs cannot be renamed and will be\n stored here for further processing by the caller. Always free this\n strarray on successful return." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to rename" }, { "name": "name", "type": "const char *", - "comment": "name of the person" + "comment": "the current name of the remote" }, { - "name": "email", + "name": "new_name", "type": "const char *", - "comment": "email of the person" + "comment": "the new name the remote should bear" } ], - "argline": "git_signature **out, const char *name, const char *email", - "sig": "git_signature **::const char *::const char *", + "argline": "git_strarray *problems, git_repository *repo, const char *name, const char *new_name", + "sig": "git_strarray *::git_repository *::const char *::const char *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, - "description": "Create a new action signature with a timestamp of 'now'.
\n", - "comments": "Call git_signature_free() to free the data.
Give the remote a new name
\n", + "comments": "All remote-tracking branches and configuration settings for the remote are updated.
\n\nThe new name will be checked for validity. See git_tag_create() for rules about valid names.
No loaded instances of a the remote with the old name will change their name or their list of refspecs.
\n", + "group": "remote", + "examples": { "remote.c": ["ex/v1.9.1/remote.html#git_remote_rename-9"] } }, - "git_signature_default": { + "git_remote_name_is_valid": { "type": "function", - "file": "git2/signature.h", - "line": 63, - "lineto": 63, + "file": "git2/remote.h", + "line": 1214, + "lineto": 1214, "args": [ { - "name": "out", - "type": "git_signature **", - "comment": "new signature" + "name": "valid", + "type": "int *", + "comment": "output pointer to set with validity of given remote name" }, { - "name": "repo", - "type": "git_repository *", - "comment": "repository pointer" + "name": "remote_name", + "type": "const char *", + "comment": "name to be checked." } ], - "argline": "git_signature **out, git_repository *repo", - "sig": "git_signature **::git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if config is missing, or error code" - }, - "description": "Create a new action signature with default user and now timestamp.
\n", - "comments": "This looks up the user.name and user.email from the configuration and\n uses the current time as the timestamp, and creates a new signature\n based on that information. It will return GIT_ENOTFOUND if either the\n user.name or user.email are not set.
\n", - "group": "signature", - "examples": { - "init.c": [ - "ex/v0.28.0/init.html#git_signature_default-12" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_signature_default-17" - ] - } + "argline": "int *valid, const char *remote_name", + "sig": "int *::const char *", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Ensure the remote name is well-formed.
\n", + "comments": "", + "group": "remote" }, - "git_signature_from_buffer": { + "git_remote_delete": { "type": "function", - "file": "git2/signature.h", - "line": 76, - "lineto": 76, + "file": "git2/remote.h", + "line": 1226, + "lineto": 1226, "args": [ { - "name": "out", - "type": "git_signature **", - "comment": "new signature" + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to act" }, { - "name": "buf", + "name": "name", "type": "const char *", - "comment": "signature string" + "comment": "the name of the remote to delete" } ], - "argline": "git_signature **out, const char *buf", - "sig": "git_signature **::const char *", + "argline": "git_repository *repo, const char *name", + "sig": "git_repository *::const char *", "return": { "type": "int", - "comment": " 0 on success, or an error code" + "comment": " 0 on success, or an error code." }, - "description": "Create a new signature by parsing the given buffer, which is\n expected to be in the format "Real Name \n<email
\n\n\n\n", - "comments": "", - "group": "signature" + "description": "timestamp tzoffset",\n where
\ntimestampis the number of seconds since the Unix epoch and\ntzoffsetis the timezone offset inhhmmformat (note the lack\n of a colon separator).
Delete an existing persisted remote.
\n", + "comments": "All remote-tracking branches and configuration settings for the remote will be removed.
\n", + "group": "remote", + "examples": { "remote.c": ["ex/v1.9.1/remote.html#git_remote_delete-10"] } }, - "git_signature_dup": { + "git_remote_default_branch": { "type": "function", - "file": "git2/signature.h", - "line": 88, - "lineto": 88, + "file": "git2/remote.h", + "line": 1244, + "lineto": 1244, "args": [ { - "name": "dest", - "type": "git_signature **", - "comment": "pointer where to store the copy" + "name": "out", + "type": "git_buf *", + "comment": "the buffer in which to store the reference name" }, - { - "name": "sig", - "type": "const git_signature *", - "comment": "signature to duplicate" - } + { "name": "remote", "type": "git_remote *", "comment": "the remote" } ], - "argline": "git_signature **dest, const git_signature *sig", - "sig": "git_signature **::const git_signature *", + "argline": "git_buf *out, git_remote *remote", + "sig": "git_buf *::git_remote *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0, GIT_ENOTFOUND if the remote does not have any references\n or none of them point to HEAD's commit, or an error message." }, - "description": "Create a copy of an existing signature. All internal strings are also\n duplicated.
\n", - "comments": "Call git_signature_free() to free the data.
Retrieve the name of the remote's default branch
\n", + "comments": "The default branch of a repository is the branch which HEAD points to. If the remote does not support reporting this information directly, it performs the guess as git does; that is, if there are multiple branches which point to the same commit, the first one is chosen. If the master branch is a candidate, it wins.
\n\nThis function must only be called after connecting.
\n", + "group": "remote" }, - "git_signature_free": { + "git_repository_open": { "type": "function", - "file": "git2/signature.h", - "line": 99, - "lineto": 99, + "file": "git2/repository.h", + "line": 43, + "lineto": 43, "args": [ { - "name": "sig", - "type": "git_signature *", - "comment": "signature to free" + "name": "out", + "type": "git_repository **", + "comment": "pointer to the repo which will be opened" + }, + { + "name": "path", + "type": "const char *", + "comment": "the path to the repository" } ], - "argline": "git_signature *sig", - "sig": "git_signature *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free an existing signature.
\n", - "comments": "Because the signature is not an opaque structure, it is legal to free it\n manually, but be sure to free the "name" and "email" strings in addition\n to the structure itself.
\n", - "group": "signature", + "argline": "git_repository **out, const char *path", + "sig": "git_repository **::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Open a git repository.
\n", + "comments": "The 'path' argument must point to either a git repository folder, or an existing work dir.
\n\nThe method will automatically detect if 'path' is a normal or bare repository or fail is 'path' is neither.
\n\nNote that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Open working tree as a repository
\n", + "comments": "Open the working directory of the working tree as a normal repository that can then be worked on.
\n", + "group": "repository" }, - "git_stash_apply_init_options": { + "git_repository_wrap_odb": { "type": "function", - "file": "git2/stash.h", - "line": 156, - "lineto": 157, + "file": "git2/repository.h", + "line": 67, + "lineto": 69, "args": [ { - "name": "opts", - "type": "git_stash_apply_options *", - "comment": "The `git_stash_apply_options` struct to initialize." + "name": "out", + "type": "git_repository **", + "comment": "pointer to the repo" }, { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`." + "name": "odb", + "type": "git_odb *", + "comment": "the object database to wrap" } ], - "argline": "git_stash_apply_options *opts, unsigned int version", - "sig": "git_stash_apply_options *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initialize git_stash_apply_options structure
\n", - "comments": "Initializes a git_stash_apply_options with default values. Equivalent to\n creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.
Create a "fake" repository to wrap an object database
\n", + "comments": "Create a repository object to wrap an object database to be used with the API when all you have is an object database. This doesn't have any paths associated with it, so use with care.
\n", + "group": "repository" }, - "git_stash_apply": { + "git_repository_discover": { "type": "function", - "file": "git2/stash.h", - "line": 185, - "lineto": 188, + "file": "git2/repository.h", + "line": 101, + "lineto": 105, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "The owning repository." + "name": "out", + "type": "git_buf *", + "comment": "A pointer to a user-allocated git_buf which will contain\n the found path." }, { - "name": "index", - "type": "size_t", - "comment": "The position within the stash list. 0 points to the\n most recent stashed state." + "name": "start_path", + "type": "const char *", + "comment": "The base path where the lookup starts." }, { - "name": "options", - "type": "const git_stash_apply_options *", - "comment": "Optional options to control how stashes are applied." + "name": "across_fs", + "type": "int", + "comment": "If true, then the lookup will not stop when a\n filesystem device change is detected while exploring parent directories." + }, + { + "name": "ceiling_dirs", + "type": "const char *", + "comment": "A GIT_PATH_LIST_SEPARATOR separated list of\n absolute symbolic link free paths. The lookup will stop when any\n of this paths is reached. Note that the lookup always performs on\n start_path no matter start_path appears in ceiling_dirs ceiling_dirs\n might be NULL (which is equivalent to an empty string)" } ], - "argline": "git_repository *repo, size_t index, const git_stash_apply_options *options", - "sig": "git_repository *::size_t::const git_stash_apply_options *", - "return": { - "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if there's no stashed state for the\n given index, GIT_EMERGECONFLICT if changes exist in the working\n directory, or an error code" - }, - "description": "Apply a single stashed state from the stash list.
\n", - "comments": "If local changes in the working directory conflict with changes in the\n stash then GIT_EMERGECONFLICT will be returned. In this case, the index\n will always remain unmodified and all files in the working directory will\n remain unmodified. However, if you are restoring untracked files or\n ignored files and there is a conflict when applying the modified files,\n then those files will remain in the working directory.
\n\nIf passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be\n conflicts when reinstating the index, the function will return\n GIT_EMERGECONFLICT and both the working directory and index will be left\n unmodified.
\n\nNote that a minimum checkout strategy of GIT_CHECKOUT_SAFE is implied.
Look for a git repository and copy its path in the given buffer.\n The lookup start from base_path and walk across parent directories\n if nothing has been found. The lookup ends when the first repository\n is found, or when reaching a directory referenced in ceiling_dirs\n or when the filesystem changes (in case across_fs is true).
\n", + "comments": "The method will automatically detect if the repository is bare (if there is a repository).
\n\nNote that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Loop over all the stashed states and issue a callback for each one.
\n", - "comments": "If the callback returns a non-zero value, this will stop looping.
\n", - "group": "stash" + "description": "Find and open a repository with extended controls.
\n", + "comments": "Note that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Remove a single stashed state from the stash list.
\n", - "comments": "", - "group": "stash" + "argline": "git_repository **out, const char *bare_path", + "sig": "git_repository **::const char *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Open a bare repository on the serverside.
\n", + "comments": "This is a fast open for bare repositories that will come in handy if you're e.g. hosting git repositories and need to access them efficiently
\n\nNote that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Free a previously allocated repository
\n", + "comments": "Note that after a repository is free'd, all the objects it has spawned will still exist until they are manually closed by the user with git_object_free, but accessing any of the attributes of an object without a backing repository will result in undefined behavior
Apply a single stashed state from the stash list and remove it from the list\n if successful.
\n", - "comments": "", - "group": "stash" + "argline": "git_repository **out, const char *path, unsigned int is_bare", + "sig": "git_repository **::const char *::unsigned int", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Creates a new Git repository in the given folder.
\n", + "comments": "TODO: - Reinit the repository
\n\nNote that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Initialize git_status_options structure
\n", - "comments": "Initializes a git_status_options with default values. Equivalent to\n creating an instance with GIT_STATUS_OPTIONS_INIT.
Initialize git_repository_init_options structure
\n", + "comments": "Initializes a git_repository_init_options with default values. Equivalent to creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.
Gather file statuses and run a callback for each one.
\n", - "comments": "The callback is passed the path of the file, the status (a combination of\n the git_status_t values above) and the payload data pointer passed\n into this function.
If the callback returns a non-zero value, this function will stop looping\n and return that value to caller.
\n", - "group": "status", + "argline": "git_repository **out, const char *repo_path, git_repository_init_options *opts", + "sig": "git_repository **::const char *::git_repository_init_options *", + "return": { "type": "int", "comment": " 0 or an error code on failure." }, + "description": "Create a new Git repository in the given folder with extended controls.
\n", + "comments": "This will initialize a new git repository (creating the repo_path if requested by flags) and working directory as needed. It will auto-detect the case sensitivity of the file system and if the file system supports file mode bits correctly.
\n\nNote that the libgit2 library must be initialized using git_libgit2_init before any APIs can be called, including this one.
Gather file status information and run callbacks as requested.
\n", - "comments": "This is an extended version of the git_status_foreach() API that\n allows for more granular control over which paths will be processed and\n in what order. See the git_status_options structure for details\n about the additional controls that this makes available.
Note that if a pathspec is given in the git_status_options to filter\n the status, then the results from rename detection (if you enable it) may\n not be accurate. To do rename detection properly, this must be called\n with no pathspec so that all files can be considered.
Retrieve and resolve the reference pointed at by HEAD.
\n", + "comments": "The returned git_reference will be owned by caller and git_reference_free() must be called when done with it to release the allocated memory and prevent a leak.
Get file status for a single file.
\n", - "comments": "This tries to get status for the filename that you give. If no files\n match that name (in either the HEAD, index, or working directory), this\n returns GIT_ENOTFOUND.
\n\nIf the name matches multiple files (for example, if the path names a\n directory or if running on a case- insensitive filesystem and yet the\n HEAD has two entries that both match the path), then this returns\n GIT_EAMBIGUOUS because it cannot give correct results.
This does not do any sort of rename detection. Renames require a set of\n targets and because of the path filtering, there is not enough\n information to check renames correctly. To check file status with rename\n detection, there is no choice but to do a full git_status_list_new and\n scan through looking for the path that you are interested in.
Retrieve the referenced HEAD for the worktree
\n", + "comments": "", + "group": "repository" }, - "git_status_list_new": { + "git_repository_head_detached": { "type": "function", - "file": "git2/status.h", - "line": 317, - "lineto": 320, + "file": "git2/repository.h", + "line": 467, + "lineto": 467, "args": [ - { - "name": "out", - "type": "git_status_list **", - "comment": "Pointer to store the status results in" - }, { "name": "repo", "type": "git_repository *", - "comment": "Repository object" - }, - { - "name": "opts", - "type": "const git_status_options *", - "comment": "Status options structure" + "comment": "Repo to test" } ], - "argline": "git_status_list **out, git_repository *repo, const git_status_options *opts", - "sig": "git_status_list **::git_repository *::const git_status_options *", + "argline": "git_repository *repo", + "sig": "git_repository *", "return": { "type": "int", - "comment": " 0 on success or error code" + "comment": " 1 if HEAD is detached, 0 if it's not; error code if there\n was an error." }, - "description": "Gather file status information and populate the git_status_list.
Note that if a pathspec is given in the git_status_options to filter\n the status, then the results from rename detection (if you enable it) may\n not be accurate. To do rename detection properly, this must be called\n with no pathspec so that all files can be considered.
Check if a repository's HEAD is detached
\n", + "comments": "A repository's HEAD is detached when it points directly to a commit instead of a branch.
\n", + "group": "repository" }, - "git_status_list_entrycount": { + "git_repository_head_detached_for_worktree": { "type": "function", - "file": "git2/status.h", - "line": 331, - "lineto": 332, + "file": "git2/repository.h", + "line": 480, + "lineto": 481, "args": [ { - "name": "statuslist", - "type": "git_status_list *", - "comment": "Existing status list object" + "name": "repo", + "type": "git_repository *", + "comment": "a repository object" + }, + { + "name": "name", + "type": "const char *", + "comment": "name of the worktree to retrieve HEAD for" } ], - "argline": "git_status_list *statuslist", - "sig": "git_status_list *", + "argline": "git_repository *repo, const char *name", + "sig": "git_repository *::const char *", "return": { - "type": "size_t", - "comment": " the number of status entries" + "type": "int", + "comment": " 1 if HEAD is detached, 0 if its not; error code if\n there was an error" }, - "description": "Gets the count of status entries in this list.
\n", - "comments": "If there are no changes in status (at least according the options given\n when the status list was created), this can return 0.
\n", - "group": "status", - "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_status_list_entrycount-14", - "ex/v0.28.0/status.html#git_status_list_entrycount-15" - ] - } + "description": "Check if a worktree's HEAD is detached
\n", + "comments": "A worktree's HEAD is detached when it points directly to a commit instead of a branch.
\n", + "group": "repository" }, - "git_status_byindex": { + "git_repository_head_unborn": { "type": "function", - "file": "git2/status.h", - "line": 343, - "lineto": 345, + "file": "git2/repository.h", + "line": 493, + "lineto": 493, "args": [ { - "name": "statuslist", - "type": "git_status_list *", - "comment": "Existing status list object" - }, - { - "name": "idx", - "type": "size_t", - "comment": "Position of the entry" + "name": "repo", + "type": "git_repository *", + "comment": "Repo to test" } ], - "argline": "git_status_list *statuslist, size_t idx", - "sig": "git_status_list *::size_t", + "argline": "git_repository *repo", + "sig": "git_repository *", "return": { - "type": "const git_status_entry *", - "comment": " Pointer to the entry; NULL if out of bounds" + "type": "int", + "comment": " 1 if the current branch is unborn, 0 if it's not; error\n code if there was an error" }, - "description": "Get a pointer to one of the entries in the status list.
\n", - "comments": "The entry is not modifiable and should not be freed.
\n", - "group": "status", - "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_status_byindex-16", - "ex/v0.28.0/status.html#git_status_byindex-17", - "ex/v0.28.0/status.html#git_status_byindex-18", - "ex/v0.28.0/status.html#git_status_byindex-19", - "ex/v0.28.0/status.html#git_status_byindex-20", - "ex/v0.28.0/status.html#git_status_byindex-21" - ] - } + "description": "Check if the current branch is unborn
\n", + "comments": "An unborn branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.
\n", + "group": "repository" }, - "git_status_list_free": { + "git_repository_is_empty": { "type": "function", - "file": "git2/status.h", - "line": 352, - "lineto": 353, + "file": "git2/repository.h", + "line": 507, + "lineto": 507, "args": [ { - "name": "statuslist", - "type": "git_status_list *", - "comment": "Existing status list object" + "name": "repo", + "type": "git_repository *", + "comment": "Repo to test" } ], - "argline": "git_status_list *statuslist", - "sig": "git_status_list *", + "argline": "git_repository *repo", + "sig": "git_repository *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 1 if the repository is empty, 0 if it isn't, error code\n if the repository is corrupted" }, - "description": "Free an existing status list
\n", - "comments": "", - "group": "status", - "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_status_list_free-22" - ] - } + "description": "Check if a repository is empty
\n", + "comments": "An empty repository has just been initialized and contains no references apart from HEAD, which must be pointing to the unborn master branch, or the branch specified for the repository in the init.defaultBranch configuration variable.
Test if the ignore rules apply to a given file.
\n", - "comments": "This function checks the ignore rules to see if they would apply to the\n given file. This indicates if the file would be ignored regardless of\n whether the file is already in the index or committed to the repository.
\n\nOne way to think of this is if you were to do "git add ." on the\n directory containing the file, would it be added or not?
\n", - "group": "status" + "description": "Get the location of a specific repository file or directory
\n", + "comments": "This function will retrieve the path of a specific repository item. It will thereby honor things like the repository's common directory, gitdir, etc. In case a file path cannot exist for a given item (e.g. the working directory of a bare repository), GIT_ENOTFOUND is returned.
\n", + "group": "repository" }, - "git_strarray_free": { + "git_repository_path": { "type": "function", - "file": "git2/strarray.h", - "line": 41, - "lineto": 41, + "file": "git2/repository.h", + "line": 556, + "lineto": 556, "args": [ { - "name": "array", - "type": "git_strarray *", - "comment": "git_strarray from which to free string data" + "name": "repo", + "type": "const git_repository *", + "comment": "A repository object" } ], - "argline": "git_strarray *array", - "sig": "git_strarray *", + "argline": "const git_repository *repo", + "sig": "const git_repository *", "return": { - "type": "void", - "comment": null + "type": "const char *", + "comment": " the path to the repository" }, - "description": "Close a string array object
\n", - "comments": "This method should be called on git_strarray objects where the strings\n array is allocated and contains allocated strings, such as what you\n would get from git_strarray_copy(). Not doing so, will result in a\n memory leak.
This does not free the git_strarray itself, since the library will\n never allocate that object directly itself (it is more commonly embedded\n inside another struct or created on the stack).
Get the path of this repository
\n", + "comments": "This is the path of the .git folder for normal repositories, or of the repository itself for bare repositories.
Copy a string array object from source to target.
\n", - "comments": "Note: target is overwritten and hence should be empty, otherwise its\n contents are leaked. Call git_strarray_free() if necessary.
\n", - "group": "strarray" + "description": "Get the path of the working directory for this repository
\n", + "comments": "If the repository is bare, this function will always return NULL.
\n", + "group": "repository", + "examples": { "init.c": ["ex/v1.9.1/init.html#git_repository_workdir-8"] } }, - "git_submodule_update_init_options": { + "git_repository_commondir": { "type": "function", - "file": "git2/submodule.h", - "line": 171, - "lineto": 172, + "file": "git2/repository.h", + "line": 579, + "lineto": 579, "args": [ { - "name": "opts", - "type": "git_submodule_update_options *", - "comment": "The `git_submodule_update_options` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "The struct version; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`." + "name": "repo", + "type": "const git_repository *", + "comment": "A repository object" } ], - "argline": "git_submodule_update_options *opts, unsigned int version", - "sig": "git_submodule_update_options *::unsigned int", + "argline": "const git_repository *repo", + "sig": "const git_repository *", "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." + "type": "const char *", + "comment": " the path to the common dir" }, - "description": "Initialize git_submodule_update_options structure
\n", - "comments": "Initializes a git_submodule_update_options with default values. Equivalent to\n creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.
Get the path of the shared common directory for this repository.
\n", + "comments": "If the repository is bare, it is the root directory for the repository. If the repository is a worktree, it is the parent repo's gitdir. Otherwise, it is the gitdir.
\n", + "group": "repository" }, - "git_submodule_update": { + "git_repository_set_workdir": { "type": "function", - "file": "git2/submodule.h", - "line": 192, - "lineto": 192, + "file": "git2/repository.h", + "line": 598, + "lineto": 599, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "Submodule object" + "name": "repo", + "type": "git_repository *", + "comment": "A repository object" }, { - "name": "init", - "type": "int", - "comment": "If the submodule is not initialized, setting this flag to true\n will initialize the submodule before updating. Otherwise, this will\n return an error if attempting to update an uninitialzed repository.\n but setting this to true forces them to be updated." + "name": "workdir", + "type": "const char *", + "comment": "The path to a working directory" }, { - "name": "options", - "type": "git_submodule_update_options *", - "comment": "configuration options for the update. If NULL, the\n function works as though GIT_SUBMODULE_UPDATE_OPTIONS_INIT was passed." + "name": "update_gitlink", + "type": "int", + "comment": "Create/update gitlink in workdir and set config\n \"core.worktree\" (if workdir is not the parent of the .git directory)" } ], - "argline": "git_submodule *submodule, int init, git_submodule_update_options *options", - "sig": "git_submodule *::int::git_submodule_update_options *", - "return": { - "type": "int", - "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `git_error_last` for a detailed error message)." - }, - "description": "Update a submodule. This will clone a missing submodule and\n checkout the subrepository to the commit specified in the index of\n the containing repository. If the submodule repository doesn't contain\n the target commit (e.g. because fetchRecurseSubmodules isn't set), then\n the submodule is fetched using the fetch options supplied in options.
\n", - "comments": "", - "group": "submodule" + "argline": "git_repository *repo, const char *workdir, int update_gitlink", + "sig": "git_repository *::const char *::int", + "return": { "type": "int", "comment": " 0, or an error code" }, + "description": "Set the path to the working directory for this repository
\n", + "comments": "The working directory doesn't need to be the same one that contains the .git folder for this repository.
If this repository is bare, setting its working directory will turn it into a normal repository, capable of performing all the common workdir operations (checkout, status, index manipulation, etc).
\n", + "group": "repository" }, - "git_submodule_lookup": { + "git_repository_is_bare": { "type": "function", - "file": "git2/submodule.h", - "line": 221, - "lineto": 224, + "file": "git2/repository.h", + "line": 607, + "lineto": 607, "args": [ - { - "name": "out", - "type": "git_submodule **", - "comment": "Output ptr to submodule; pass NULL to just get return code" - }, { "name": "repo", - "type": "git_repository *", - "comment": "The parent repository" - }, - { - "name": "name", - "type": "const char *", - "comment": "The name of or path to the submodule; trailing slashes okay" + "type": "const git_repository *", + "comment": "Repo to test" } ], - "argline": "git_submodule **out, git_repository *repo, const char *name", - "sig": "git_submodule **::git_repository *::const char *", + "argline": "const git_repository *repo", + "sig": "const git_repository *", "return": { "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND if submodule does not exist,\n GIT_EEXISTS if a repository is found in working directory only,\n -1 on other errors." + "comment": " 1 if the repository is bare, 0 otherwise." }, - "description": "Lookup submodule information by name or path.
\n", - "comments": "Given either the submodule name or path (they are usually the same), this\n returns a structure describing the submodule.
\n\nThere are two expected error scenarios:
\n\nYou must call git_submodule_free when done with the submodule.
Check if a repository is bare
\n", + "comments": "", + "group": "repository", + "examples": { + "status.c": ["ex/v1.9.1/status.html#git_repository_is_bare-5"] + } }, - "git_submodule_free": { + "git_repository_is_worktree": { "type": "function", - "file": "git2/submodule.h", - "line": 231, - "lineto": 231, + "file": "git2/repository.h", + "line": 615, + "lineto": 615, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "Submodule object" + "name": "repo", + "type": "const git_repository *", + "comment": "Repo to test" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", + "argline": "const git_repository *repo", + "sig": "const git_repository *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 1 if the repository is a linked work tree, 0 otherwise." }, - "description": "Release a submodule
\n", + "description": "Check if a repository is a linked work tree
\n", "comments": "", - "group": "submodule" + "group": "repository" }, - "git_submodule_foreach": { + "git_repository_config": { "type": "function", - "file": "git2/submodule.h", - "line": 251, - "lineto": 254, + "file": "git2/repository.h", + "line": 631, + "lineto": 631, "args": [ + { + "name": "out", + "type": "git_config **", + "comment": "Pointer to store the loaded configuration" + }, { "name": "repo", "type": "git_repository *", - "comment": "The repository" - }, + "comment": "A repository object" + } + ], + "argline": "git_config **out, git_repository *repo", + "sig": "git_config **::git_repository *", + "return": { "type": "int", "comment": " 0, or an error code" }, + "description": "Get the configuration file for this repository.
\n", + "comments": "If a configuration file has not been set, the default config set for the repository will be returned, including global and system configurations (if they are available).
\n\nThe configuration file must be freed once it's no longer being used by the user.
\n", + "group": "repository", + "examples": { + "config.c": ["ex/v1.9.1/config.html#git_repository_config-9"] + } + }, + "git_repository_config_snapshot": { + "type": "function", + "file": "git2/repository.h", + "line": 647, + "lineto": 647, + "args": [ { - "name": "callback", - "type": "git_submodule_cb", - "comment": "Function to be called with the name of each submodule.\n Return a non-zero value to terminate the iteration." + "name": "out", + "type": "git_config **", + "comment": "Pointer to store the loaded configuration" }, { - "name": "payload", - "type": "void *", - "comment": "Extra data to pass to callback" + "name": "repo", + "type": "git_repository *", + "comment": "the repository" } - ], - "argline": "git_repository *repo, git_submodule_cb callback, void *payload", - "sig": "git_repository *::git_submodule_cb::void *", - "return": { - "type": "int", - "comment": " 0 on success, -1 on error, or non-zero return value of callback" - }, - "description": "Iterate over all tracked submodules of a repository.
\n", - "comments": "See the note on git_submodule above. This iterates over the tracked\n submodules as described therein.
If you are concerned about items in the working directory that look like\n submodules but are not tracked, the diff API will generate a diff record\n for workdir items that look like submodules but are not tracked, showing\n them as added in the workdir. Also, the status API will treat the entire\n subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.
\n", - "group": "submodule", + ], + "argline": "git_config **out, git_repository *repo", + "sig": "git_config **::git_repository *", + "return": { "type": "int", "comment": " 0, or an error code" }, + "description": "Get a snapshot of the repository's configuration
\n", + "comments": "Convenience function to take a snapshot from the repository's configuration. The contents of this snapshot will not change, even if the underlying config files are modified.
\n\nThe configuration file must be freed once it's no longer being used by the user.
\n", + "group": "repository", "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_submodule_foreach-23" + "general.c": [ + "ex/v1.9.1/general.html#git_repository_config_snapshot-77", + "ex/v1.9.1/general.html#git_repository_config_snapshot-78" ] } }, - "git_submodule_add_setup": { + "git_repository_odb": { "type": "function", - "file": "git2/submodule.h", - "line": 281, - "lineto": 286, + "file": "git2/repository.h", + "line": 663, + "lineto": 663, "args": [ { "name": "out", - "type": "git_submodule **", - "comment": "The newly created submodule ready to open for clone" + "type": "git_odb **", + "comment": "Pointer to store the loaded ODB" }, { "name": "repo", "type": "git_repository *", - "comment": "The repository in which you want to create the submodule" - }, - { - "name": "url", - "type": "const char *", - "comment": "URL for the submodule's remote" - }, + "comment": "A repository object" + } + ], + "argline": "git_odb **out, git_repository *repo", + "sig": "git_odb **::git_repository *", + "return": { "type": "int", "comment": " 0, or an error code" }, + "description": "Get the Object Database for this repository.
\n", + "comments": "If a custom ODB has not been set, the default database for the repository will be returned (the one located in .git/objects).
The ODB must be freed once it's no longer being used by the user.
\n", + "group": "repository", + "examples": { + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_repository_odb-29"], + "general.c": ["ex/v1.9.1/general.html#git_repository_odb-79"] + } + }, + "git_repository_refdb": { + "type": "function", + "file": "git2/repository.h", + "line": 679, + "lineto": 679, + "args": [ { - "name": "path", - "type": "const char *", - "comment": "Path at which the submodule should be created" + "name": "out", + "type": "git_refdb **", + "comment": "Pointer to store the loaded refdb" }, { - "name": "use_gitlink", - "type": "int", - "comment": "Should workdir contain a gitlink to the repo in\n .git/modules vs. repo directly in workdir." + "name": "repo", + "type": "git_repository *", + "comment": "A repository object" } ], - "argline": "git_submodule **out, git_repository *repo, const char *url, const char *path, int use_gitlink", - "sig": "git_submodule **::git_repository *::const char *::const char *::int", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EEXISTS if submodule already exists,\n -1 on other errors." - }, - "description": "Set up a new git submodule for checkout.
\n", - "comments": "This does "git submodule add" up to the fetch and checkout of the\n submodule contents. It preps a new submodule, creates an entry in\n .gitmodules and creates an empty initialized repository either at the\n given path in the working directory or in .git/modules with a gitlink\n from the working directory to the new repo.
\n\nTo fully emulate "git submodule add" call this function, then open the\n submodule repo and perform the clone step as needed. Lastly, call\n git_submodule_add_finalize() to wrap up adding the new submodule and\n .gitmodules to the index to be ready to commit.
You must call git_submodule_free on the submodule object when done.
Get the Reference Database Backend for this repository.
\n", + "comments": "If a custom refsdb has not been set, the default database for the repository will be returned (the one that manipulates loose and packed references in the .git directory).
The refdb must be freed once it's no longer being used by the user.
\n", + "group": "repository" }, - "git_submodule_add_finalize": { + "git_repository_index": { "type": "function", - "file": "git2/submodule.h", - "line": 298, - "lineto": 298, + "file": "git2/repository.h", + "line": 695, + "lineto": 695, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "The submodule to finish adding." + "name": "out", + "type": "git_index **", + "comment": "Pointer to store the loaded index" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "A repository object" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", - "return": { - "type": "int", - "comment": null - }, - "description": "Resolve the setup of a new git submodule.
\n", - "comments": "This should be called on a submodule once you have called add setup\n and done the clone of the submodule. This adds the .gitmodules file\n and the newly cloned submodule to the index to be ready to be committed\n (but doesn't actually do the commit).
\n", - "group": "submodule" + "argline": "git_index **out, git_repository *repo", + "sig": "git_index **::git_repository *", + "return": { "type": "int", "comment": " 0, or an error code" }, + "description": "Get the Index file for this repository.
\n", + "comments": "If a custom index has not been set, the default index for the repository will be returned (the one located in .git/index).
The index must be freed once it's no longer being used by the user.
\n", + "group": "repository", + "examples": { + "add.c": ["ex/v1.9.1/add.html#git_repository_index-5"], + "commit.c": ["ex/v1.9.1/commit.html#git_repository_index-8"], + "general.c": ["ex/v1.9.1/general.html#git_repository_index-80"], + "init.c": ["ex/v1.9.1/init.html#git_repository_index-9"], + "ls-files.c": ["ex/v1.9.1/ls-files.html#git_repository_index-5"], + "merge.c": ["ex/v1.9.1/merge.html#git_repository_index-33"] + } }, - "git_submodule_add_to_index": { + "git_repository_message": { "type": "function", - "file": "git2/submodule.h", - "line": 310, - "lineto": 312, + "file": "git2/repository.h", + "line": 713, + "lineto": 713, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "The submodule to add to the index" + "name": "out", + "type": "git_buf *", + "comment": "git_buf to write data into" }, { - "name": "write_index", - "type": "int", - "comment": "Boolean if this should immediately write the index\n file. If you pass this as false, you will have to get the\n git_index and explicitly call `git_index_write()` on it to\n save the change." + "name": "repo", + "type": "git_repository *", + "comment": "Repository to read prepared message from" } ], - "argline": "git_submodule *submodule, int write_index", - "sig": "git_submodule *::int", + "argline": "git_buf *out, git_repository *repo", + "sig": "git_buf *::git_repository *", "return": { "type": "int", - "comment": " 0 on success, \n<\n0 on failure" + "comment": " 0, GIT_ENOTFOUND if no message exists or an error code" }, - "description": "Add current submodule HEAD commit to index of superproject.
\n", - "comments": "", - "group": "submodule" + "description": "Retrieve git's prepared message
\n", + "comments": "Operations such as git revert/cherry-pick/merge with the -n option stop just short of creating a commit with the changes and save their prepared message in .git/MERGE_MSG so the next git-commit execution can present it to the user for them to amend if they wish.
\n\nUse this function to get the contents of this file. Don't forget to remove the file after you create the commit.
\n", + "group": "repository" }, - "git_submodule_owner": { + "git_repository_message_remove": { "type": "function", - "file": "git2/submodule.h", - "line": 325, - "lineto": 325, + "file": "git2/repository.h", + "line": 723, + "lineto": 723, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "Pointer to submodule object" + "name": "repo", + "type": "git_repository *", + "comment": "Repository to remove prepared message from." } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", - "return": { - "type": "git_repository *", - "comment": " Pointer to `git_repository`" - }, - "description": "Get the containing repository for a submodule.
\n", - "comments": "This returns a pointer to the repository that contains the submodule.\n This is a just a reference to the repository that was passed to the\n original git_submodule_lookup() call, so if that repository has been\n freed, then this may be a dangling reference.
Remove git's prepared message.
\n", + "comments": "Remove the message that git_repository_message retrieves.
Get the name of submodule.
\n", + "argline": "git_repository *repo", + "sig": "git_repository *", + "return": { "type": "int", "comment": " 0 on success, or error" }, + "description": "Remove all the metadata associated with an ongoing command like merge,\n revert, cherry-pick, etc. For example: MERGE_HEAD, MERGE_MSG, etc.
\n", "comments": "", - "group": "submodule", + "group": "repository", "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_submodule_name-24" - ] + "merge.c": ["ex/v1.9.1/merge.html#git_repository_state_cleanup-34"] } }, - "git_submodule_path": { + "git_repository_fetchhead_foreach": { "type": "function", - "file": "git2/submodule.h", - "line": 344, - "lineto": 344, + "file": "git2/repository.h", + "line": 763, + "lineto": 766, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "Pointer to submodule object" + "name": "repo", + "type": "git_repository *", + "comment": "A repository object" + }, + { + "name": "callback", + "type": "git_repository_fetchhead_foreach_cb", + "comment": "Callback function" + }, + { + "name": "payload", + "type": "void *", + "comment": "Pointer to callback data (optional)" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", + "argline": "git_repository *repo, git_repository_fetchhead_foreach_cb callback, void *payload", + "sig": "git_repository *::git_repository_fetchhead_foreach_cb::void *", "return": { - "type": "const char *", - "comment": " Pointer to the submodule path" + "type": "int", + "comment": " 0 on success, non-zero callback return value, GIT_ENOTFOUND if\n there is no FETCH_HEAD file, or other error code." }, - "description": "Get the path to the submodule.
\n", - "comments": "The path is almost always the same as the submodule name, but the\n two are actually not required to match.
\n", - "group": "submodule", - "examples": { - "status.c": [ - "ex/v0.28.0/status.html#git_submodule_path-25" - ] - } + "description": "Invoke 'callback' for each entry in the given FETCH_HEAD file.
\n", + "comments": "Return a non-zero value from the callback to stop the loop.
\n", + "group": "repository" }, - "git_submodule_url": { + "git_repository_mergehead_foreach": { "type": "function", - "file": "git2/submodule.h", - "line": 352, - "lineto": 352, + "file": "git2/repository.h", + "line": 792, + "lineto": 795, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "Pointer to submodule object" + "name": "repo", + "type": "git_repository *", + "comment": "A repository object" + }, + { + "name": "callback", + "type": "git_repository_mergehead_foreach_cb", + "comment": "Callback function" + }, + { + "name": "payload", + "type": "void *", + "comment": "Pointer to callback data (optional)" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", + "argline": "git_repository *repo, git_repository_mergehead_foreach_cb callback, void *payload", + "sig": "git_repository *::git_repository_mergehead_foreach_cb::void *", "return": { - "type": "const char *", - "comment": " Pointer to the submodule url" + "type": "int", + "comment": " 0 on success, non-zero callback return value, GIT_ENOTFOUND if\n there is no MERGE_HEAD file, or other error code." }, - "description": "Get the URL for the submodule.
\n", - "comments": "", - "group": "submodule" + "description": "If a merge is in progress, invoke 'callback' for each commit ID in the\n MERGE_HEAD file.
\n", + "comments": "Return a non-zero value from the callback to stop the loop.
\n", + "group": "repository" }, - "git_submodule_resolve_url": { + "git_repository_hashfile": { "type": "function", - "file": "git2/submodule.h", - "line": 362, - "lineto": 362, + "file": "git2/repository.h", + "line": 822, + "lineto": 827, "args": [ { "name": "out", - "type": "git_buf *", - "comment": "buffer to store the absolute submodule url in" + "type": "git_oid *", + "comment": "Output value of calculated SHA" }, { "name": "repo", "type": "git_repository *", - "comment": "Pointer to repository object" + "comment": "Repository pointer" }, { - "name": "url", + "name": "path", + "type": "const char *", + "comment": "Path to file on disk whose contents should be hashed. This\n may be an absolute path or a relative path, in which case it\n will be treated as a path within the working directory." + }, + { + "name": "type", + "type": "git_object_t", + "comment": "The object type to hash as (e.g. GIT_OBJECT_BLOB)" + }, + { + "name": "as_path", "type": "const char *", - "comment": "Relative url" + "comment": "The path to use to look up filtering rules. If this is\n an empty string then no filters will be applied when\n calculating the hash. If this is `NULL` and the `path`\n parameter is a file within the repository's working\n directory, then the `path` will be used." } ], - "argline": "git_buf *out, git_repository *repo, const char *url", - "sig": "git_buf *::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Resolve a submodule url relative to the given repository.
\n", - "comments": "", - "group": "submodule" + "argline": "git_oid *out, git_repository *repo, const char *path, git_object_t type, const char *as_path", + "sig": "git_oid *::git_repository *::const char *::git_object_t::const char *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Calculate hash of file using repository filtering rules.
\n", + "comments": "If you simply want to calculate the hash of a file on disk with no filters, you can just use the git_odb_hashfile() API. However, if you want to hash a file in the repository and you want to apply filtering rules (e.g. crlf filters) before generating the SHA, then use this function.
Note: if the repository has core.safecrlf set to fail and the filtering triggers that failure, then this function will return an error and not calculate the hash of the file.
Get the branch for the submodule.
\n", - "comments": "", - "group": "submodule" + "argline": "git_repository *repo, const char *refname", + "sig": "git_repository *::const char *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Make the repository HEAD point to the specified reference.
\n", + "comments": "If the provided reference points to a Tree or a Blob, the HEAD is unaltered and -1 is returned.
\n\nIf the provided reference points to a branch, the HEAD will point to that branch, staying attached, or become attached if it isn't yet. If the branch doesn't exist yet, no error will be return. The HEAD will then be attached to an unborn branch.
\n\nOtherwise, the HEAD will be detached and will directly point to the Commit.
\n", + "group": "repository", + "examples": { + "checkout.c": ["ex/v1.9.1/checkout.html#git_repository_set_head-23"] + } }, - "git_submodule_set_branch": { + "git_repository_set_head_detached": { "type": "function", - "file": "git2/submodule.h", - "line": 383, - "lineto": 383, + "file": "git2/repository.h", + "line": 867, + "lineto": 869, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository to affect" - }, - { - "name": "name", - "type": "const char *", - "comment": "the name of the submodule to configure" + "comment": "Repository pointer" }, { - "name": "branch", - "type": "const char *", - "comment": "Branch that should be used for the submodule" + "name": "committish", + "type": "const git_oid *", + "comment": "Object id of the Commit the HEAD should point to" } ], - "argline": "git_repository *repo, const char *name, const char *branch", - "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on failure" - }, - "description": "Set the branch for the submodule in the configuration
\n", - "comments": "After calling this, you may wish to call git_submodule_sync() to\n write the changes to the checked out submodule repository.
Make the repository HEAD directly point to the Commit.
\n", + "comments": "If the provided committish cannot be found in the repository, the HEAD is unaltered and GIT_ENOTFOUND is returned.
\n\nIf the provided committish cannot be peeled into a commit, the HEAD is unaltered and -1 is returned.
\n\nOtherwise, the HEAD will eventually be detached and will directly point to the peeled Commit.
\n", + "group": "repository" }, - "git_submodule_set_url": { + "git_repository_set_head_detached_from_annotated": { "type": "function", - "file": "git2/submodule.h", - "line": 397, - "lineto": 397, + "file": "git2/repository.h", + "line": 885, + "lineto": 887, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository to affect" - }, - { - "name": "name", - "type": "const char *", - "comment": "the name of the submodule to configure" + "comment": "Repository pointer" }, { - "name": "url", - "type": "const char *", - "comment": "URL that should be used for the submodule" + "name": "committish", + "type": "const git_annotated_commit *", + "comment": "annotated commit to point HEAD to" } ], - "argline": "git_repository *repo, const char *name, const char *url", - "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on failure" - }, - "description": "Set the URL for the submodule in the configuration
\n", - "comments": "After calling this, you may wish to call git_submodule_sync() to\n write the changes to the checked out submodule repository.
Make the repository HEAD directly point to the Commit.
\n", + "comments": "This behaves like git_repository_set_head_detached() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.
See the documentation for git_repository_set_head_detached().
Get the OID for the submodule in the index.
\n", - "comments": "", - "group": "submodule" + "description": "Detach the HEAD.
\n", + "comments": "If the HEAD is already detached and points to a Commit, 0 is returned.
\n\nIf the HEAD is already detached and points to a Tag, the HEAD is updated into making it point to the peeled Commit, and 0 is returned.
\n\nIf the HEAD is already detached and points to a non committish, the HEAD is unaltered, and -1 is returned.
\n\nOtherwise, the HEAD will be detached and point to the peeled Commit.
\n", + "group": "repository" }, - "git_submodule_head_id": { + "git_repository_state": { "type": "function", - "file": "git2/submodule.h", - "line": 413, - "lineto": 413, + "file": "git2/repository.h", + "line": 937, + "lineto": 937, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "Pointer to submodule object" + "name": "repo", + "type": "git_repository *", + "comment": "Repository pointer" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", - "return": { - "type": "const git_oid *", - "comment": " Pointer to git_oid or NULL if submodule is not in the HEAD." - }, - "description": "Get the OID for the submodule in the current HEAD tree.
\n", + "argline": "git_repository *repo", + "sig": "git_repository *", + "return": { "type": "int", "comment": " The state of the repository" }, + "description": "Determines the status of a git repository - ie, whether an operation\n (merge, cherry-pick, etc) is in progress.
\n", "comments": "", - "group": "submodule" + "group": "repository", + "examples": { + "checkout.c": ["ex/v1.9.1/checkout.html#git_repository_state-25"], + "merge.c": ["ex/v1.9.1/merge.html#git_repository_state-35"] + } }, - "git_submodule_wd_id": { + "git_repository_set_namespace": { "type": "function", - "file": "git2/submodule.h", - "line": 426, - "lineto": 426, + "file": "git2/repository.h", + "line": 951, + "lineto": 951, "args": [ + { "name": "repo", "type": "git_repository *", "comment": "The repo" }, { - "name": "submodule", - "type": "git_submodule *", - "comment": "Pointer to submodule object" + "name": "nmspace", + "type": "const char *", + "comment": "The namespace. This should not include the refs\n\tfolder, e.g. to namespace all references under `refs/namespaces/foo/`,\n\tuse `foo` as the namespace." } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", - "return": { - "type": "const git_oid *", - "comment": " Pointer to git_oid or NULL if submodule is not checked out." - }, - "description": "Get the OID for the submodule in the current working directory.
\n", - "comments": "This returns the OID that corresponds to looking up 'HEAD' in the checked\n out submodule. If there are pending changes in the index or anything\n else, this won't notice that. You should call git_submodule_status()\n for a more complete picture about the state of the working directory.
Sets the active namespace for this Git Repository
\n", + "comments": "This namespace affects all reference operations for the repo. See man gitnamespaces
Get the ignore rule that will be used for the submodule.
\n", - "comments": "These values control the behavior of git_submodule_status() for this\n submodule. There are four ignore values:
git_status_foreach() on the submodule) but\nUNTRACKED files will not count as making the submodule dirty.Get the currently active namespace for this repository
\n", + "comments": "", + "group": "repository" }, - "git_submodule_set_ignore": { + "git_repository_is_shallow": { "type": "function", - "file": "git2/submodule.h", - "line": 464, - "lineto": 467, + "file": "git2/repository.h", + "line": 968, + "lineto": 968, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository to affect" - }, - { - "name": "name", - "type": "const char *", - "comment": "the name of the submdule" - }, - { - "name": "ignore", - "type": "git_submodule_ignore_t", - "comment": "The new value for the ignore rule" + "comment": "The repository" } ], - "argline": "git_repository *repo, const char *name, git_submodule_ignore_t ignore", - "sig": "git_repository *::const char *::git_submodule_ignore_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Set the ignore rule for the submodule in the configuration
\n", - "comments": "This does not affect any currently-loaded instances.
\n", - "group": "submodule" + "argline": "git_repository *repo", + "sig": "git_repository *", + "return": { "type": "int", "comment": " 1 if shallow, zero if not" }, + "description": "Determine if the repository was a shallow clone
\n", + "comments": "", + "group": "repository" }, - "git_submodule_update_strategy": { + "git_repository_ident": { "type": "function", - "file": "git2/submodule.h", - "line": 479, - "lineto": 480, + "file": "git2/repository.h", + "line": 981, + "lineto": 981, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "The submodule to check" + "name": "name", + "type": "const char **", + "comment": "where to store the pointer to the name" + }, + { + "name": "email", + "type": "const char **", + "comment": "where to store the pointer to the email" + }, + { + "name": "repo", + "type": "const git_repository *", + "comment": "the repository" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", - "return": { - "type": "git_submodule_update_t", - "comment": " The current git_submodule_update_t value that will be used\n for this submodule." - }, - "description": "Get the update rule that will be used for the submodule.
\n", - "comments": "This value controls the behavior of the git submodule update command.\n There are four useful values documented with git_submodule_update_t.
Retrieve the configured identity to use for reflogs
\n", + "comments": "The memory is owned by the repository and must not be freed by the user.
\n", + "group": "repository" }, - "git_submodule_set_update": { + "git_repository_set_ident": { "type": "function", - "file": "git2/submodule.h", - "line": 492, - "lineto": 495, + "file": "git2/repository.h", + "line": 995, + "lineto": 995, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository to affect" + "comment": "the repository to configure" }, { "name": "name", "type": "const char *", - "comment": "the name of the submodule to configure" + "comment": "the name to use for the reflog entries" }, { - "name": "update", - "type": "git_submodule_update_t", - "comment": "The new value to use" + "name": "email", + "type": "const char *", + "comment": "the email to use for the reflog entries" } ], - "argline": "git_repository *repo, const char *name, git_submodule_update_t update", - "sig": "git_repository *::const char *::git_submodule_update_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Set the update rule for the submodule in the configuration
\n", - "comments": "This setting won't affect any existing instances.
\n", - "group": "submodule" + "argline": "git_repository *repo, const char *name, const char *email", + "sig": "git_repository *::const char *::const char *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Set the identity to be used for writing reflogs
\n", + "comments": "If both are set, this name and email will be used to write to the reflog. Pass NULL to unset. When unset, the identity will be taken from the repository's configuration.
\n", + "group": "repository" }, - "git_submodule_fetch_recurse_submodules": { + "git_repository_oid_type": { "type": "function", - "file": "git2/submodule.h", - "line": 508, - "lineto": 509, + "file": "git2/repository.h", + "line": 1003, + "lineto": 1003, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": null + "name": "repo", + "type": "git_repository *", + "comment": "the repository" } ], - "argline": "git_submodule *submodule", - "sig": "git_submodule *", - "return": { - "type": "git_submodule_recurse_t", - "comment": " 0 if fetchRecurseSubmodules is false, 1 if true" - }, - "description": "Read the fetchRecurseSubmodules rule for a submodule.
\n", - "comments": "This accesses the submodule.\n<name
\n\n\n\n\n.fetchRecurseSubmodules value for\n the submodule that controls fetching behavior for the submodule.
\n
Note that at this time, libgit2 does not honor this setting and the\n fetch functionality current ignores submodules.
\n", - "group": "submodule" + "argline": "git_repository *repo", + "sig": "git_repository *", + "return": { "type": "git_oid_t", "comment": " the object id type" }, + "description": "Gets the object type used by this repository.
\n", + "comments": "", + "group": "repository" }, - "git_submodule_set_fetch_recurse_submodules": { + "git_repository_commit_parents": { "type": "function", - "file": "git2/submodule.h", - "line": 521, - "lineto": 524, + "file": "git2/repository.h", + "line": 1014, + "lineto": 1014, "args": [ + { + "name": "commits", + "type": "git_commitarray *", + "comment": "a `git_commitarray` that will contain the commit parents" + }, { "name": "repo", "type": "git_repository *", - "comment": "the repository to affect" + "comment": "the repository" + } + ], + "argline": "git_commitarray *commits, git_repository *repo", + "sig": "git_commitarray *::git_repository *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Gets the parents of the next commit, given the current repository state.\n Generally, this is the HEAD commit, except when performing a merge, in\n which case it is two or more commits.
\n", + "comments": "", + "group": "repository" + }, + "git_reset": { + "type": "function", + "file": "git2/reset.h", + "line": 62, + "lineto": 66, + "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "Repository where to perform the reset operation." }, { - "name": "name", - "type": "const char *", - "comment": "the submodule to configure" + "name": "target", + "type": "const git_object *", + "comment": "Committish to which the Head should be moved to. This object\n must belong to the given `repo` and can either be a git_commit or a\n git_tag. When a git_tag is being passed, it should be dereferenceable\n to a git_commit which oid will be used as the target of the branch." }, { - "name": "fetch_recurse_submodules", - "type": "git_submodule_recurse_t", - "comment": "Boolean value" + "name": "reset_type", + "type": "git_reset_t", + "comment": "Kind of reset operation to perform." + }, + { + "name": "checkout_opts", + "type": "const git_checkout_options *", + "comment": "Optional checkout options to be used for a HARD reset.\n The checkout_strategy field will be overridden (based on reset_type).\n This parameter can be used to propagate notify and progress callbacks." } ], - "argline": "git_repository *repo, const char *name, git_submodule_recurse_t fetch_recurse_submodules", - "sig": "git_repository *::const char *::git_submodule_recurse_t", - "return": { - "type": "int", - "comment": " old value for fetchRecurseSubmodules" - }, - "description": "Set the fetchRecurseSubmodules rule for a submodule in the configuration
\n", - "comments": "This setting won't affect any existing instances.
\n", - "group": "submodule" + "argline": "git_repository *repo, const git_object *target, git_reset_t reset_type, const git_checkout_options *checkout_opts", + "sig": "git_repository *::const git_object *::git_reset_t::const git_checkout_options *", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Sets the current head to the specified commit oid and optionally\n resets the index and working tree to match.
\n", + "comments": "SOFT reset means the Head will be moved to the commit.
\n\nMIXED reset will trigger a SOFT reset, plus the index will be replaced with the content of the commit tree.
\n\nHARD reset will trigger a MIXED reset and the working directory will be replaced with the content of the index. (Untracked and ignored files will be left alone, however.)
\n\nTODO: Implement remaining kinds of resets.
\n", + "group": "reset" }, - "git_submodule_init": { + "git_reset_from_annotated": { "type": "function", - "file": "git2/submodule.h", - "line": 539, - "lineto": 539, + "file": "git2/reset.h", + "line": 92, + "lineto": 96, "args": [ { - "name": "submodule", - "type": "git_submodule *", - "comment": "The submodule to write into the superproject config" + "name": "repo", + "type": "git_repository *", + "comment": "Repository where to perform the reset operation." }, { - "name": "overwrite", - "type": "int", - "comment": "By default, existing entries will not be overwritten,\n but setting this to true forces them to be updated." + "name": "target", + "type": "const git_annotated_commit *", + "comment": "Annotated commit to which the Head should be moved to.\n This object must belong to the given `repo`, it will be dereferenced\n to a git_commit which oid will be used as the target of the branch." + }, + { + "name": "reset_type", + "type": "git_reset_t", + "comment": "Kind of reset operation to perform." + }, + { + "name": "checkout_opts", + "type": "const git_checkout_options *", + "comment": "Optional checkout options to be used for a HARD reset.\n The checkout_strategy field will be overridden (based on reset_type).\n This parameter can be used to propagate notify and progress callbacks." } ], - "argline": "git_submodule *submodule, int overwrite", - "sig": "git_submodule *::int", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on failure." - }, - "description": "Copy submodule info into ".git/config" file.
\n", - "comments": "Just like "git submodule init", this copies information about the\n submodule into ".git/config". You can use the accessor functions\n above to alter the in-memory git_submodule object and control what\n is written to the config, overriding what is in .gitmodules.
\n", - "group": "submodule" + "argline": "git_repository *repo, const git_annotated_commit *target, git_reset_t reset_type, const git_checkout_options *checkout_opts", + "sig": "git_repository *::const git_annotated_commit *::git_reset_t::const git_checkout_options *", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Sets the current head to the specified commit oid and optionally\n resets the index and working tree to match.
\n", + "comments": "This behaves like git_reset() but takes an annotated commit, which lets you specify which extended sha syntax string was specified by a user, allowing for more exact reflog messages.
See the documentation for git_reset().
Set up the subrepository for a submodule in preparation for clone.
\n", - "comments": "This function can be called to init and set up a submodule\n repository from a submodule in preparation to clone it from\n its remote.
\n", - "group": "submodule" + "description": "Updates some entries in the index from the target commit tree.
\n", + "comments": "The scope of the updated entries is determined by the paths being passed in the pathspec parameters.
Passing a NULL target will result in removing entries in the index matching the provided pathspecs.
Copy submodule remote info into submodule repo.
\n", - "comments": "This copies the information about the submodules URL into the checked out\n submodule config, acting like "git submodule sync". This is useful if\n you have altered the URL for the submodule (or it has been altered by a\n fetch of upstream changes) and you need to update your local repo.
\n", - "group": "submodule" + "description": "Initialize git_revert_options structure
\n", + "comments": "Initializes a git_revert_options with default values. Equivalent to creating an instance with GIT_REVERT_OPTIONS_INIT.
Open the repository for a submodule.
\n", - "comments": "This is a newly opened repository object. The caller is responsible for\n calling git_repository_free() on it when done. Multiple calls to this\n function will return distinct git_repository objects. This will only\n work if the submodule is checked out into the working directory.
Reverts the given commit against the given "our" commit, producing an\n index that reflects the result of the revert.
\n", + "comments": "The returned index must be freed explicitly with git_index_free.
Reread submodule info from config, index, and HEAD.
\n", - "comments": "Call this to reread cached submodule information for this submodule if\n you have reason to believe that it has changed.
\n", - "group": "submodule" + "description": "Reverts the given commit, producing changes in the index and working directory.
\n", + "comments": "", + "group": "revert" }, - "git_submodule_status": { + "git_revparse_single": { "type": "function", - "file": "git2/submodule.h", - "line": 611, - "lineto": 615, + "file": "git2/revparse.h", + "line": 37, + "lineto": 38, "args": [ { - "name": "status", - "type": "unsigned int *", - "comment": "Combination of `GIT_SUBMODULE_STATUS` flags" + "name": "out", + "type": "git_object **", + "comment": "pointer to output object" }, { "name": "repo", "type": "git_repository *", - "comment": "the repository in which to look" + "comment": "the repository to search in" }, { - "name": "name", + "name": "spec", "type": "const char *", - "comment": "name of the submodule" - }, - { - "name": "ignore", - "type": "git_submodule_ignore_t", - "comment": "the ignore rules to follow" + "comment": "the textual specification for an object" } ], - "argline": "unsigned int *status, git_repository *repo, const char *name, git_submodule_ignore_t ignore", - "sig": "unsigned int *::git_repository *::const char *::git_submodule_ignore_t", + "argline": "git_object **out, git_repository *repo, const char *spec", + "sig": "git_object **::git_repository *::const char *", "return": { "type": "int", - "comment": " 0 on success, \n<\n0 on error" + "comment": " 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code" }, - "description": "Get the status for a submodule.
\n", - "comments": "This looks at a submodule and tries to determine the status. It\n will return a combination of the GIT_SUBMODULE_STATUS values above.\n How deeply it examines the working directory to do this will depend\n on the git_submodule_ignore_t value for the submodule.
Find a single object, as specified by a revision string.
\n", + "comments": "See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
The returned object should be released with git_object_free when no longer needed.
Get the locations of submodule information.
\n", - "comments": "This is a bit like a very lightweight version of git_submodule_status.\n It just returns a made of the first four submodule status values (i.e.\n the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the\n submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.).\n This can be useful if you want to know if the submodule is present in the\n working directory at this point in time, etc.
Initialize the allocator structure to use the stdalloc pointer.
Set up the structure so that all of its members are using the standard\n "stdalloc" allocator functions. The structure can then be used with\n git_allocator_setup.
Initialize the allocator structure to use the crtdbg pointer.
Set up the structure so that all of its members are using the "crtdbg"\n allocator functions. Note that this allocator is only available on Windows\n platforms and only if libgit2 is being compiled with "-DMSVC_CRTDBG".
\n", - "group": "win32" + "description": "Find a single object and intermediate reference by a revision string.
\n", + "comments": "See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
In some cases (@{<-n>} or <branchname>@{upstream}), the expression may point to an intermediate reference. When such expressions are being passed in, reference_out will be valued as well.
The returned object should be released with git_object_free and the returned reference with git_reference_free when no longer needed.
Create new commit in the repository from a list of git_oid values.
See documentation for git_commit_create() for information about the\n parameters, as the meaning is identical excepting that tree and\n parents now take git_oid. This is a dangerous API in that nor\n the tree, neither the parents list of git_oids are checked for\n validity.
Parse a revision string for from, to, and intent.
See man gitrevisions or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.
Allocate a new revision walker to iterate through a repo.
\n", + "comments": "This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.
\n\nFor maximum performance, this revision walker should be reused for different walks.
\n\nThis revision walker is not thread safe: it may only be used to walk a repository on a single thread; however, it is possible to have several revision walkers in several different threads walking the same repository.
\n", + "group": "revwalk", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_revwalk_new-81"], + "log.c": [ + "ex/v1.9.1/log.html#git_revwalk_new-46", + "ex/v1.9.1/log.html#git_revwalk_new-47" + ] + } + }, + "git_revwalk_reset": { + "type": "function", + "file": "git2/revwalk.h", + "line": 89, + "lineto": 89, + "args": [ { - "name": "parent_payload", - "type": "void *", - "comment": null + "name": "walker", + "type": "git_revwalk *", + "comment": "handle to reset." } ], - "argline": "git_oid *id, git_repository *repo, const char *update_ref, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message, const git_oid *tree, git_commit_parent_callback parent_cb, void *parent_payload", - "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_oid *::git_commit_parent_callback::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Create a new commit in the repository with an callback to supply parents.
\n", - "comments": "See documentation for git_commit_create() for information about the\n parameters, as the meaning is identical excepting that tree takes a\n git_oid and doesn't check for validity, and parent_cb is invoked\n with parent_payload and should return git_oid values or NULL to\n indicate that all parents are accounted for.
Reset the revision walker for reuse.
\n", + "comments": "This will clear all the pushed and hidden commits, and leave the walker in a blank state (just like at creation) ready to receive new commit pushes and start a new walk.
\n\nThe revision walk is automatically reset when a walk is over.
\n", + "group": "revwalk" }, - "git_config_init_backend": { + "git_revwalk_push": { "type": "function", - "file": "git2/sys/config.h", - "line": 97, - "lineto": 99, + "file": "git2/revwalk.h", + "line": 108, + "lineto": 108, "args": [ { - "name": "backend", - "type": "git_config_backend *", - "comment": "the `git_config_backend` struct to initialize." + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal." }, { - "name": "version", - "type": "unsigned int", - "comment": "Version of struct; pass `GIT_CONFIG_BACKEND_VERSION`" + "name": "id", + "type": "const git_oid *", + "comment": "the oid of the commit to start from." } ], - "argline": "git_config_backend *backend, unsigned int version", - "sig": "git_config_backend *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initializes a git_config_backend with default values. Equivalent to\n creating an instance with GIT_CONFIG_BACKEND_INIT.
Add a new root for the traversal
\n", + "comments": "The pushed commit will be marked as one of the roots from which to start the walk. This commit may not be walked if it or a child is hidden.
\n\nAt least one commit must be pushed onto the walker before a walk can be started.
\n\nThe given id must belong to a committish on the walked repository.
\n", + "group": "revwalk", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_revwalk_push-82"], + "log.c": ["ex/v1.9.1/log.html#git_revwalk_push-48"] + } }, - "git_config_add_backend": { + "git_revwalk_push_glob": { "type": "function", - "file": "git2/sys/config.h", - "line": 121, + "file": "git2/revwalk.h", + "line": 126, "lineto": 126, "args": [ { - "name": "cfg", - "type": "git_config *", - "comment": "the configuration to add the file to" - }, - { - "name": "file", - "type": "git_config_backend *", - "comment": "the configuration file (backend) to add" - }, - { - "name": "level", - "type": "git_config_level_t", - "comment": "the priority level of the backend" - }, - { - "name": "repo", - "type": "const git_repository *", - "comment": "optional repository to allow parsing of\n conditional includes" + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" }, { - "name": "force", - "type": "int", - "comment": "if a config file already exists for the given\n priority level, replace it" + "name": "glob", + "type": "const char *", + "comment": "the glob pattern references should match" } ], - "argline": "git_config *cfg, git_config_backend *file, git_config_level_t level, const git_repository *repo, int force", - "sig": "git_config *::git_config_backend *::git_config_level_t::const git_repository *::int", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0), or error code" - }, - "description": "Add a generic config file instance to an existing config
\n", - "comments": "Note that the configuration object will free the file\n automatically.
\n\nFurther queries on this config object will access each\n of the config file instances in order (instances with\n a higher priority level will be accessed first).
\n", - "group": "config" + "argline": "git_revwalk *walk, const char *glob", + "sig": "git_revwalk *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Push matching references
\n", + "comments": "The OIDs pointed to by the references that match the given glob pattern will be pushed to the revision walker.
\n\nA leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.
\n\nAny references matching this glob which do not point to a committish will be ignored.
\n", + "group": "revwalk" }, - "git_diff_print_callback__to_buf": { + "git_revwalk_push_head": { "type": "function", - "file": "git2/sys/diff.h", - "line": 37, - "lineto": 41, + "file": "git2/revwalk.h", + "line": 134, + "lineto": 134, "args": [ { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null - }, - { - "name": "hunk", - "type": "const git_diff_hunk *", - "comment": null - }, - { - "name": "line", - "type": "const git_diff_line *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" } ], - "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload", - "sig": "const git_diff_delta *::const git_diff_hunk *::const git_diff_line *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Diff print callback that writes to a git_buf.
\n", - "comments": "This function is provided not for you to call it directly, but instead\n so you can use it as a function pointer to the git_diff_print or\n git_patch_print APIs. When using those APIs, you specify a callback\n to actually handle the diff and/or patch data.
Use this callback to easily write that data to a git_buf buffer. You\n must pass a git_buf * value as the payload to the git_diff_print\n and/or git_patch_print function. The data will be appended to the\n buffer (after any existing content).
Push the repository's HEAD
\n", + "comments": "", + "group": "revwalk", + "examples": { "log.c": ["ex/v1.9.1/log.html#git_revwalk_push_head-49"] } }, - "git_diff_print_callback__to_file_handle": { + "git_revwalk_hide": { "type": "function", - "file": "git2/sys/diff.h", - "line": 57, - "lineto": 61, + "file": "git2/revwalk.h", + "line": 149, + "lineto": 149, "args": [ { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null - }, - { - "name": "hunk", - "type": "const git_diff_hunk *", - "comment": null - }, - { - "name": "line", - "type": "const git_diff_line *", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal." }, { - "name": "payload", - "type": "void *", - "comment": null + "name": "commit_id", + "type": "const git_oid *", + "comment": "the oid of commit that will be ignored during the traversal" } ], - "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload", - "sig": "const git_diff_delta *::const git_diff_hunk *::const git_diff_line *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Diff print callback that writes to stdio FILE handle.
\n", - "comments": "This function is provided not for you to call it directly, but instead\n so you can use it as a function pointer to the git_diff_print or\n git_patch_print APIs. When using those APIs, you specify a callback\n to actually handle the diff and/or patch data.
Use this callback to easily write that data to a stdio FILE handle. You\n must pass a FILE * value (such as stdout or stderr or the return\n value from fopen()) as the payload to the git_diff_print\n and/or git_patch_print function. If you pass NULL, this will write\n data to stdout.
Mark a commit (and its ancestors) uninteresting for the output.
\n", + "comments": "The given id must belong to a committish on the walked repository.
\n\nThe resolved commit and all its parents will be hidden from the output on the revision walk.
\n", + "group": "revwalk", + "examples": { "log.c": ["ex/v1.9.1/log.html#git_revwalk_hide-50"] } }, - "git_diff_get_perfdata": { + "git_revwalk_hide_glob": { "type": "function", - "file": "git2/sys/diff.h", - "line": 83, - "lineto": 84, + "file": "git2/revwalk.h", + "line": 168, + "lineto": 168, "args": [ { - "name": "out", - "type": "git_diff_perfdata *", - "comment": "Structure to be filled with diff performance data" + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" }, { - "name": "diff", - "type": "const git_diff *", - "comment": "Diff to read performance data from" + "name": "glob", + "type": "const char *", + "comment": "the glob pattern references should match" } ], - "argline": "git_diff_perfdata *out, const git_diff *diff", - "sig": "git_diff_perfdata *::const git_diff *", - "return": { - "type": "int", - "comment": " 0 for success, \n<\n0 for error" - }, - "description": "Get performance data for a diff object.
\n", - "comments": "", - "group": "diff" + "argline": "git_revwalk *walk, const char *glob", + "sig": "git_revwalk *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Hide matching references.
\n", + "comments": "The OIDs pointed to by the references that match the given glob pattern and their ancestors will be hidden from the output on the revision walk.
\n\nA leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.
\n\nAny references matching this glob which do not point to a committish will be ignored.
\n", + "group": "revwalk" }, - "git_status_list_get_perfdata": { + "git_revwalk_hide_head": { "type": "function", - "file": "git2/sys/diff.h", - "line": 89, - "lineto": 90, + "file": "git2/revwalk.h", + "line": 176, + "lineto": 176, "args": [ { - "name": "out", - "type": "git_diff_perfdata *", - "comment": null - }, - { - "name": "status", - "type": "const git_status_list *", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" } ], - "argline": "git_diff_perfdata *out, const git_status_list *status", - "sig": "git_diff_perfdata *::const git_status_list *", - "return": { - "type": "int", - "comment": null - }, - "description": "Get performance data for diffs from a git_status_list
\n", + "argline": "git_revwalk *walk", + "sig": "git_revwalk *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Hide the repository's HEAD
\n", "comments": "", - "group": "status" + "group": "revwalk" }, - "git_filter_lookup": { + "git_revwalk_push_ref": { "type": "function", - "file": "git2/sys/filter.h", - "line": 27, - "lineto": 27, + "file": "git2/revwalk.h", + "line": 187, + "lineto": 187, "args": [ { - "name": "name", + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" + }, + { + "name": "refname", "type": "const char *", - "comment": "The name of the filter" + "comment": "the reference to push" } ], - "argline": "const char *name", - "sig": "const char *", - "return": { - "type": "git_filter *", - "comment": " Pointer to the filter object or NULL if not found" - }, - "description": "Look up a filter by name
\n", - "comments": "", - "group": "filter" + "argline": "git_revwalk *walk, const char *refname", + "sig": "git_revwalk *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Push the OID pointed to by a reference
\n", + "comments": "The reference must point to a committish.
\n", + "group": "revwalk" }, - "git_filter_list_new": { + "git_revwalk_hide_ref": { "type": "function", - "file": "git2/sys/filter.h", - "line": 57, - "lineto": 61, + "file": "git2/revwalk.h", + "line": 198, + "lineto": 198, "args": [ { - "name": "out", - "type": "git_filter_list **", - "comment": null - }, - { - "name": "repo", - "type": "git_repository *", - "comment": null - }, - { - "name": "mode", - "type": "git_filter_mode_t", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" }, { - "name": "options", - "type": "int", - "comment": null + "name": "refname", + "type": "const char *", + "comment": "the reference to hide" } ], - "argline": "git_filter_list **out, git_repository *repo, git_filter_mode_t mode, int options", - "sig": "git_filter_list **::git_repository *::git_filter_mode_t::int", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "filter" + "argline": "git_revwalk *walk, const char *refname", + "sig": "git_revwalk *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Hide the OID pointed to by a reference
\n", + "comments": "The reference must point to a committish.
\n", + "group": "revwalk" }, - "git_filter_list_push": { + "git_revwalk_next": { "type": "function", - "file": "git2/sys/filter.h", - "line": 76, - "lineto": 77, + "file": "git2/revwalk.h", + "line": 218, + "lineto": 218, "args": [ { - "name": "fl", - "type": "git_filter_list *", - "comment": null - }, - { - "name": "filter", - "type": "git_filter *", - "comment": null + "name": "out", + "type": "git_oid *", + "comment": "Pointer where to store the oid of the next commit" }, { - "name": "payload", - "type": "void *", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker to pop the commit from." } ], - "argline": "git_filter_list *fl, git_filter *filter, void *payload", - "sig": "git_filter_list *::git_filter *::void *", + "argline": "git_oid *out, git_revwalk *walk", + "sig": "git_oid *::git_revwalk *", "return": { "type": "int", - "comment": null + "comment": " 0 if the next commit was found;\n\tGIT_ITEROVER if there are no commits left to iterate" }, - "description": "Add a filter to a filter list with the given payload.
\n", - "comments": "Normally you won't have to do this because the filter list is created\n by calling the "check" function on registered filters when the filter\n attributes are set, but this does allow more direct manipulation of\n filter lists when desired.
\n\nNote that normally the "check" function can set up a payload for the\n filter. Using this function, you can either pass in a payload if you\n know the expected payload format, or you can pass NULL. Some filters\n may fail with a NULL payload. Good luck!
\n", - "group": "filter" + "description": "Get the next commit from the revision walk.
\n", + "comments": "The initial call to this method is not blocking when iterating through a repo with a time-sorting mode.
\n\nIterating with Topological or inverted modes makes the initial call blocking to preprocess the commit list, but this block should be mostly unnoticeable on most repositories (topological preprocessing times at 0.3s on the git.git repo).
\n\nThe revision walker is reset when the walk is over.
\n", + "group": "revwalk", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_revwalk_next-83"], + "log.c": ["ex/v1.9.1/log.html#git_revwalk_next-51"] + } }, - "git_filter_list_length": { + "git_revwalk_sorting": { "type": "function", - "file": "git2/sys/filter.h", - "line": 90, - "lineto": 90, + "file": "git2/revwalk.h", + "line": 230, + "lineto": 230, "args": [ { - "name": "fl", - "type": "const git_filter_list *", - "comment": "A filter list" + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal." + }, + { + "name": "sort_mode", + "type": "unsigned int", + "comment": "combination of GIT_SORT_XXX flags" } ], - "argline": "const git_filter_list *fl", - "sig": "const git_filter_list *", - "return": { - "type": "size_t", - "comment": " The number of filters in the list" - }, - "description": "Look up how many filters are in the list
\n", - "comments": "We will attempt to apply all of these filters to any data passed in,\n but note that the filter apply action still has the option of skipping\n data that is passed in (for example, the CRLF filter will skip data\n that appears to be binary).
\n", - "group": "filter" + "argline": "git_revwalk *walk, unsigned int sort_mode", + "sig": "git_revwalk *::unsigned int", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Change the sorting mode when iterating through the\n repository's contents.
\n", + "comments": "Changing the sorting mode resets the walker.
\n", + "group": "revwalk", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_revwalk_sorting-84"], + "log.c": [ + "ex/v1.9.1/log.html#git_revwalk_sorting-52", + "ex/v1.9.1/log.html#git_revwalk_sorting-53" + ] + } }, - "git_filter_source_repo": { + "git_revwalk_push_range": { "type": "function", - "file": "git2/sys/filter.h", - "line": 100, - "lineto": 100, + "file": "git2/revwalk.h", + "line": 245, + "lineto": 245, "args": [ { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } + "name": "walk", + "type": "git_revwalk *", + "comment": "the walker being used for the traversal" + }, + { "name": "range", "type": "const char *", "comment": "the range" } ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "git_repository *", - "comment": null - }, - "description": "Get the repository that the source data is coming from.
\n", - "comments": "", - "group": "filter" + "argline": "git_revwalk *walk, const char *range", + "sig": "git_revwalk *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Push and hide the respective endpoints of the given range.
\n", + "comments": "The range should be of the form
Get the path that the source data is coming from.
\n", - "comments": "", - "group": "filter" - }, - "git_filter_source_filemode": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 111, - "lineto": 111, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "filter" + "argline": "git_revwalk *walk", + "sig": "git_revwalk *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Simplify the history by first-parent
\n", + "comments": "No parents other than the first for each commit will be enqueued.
\n", + "group": "revwalk" }, - "git_filter_source_id": { + "git_revwalk_free": { "type": "function", - "file": "git2/sys/filter.h", - "line": 118, - "lineto": 118, + "file": "git2/revwalk.h", + "line": 263, + "lineto": 263, "args": [ { - "name": "src", - "type": "const git_filter_source *", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "traversal handle to close. If NULL nothing occurs." } ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "const git_oid *", - "comment": null - }, - "description": "Get the OID of the source\n If the OID is unknown (often the case with GIT_FILTER_CLEAN) then\n this will return NULL.
\n", + "argline": "git_revwalk *walk", + "sig": "git_revwalk *", + "return": { "type": "void", "comment": null }, + "description": "Free a revision walker previously allocated.
\n", "comments": "", - "group": "filter" + "group": "revwalk", + "examples": { + "general.c": ["ex/v1.9.1/general.html#git_revwalk_free-85"], + "log.c": ["ex/v1.9.1/log.html#git_revwalk_free-54"] + } }, - "git_filter_source_mode": { + "git_revwalk_repository": { "type": "function", - "file": "git2/sys/filter.h", - "line": 123, - "lineto": 123, + "file": "git2/revwalk.h", + "line": 272, + "lineto": 272, "args": [ { - "name": "src", - "type": "const git_filter_source *", - "comment": null + "name": "walk", + "type": "git_revwalk *", + "comment": "the revision walker" } ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "git_filter_mode_t", - "comment": null - }, - "description": "Get the git_filter_mode_t to be used
\n", - "comments": "", - "group": "filter" - }, - "git_filter_source_flags": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 128, - "lineto": 128, - "args": [], - "argline": "", - "sig": "", + "argline": "git_revwalk *walk", + "sig": "git_revwalk *", "return": { - "type": "int", - "comment": null + "type": "git_repository *", + "comment": " the repository being walked" }, - "description": "", + "description": "Return the repository on which this walker\n is operating.
\n", "comments": "", - "group": "filter" + "group": "revwalk" }, - "git_filter_init": { + "git_revwalk_add_hide_cb": { "type": "function", - "file": "git2/sys/filter.h", - "line": 284, - "lineto": 284, + "file": "git2/revwalk.h", + "line": 295, + "lineto": 298, "args": [ { - "name": "filter", - "type": "git_filter *", - "comment": "the `git_filter` struct to initialize." + "name": "walk", + "type": "git_revwalk *", + "comment": "the revision walker" }, { - "name": "version", - "type": "unsigned int", - "comment": "Version the struct; pass `GIT_FILTER_VERSION`" + "name": "hide_cb", + "type": "git_revwalk_hide_cb", + "comment": "callback function to hide a commit and its parents" + }, + { + "name": "payload", + "type": "void *", + "comment": "data payload to be passed to callback function" } ], - "argline": "git_filter *filter, unsigned int version", - "sig": "git_filter *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "Initializes a git_filter with default values. Equivalent to\n creating an instance with GIT_FILTER_INIT.
Adds, changes or removes a callback function to hide a commit and its parents
\n", "comments": "", - "group": "filter" + "group": "revwalk" }, - "git_filter_register": { + "git_signature_new": { "type": "function", - "file": "git2/sys/filter.h", - "line": 312, - "lineto": 313, + "file": "git2/signature.h", + "line": 41, + "lineto": 41, "args": [ + { + "name": "out", + "type": "git_signature **", + "comment": "new signature, in case of error NULL" + }, { "name": "name", "type": "const char *", - "comment": "A name by which the filter can be referenced. Attempting\n \t\t\tto register with an in-use name will return GIT_EEXISTS." + "comment": "name of the person" }, { - "name": "filter", - "type": "git_filter *", - "comment": "The filter definition. This pointer will be stored as is\n \t\t\tby libgit2 so it must be a durable allocation (either static\n \t\t\tor on the heap)." + "name": "email", + "type": "const char *", + "comment": "email of the person" }, { - "name": "priority", - "type": "int", - "comment": "The priority for filter application" - } - ], - "argline": "const char *name, git_filter *filter, int priority", - "sig": "const char *::git_filter *::int", - "return": { - "type": "int", - "comment": " 0 on successful registry, error code \n<\n0 on failure" - }, - "description": "Register a filter under a given name with a given priority.
\n", - "comments": "As mentioned elsewhere, the initialize callback will not be invoked\n immediately. It is deferred until the filter is used in some way.
\n\nA filter's attribute checks and check and apply callbacks will be\n issued in order of priority on smudge (to workdir), and in reverse\n order of priority on clean (to odb).
Two filters are preregistered with libgit2:\n - GIT_FILTER_CRLF with priority 0\n - GIT_FILTER_IDENT with priority 100
\n\nCurrently the filter registry is not thread safe, so any registering or\n deregistering of filters must be done outside of any possible usage of\n the filters (i.e. during application setup or shutdown).
\n", - "group": "filter" - }, - "git_filter_unregister": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 328, - "lineto": 328, - "args": [ + "name": "time", + "type": "git_time_t", + "comment": "time (in seconds from epoch) when the action happened" + }, { - "name": "name", - "type": "const char *", - "comment": "The name under which the filter was registered" + "name": "offset", + "type": "int", + "comment": "timezone offset (in minutes) for the time" } ], - "argline": "const char *name", - "sig": "const char *", - "return": { - "type": "int", - "comment": " 0 on success, error code \n<\n0 on failure" - }, - "description": "Remove the filter with the given name
\n", - "comments": "Attempting to remove the builtin libgit2 filters is not permitted and\n will return an error.
\n\nCurrently the filter registry is not thread safe, so any registering or\n deregistering of filters must be done outside of any possible usage of\n the filters (i.e. during application setup or shutdown).
\n", - "group": "filter" + "argline": "git_signature **out, const char *name, const char *email, git_time_t time, int offset", + "sig": "git_signature **::const char *::const char *::git_time_t::int", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new action signature.
\n", + "comments": "Call git_signature_free() to free the data.
Note: angle brackets ('<' and '>') characters are not allowed to be used in either the name or the email parameter.
Compute a similarity signature for a text buffer
\n", - "comments": "If you have passed the option GIT_HASHSIG_IGNORE_WHITESPACE, then the\n whitespace will be removed from the buffer while it is being processed,\n modifying the buffer in place. Sorry about that!
\n", - "group": "hashsig" + "argline": "git_signature **out, const char *name, const char *email", + "sig": "git_signature **::const char *::const char *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a new action signature with a timestamp of 'now'.
\n", + "comments": "Call git_signature_free() to free the data.
Compute a similarity signature for a text file
\n", - "comments": "This walks through the file, only loading a maximum of 4K of file data at\n a time. Otherwise, it acts just like git_hashsig_create.
Create a new author and/or committer signatures with default\n information based on the configuration and environment variables.
\n", + "comments": "If author_out is set, it will be populated with the author information. The GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables will be honored, and user.name and user.email configuration options will be honored if the environment variables are unset. For timestamps, GIT_AUTHOR_DATE will be used, otherwise the current time will be used.
If committer_out is set, it will be populated with the committer information. The GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL environment variables will be honored, and user.name and user.email configuration options will be honored if the environment variables are unset. For timestamps, GIT_COMMITTER_DATE will be used, otherwise the current time will be used.
If neither GIT_AUTHOR_DATE nor GIT_COMMITTER_DATE are set, both timestamps will be set to the same time.
It will return GIT_ENOTFOUND if either the user.name or user.email are not set and there is no fallback from an environment variable. One of author_out or committer_out must be set.
Release memory for a content similarity signature
\n", - "comments": "", - "group": "hashsig" + "description": "Create a new action signature with default user and now timestamp.
\n", + "comments": "This looks up the user.name and user.email from the configuration and uses the current time as the timestamp, and creates a new signature based on that information. It will return GIT_ENOTFOUND if either the user.name or user.email are not set.
\n\nNote that these do not examine environment variables, only the configuration files. Use git_signature_default_from_env to consider the environment variables.
Measure similarity score between two similarity signatures
\n", + "description": "Create a new signature by parsing the given buffer, which is\n expected to be in the format "Real Name \n<email
\n\n\n\n", "comments": "", - "group": "hashsig" + "group": "signature" }, - "git_index_name_entrycount": { + "git_signature_dup": { "type": "function", - "file": "git2/sys/index.h", - "line": 48, - "lineto": 48, + "file": "git2/signature.h", + "line": 132, + "lineto": 132, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "dest", + "type": "git_signature **", + "comment": "pointer where to store the copy" + }, + { + "name": "sig", + "type": "const git_signature *", + "comment": "signature to duplicate" } ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "size_t", - "comment": " integer of count of current filename conflict entries" - }, - "description": "timestamp tzoffset",\n where
\ntimestampis the number of seconds since the Unix epoch and\ntzoffsetis the timezone offset inhhmmformat (note the lack\n of a colon separator).
Get the count of filename conflict entries currently in the index.
\n", - "comments": "", - "group": "index" + "argline": "git_signature **dest, const git_signature *sig", + "sig": "git_signature **::const git_signature *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Create a copy of an existing signature. All internal strings are also\n duplicated.
\n", + "comments": "Call git_signature_free() to free the data.
Get a filename conflict entry from the index.
\n", - "comments": "The returned entry is read-only and should not be modified\n or freed by the caller.
\n", - "group": "index" + "argline": "git_signature *sig", + "sig": "git_signature *", + "return": { "type": "void", "comment": null }, + "description": "Free an existing signature.
\n", + "comments": "Because the signature is not an opaque structure, it is legal to free it manually, but be sure to free the "name" and "email" strings in addition to the structure itself.
\n", + "group": "signature", + "examples": { + "commit.c": [ + "ex/v1.9.1/commit.html#git_signature_free-11", + "ex/v1.9.1/commit.html#git_signature_free-12" + ], + "general.c": [ + "ex/v1.9.1/general.html#git_signature_free-88", + "ex/v1.9.1/general.html#git_signature_free-89" + ], + "init.c": [ + "ex/v1.9.1/init.html#git_signature_free-11", + "ex/v1.9.1/init.html#git_signature_free-12" + ], + "tag.c": ["ex/v1.9.1/tag.html#git_signature_free-14"] + } }, - "git_index_name_add": { + "git_stash_save": { "type": "function", - "file": "git2/sys/index.h", - "line": 71, - "lineto": 72, + "file": "git2/stash.h", + "line": 72, + "lineto": 77, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "out", + "type": "git_oid *", + "comment": "Object id of the commit containing the stashed state.\n This commit is also the target of the direct reference refs/stash." }, { - "name": "ancestor", - "type": "const char *", - "comment": "the path of the file as it existed in the ancestor" + "name": "repo", + "type": "git_repository *", + "comment": "The owning repository." }, { - "name": "ours", - "type": "const char *", - "comment": "the path of the file as it existed in our tree" + "name": "stasher", + "type": "const git_signature *", + "comment": "The identity of the person performing the stashing." }, { - "name": "theirs", + "name": "message", "type": "const char *", - "comment": "the path of the file as it existed in their tree" + "comment": "Optional description along with the stashed state." + }, + { + "name": "flags", + "type": "uint32_t", + "comment": "Flags to control the stashing process. (see GIT_STASH_* above)" } ], - "argline": "git_index *index, const char *ancestor, const char *ours, const char *theirs", - "sig": "git_index *::const char *::const char *::const char *", + "argline": "git_oid *out, git_repository *repo, const git_signature *stasher, const char *message, uint32_t flags", + "sig": "git_oid *::git_repository *::const git_signature *::const char *::uint32_t", "return": { "type": "int", - "comment": null + "comment": " 0 on success, GIT_ENOTFOUND where there's nothing to stash,\n or error code." }, - "description": "Record the filenames involved in a rename conflict.
\n", + "description": "Save the local modifications to a new stash.
\n", "comments": "", - "group": "index" + "group": "stash" }, - "git_index_name_clear": { + "git_stash_save_options_init": { "type": "function", - "file": "git2/sys/index.h", - "line": 79, - "lineto": 79, + "file": "git2/stash.h", + "line": 118, + "lineto": 119, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "void", - "comment": null - }, - "description": "Remove all filename conflict entries.
\n", - "comments": "", - "group": "index" - }, - "git_index_reuc_entrycount": { - "type": "function", - "file": "git2/sys/index.h", - "line": 96, - "lineto": 96, - "args": [ + "name": "opts", + "type": "git_stash_save_options *", + "comment": "The `git_stash_save_options` struct to initialize." + }, { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_STASH_SAVE_OPTIONS_VERSION`." } ], - "argline": "git_index *index", - "sig": "git_index *", + "argline": "git_stash_save_options *opts, unsigned int version", + "sig": "git_stash_save_options *::unsigned int", "return": { - "type": "size_t", - "comment": " integer of count of current resolve undo entries" + "type": "int", + "comment": " Zero on success; -1 on failure." }, - "description": "Get the count of resolve undo entries currently in the index.
\n", - "comments": "", - "group": "index" + "description": "Initialize git_stash_save_options structure
\n", + "comments": "Initializes a git_stash_save_options with default values. Equivalent to creating an instance with GIT_STASH_SAVE_OPTIONS_INIT.
Finds the resolve undo entry that points to the given path in the Git\n index.
\n", + "description": "Save the local modifications to a new stash, with options.
\n", "comments": "", - "group": "index" + "group": "stash" }, - "git_index_reuc_get_bypath": { + "git_stash_apply_options_init": { "type": "function", - "file": "git2/sys/index.h", - "line": 119, - "lineto": 119, + "file": "git2/stash.h", + "line": 225, + "lineto": 226, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "opts", + "type": "git_stash_apply_options *", + "comment": "The `git_stash_apply_options` struct to initialize." }, { - "name": "path", - "type": "const char *", - "comment": "path to search" + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`." } ], - "argline": "git_index *index, const char *path", - "sig": "git_index *::const char *", + "argline": "git_stash_apply_options *opts, unsigned int version", + "sig": "git_stash_apply_options *::unsigned int", "return": { - "type": "const git_index_reuc_entry *", - "comment": " the resolve undo entry; NULL if not found" + "type": "int", + "comment": " Zero on success; -1 on failure." }, - "description": "Get a resolve undo entry from the index.
\n", - "comments": "The returned entry is read-only and should not be modified\n or freed by the caller.
\n", - "group": "index" + "description": "Initialize git_stash_apply_options structure
\n", + "comments": "Initializes a git_stash_apply_options with default values. Equivalent to creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.
Get a resolve undo entry from the index.
\n", - "comments": "The returned entry is read-only and should not be modified\n or freed by the caller.
\n", - "group": "index" + "description": "Apply a single stashed state from the stash list.
\n", + "comments": "If local changes in the working directory conflict with changes in the stash then GIT_EMERGECONFLICT will be returned. In this case, the index will always remain unmodified and all files in the working directory will remain unmodified. However, if you are restoring untracked files or ignored files and there is a conflict when applying the modified files, then those files will remain in the working directory.
\n\nIf passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be conflicts when reinstating the index, the function will return GIT_EMERGECONFLICT and both the working directory and index will be left unmodified.
\n", + "group": "stash" }, - "git_index_reuc_add": { + "git_stash_foreach": { "type": "function", - "file": "git2/sys/index.h", - "line": 155, - "lineto": 158, + "file": "git2/stash.h", + "line": 288, + "lineto": 291, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", - "type": "const char *", - "comment": "filename to add" - }, - { - "name": "ancestor_mode", - "type": "int", - "comment": "mode of the ancestor file" - }, - { - "name": "ancestor_id", - "type": "const git_oid *", - "comment": "oid of the ancestor file" - }, - { - "name": "our_mode", - "type": "int", - "comment": "mode of our file" - }, - { - "name": "our_id", - "type": "const git_oid *", - "comment": "oid of our file" + "name": "repo", + "type": "git_repository *", + "comment": "Repository where to find the stash." }, { - "name": "their_mode", - "type": "int", - "comment": "mode of their file" + "name": "callback", + "type": "git_stash_cb", + "comment": "Callback to invoke per found stashed state. The most\n recent stash state will be enumerated first." }, { - "name": "their_id", - "type": "const git_oid *", - "comment": "oid of their file" + "name": "payload", + "type": "void *", + "comment": "Extra parameter to callback function." } ], - "argline": "git_index *index, const char *path, int ancestor_mode, const git_oid *ancestor_id, int our_mode, const git_oid *our_id, int their_mode, const git_oid *their_id", - "sig": "git_index *::const char *::int::const git_oid *::int::const git_oid *::int::const git_oid *", + "argline": "git_repository *repo, git_stash_cb callback, void *payload", + "sig": "git_repository *::git_stash_cb::void *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, non-zero callback return value, or error code." }, - "description": "Adds a resolve undo entry for a file based on the given parameters.
\n", - "comments": "The resolve undo entry contains the OIDs of files that were involved\n in a merge conflict after the conflict has been resolved. This allows\n conflicts to be re-resolved later.
\n\nIf there exists a resolve undo entry for the given path in the index,\n it will be removed.
\n\nThis method will fail in bare index instances.
\n", - "group": "index" + "description": "Loop over all the stashed states and issue a callback for each one.
\n", + "comments": "If the callback returns a non-zero value, this will stop looping.
\n", + "group": "stash" }, - "git_index_reuc_remove": { + "git_stash_drop": { "type": "function", - "file": "git2/sys/index.h", - "line": 167, - "lineto": 167, + "file": "git2/stash.h", + "line": 304, + "lineto": 306, "args": [ { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "name": "repo", + "type": "git_repository *", + "comment": "The owning repository." }, { - "name": "n", + "name": "index", "type": "size_t", - "comment": "position of the resolve undo entry to remove" + "comment": "The position within the stash list. 0 points to the\n most recent stashed state." } ], - "argline": "git_index *index, size_t n", - "sig": "git_index *::size_t", + "argline": "git_repository *repo, size_t index", + "sig": "git_repository *::size_t", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success, GIT_ENOTFOUND if there's no stashed state for the given\n index, or error code." }, - "description": "Remove an resolve undo entry from the index
\n", + "description": "Remove a single stashed state from the stash list.
\n", "comments": "", - "group": "index" + "group": "stash" }, - "git_index_reuc_clear": { + "git_stash_pop": { "type": "function", - "file": "git2/sys/index.h", - "line": 174, - "lineto": 174, + "file": "git2/stash.h", + "line": 320, + "lineto": 323, "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "The owning repository." + }, { "name": "index", - "type": "git_index *", - "comment": "an existing index object" + "type": "size_t", + "comment": "The position within the stash list. 0 points to the\n most recent stashed state." + }, + { + "name": "options", + "type": "const git_stash_apply_options *", + "comment": "Optional options to control how stashes are applied." } ], - "argline": "git_index *index", - "sig": "git_index *", + "argline": "git_repository *repo, size_t index, const git_stash_apply_options *options", + "sig": "git_repository *::size_t::const git_stash_apply_options *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success, GIT_ENOTFOUND if there's no stashed state for the given\n index, or error code. (see git_stash_apply() above for details)" }, - "description": "Remove all resolve undo entries from the index
\n", + "description": "Apply a single stashed state from the stash list and remove it from the list\n if successful.
\n", "comments": "", - "group": "index" + "group": "stash" }, - "git_mempack_new": { + "git_status_options_init": { "type": "function", - "file": "git2/sys/mempack.h", - "line": 45, - "lineto": 45, + "file": "git2/status.h", + "line": 280, + "lineto": 282, "args": [ { - "name": "out", - "type": "git_odb_backend **", - "comment": "Pointer where to store the ODB backend" + "name": "opts", + "type": "git_status_options *", + "comment": "The `git_status_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_STATUS_OPTIONS_VERSION`." } ], - "argline": "git_odb_backend **out", - "sig": "git_odb_backend **", + "argline": "git_status_options *opts, unsigned int version", + "sig": "git_status_options *::unsigned int", "return": { "type": "int", - "comment": " 0 on success; error code otherwise" + "comment": " Zero on success; -1 on failure." }, - "description": "Instantiate a new mempack backend.
\n", - "comments": "The backend must be added to an existing ODB with the highest\n priority.
\n\n git_mempack_new(\n\n\n&mempacker\n);\n git_repository_odb(\n&odb\n, repository);\n git_odb_add_backend(odb, mempacker, 999);
\n\nOnce the backend has been loaded, all writes to the ODB will\n instead be queued in memory, and can be finalized with\n git_mempack_dump.
Subsequent reads will also be served from the in-memory store\n to ensure consistency, until the memory store is dumped.
\n", - "group": "mempack" + "description": "Initialize git_status_options structure
\n", + "comments": "Initializes a git_status_options with default values. Equivalent to creating an instance with GIT_STATUS_OPTIONS_INIT.
Dump all the queued in-memory writes to a packfile.
\n", - "comments": "The contents of the packfile will be stored in the given buffer.\n It is the caller's responsibility to ensure that the generated\n packfile is available to the repository (e.g. by writing it\n to disk, or doing something crazy like distributing it across\n several copies of the repository over a network).
\n\nOnce the generated packfile is available to the repository,\n call git_mempack_reset to cleanup the memory store.
Calling git_mempack_reset before the packfile has been\n written to disk will result in an inconsistent repository\n (the objects in the memory store won't be accessible).
Gather file statuses and run a callback for each one.
\n", + "comments": "The callback is passed the path of the file, the status (a combination of the git_status_t values above) and the payload data pointer passed into this function.
If the callback returns a non-zero value, this function will stop looping and return that value to caller.
\n", + "group": "status", + "examples": { "status.c": ["ex/v1.9.1/status.html#git_status_foreach-6"] } }, - "git_mempack_reset": { + "git_status_foreach_ext": { "type": "function", - "file": "git2/sys/mempack.h", - "line": 82, - "lineto": 82, + "file": "git2/status.h", + "line": 344, + "lineto": 348, "args": [ { - "name": "backend", - "type": "git_odb_backend *", - "comment": "The mempack backend" + "name": "repo", + "type": "git_repository *", + "comment": "Repository object" + }, + { + "name": "opts", + "type": "const git_status_options *", + "comment": "Status options structure" + }, + { + "name": "callback", + "type": "git_status_cb", + "comment": "The function to call on each file" + }, + { + "name": "payload", + "type": "void *", + "comment": "Pointer to pass through to callback function" } ], - "argline": "git_odb_backend *backend", - "sig": "git_odb_backend *", + "argline": "git_repository *repo, const git_status_options *opts, git_status_cb callback, void *payload", + "sig": "git_repository *::const git_status_options *::git_status_cb::void *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "Reset the memory packer by clearing all the queued objects.
\n", - "comments": "This assumes that git_mempack_dump has been called before to\n store all the queued objects into a single packfile.
Alternatively, call reset without a previous dump to "undo"\n all the recently written objects, giving transaction-like\n semantics to the Git repository.
Gather file status information and run callbacks as requested.
\n", + "comments": "This is an extended version of the git_status_foreach() API that allows for more granular control over which paths will be processed and in what order. See the git_status_options structure for details about the additional controls that this makes available.
Note that if a pathspec is given in the git_status_options to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec so that all files can be considered.
Look up a merge driver by name
\n", - "comments": "", - "group": "merge" + "description": "Get file status for a single file.
\n", + "comments": "This tries to get status for the filename that you give. If no files match that name (in either the HEAD, index, or working directory), this returns GIT_ENOTFOUND.
\n\nIf the name matches multiple files (for example, if the path names a directory or if running on a case- insensitive filesystem and yet the HEAD has two entries that both match the path), then this returns GIT_EAMBIGUOUS because it cannot give correct results.
This does not do any sort of rename detection. Renames require a set of targets and because of the path filtering, there is not enough information to check renames correctly. To check file status with rename detection, there is no choice but to do a full git_status_list_new and scan through looking for the path that you are interested in.
Get the repository that the source data is coming from.
\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_source_ancestor": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 48, - "lineto": 49, - "args": [ + "name": "out", + "type": "git_status_list **", + "comment": "Pointer to store the status results in" + }, { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null + "name": "repo", + "type": "git_repository *", + "comment": "Repository object" + }, + { + "name": "opts", + "type": "const git_status_options *", + "comment": "Status options structure" } ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_index_entry *", - "comment": null - }, - "description": "Gets the ancestor of the file to merge.
\n", - "comments": "", - "group": "merge" + "argline": "git_status_list **out, git_repository *repo, const git_status_options *opts", + "sig": "git_status_list **::git_repository *::const git_status_options *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Gather file status information and populate the git_status_list.
Note that if a pathspec is given in the git_status_options to filter the status, then the results from rename detection (if you enable it) may not be accurate. To do rename detection properly, this must be called with no pathspec so that all files can be considered.
Gets the ours side of the file to merge.
\n", - "comments": "", - "group": "merge" + "description": "Gets the count of status entries in this list.
\n", + "comments": "If there are no changes in status (at least according the options given when the status list was created), this can return 0.
\n", + "group": "status", + "examples": { + "status.c": [ + "ex/v1.9.1/status.html#git_status_list_entrycount-10", + "ex/v1.9.1/status.html#git_status_list_entrycount-11" + ] + } }, - "git_merge_driver_source_theirs": { + "git_status_byindex": { "type": "function", - "file": "git2/sys/merge.h", - "line": 56, - "lineto": 57, + "file": "git2/status.h", + "line": 420, + "lineto": 422, "args": [ { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } + "name": "statuslist", + "type": "git_status_list *", + "comment": "Existing status list object" + }, + { "name": "idx", "type": "size_t", "comment": "Position of the entry" } ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", + "argline": "git_status_list *statuslist, size_t idx", + "sig": "git_status_list *::size_t", "return": { - "type": "const git_index_entry *", - "comment": null + "type": "const git_status_entry *", + "comment": " Pointer to the entry; NULL if out of bounds" }, - "description": "Gets the theirs side of the file to merge.
\n", - "comments": "", - "group": "merge" + "description": "Get a pointer to one of the entries in the status list.
\n", + "comments": "The entry is not modifiable and should not be freed.
\n", + "group": "status", + "examples": { + "status.c": [ + "ex/v1.9.1/status.html#git_status_byindex-12", + "ex/v1.9.1/status.html#git_status_byindex-13", + "ex/v1.9.1/status.html#git_status_byindex-14", + "ex/v1.9.1/status.html#git_status_byindex-15", + "ex/v1.9.1/status.html#git_status_byindex-16", + "ex/v1.9.1/status.html#git_status_byindex-17" + ] + } }, - "git_merge_driver_source_file_options": { + "git_status_list_free": { "type": "function", - "file": "git2/sys/merge.h", - "line": 60, - "lineto": 61, + "file": "git2/status.h", + "line": 429, + "lineto": 430, "args": [ { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null + "name": "statuslist", + "type": "git_status_list *", + "comment": "Existing status list object" } ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_merge_file_options *", - "comment": null - }, - "description": "Gets the merge file options that the merge was invoked with
\n", + "argline": "git_status_list *statuslist", + "sig": "git_status_list *", + "return": { "type": "void", "comment": null }, + "description": "Free an existing status list
\n", "comments": "", - "group": "merge" + "group": "status", + "examples": { + "status.c": ["ex/v1.9.1/status.html#git_status_list_free-18"] + } }, - "git_merge_driver_register": { + "git_status_should_ignore": { "type": "function", - "file": "git2/sys/merge.h", - "line": 162, - "lineto": 163, + "file": "git2/status.h", + "line": 448, + "lineto": 451, "args": [ { - "name": "name", - "type": "const char *", - "comment": "The name of this driver to match an attribute. Attempting\n \t\t\tto register with an in-use name will return GIT_EEXISTS." + "name": "ignored", + "type": "int *", + "comment": "Boolean returning 0 if the file is not ignored, 1 if it is" }, { - "name": "driver", - "type": "git_merge_driver *", - "comment": "The merge driver definition. This pointer will be stored\n\t\t\tas is by libgit2 so it must be a durable allocation (either\n\t\t\tstatic or on the heap)." + "name": "repo", + "type": "git_repository *", + "comment": "A repository object" + }, + { + "name": "path", + "type": "const char *", + "comment": "The file to check ignores for, rooted at the repo's workdir." } ], - "argline": "const char *name, git_merge_driver *driver", - "sig": "const char *::git_merge_driver *", + "argline": "int *ignored, git_repository *repo, const char *path", + "sig": "int *::git_repository *::const char *", "return": { "type": "int", - "comment": " 0 on successful registry, error code \n<\n0 on failure" + "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." }, - "description": "Register a merge driver under a given name.
\n", - "comments": "As mentioned elsewhere, the initialize callback will not be invoked\n immediately. It is deferred until the driver is used in some way.
\n\nCurrently the merge driver registry is not thread safe, so any\n registering or deregistering of merge drivers must be done outside of\n any possible usage of the drivers (i.e. during application setup or\n shutdown).
\n", - "group": "merge" + "description": "Test if the ignore rules apply to a given file.
\n", + "comments": "This function checks the ignore rules to see if they would apply to the given file. This indicates if the file would be ignored regardless of whether the file is already in the index or committed to the repository.
\n\nOne way to think of this is if you were to do "git add ." on the directory containing the file, would it be added or not?
\n", + "group": "status" }, - "git_merge_driver_unregister": { + "git_strarray_dispose": { "type": "function", - "file": "git2/sys/merge.h", - "line": 178, - "lineto": 178, + "file": "git2/strarray.h", + "line": 37, + "lineto": 37, "args": [ { - "name": "name", - "type": "const char *", - "comment": "The name under which the merge driver was registered" + "name": "array", + "type": "git_strarray *", + "comment": "The git_strarray that contains strings to free" } ], - "argline": "const char *name", - "sig": "const char *", - "return": { - "type": "int", - "comment": " 0 on success, error code \n<\n0 on failure" - }, - "description": "Remove the merge driver with the given name.
\n", - "comments": "Attempting to remove the builtin libgit2 merge drivers is not permitted\n and will return an error.
\n\nCurrently the merge driver registry is not thread safe, so any\n registering or deregistering of drivers must be done outside of any\n possible usage of the drivers (i.e. during application setup or shutdown).
\n", - "group": "merge" + "argline": "git_strarray *array", + "sig": "git_strarray *", + "return": { "type": "void", "comment": null }, + "description": "Free the strings contained in a string array. This method should\n be called on git_strarray objects that were provided by the\n library. Not doing so, will result in a memory leak.
This does not free the git_strarray itself, since the library will never allocate that object directly itself.
Initializes a git_odb_backend with default values. Equivalent to\n creating an instance with GIT_ODB_BACKEND_INIT.
Initialize the OpenSSL locks
\n", - "comments": "OpenSSL requires the application to determine how it performs\n locking.
\n\nThis is a last-resort convenience function which libgit2 provides for\n allocating and initializing the locks as well as setting the\n locking function to use the system's native locking functions.
\n\nThe locking function will be cleared and the memory will be freed\n when you call git_threads_sutdown().
\n\nIf your programming language has an OpenSSL package/bindings, it\n likely sets up locking. You should very strongly prefer that over\n this function.
\n", - "group": "openssl" + "description": "Initialize git_submodule_update_options structure
\n", + "comments": "Initializes a git_submodule_update_options with default values. Equivalent to creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.
Check whether a path component corresponds to a .git$SUFFIX\n file.
\n", - "comments": "As some filesystems do special things to filenames when\n writing files to disk, you cannot always do a plain string\n comparison to verify whether a file name matches an expected\n path or not. This function can do the comparison for you,\n depending on the filesystem you're on.
\n", - "group": "path" - }, - "git_refdb_init_backend": { - "type": "function", - "file": "git2/sys/refdb_backend.h", - "line": 183, - "lineto": 185, - "args": [ - { - "name": "backend", - "type": "git_refdb_backend *", - "comment": "the `git_refdb_backend` struct to initialize" + "name": "init", + "type": "int", + "comment": "If the submodule is not initialized, setting this flag to true\n will initialize the submodule before updating. Otherwise, this will\n return an error if attempting to update an uninitialized repository.\n but setting this to true forces them to be updated." }, { - "name": "version", - "type": "unsigned int", - "comment": "Version of struct; pass `GIT_REFDB_BACKEND_VERSION`" + "name": "options", + "type": "git_submodule_update_options *", + "comment": "configuration options for the update. If NULL, the\n function works as though GIT_SUBMODULE_UPDATE_OPTIONS_INIT was passed." } ], - "argline": "git_refdb_backend *backend, unsigned int version", - "sig": "git_refdb_backend *::unsigned int", + "argline": "git_submodule *submodule, int init, git_submodule_update_options *options", + "sig": "git_submodule *::int::git_submodule_update_options *", "return": { "type": "int", - "comment": " Zero on success; -1 on failure." + "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `git_error_last` for a detailed error message)." }, - "description": "Initializes a git_refdb_backend with default values. Equivalent to\n creating an instance with GIT_REFDB_BACKEND_INIT.
Update a submodule. This will clone a missing submodule and\n checkout the subrepository to the commit specified in the index of\n the containing repository. If the submodule repository doesn't contain\n the target commit (e.g. because fetchRecurseSubmodules isn't set), then\n the submodule is fetched using the fetch options supplied in options.
\n", "comments": "", - "group": "refdb" + "group": "submodule" }, - "git_refdb_backend_fs": { + "git_submodule_lookup": { "type": "function", - "file": "git2/sys/refdb_backend.h", - "line": 198, - "lineto": 200, + "file": "git2/submodule.h", + "line": 230, + "lineto": 233, "args": [ { - "name": "backend_out", - "type": "git_refdb_backend **", - "comment": "Output pointer to the git_refdb_backend object" + "name": "out", + "type": "git_submodule **", + "comment": "Output ptr to submodule; pass NULL to just get return code" }, { "name": "repo", "type": "git_repository *", - "comment": "Git repository to access" + "comment": "The parent repository" + }, + { + "name": "name", + "type": "const char *", + "comment": "The name of or path to the submodule; trailing slashes okay" } ], - "argline": "git_refdb_backend **backend_out, git_repository *repo", - "sig": "git_refdb_backend **::git_repository *", + "argline": "git_submodule **out, git_repository *repo, const char *name", + "sig": "git_submodule **::git_repository *::const char *", "return": { "type": "int", - "comment": " 0 on success, \n<\n0 error code on failure" + "comment": " 0 on success, GIT_ENOTFOUND if submodule does not exist,\n GIT_EEXISTS if a repository is found in working directory only,\n -1 on other errors." }, - "description": "Constructors for default filesystem-based refdb backend
\n", - "comments": "Under normal usage, this is called for you when the repository is\n opened / created, but you can use this to explicitly construct a\n filesystem refdb backend for a repository.
\n", - "group": "refdb" + "description": "Lookup submodule information by name or path.
\n", + "comments": "Given either the submodule name or path (they are usually the same), this returns a structure describing the submodule.
\n\nThere are two expected error scenarios:
\n\nYou must call git_submodule_free when done with the submodule.
Sets the custom backend to an existing reference DB
\n", - "comments": "The git_refdb will take ownership of the git_refdb_backend so you\n should NOT free it after calling this function.
Create an in-memory copy of a submodule. The copy must be explicitly\n free'd or it will leak.
\n", "comments": "", - "group": "reflog" + "group": "submodule" }, - "git_reflog_entry__free": { + "git_submodule_free": { "type": "function", - "file": "git2/sys/reflog.h", - "line": 17, - "lineto": 17, + "file": "git2/submodule.h", + "line": 250, + "lineto": 250, "args": [ { - "name": "entry", - "type": "git_reflog_entry *", - "comment": null + "name": "submodule", + "type": "git_submodule *", + "comment": "Submodule object" } ], - "argline": "git_reflog_entry *entry", - "sig": "git_reflog_entry *", - "return": { - "type": "void", - "comment": null - }, - "description": "", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", + "return": { "type": "void", "comment": null }, + "description": "Release a submodule
\n", "comments": "", - "group": "reflog" + "group": "submodule" }, - "git_reference__alloc": { + "git_submodule_foreach": { "type": "function", - "file": "git2/sys/refs.h", - "line": 31, - "lineto": 34, + "file": "git2/submodule.h", + "line": 270, + "lineto": 273, "args": [ { - "name": "name", - "type": "const char *", - "comment": "the reference name" + "name": "repo", + "type": "git_repository *", + "comment": "The repository" }, { - "name": "oid", - "type": "const git_oid *", - "comment": "the object id for a direct reference" + "name": "callback", + "type": "git_submodule_cb", + "comment": "Function to be called with the name of each submodule.\n Return a non-zero value to terminate the iteration." }, { - "name": "peel", - "type": "const git_oid *", - "comment": "the first non-tag object's OID, or NULL" + "name": "payload", + "type": "void *", + "comment": "Extra data to pass to callback" } ], - "argline": "const char *name, const git_oid *oid, const git_oid *peel", - "sig": "const char *::const git_oid *::const git_oid *", + "argline": "git_repository *repo, git_submodule_cb callback, void *payload", + "sig": "git_repository *::git_submodule_cb::void *", "return": { - "type": "git_reference *", - "comment": " the created git_reference or NULL on error" + "type": "int", + "comment": " 0 on success, -1 on error, or non-zero return value of callback" }, - "description": "Create a new direct reference from an OID.
\n", - "comments": "", - "group": "reference" + "description": "Iterate over all tracked submodules of a repository.
\n", + "comments": "See the note on git_submodule above. This iterates over the tracked submodules as described therein.
If you are concerned about items in the working directory that look like submodules but are not tracked, the diff API will generate a diff record for workdir items that look like submodules but are not tracked, showing them as added in the workdir. Also, the status API will treat the entire subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.
\n", + "group": "submodule", + "examples": { + "status.c": ["ex/v1.9.1/status.html#git_submodule_foreach-19"] + } }, - "git_reference__alloc_symbolic": { + "git_submodule_add_setup": { "type": "function", - "file": "git2/sys/refs.h", - "line": 43, - "lineto": 45, + "file": "git2/submodule.h", + "line": 301, + "lineto": 306, "args": [ { - "name": "name", + "name": "out", + "type": "git_submodule **", + "comment": "The newly created submodule ready to open for clone" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "The repository in which you want to create the submodule" + }, + { + "name": "url", "type": "const char *", - "comment": "the reference name" + "comment": "URL for the submodule's remote" }, { - "name": "target", + "name": "path", "type": "const char *", - "comment": "the target for a symbolic reference" + "comment": "Path at which the submodule should be created" + }, + { + "name": "use_gitlink", + "type": "int", + "comment": "Should workdir contain a gitlink to the repo in\n .git/modules vs. repo directly in workdir." } ], - "argline": "const char *name, const char *target", - "sig": "const char *::const char *", + "argline": "git_submodule **out, git_repository *repo, const char *url, const char *path, int use_gitlink", + "sig": "git_submodule **::git_repository *::const char *::const char *::int", "return": { - "type": "git_reference *", - "comment": " the created git_reference or NULL on error" + "type": "int", + "comment": " 0 on success, GIT_EEXISTS if submodule already exists,\n -1 on other errors." }, - "description": "Create a new symbolic reference.
\n", - "comments": "", - "group": "reference" + "description": "Set up a new git submodule for checkout.
\n", + "comments": "This does "git submodule add" up to the fetch and checkout of the submodule contents. It preps a new submodule, creates an entry in .gitmodules and creates an empty initialized repository either at the given path in the working directory or in .git/modules with a gitlink from the working directory to the new repo.
\n\nTo fully emulate "git submodule add" call this function, then open the submodule repo and perform the clone step as needed (if you don't need anything custom see git_submodule_add_clone()). Lastly, call git_submodule_add_finalize() to wrap up adding the new submodule and .gitmodules to the index to be ready to commit.
You must call git_submodule_free on the submodule object when done.
Create a new repository with neither backends nor config object
\n", - "comments": "Note that this is only useful if you wish to associate the repository\n with a non-filesystem-backed object database and config store.
\n", - "group": "repository" + "description": "Perform the clone step for a newly created submodule.
\n", + "comments": "This performs the necessary git_clone to setup a newly-created submodule.
Reset all the internal state in a repository.
\n", - "comments": "This will free all the mapped memory and internal objects\n of the repository and leave it in a "blank" state.
\n\nThere's no need to call this function directly unless you're\n trying to aggressively cleanup the repo before its\n deallocation. git_repository_free already performs this operation\n before deallocation the repo.
Resolve the setup of a new git submodule.
\n", + "comments": "This should be called on a submodule once you have called add setup and done the clone of the submodule. This adds the .gitmodules file and the newly cloned submodule to the index to be ready to be committed (but doesn't actually do the commit).
\n", + "group": "submodule" }, - "git_repository_reinit_filesystem": { + "git_submodule_add_to_index": { "type": "function", - "file": "git2/sys/repository.h", - "line": 61, - "lineto": 63, + "file": "git2/submodule.h", + "line": 347, + "lineto": 349, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" + "name": "submodule", + "type": "git_submodule *", + "comment": "The submodule to add to the index" }, { - "name": "recurse_submodules", + "name": "write_index", "type": "int", - "comment": "Should submodules be updated recursively" + "comment": "Boolean if this should immediately write the index\n file. If you pass this as false, you will have to get the\n git_index and explicitly call `git_index_write()` on it to\n save the change." } ], - "argline": "git_repository *repo, int recurse_submodules", - "sig": "git_repository *::int", + "argline": "git_submodule *submodule, int write_index", + "sig": "git_submodule *::int", "return": { "type": "int", - "comment": " 0 on success, \n<\n 0 on error" + "comment": " 0 on success, \n<\n0 on failure" }, - "description": "Update the filesystem config settings for an open repository
\n", - "comments": "When a repository is initialized, config values are set based on the\n properties of the filesystem that the repository is on, such as\n "core.ignorecase", "core.filemode", "core.symlinks", etc. If the\n repository is moved to a new filesystem, these properties may no\n longer be correct and API calls may not behave as expected. This\n call reruns the phase of repository initialization that sets those\n properties to compensate for the current filesystem of the repo.
\n", - "group": "repository" + "description": "Add current submodule HEAD commit to index of superproject.
\n", + "comments": "", + "group": "submodule" }, - "git_repository_set_config": { + "git_submodule_owner": { "type": "function", - "file": "git2/sys/repository.h", - "line": 78, - "lineto": 78, + "file": "git2/submodule.h", + "line": 362, + "lineto": 362, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "config", - "type": "git_config *", - "comment": "A Config object" + "name": "submodule", + "type": "git_submodule *", + "comment": "Pointer to submodule object" } ], - "argline": "git_repository *repo, git_config *config", - "sig": "git_repository *::git_config *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "void", - "comment": null + "type": "git_repository *", + "comment": " Pointer to `git_repository`" }, - "description": "Set the configuration file for this repository
\n", - "comments": "This configuration file will be used for all configuration\n queries involving this repository.
\n\nThe repository will keep a reference to the config file;\n the user must still free the config after setting it\n to the repository, or it will leak.
\n", - "group": "repository" + "description": "Get the containing repository for a submodule.
\n", + "comments": "This returns a pointer to the repository that contains the submodule. This is a just a reference to the repository that was passed to the original git_submodule_lookup() call, so if that repository has been freed, then this may be a dangling reference.
Set the Object Database for this repository
\n", - "comments": "The ODB will be used for all object-related operations\n involving this repository.
\n\nThe repository will keep a reference to the ODB; the user\n must still free the ODB object after setting it to the\n repository, or it will leak.
\n", - "group": "repository" + "description": "Get the name of submodule.
\n", + "comments": "", + "group": "submodule", + "examples": { + "status.c": ["ex/v1.9.1/status.html#git_submodule_name-20"] + } }, - "git_repository_set_refdb": { + "git_submodule_path": { "type": "function", - "file": "git2/sys/repository.h", - "line": 108, - "lineto": 108, + "file": "git2/submodule.h", + "line": 381, + "lineto": 381, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "refdb", - "type": "git_refdb *", - "comment": "An refdb object" + "name": "submodule", + "type": "git_submodule *", + "comment": "Pointer to submodule object" } ], - "argline": "git_repository *repo, git_refdb *refdb", - "sig": "git_repository *::git_refdb *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "void", - "comment": null + "type": "const char *", + "comment": " Pointer to the submodule path" }, - "description": "Set the Reference Database Backend for this repository
\n", - "comments": "The refdb will be used for all reference related operations\n involving this repository.
\n\nThe repository will keep a reference to the refdb; the user\n must still free the refdb object after setting it to the\n repository, or it will leak.
\n", - "group": "repository" + "description": "Get the path to the submodule.
\n", + "comments": "The path is almost always the same as the submodule name, but the two are actually not required to match.
\n", + "group": "submodule", + "examples": { + "status.c": ["ex/v1.9.1/status.html#git_submodule_path-21"] + } }, - "git_repository_set_index": { + "git_submodule_url": { "type": "function", - "file": "git2/sys/repository.h", - "line": 123, - "lineto": 123, + "file": "git2/submodule.h", + "line": 389, + "lineto": 389, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "index", - "type": "git_index *", - "comment": "An index object" + "name": "submodule", + "type": "git_submodule *", + "comment": "Pointer to submodule object" } ], - "argline": "git_repository *repo, git_index *index", - "sig": "git_repository *::git_index *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "void", - "comment": null + "type": "const char *", + "comment": " Pointer to the submodule url" }, - "description": "Set the index file for this repository
\n", - "comments": "This index will be used for all index-related operations\n involving this repository.
\n\nThe repository will keep a reference to the index file;\n the user must still free the index after setting it\n to the repository, or it will leak.
\n", - "group": "repository" + "description": "Get the URL for the submodule.
\n", + "comments": "", + "group": "submodule" }, - "git_repository_set_bare": { + "git_submodule_resolve_url": { "type": "function", - "file": "git2/sys/repository.h", - "line": 136, - "lineto": 136, + "file": "git2/submodule.h", + "line": 399, + "lineto": 399, "args": [ + { + "name": "out", + "type": "git_buf *", + "comment": "buffer to store the absolute submodule url in" + }, { "name": "repo", "type": "git_repository *", - "comment": "Repo to make bare" - } + "comment": "Pointer to repository object" + }, + { "name": "url", "type": "const char *", "comment": "Relative url" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on failure" - }, - "description": "Set a repository to be bare.
\n", - "comments": "Clear the working directory and set core.bare to true. You may also\n want to call git_repository_set_index(repo, NULL) since a bare repo\n typically does not have an index, but this function will not do that\n for you.
Resolve a submodule url relative to the given repository.
\n", + "comments": "", + "group": "submodule" }, - "git_repository_submodule_cache_all": { + "git_submodule_branch": { "type": "function", - "file": "git2/sys/repository.h", - "line": 149, - "lineto": 150, + "file": "git2/submodule.h", + "line": 407, + "lineto": 407, "args": [ { - "name": "repo", - "type": "git_repository *", - "comment": "the repository whose submodules will be cached." + "name": "submodule", + "type": "git_submodule *", + "comment": "Pointer to submodule object" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "int", - "comment": null + "type": "const char *", + "comment": " Pointer to the submodule branch" }, - "description": "Load and cache all submodules.
\n", - "comments": "Because the .gitmodules file is unstructured, loading submodules is an\n O(N) operation. Any operation (such as git_rebase_init) that requires\n accessing all submodules is O(N^2) in the number of submodules, if it\n has to look each one up individually. This function loads all submodules\n and caches them so that subsequent calls to git_submodule_lookup are O(1).
Get the branch for the submodule.
\n", + "comments": "", + "group": "submodule" }, - "git_repository_submodule_cache_clear": { + "git_submodule_set_branch": { "type": "function", - "file": "git2/sys/repository.h", - "line": 164, - "lineto": 165, + "file": "git2/submodule.h", + "line": 420, + "lineto": 420, "args": [ { "name": "repo", "type": "git_repository *", - "comment": "the repository whose submodule cache will be cleared" + "comment": "the repository to affect" + }, + { + "name": "name", + "type": "const char *", + "comment": "the name of the submodule to configure" + }, + { + "name": "branch", + "type": "const char *", + "comment": "Branch that should be used for the submodule" } ], - "argline": "git_repository *repo", - "sig": "git_repository *", + "argline": "git_repository *repo, const char *name, const char *branch", + "sig": "git_repository *::const char *::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, \n<\n0 on failure" }, - "description": "Clear the submodule cache.
\n", - "comments": "Clear the submodule cache populated by git_repository_submodule_cache_all.\n If there is no cache, do nothing.
The cache incorporates data from the repository's configuration, as well\n as the state of the working tree, the index, and HEAD. So any time any\n of these has changed, the cache might become invalid.
\n", - "group": "repository" + "description": "Set the branch for the submodule in the configuration
\n", + "comments": "After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.
Register stream constructors for the library to use
\n", - "comments": "If a registration structure is already set, it will be overwritten.\n Pass NULL in order to deregister the current constructor and return\n to the system defaults.
The type parameter may be a bitwise AND of types.
\n", - "group": "stream" + "description": "Set the URL for the submodule in the configuration
\n", + "comments": "After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.
Register a TLS stream constructor for the library to use. This stream\n will not support HTTP CONNECT proxies. This internally calls\n git_stream_register and is preserved for backward compatibility.
This function is deprecated, but there is no plan to remove this\n function at this time.
\n", - "group": "stream" - }, - "git_time_monotonic": { - "type": "function", - "file": "git2/sys/time.h", - "line": 27, - "lineto": 27, - "args": [], - "argline": "", - "sig": "", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "double", - "comment": null + "type": "const git_oid *", + "comment": " Pointer to git_oid or NULL if submodule is not in index." }, - "description": "Return a monotonic time value, useful for measuring running time\n and setting up timeouts.
\n", - "comments": "The returned value is an arbitrary point in time -- it can only be\n used when comparing it to another git_time_monotonic call.
The time is returned in seconds, with a decimal fraction that differs\n on accuracy based on the underlying system, but should be least\n accurate to Nanoseconds.
\n\nThis function cannot fail.
\n", - "group": "time" + "description": "Get the OID for the submodule in the index.
\n", + "comments": "", + "group": "submodule" }, - "git_transport_init": { + "git_submodule_head_id": { "type": "function", - "file": "git2/sys/transport.h", - "line": 137, - "lineto": 139, + "file": "git2/submodule.h", + "line": 450, + "lineto": 450, "args": [ { - "name": "opts", - "type": "git_transport *", - "comment": "the `git_transport` struct to initialize" - }, - { - "name": "version", - "type": "unsigned int", - "comment": "Version of struct; pass `GIT_TRANSPORT_VERSION`" + "name": "submodule", + "type": "git_submodule *", + "comment": "Pointer to submodule object" } ], - "argline": "git_transport *opts, unsigned int version", - "sig": "git_transport *::unsigned int", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." + "type": "const git_oid *", + "comment": " Pointer to git_oid or NULL if submodule is not in the HEAD." }, - "description": "Initializes a git_transport with default values. Equivalent to\n creating an instance with GIT_TRANSPORT_INIT.
Get the OID for the submodule in the current HEAD tree.
\n", "comments": "", - "group": "transport" + "group": "submodule" }, - "git_transport_new": { + "git_submodule_wd_id": { "type": "function", - "file": "git2/sys/transport.h", - "line": 151, - "lineto": 151, + "file": "git2/submodule.h", + "line": 463, + "lineto": 463, "args": [ { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" - }, - { - "name": "url", - "type": "const char *", - "comment": "The URL to connect to" + "name": "submodule", + "type": "git_submodule *", + "comment": "Pointer to submodule object" } ], - "argline": "git_transport **out, git_remote *owner, const char *url", - "sig": "git_transport **::git_remote *::const char *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "const git_oid *", + "comment": " Pointer to git_oid or NULL if submodule is not checked out." }, - "description": "Function to use to create a transport from a URL. The transport database\n is scanned to find a transport that implements the scheme of the URI (i.e.\n git:// or http://) and a transport object is returned to the caller.
\n", - "comments": "", - "group": "transport" + "description": "Get the OID for the submodule in the current working directory.
\n", + "comments": "This returns the OID that corresponds to looking up 'HEAD' in the checked out submodule. If there are pending changes in the index or anything else, this won't notice that. You should call git_submodule_status() for a more complete picture about the state of the working directory.
Create an ssh transport with custom git command paths
\n", - "comments": "This is a factory function suitable for setting as the transport\n callback in a remote (or for a clone in the options).
\n\nThe payload argument must be a strarray pointer with the paths for\n the git-upload-pack and git-receive-pack at index 0 and 1.
Get the ignore rule that will be used for the submodule.
\n", + "comments": "These values control the behavior of git_submodule_status() for this submodule. There are four ignore values:
git_status_foreach() on the submodule) but UNTRACKED files will not count as making the submodule dirty. - GIT_SUBMODULE_IGNORE_DIRTY means to only check if the HEAD of the submodule has moved for status. This is fast since it does not need to scan the working tree of the submodule at all. - GIT_SUBMODULE_IGNORE_ALL means not to open the submodule repo. The working directory will be consider clean so long as there is a checked out version present.Add a custom transport definition, to be used in addition to the built-in\n set of transports that come with libgit2.
\n", - "comments": "The caller is responsible for synchronizing calls to git_transport_register\n and git_transport_unregister with other calls to the library that\n instantiate transports.
\n", - "group": "transport" + "argline": "git_repository *repo, const char *name, git_submodule_ignore_t ignore", + "sig": "git_repository *::const char *::git_submodule_ignore_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Set the ignore rule for the submodule in the configuration
\n", + "comments": "This does not affect any currently-loaded instances.
\n", + "group": "submodule" }, - "git_transport_unregister": { + "git_submodule_update_strategy": { "type": "function", - "file": "git2/sys/transport.h", - "line": 198, - "lineto": 199, + "file": "git2/submodule.h", + "line": 516, + "lineto": 517, "args": [ { - "name": "prefix", - "type": "const char *", - "comment": "From the previous call to git_transport_register" + "name": "submodule", + "type": "git_submodule *", + "comment": "The submodule to check" } ], - "argline": "const char *prefix", - "sig": "const char *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "git_submodule_update_t", + "comment": " The current git_submodule_update_t value that will be used\n for this submodule." }, - "description": "Unregister a custom transport definition which was previously registered\n with git_transport_register.
\n", - "comments": "The caller is responsible for synchronizing calls to git_transport_register\n and git_transport_unregister with other calls to the library that\n instantiate transports.
\n", - "group": "transport" + "description": "Get the update rule that will be used for the submodule.
\n", + "comments": "This value controls the behavior of the git submodule update command. There are four useful values documented with git_submodule_update_t.
Create an instance of the dummy transport.
\n", - "comments": "", - "group": "transport" + "argline": "git_repository *repo, const char *name, git_submodule_update_t update", + "sig": "git_repository *::const char *::git_submodule_update_t", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Set the update rule for the submodule in the configuration
\n", + "comments": "This setting won't affect any existing instances.
\n", + "group": "submodule" }, - "git_transport_local": { + "git_submodule_fetch_recurse_submodules": { "type": "function", - "file": "git2/sys/transport.h", - "line": 225, - "lineto": 228, + "file": "git2/submodule.h", + "line": 546, + "lineto": 547, "args": [ { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" - }, - { - "name": "payload", - "type": "void *", - "comment": "You must pass NULL for this parameter." + "name": "submodule", + "type": "git_submodule *", + "comment": "the submodule to examine" } ], - "argline": "git_transport **out, git_remote *owner, void *payload", - "sig": "git_transport **::git_remote *::void *", + "argline": "git_submodule *submodule", + "sig": "git_submodule *", "return": { - "type": "int", - "comment": " 0 or an error code" + "type": "git_submodule_recurse_t", + "comment": " the submodule recursion configuration" }, - "description": "Create an instance of the local transport.
\n", - "comments": "", - "group": "transport" + "description": "Read the fetchRecurseSubmodules rule for a submodule.
\n", + "comments": "This accesses the submodule.
Note that at this time, libgit2 does not honor this setting and the fetch functionality current ignores submodules.
\n", + "group": "submodule" }, - "git_transport_smart": { + "git_submodule_set_fetch_recurse_submodules": { "type": "function", - "file": "git2/sys/transport.h", - "line": 238, - "lineto": 241, + "file": "git2/submodule.h", + "line": 559, + "lineto": 562, "args": [ { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" + "name": "repo", + "type": "git_repository *", + "comment": "the repository to affect" }, { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" + "name": "name", + "type": "const char *", + "comment": "the submodule to configure" }, { - "name": "payload", - "type": "void *", - "comment": "A pointer to a git_smart_subtransport_definition" + "name": "fetch_recurse_submodules", + "type": "git_submodule_recurse_t", + "comment": "the submodule recursion configuration" } ], - "argline": "git_transport **out, git_remote *owner, void *payload", - "sig": "git_transport **::git_remote *::void *", + "argline": "git_repository *repo, const char *name, git_submodule_recurse_t fetch_recurse_submodules", + "sig": "git_repository *::const char *::git_submodule_recurse_t", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " old value for fetchRecurseSubmodules" }, - "description": "Create an instance of the smart transport.
\n", - "comments": "", - "group": "transport" + "description": "Set the fetchRecurseSubmodules rule for a submodule in the configuration
\n", + "comments": "This setting won't affect any existing instances.
\n", + "group": "submodule" }, - "git_transport_smart_certificate_check": { + "git_submodule_init": { "type": "function", - "file": "git2/sys/transport.h", - "line": 255, - "lineto": 255, + "file": "git2/submodule.h", + "line": 577, + "lineto": 577, "args": [ { - "name": "transport", - "type": "git_transport *", - "comment": "a smart transport" - }, - { - "name": "cert", - "type": "git_cert *", - "comment": "the certificate to pass to the caller" + "name": "submodule", + "type": "git_submodule *", + "comment": "The submodule to write into the superproject config" }, { - "name": "valid", + "name": "overwrite", "type": "int", - "comment": "whether we believe the certificate is valid" - }, - { - "name": "hostname", - "type": "const char *", - "comment": "the hostname we connected to" + "comment": "By default, existing entries will not be overwritten,\n but setting this to true forces them to be updated." } ], - "argline": "git_transport *transport, git_cert *cert, int valid, const char *hostname", - "sig": "git_transport *::git_cert *::int::const char *", + "argline": "git_submodule *submodule, int overwrite", + "sig": "git_submodule *::int", "return": { "type": "int", - "comment": " the return value of the callback: 0 for no error, GIT_PASSTHROUGH\n to indicate that there is no callback registered (or the callback\n refused to validate the certificate and callers should behave as\n if no callback was set), or \n<\n 0 for an error" + "comment": " 0 on success, \n<\n0 on failure." }, - "description": "Call the certificate check for this transport.
\n", - "comments": "", - "group": "transport" + "description": "Copy submodule info into ".git/config" file.
\n", + "comments": "Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.
\n", + "group": "submodule" }, - "git_transport_smart_credentials": { + "git_submodule_repo_init": { "type": "function", - "file": "git2/sys/transport.h", - "line": 269, - "lineto": 269, + "file": "git2/submodule.h", + "line": 592, + "lineto": 595, "args": [ { "name": "out", - "type": "git_cred **", - "comment": "the pointer where the creds are to be stored" - }, - { - "name": "transport", - "type": "git_transport *", - "comment": "a smart transport" + "type": "git_repository **", + "comment": "Output pointer to the created git repository." }, { - "name": "user", - "type": "const char *", - "comment": "the user we saw on the url (if any)" + "name": "sm", + "type": "const git_submodule *", + "comment": "The submodule to create a new subrepository from." }, { - "name": "methods", + "name": "use_gitlink", "type": "int", - "comment": "available methods for authentication" + "comment": "Should the workdir contain a gitlink to\n the repo in .git/modules vs. repo directly in workdir." } ], - "argline": "git_cred **out, git_transport *transport, const char *user, int methods", - "sig": "git_cred **::git_transport *::const char *::int", + "argline": "git_repository **out, const git_submodule *sm, int use_gitlink", + "sig": "git_repository **::const git_submodule *::int", "return": { "type": "int", - "comment": " the return value of the callback: 0 for no error, GIT_PASSTHROUGH\n to indicate that there is no callback registered (or the callback\n refused to provide credentials and callers should behave as if no\n callback was set), or \n<\n 0 for an error" + "comment": " 0 on success, \n<\n0 on failure." }, - "description": "Call the credentials callback for this transport
\n", - "comments": "", - "group": "transport" + "description": "Set up the subrepository for a submodule in preparation for clone.
\n", + "comments": "This function can be called to init and set up a submodule repository from a submodule in preparation to clone it from its remote.
\n", + "group": "submodule" }, - "git_transport_smart_proxy_options": { + "git_submodule_sync": { "type": "function", - "file": "git2/sys/transport.h", - "line": 279, - "lineto": 279, + "file": "git2/submodule.h", + "line": 608, + "lineto": 608, "args": [ { - "name": "out", - "type": "git_proxy_options *", - "comment": "options struct to fill" + "name": "submodule", + "type": "git_submodule *", + "comment": "The submodule to copy." + } + ], + "argline": "git_submodule *submodule", + "sig": "git_submodule *", + "return": { "type": "int", "comment": " 0 or an error code." }, + "description": "Copy submodule remote info into submodule repo.
\n", + "comments": "This copies the information about the submodules URL into the checked out submodule config, acting like "git submodule sync". This is useful if you have altered the URL for the submodule (or it has been altered by a fetch of upstream changes) and you need to update your local repo.
\n", + "group": "submodule" + }, + "git_submodule_open": { + "type": "function", + "file": "git2/submodule.h", + "line": 622, + "lineto": 624, + "args": [ + { + "name": "repo", + "type": "git_repository **", + "comment": "Pointer to the submodule repo which was opened" }, { - "name": "transport", - "type": "git_transport *", - "comment": "the transport to extract the data from." + "name": "submodule", + "type": "git_submodule *", + "comment": "Submodule to be opened" } ], - "argline": "git_proxy_options *out, git_transport *transport", - "sig": "git_proxy_options *::git_transport *", + "argline": "git_repository **repo, git_submodule *submodule", + "sig": "git_repository **::git_submodule *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, \n<\n0 if submodule repo could not be opened." }, - "description": "Get a copy of the proxy options
\n", - "comments": "The url is copied and must be freed by the caller.
\n", - "group": "transport" + "description": "Open the repository for a submodule.
\n", + "comments": "This is a newly opened repository object. The caller is responsible for calling git_repository_free() on it when done. Multiple calls to this function will return distinct git_repository objects. This will only work if the submodule is checked out into the working directory.
Create an instance of the http subtransport.
\n", - "comments": "This subtransport also supports https.
\n", - "group": "smart" + "argline": "git_submodule *submodule, int force", + "sig": "git_submodule *::int", + "return": { "type": "int", "comment": " 0 on success, \n<\n0 on error" }, + "description": "Reread submodule info from config, index, and HEAD.
\n", + "comments": "Call this to reread cached submodule information for this submodule if you have reason to believe that it has changed.
\n", + "group": "submodule" }, - "git_smart_subtransport_git": { + "git_submodule_status": { "type": "function", - "file": "git2/sys/transport.h", - "line": 420, - "lineto": 423, + "file": "git2/submodule.h", + "line": 652, + "lineto": 656, "args": [ { - "name": "out", - "type": "git_smart_subtransport **", - "comment": "The newly created subtransport" + "name": "status", + "type": "unsigned int *", + "comment": "Combination of `GIT_SUBMODULE_STATUS` flags" }, { - "name": "owner", - "type": "git_transport *", - "comment": "The smart transport to own this subtransport" + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to look" }, { - "name": "param", - "type": "void *", - "comment": null + "name": "name", + "type": "const char *", + "comment": "name of the submodule" + }, + { + "name": "ignore", + "type": "git_submodule_ignore_t", + "comment": "the ignore rules to follow" } ], - "argline": "git_smart_subtransport **out, git_transport *owner, void *param", - "sig": "git_smart_subtransport **::git_transport *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Create an instance of the git subtransport.
\n", - "comments": "", - "group": "smart" + "argline": "unsigned int *status, git_repository *repo, const char *name, git_submodule_ignore_t ignore", + "sig": "unsigned int *::git_repository *::const char *::git_submodule_ignore_t", + "return": { "type": "int", "comment": " 0 on success, \n<\n0 on error" }, + "description": "Get the status for a submodule.
\n", + "comments": "This looks at a submodule and tries to determine the status. It will return a combination of the GIT_SUBMODULE_STATUS values above. How deeply it examines the working directory to do this will depend on the git_submodule_ignore_t value for the submodule.
Create an instance of the ssh subtransport.
\n", - "comments": "", - "group": "smart" + "argline": "unsigned int *location_status, git_submodule *submodule", + "sig": "unsigned int *::git_submodule *", + "return": { "type": "int", "comment": " 0 on success, \n<\n0 on error" }, + "description": "Get the locations of submodule information.
\n", + "comments": "This is a bit like a very lightweight version of git_submodule_status. It just returns a made of the first four submodule status values (i.e. the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.). This can be useful if you want to know if the submodule is present in the working directory at this point in time, etc.
Lookup a tag object from the repository.
\n", "comments": "", "group": "tag", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tag_lookup-84" - ] - } + "examples": { "general.c": ["ex/v1.9.1/general.html#git_tag_lookup-91"] } }, "git_tag_lookup_prefix": { "type": "function", @@ -24806,10 +21501,7 @@ ], "argline": "git_tag **out, git_repository *repo, const git_oid *id, size_t len", "sig": "git_tag **::git_repository *::const git_oid *::size_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a tag object from the repository,\n given a prefix of its identifier (short id).
\n", "comments": "", "group": "tag" @@ -24820,26 +21512,15 @@ "line": 61, "lineto": 61, "args": [ - { - "name": "tag", - "type": "git_tag *", - "comment": "the tag to close" - } + { "name": "tag", "type": "git_tag *", "comment": "the tag to close" } ], "argline": "git_tag *tag", "sig": "git_tag *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Close an open tag
\n", - "comments": "You can no longer use the git_tag pointer after this call.
\n\nIMPORTANT: You MUST call this method when you are through with a tag to\n release memory. Failure to do so will cause a memory leak.
\n", + "comments": "You can no longer use the git_tag pointer after this call.
\n\nIMPORTANT: You MUST call this method when you are through with a tag to release memory. Failure to do so will cause a memory leak.
\n", "group": "tag", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tag_free-85" - ] - } + "examples": { "general.c": ["ex/v1.9.1/general.html#git_tag_free-92"] } }, "git_tag_id": { "type": "function", @@ -24904,18 +21585,11 @@ ], "argline": "git_object **target_out, const git_tag *tag", "sig": "git_object **::const git_tag *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the tagged object of a tag
\n", - "comments": "This method performs a repository lookup for the\n given object and returns it
\n", + "comments": "This method performs a repository lookup for the given object and returns it
\n", "group": "tag", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tag_target-86" - ] - } + "examples": { "general.c": ["ex/v1.9.1/general.html#git_tag_target-93"] } }, "git_tag_target_id": { "type": "function", @@ -24931,17 +21605,12 @@ ], "argline": "const git_tag *tag", "sig": "const git_tag *", - "return": { - "type": "const git_oid *", - "comment": " pointer to the OID" - }, + "return": { "type": "const git_oid *", "comment": " pointer to the OID" }, "description": "Get the OID of the tagged object of a tag
\n", "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_target_id-35" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tag_target_id-31"] } }, "git_tag_target_type": { @@ -24966,12 +21635,8 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_target_type-36" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_tag_target_type-87" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tag_target_type-32"], + "general.c": ["ex/v1.9.1/general.html#git_tag_target_type-94"] } }, "git_tag_name": { @@ -24988,23 +21653,14 @@ ], "argline": "const git_tag *tag", "sig": "const git_tag *", - "return": { - "type": "const char *", - "comment": " name of the tag" - }, + "return": { "type": "const char *", "comment": " name of the tag" }, "description": "Get the name of a tag
\n", "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_name-37" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_tag_name-88" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_name-20" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tag_name-33"], + "general.c": ["ex/v1.9.1/general.html#git_tag_name-95"], + "tag.c": ["ex/v1.9.1/tag.html#git_tag_name-16"] } }, "git_tag_tagger": { @@ -25029,9 +21685,7 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_tagger-38" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tag_tagger-34"] } }, "git_tag_message": { @@ -25057,15 +21711,11 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_message-39", - "ex/v0.28.0/cat-file.html#git_tag_message-40" + "ex/v1.9.1/cat-file.html#git_tag_message-35", + "ex/v1.9.1/cat-file.html#git_tag_message-36" ], - "general.c": [ - "ex/v0.28.0/general.html#git_tag_message-89" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_message-21" - ] + "general.c": ["ex/v1.9.1/general.html#git_tag_message-96"], + "tag.c": ["ex/v1.9.1/tag.html#git_tag_message-17"] } }, "git_tag_create": { @@ -25117,13 +21767,9 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code\n\tA tag object is written to the ODB, and a proper reference\n\tis written in the /refs/tags folder, pointing to it" }, "description": "Create a new tag in the repository from an object
\n", - "comments": "A new reference will also be created pointing to\n this tag object. If force is true and a reference\n already exists with the given name, it'll be replaced.
The message will not be cleaned up. This can be achieved\n through git_message_prettify().
The tag name will be checked for validity. You must avoid\n the characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\n sequences ".." and "\n@\n{" which have special meaning to revparse.
\n", + "comments": "A new reference will also be created pointing to this tag object. If force is true and a reference already exists with the given name, it'll be replaced.
The message will not be cleaned up. This can be achieved through git_message_prettify().
The tag name will be checked for validity. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
\n", "group": "tag", - "examples": { - "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_create-22" - ] - } + "examples": { "tag.c": ["ex/v1.9.1/tag.html#git_tag_create-18"] } }, "git_tag_annotation_create": { "type": "function", @@ -25164,15 +21810,12 @@ ], "argline": "git_oid *oid, git_repository *repo, const char *tag_name, const git_object *target, const git_signature *tagger, const char *message", "sig": "git_oid *::git_repository *::const char *::const git_object *::const git_signature *::const char *", - "return": { - "type": "int", - "comment": " 0 on success or an error code" - }, + "return": { "type": "int", "comment": " 0 on success or an error code" }, "description": "Create a new tag in the object database pointing to a git_object
\n", - "comments": "The message will not be cleaned up. This can be achieved\n through git_message_prettify().
The message will not be cleaned up. This can be achieved through git_message_prettify().
Create a new lightweight tag pointing at a target object
\n", - "comments": "A new direct reference will be created pointing to\n this target object. If force is true and a reference\n already exists with the given name, it'll be replaced.
The tag name will be checked for validity.\n See git_tag_create() for rules about valid names.
A new direct reference will be created pointing to this target object. If force is true and a reference already exists with the given name, it'll be replaced.
The tag name will be checked for validity. See git_tag_create() for rules about valid names.
Delete an existing tag reference.
\n", - "comments": "The tag name will be checked for validity.\n See git_tag_create() for rules about valid names.
The tag name will be checked for validity. See git_tag_create() for rules about valid names.
Fill a list with all the tags in the Repository
\n", - "comments": "The string array will be filled with the names of the\n matching tags; these values are owned by the user and\n should be free'd manually when no longer needed, using\n git_strarray_free.
The string array will be filled with the names of the matching tags; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free.
Fill a list with all the tags in the Repository\n which name match a defined pattern
\n", - "comments": "If an empty pattern is provided, all the tags\n will be returned.
\n\nThe string array will be filled with the names of the\n matching tags; these values are owned by the user and\n should be free'd manually when no longer needed, using\n git_strarray_free.
If an empty pattern is provided, all the tags will be returned.
\n\nThe string array will be filled with the names of the matching tags; these values are owned by the user and should be free'd manually when no longer needed, using git_strarray_free.
Call callback `cb' for each tag in the repository
\n", "comments": "", "group": "tag" @@ -25387,8 +21999,8 @@ "git_tag_peel": { "type": "function", "file": "git2/tag.h", - "line": 346, - "lineto": 348, + "line": 356, + "lineto": 358, "args": [ { "name": "tag_target_out", @@ -25403,19 +22015,16 @@ ], "argline": "git_object **tag_target_out, const git_tag *tag", "sig": "git_object **::const git_tag *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Recursively peel a tag until a non tag git_object is found
\n", - "comments": "The retrieved tag_target object is owned by the repository\n and should be closed with the git_object_free method.
The retrieved tag_target object is owned by the repository and should be closed with the git_object_free method.
Create an in-memory copy of a tag. The copy must be explicitly\n free'd or it will leak.
\n", "comments": "", "group": "tag" }, + "git_tag_name_is_valid": { + "type": "function", + "file": "git2/tag.h", + "line": 380, + "lineto": 380, + "args": [ + { + "name": "valid", + "type": "int *", + "comment": "output pointer to set with validity of given tag name" + }, + { + "name": "name", + "type": "const char *", + "comment": "a tag name to test" + } + ], + "argline": "int *valid, const char *name", + "sig": "int *::const char *", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Determine whether a tag name is valid, meaning that (when prefixed\n with refs/tags/) that it is a valid reference name, and that any\n additional tag name restrictions are imposed (eg, it cannot start\n with a -).
Sets the system tracing configuration to the specified level with the\n specified callback. When system events occur at a level equal to, or\n lower than, the given level they will be reported to the given callback.
\n", "comments": "", "group": "trace" @@ -25484,12 +22111,9 @@ ], "argline": "git_transaction **out, git_repository *repo", "sig": "git_transaction **::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Create a new transaction object
\n", - "comments": "This does not lock anything, but sets up the transaction object to\n know from which repository to lock.
\n", + "comments": "This does not lock anything, but sets up the transaction object to know from which repository to lock.
\n", "group": "transaction" }, "git_transaction_lock_ref": { @@ -25511,12 +22135,9 @@ ], "argline": "git_transaction *tx, const char *refname", "sig": "git_transaction *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error message" - }, + "return": { "type": "int", "comment": " 0 or an error message" }, "description": "Lock a reference
\n", - "comments": "Lock the specified reference. This is the first step to updating a\n reference.
\n", + "comments": "Lock the specified reference. This is the first step to updating a reference.
\n", "group": "transaction" }, "git_transaction_set_target": { @@ -25558,7 +22179,7 @@ "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" }, "description": "Set the target of a reference
\n", - "comments": "Set the target of the specified reference. This reference must be\n locked.
\n", + "comments": "Set the target of the specified reference. This reference must be locked.
\n", "group": "transaction" }, "git_transaction_set_symbolic_target": { @@ -25600,7 +22221,7 @@ "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" }, "description": "Set the target of a reference
\n", - "comments": "Set the target of the specified reference. This reference must be\n locked.
\n", + "comments": "Set the target of the specified reference. This reference must be locked.
\n", "group": "transaction" }, "git_transaction_set_reflog": { @@ -25632,7 +22253,7 @@ "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" }, "description": "Set the reflog of a reference
\n", - "comments": "Set the specified reference's reflog. If this is combined with\n setting the target, that update won't be written to the reflog.
\n", + "comments": "Set the specified reference's reflog. If this is combined with setting the target, that update won't be written to the reflog.
\n", "group": "transaction" }, "git_transaction_remove": { @@ -25676,12 +22297,9 @@ ], "argline": "git_transaction *tx", "sig": "git_transaction *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Commit the changes from the transaction
\n", - "comments": "Perform the changes that have been queued. The updates will be made\n one by one, and the first failure will stop the processing.
\n", + "comments": "Perform the changes that have been queued. The updates will be made one by one, and the first failure will stop the processing.
\n", "group": "transaction" }, "git_transaction_free": { @@ -25698,334 +22316,11 @@ ], "argline": "git_transaction *tx", "sig": "git_transaction *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the resources allocated by this transaction
\n", - "comments": "If any references remain locked, they will be unlocked without any\n changes made to them.
\n", + "comments": "If any references remain locked, they will be unlocked without any changes made to them.
\n", "group": "transaction" }, - "git_cred_has_username": { - "type": "function", - "file": "git2/transport.h", - "line": 219, - "lineto": 219, - "args": [ - { - "name": "cred", - "type": "git_cred *", - "comment": "object to check" - } - ], - "argline": "git_cred *cred", - "sig": "git_cred *", - "return": { - "type": "int", - "comment": " 1 if the credential object has non-NULL username, 0 otherwise" - }, - "description": "Check whether a credential object contains username information.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_userpass_plaintext_new": { - "type": "function", - "file": "git2/transport.h", - "line": 230, - "lineto": 233, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": "The newly created credential object." - }, - { - "name": "username", - "type": "const char *", - "comment": "The username of the credential." - }, - { - "name": "password", - "type": "const char *", - "comment": "The password of the credential." - } - ], - "argline": "git_cred **out, const char *username, const char *password", - "sig": "git_cred **::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure" - }, - "description": "Create a new plain-text username and password credential object.\n The supplied credential parameter will be internally duplicated.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_ssh_key_new": { - "type": "function", - "file": "git2/transport.h", - "line": 246, - "lineto": 251, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": "The newly created credential object." - }, - { - "name": "username", - "type": "const char *", - "comment": "username to use to authenticate" - }, - { - "name": "publickey", - "type": "const char *", - "comment": "The path to the public key of the credential." - }, - { - "name": "privatekey", - "type": "const char *", - "comment": "The path to the private key of the credential." - }, - { - "name": "passphrase", - "type": "const char *", - "comment": "The passphrase of the credential." - } - ], - "argline": "git_cred **out, const char *username, const char *publickey, const char *privatekey, const char *passphrase", - "sig": "git_cred **::const char *::const char *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure" - }, - "description": "Create a new passphrase-protected ssh key credential object.\n The supplied credential parameter will be internally duplicated.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_ssh_interactive_new": { - "type": "function", - "file": "git2/transport.h", - "line": 262, - "lineto": 266, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": null - }, - { - "name": "username", - "type": "const char *", - "comment": "Username to use to authenticate." - }, - { - "name": "prompt_callback", - "type": "git_cred_ssh_interactive_callback", - "comment": "The callback method used for prompts." - }, - { - "name": "payload", - "type": "void *", - "comment": "Additional data to pass to the callback." - } - ], - "argline": "git_cred **out, const char *username, git_cred_ssh_interactive_callback prompt_callback, void *payload", - "sig": "git_cred **::const char *::git_cred_ssh_interactive_callback::void *", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure." - }, - "description": "Create a new ssh keyboard-interactive based credential object.\n The supplied credential parameter will be internally duplicated.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_ssh_key_from_agent": { - "type": "function", - "file": "git2/transport.h", - "line": 276, - "lineto": 278, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": "The newly created credential object." - }, - { - "name": "username", - "type": "const char *", - "comment": "username to use to authenticate" - } - ], - "argline": "git_cred **out, const char *username", - "sig": "git_cred **::const char *", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure" - }, - "description": "Create a new ssh key credential object used for querying an ssh-agent.\n The supplied credential parameter will be internally duplicated.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_ssh_custom_new": { - "type": "function", - "file": "git2/transport.h", - "line": 298, - "lineto": 304, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": "The newly created credential object." - }, - { - "name": "username", - "type": "const char *", - "comment": "username to use to authenticate" - }, - { - "name": "publickey", - "type": "const char *", - "comment": "The bytes of the public key." - }, - { - "name": "publickey_len", - "type": "size_t", - "comment": "The length of the public key in bytes." - }, - { - "name": "sign_callback", - "type": "git_cred_sign_callback", - "comment": "The callback method to sign the data during the challenge." - }, - { - "name": "payload", - "type": "void *", - "comment": "Additional data to pass to the callback." - } - ], - "argline": "git_cred **out, const char *username, const char *publickey, size_t publickey_len, git_cred_sign_callback sign_callback, void *payload", - "sig": "git_cred **::const char *::const char *::size_t::git_cred_sign_callback::void *", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure" - }, - "description": "Create an ssh key credential with a custom signing function.
\n", - "comments": "This lets you use your own function to sign the challenge.
\n\nThis function and its credential type is provided for completeness\n and wraps libssh2_userauth_publickey(), which is undocumented.
The supplied credential parameter will be internally duplicated.
\n", - "group": "cred" - }, - "git_cred_default_new": { - "type": "function", - "file": "git2/transport.h", - "line": 312, - "lineto": 312, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": null - } - ], - "argline": "git_cred **out", - "sig": "git_cred **", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure" - }, - "description": "Create a "default" credential usable for Negotiate mechanisms like NTLM\n or Kerberos authentication.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_username_new": { - "type": "function", - "file": "git2/transport.h", - "line": 320, - "lineto": 320, - "args": [ - { - "name": "cred", - "type": "git_cred **", - "comment": null - }, - { - "name": "username", - "type": "const char *", - "comment": null - } - ], - "argline": "git_cred **cred, const char *username", - "sig": "git_cred **::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "Create a credential to specify a username.
\n", - "comments": "This is used with ssh authentication to query for the username if\n none is specified in the url.
\n", - "group": "cred" - }, - "git_cred_ssh_key_memory_new": { - "type": "function", - "file": "git2/transport.h", - "line": 332, - "lineto": 337, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": "The newly created credential object." - }, - { - "name": "username", - "type": "const char *", - "comment": "username to use to authenticate." - }, - { - "name": "publickey", - "type": "const char *", - "comment": "The public key of the credential." - }, - { - "name": "privatekey", - "type": "const char *", - "comment": "The private key of the credential." - }, - { - "name": "passphrase", - "type": "const char *", - "comment": "The passphrase of the credential." - } - ], - "argline": "git_cred **out, const char *username, const char *publickey, const char *privatekey, const char *passphrase", - "sig": "git_cred **::const char *::const char *::const char *::const char *", - "return": { - "type": "int", - "comment": " 0 for success or an error code for failure" - }, - "description": "Create a new ssh key credential object reading the keys from memory.
\n", - "comments": "", - "group": "cred" - }, - "git_cred_free": { - "type": "function", - "file": "git2/transport.h", - "line": 348, - "lineto": 348, - "args": [ - { - "name": "cred", - "type": "git_cred *", - "comment": "the object to free" - } - ], - "argline": "git_cred *cred", - "sig": "git_cred *", - "return": { - "type": "void", - "comment": null - }, - "description": "Free a credential.
\n", - "comments": "This is only necessary if you own the object; that is, if you are a\n transport.
\n", - "group": "cred" - }, "git_tree_lookup": { "type": "function", "file": "git2/tree.h", @@ -26050,24 +22345,18 @@ ], "argline": "git_tree **out, git_repository *repo, const git_oid *id", "sig": "git_tree **::git_repository *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a tree object from the repository.
\n", "comments": "", "group": "tree", "examples": { + "commit.c": ["ex/v1.9.1/commit.html#git_tree_lookup-13"], "general.c": [ - "ex/v0.28.0/general.html#git_tree_lookup-90", - "ex/v0.28.0/general.html#git_tree_lookup-91" + "ex/v1.9.1/general.html#git_tree_lookup-97", + "ex/v1.9.1/general.html#git_tree_lookup-98" ], - "init.c": [ - "ex/v0.28.0/init.html#git_tree_lookup-14" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_tree_lookup-41" - ] + "init.c": ["ex/v1.9.1/init.html#git_tree_lookup-13"], + "merge.c": ["ex/v1.9.1/merge.html#git_tree_lookup-37"] } }, "git_tree_lookup_prefix": { @@ -26099,10 +22388,7 @@ ], "argline": "git_tree **out, git_repository *repo, const git_oid *id, size_t len", "sig": "git_tree **::git_repository *::const git_oid *::size_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Lookup a tree object from the repository,\n given a prefix of its identifier (short id).
\n", "comments": "", "group": "tree" @@ -26113,39 +22399,31 @@ "line": 63, "lineto": 63, "args": [ - { - "name": "tree", - "type": "git_tree *", - "comment": "The tree to close" - } + { "name": "tree", "type": "git_tree *", "comment": "The tree to close" } ], "argline": "git_tree *tree", "sig": "git_tree *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Close an open tree
\n", - "comments": "You can no longer use the git_tree pointer after this call.
\n\nIMPORTANT: You MUST call this method when you stop using a tree to\n release memory. Failure to do so will cause a memory leak.
\n", + "comments": "You can no longer use the git_tree pointer after this call.
\n\nIMPORTANT: You MUST call this method when you stop using a tree to release memory. Failure to do so will cause a memory leak.
\n", "group": "tree", "examples": { + "commit.c": ["ex/v1.9.1/commit.html#git_tree_free-14"], "diff.c": [ - "ex/v0.28.0/diff.html#git_tree_free-17", - "ex/v0.28.0/diff.html#git_tree_free-18" + "ex/v1.9.1/diff.html#git_tree_free-19", + "ex/v1.9.1/diff.html#git_tree_free-20" ], "general.c": [ - "ex/v0.28.0/general.html#git_tree_free-92", - "ex/v0.28.0/general.html#git_tree_free-93" - ], - "init.c": [ - "ex/v0.28.0/init.html#git_tree_free-15" + "ex/v1.9.1/general.html#git_tree_free-99", + "ex/v1.9.1/general.html#git_tree_free-100" ], + "init.c": ["ex/v1.9.1/init.html#git_tree_free-14"], "log.c": [ - "ex/v0.28.0/log.html#git_tree_free-59", - "ex/v0.28.0/log.html#git_tree_free-60", - "ex/v0.28.0/log.html#git_tree_free-61", - "ex/v0.28.0/log.html#git_tree_free-62", - "ex/v0.28.0/log.html#git_tree_free-63" + "ex/v1.9.1/log.html#git_tree_free-55", + "ex/v1.9.1/log.html#git_tree_free-56", + "ex/v1.9.1/log.html#git_tree_free-57", + "ex/v1.9.1/log.html#git_tree_free-58", + "ex/v1.9.1/log.html#git_tree_free-59" ] } }, @@ -26215,12 +22493,8 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entrycount-41" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_tree_entrycount-94" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tree_entrycount-37"], + "general.c": ["ex/v1.9.1/general.html#git_tree_entrycount-101"] } }, "git_tree_entry_byname": { @@ -26247,12 +22521,10 @@ "comment": " the tree entry; NULL if not found" }, "description": "Lookup a tree entry by its filename
\n", - "comments": "This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.
\n", + "comments": "This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.
\n", "group": "tree", "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_byname-95" - ] + "general.c": ["ex/v1.9.1/general.html#git_tree_entry_byname-102"] } }, "git_tree_entry_byindex": { @@ -26279,15 +22551,11 @@ "comment": " the tree entry; NULL if not found" }, "description": "Lookup a tree entry by its position in the tree
\n", - "comments": "This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.
\n", + "comments": "This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.
\n", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_byindex-42" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_byindex-96" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tree_entry_byindex-38"], + "general.c": ["ex/v1.9.1/general.html#git_tree_entry_byindex-103"] } }, "git_tree_entry_byid": { @@ -26314,7 +22582,7 @@ "comment": " the tree entry; NULL if not found" }, "description": "Lookup a tree entry by SHA value.
\n", - "comments": "This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.
\n\nWarning: this must examine every entry in the tree, so it is not fast.
\n", + "comments": "This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.
\n\nWarning: this must examine every entry in the tree, so it is not fast.
\n", "group": "tree" }, "git_tree_entry_bypath": { @@ -26346,7 +22614,7 @@ "comment": " 0 on success; GIT_ENOTFOUND if the path does not exist" }, "description": "Retrieve a tree entry contained in a tree or in any of its subtrees,\n given its relative path.
\n", - "comments": "Unlike the other lookup functions, the returned tree entry is owned by\n the user and must be freed explicitly with git_tree_entry_free().
Unlike the other lookup functions, the returned tree entry is owned by the user and must be freed explicitly with git_tree_entry_free().
Duplicate a tree entry
\n", - "comments": "Create a copy of a tree entry. The returned copy is owned by the user,\n and must be freed explicitly with git_tree_entry_free().
Create a copy of a tree entry. The returned copy is owned by the user, and must be freed explicitly with git_tree_entry_free().
Free a user-owned tree entry
\n", - "comments": "IMPORTANT: This function is only needed for tree entries owned by the\n user, such as the ones returned by git_tree_entry_dup() or\n git_tree_entry_bypath().
IMPORTANT: This function is only needed for tree entries owned by the user, such as the ones returned by git_tree_entry_dup() or git_tree_entry_bypath().
Get the filename of a tree entry
\n", "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_name-43" - ], + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tree_entry_name-39"], "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_name-97", - "ex/v0.28.0/general.html#git_tree_entry_name-98" + "ex/v1.9.1/general.html#git_tree_entry_name-104", + "ex/v1.9.1/general.html#git_tree_entry_name-105" ] } }, @@ -26451,9 +22708,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_id-44" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tree_entry_id-40"] } }, "git_tree_entry_type": { @@ -26478,9 +22733,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_type-45" - ] + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tree_entry_type-41"] } }, "git_tree_entry_filemode": { @@ -26504,10 +22757,8 @@ "description": "Get the UNIX file attributes of a tree entry
\n", "comments": "", "group": "tree", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_filemode-46" - ] + "examples": { + "cat-file.c": ["ex/v1.9.1/cat-file.html#git_tree_entry_filemode-42"] } }, "git_tree_entry_filemode_raw": { @@ -26529,7 +22780,7 @@ "comment": " filemode as an integer" }, "description": "Get the raw UNIX file attributes of a tree entry
\n", - "comments": "This function does not perform any normalization and is only useful\n if you need to be able to recreate the original tree object.
\n", + "comments": "This function does not perform any normalization and is only useful if you need to be able to recreate the original tree object.
\n", "group": "tree" }, "git_tree_entry_cmp": { @@ -26583,17 +22834,12 @@ ], "argline": "git_object **object_out, git_repository *repo, const git_tree_entry *entry", "sig": "git_object **::git_repository *::const git_tree_entry *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Convert a tree entry to the git_object it points to.
\n", "comments": "You must call git_object_free() on the object when you are done with it.
Create a new tree builder.
\n", - "comments": "The tree builder can be used to create or modify trees in memory and\n write them as tree objects to the database.
\n\nIf the source parameter is not NULL, the tree builder will be\n initialized with the entries of the given tree.
If the source parameter is NULL, the tree builder will start with no\n entries and will have to be filled manually.
The tree builder can be used to create or modify trees in memory and write them as tree objects to the database.
\n\nIf the source parameter is not NULL, the tree builder will be initialized with the entries of the given tree.
If the source parameter is NULL, the tree builder will start with no entries and will have to be filled manually.
Clear all the entires in the builder
\n", + "description": "Clear all the entries in the builder
\n", "comments": "", "group": "treebuilder" }, "git_treebuilder_entrycount": { "type": "function", "file": "git2/tree.h", - "line": 270, - "lineto": 270, + "line": 271, + "lineto": 271, "args": [ { "name": "bld", @@ -26665,7 +22911,7 @@ "argline": "git_treebuilder *bld", "sig": "git_treebuilder *", "return": { - "type": "unsigned int", + "type": "size_t", "comment": " the number of entries in the treebuilder" }, "description": "Get the number of entries listed in a treebuilder
\n", @@ -26675,8 +22921,8 @@ "git_treebuilder_free": { "type": "function", "file": "git2/tree.h", - "line": 281, - "lineto": 281, + "line": 282, + "lineto": 282, "args": [ { "name": "bld", @@ -26686,19 +22932,16 @@ ], "argline": "git_treebuilder *bld", "sig": "git_treebuilder *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a tree builder
\n", - "comments": "This will clear all the entries and free to builder.\n Failing to free the builder after you're done using it\n will result in a memory leak
\n", + "comments": "This will clear all the entries and free to builder. Failing to free the builder after you're done using it will result in a memory leak
\n", "group": "treebuilder" }, "git_treebuilder_get": { "type": "function", "file": "git2/tree.h", - "line": 293, - "lineto": 294, + "line": 294, + "lineto": 295, "args": [ { "name": "bld", @@ -26718,14 +22961,14 @@ "comment": " pointer to the entry; NULL if not found" }, "description": "Get an entry from the builder from its filename
\n", - "comments": "The returned entry is owned by the builder and should\n not be freed manually.
\n", + "comments": "The returned entry is owned by the builder and should not be freed manually.
\n", "group": "treebuilder" }, "git_treebuilder_insert": { "type": "function", "file": "git2/tree.h", - "line": 324, - "lineto": 329, + "line": 325, + "lineto": 330, "args": [ { "name": "out", @@ -26755,19 +22998,16 @@ ], "argline": "const git_tree_entry **out, git_treebuilder *bld, const char *filename, const git_oid *id, git_filemode_t filemode", "sig": "const git_tree_entry **::git_treebuilder *::const char *::const git_oid *::git_filemode_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Add or update an entry to the builder
\n", - "comments": "Insert a new entry for filename in the builder with the\n given attributes.
If an entry named filename already exists, its attributes\n will be updated with the given ones.
The optional pointer out can be used to retrieve a pointer to the\n newly created/updated entry. Pass NULL if you do not need it. The\n pointer may not be valid past the next operation in this\n builder. Duplicate the entry if you want to keep it.
By default the entry that you are inserting will be checked for\n validity; that it exists in the object database and is of the\n correct type. If you do not want this behavior, set the\n GIT_OPT_ENABLE_STRICT_OBJECT_CREATION library option to false.
Insert a new entry for filename in the builder with the given attributes.
If an entry named filename already exists, its attributes will be updated with the given ones.
The optional pointer out can be used to retrieve a pointer to the newly created/updated entry. Pass NULL if you do not need it. The pointer may not be valid past the next operation in this builder. Duplicate the entry if you want to keep it.
By default the entry that you are inserting will be checked for validity; that it exists in the object database and is of the correct type. If you do not want this behavior, set the GIT_OPT_ENABLE_STRICT_OBJECT_CREATION library option to false.
Remove an entry from the builder by its filename
\n", "comments": "", "group": "treebuilder" @@ -26793,8 +23030,8 @@ "git_treebuilder_filter": { "type": "function", "file": "git2/tree.h", - "line": 361, - "lineto": 364, + "line": 368, + "lineto": 371, "args": [ { "name": "bld", @@ -26815,18 +23052,18 @@ "argline": "git_treebuilder *bld, git_treebuilder_filter_cb filter, void *payload", "sig": "git_treebuilder *::git_treebuilder_filter_cb::void *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "Selectively remove entries in the tree
\n", - "comments": "The filter callback will be called for each entry in the tree with a\n pointer to the entry and the provided payload; if the callback returns\n non-zero, the entry will be filtered (removed from the builder).
The filter callback will be called for each entry in the tree with a pointer to the entry and the provided payload; if the callback returns non-zero, the entry will be filtered (removed from the builder).
Write the contents of the tree builder as a tree object
\n", - "comments": "The tree builder will be written to the given repo, and its\n identifying SHA1 hash will be stored in the id pointer.
Write the contents of the tree builder as a tree object\n using a shared git_buf.
\n", - "comments": "", + "comments": "The tree builder will be written to the given repo, and its identifying SHA1 hash will be stored in the id pointer.
Traverse the entries in a tree and its subtrees in post or pre order.
\n", - "comments": "The entries will be traversed in the specified order, children subtrees\n will be automatically loaded as required, and the callback will be\n called once per entry with the current (relative) root for the entry and\n the entry data itself.
If the callback returns a positive value, the passed entry will be\n skipped on the traversal (in pre mode). A negative value stops the walk.
\n", + "comments": "The entries will be traversed in the specified order, children subtrees will be automatically loaded as required, and the callback will be called once per entry with the current (relative) root for the entry and the entry data itself.
If the callback returns a positive value, the passed entry will be skipped on the traversal (in pre mode). A negative value stops the walk.
\n", "group": "tree" }, "git_tree_dup": { "type": "function", "file": "git2/tree.h", - "line": 433, - "lineto": 433, + "line": 434, + "lineto": 434, "args": [ { "name": "out", @@ -26937,10 +23136,7 @@ ], "argline": "git_tree **out, git_tree *source", "sig": "git_tree **::git_tree *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0" }, "description": "Create an in-memory copy of a tree. The copy must be explicitly\n free'd or it will leak.
\n", "comments": "", "group": "tree" @@ -26948,14 +23144,10 @@ "git_tree_create_updated": { "type": "function", "file": "git2/tree.h", - "line": 479, - "lineto": 479, + "line": 481, + "lineto": 481, "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "id of the new tree" - }, + { "name": "out", "type": "git_oid *", "comment": "id of the new tree" }, { "name": "repo", "type": "git_repository *", @@ -26979,19 +23171,16 @@ ], "argline": "git_oid *out, git_repository *repo, git_tree *baseline, size_t nupdates, const git_tree_update *updates", "sig": "git_oid *::git_repository *::git_tree *::size_t::const git_tree_update *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Create a tree based on another one with the specified modifications
\n", - "comments": "Given the baseline perform the changes described in the list of\n updates and create a new tree.
This function is optimized for common file/directory addition, removal and\n replacement in trees. It is much more efficient than reading the tree into a\n git_index and modifying that, but in exchange it is not as flexible.
Deleting and adding the same entry is undefined behaviour, changing\n a tree to a blob or viceversa is not supported.
\n", + "comments": "Given the baseline perform the changes described in the list of updates and create a new tree.
This function is optimized for common file/directory addition, removal and replacement in trees. It is much more efficient than reading the tree into a git_index and modifying that, but in exchange it is not as flexible.
Deleting and adding the same entry is undefined behaviour, changing a tree to a blob or viceversa is not supported.
\n", "group": "tree" }, "git_worktree_list": { "type": "function", "file": "git2/worktree.h", - "line": 34, - "lineto": 34, + "line": 35, + "lineto": 35, "args": [ { "name": "out", @@ -27006,19 +23195,16 @@ ], "argline": "git_strarray *out, git_repository *repo", "sig": "git_strarray *::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "List names of linked working trees
\n", - "comments": "The returned list should be released with git_strarray_free\n when no longer needed.
The returned list should be released with git_strarray_free when no longer needed.
Lookup a working tree by its name for a given repository
\n", "comments": "", "group": "worktree" @@ -27049,8 +23232,8 @@ "git_worktree_open_from_repository": { "type": "function", "file": "git2/worktree.h", - "line": 56, - "lineto": 56, + "line": 58, + "lineto": 58, "args": [ { "name": "out", @@ -27065,19 +23248,16 @@ ], "argline": "git_worktree **out, git_repository *repo", "sig": "git_worktree **::git_repository *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Open a worktree of a given repository
\n", - "comments": "If a repository is not the main tree but a worktree, this\n function will look up the worktree inside the parent\n repository and create a new git_worktree structure.
If a repository is not the main tree but a worktree, this function will look up the worktree inside the parent repository and create a new git_worktree structure.
Free a previously allocated worktree
\n", "comments": "", "group": "worktree" @@ -27098,8 +23275,8 @@ "git_worktree_validate": { "type": "function", "file": "git2/worktree.h", - "line": 75, - "lineto": 75, + "line": 77, + "lineto": 77, "args": [ { "name": "wt", @@ -27114,14 +23291,14 @@ "comment": " 0 when worktree is valid, error-code otherwise" }, "description": "Check if worktree is valid
\n", - "comments": "A valid worktree requires both the git data structures inside\n the linked parent repository and the linked working copy to be\n present.
\n", + "comments": "A valid worktree requires both the git data structures inside the linked parent repository and the linked working copy to be present.
\n", "group": "worktree" }, - "git_worktree_add_init_options": { + "git_worktree_add_options_init": { "type": "function", "file": "git2/worktree.h", - "line": 104, - "lineto": 105, + "line": 116, + "lineto": 117, "args": [ { "name": "opts", @@ -27141,14 +23318,14 @@ "comment": " Zero on success; -1 on failure." }, "description": "Initialize git_worktree_add_options structure
\n", - "comments": "Initializes a git_worktree_add_options with default values. Equivalent to\n creating an instance with GIT_WORKTREE_ADD_OPTIONS_INIT.
Initializes a git_worktree_add_options with default values. Equivalent to creating an instance with GIT_WORKTREE_ADD_OPTIONS_INIT.
Add a new working tree
\n", - "comments": "Add a new working tree for the repository, that is create the\n required data structures inside the repository and check out\n the current HEAD at path
Add a new working tree for the repository, that is create the required data structures inside the repository and check out the current HEAD at path
Lock worktree if not already locked
\n", - "comments": "Lock a worktree, optionally specifying a reason why the linked\n working tree is being locked.
\n", + "comments": "Lock a worktree, optionally specifying a reason why the linked working tree is being locked.
\n", "group": "worktree" }, "git_worktree_unlock": { "type": "function", "file": "git2/worktree.h", - "line": 144, - "lineto": 144, + "line": 156, + "lineto": 156, "args": [ { "name": "wt", @@ -27238,8 +23412,8 @@ "git_worktree_is_locked": { "type": "function", "file": "git2/worktree.h", - "line": 158, - "lineto": 158, + "line": 170, + "lineto": 170, "args": [ { "name": "reason", @@ -27259,14 +23433,14 @@ "comment": " 0 when the working tree not locked, a value greater\n than zero if it is locked, less than zero if there was an\n error" }, "description": "Check if worktree is locked
\n", - "comments": "A worktree may be locked if the linked working tree is stored\n on a portable device which is not available.
\n", + "comments": "A worktree may be locked if the linked working tree is stored on a portable device which is not available.
\n", "group": "worktree" }, "git_worktree_name": { "type": "function", "file": "git2/worktree.h", - "line": 167, - "lineto": 167, + "line": 179, + "lineto": 179, "args": [ { "name": "wt", @@ -27287,8 +23461,8 @@ "git_worktree_path": { "type": "function", "file": "git2/worktree.h", - "line": 176, - "lineto": 176, + "line": 188, + "lineto": 188, "args": [ { "name": "wt", @@ -27306,11 +23480,11 @@ "comments": "", "group": "worktree" }, - "git_worktree_prune_init_options": { + "git_worktree_prune_options_init": { "type": "function", "file": "git2/worktree.h", - "line": 217, - "lineto": 219, + "line": 233, + "lineto": 235, "args": [ { "name": "opts", @@ -27330,41 +23504,41 @@ "comment": " Zero on success; -1 on failure." }, "description": "Initialize git_worktree_prune_options structure
\n", - "comments": "Initializes a git_worktree_prune_options with default values. Equivalent to\n creating an instance with GIT_WORKTREE_PRUNE_OPTIONS_INIT.
Initializes a git_worktree_prune_options with default values. Equivalent to creating an instance with GIT_WORKTREE_PRUNE_OPTIONS_INIT.
Is the worktree prunable with the given options?
\n", - "comments": "A worktree is not prunable in the following scenarios:
\n\nvalid member will cause this check to be ignored.locked flag will cause this\ncheck to be ignored.If the worktree is not valid and not locked or if the above\n flags have been passed in, this function will return a\n positive value.
\n", + "comments": "A worktree is not prunable in the following scenarios:
\n\nvalid member will cause this check to be ignored. - the worktree is locked. The locked flag will cause this check to be ignored.If the worktree is not valid and not locked or if the above flags have been passed in, this function will return a positive value. If the worktree is not prunable, an error message will be set (visible in giterr_last) with details about why.
Prune working tree
\n", - "comments": "Prune the working tree, that is remove the git data\n structures on disk. The repository will only be pruned of\n git_worktree_is_prunable succeeds.
Prune the working tree, that is remove the git data structures on disk. The repository will only be pruned of git_worktree_is_prunable succeeds.
When applying a patch, callback that will be made per delta (file).
\n", - "comments": "When the callback:\n - returns \n<\n 0, the apply process will be aborted.\n - returns > 0, the delta will not be applied, but the apply process\n continues\n - returns 0, the delta is applied, and the apply process continues.
\n" + "comments": "When the callback: - returns < 0, the apply process will be aborted. - returns > 0, the delta will not be applied, but the apply process continues - returns 0, the delta is applied, and the apply process continues.
\n" }, "git_apply_hunk_cb": { "type": "callback", "file": "git2/apply.h", - "line": 52, - "lineto": 54, + "line": 59, + "lineto": 61, "args": [ { "name": "hunk", @@ -27436,16 +23607,16 @@ "sig": "const git_diff_hunk *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 if the hunk is applied, \n<\n 0 if the apply process will be aborted\n\tor > 0 if the hunk will not be applied." }, "description": "When applying a patch, callback that will be made per hunk.
\n", - "comments": "When the callback:\n - returns \n<\n 0, the apply process will be aborted.\n - returns > 0, the hunk will not be applied, but the apply process\n continues\n - returns 0, the hunk is applied, and the apply process continues.
\n" + "comments": "When the callback: - returns < 0, the apply process will be aborted. - returns > 0, the hunk will not be applied, but the apply process continues - returns 0, the hunk is applied, and the apply process continues.
\n" }, "git_attr_foreach_cb": { "type": "callback", "file": "git2/attr.h", - "line": 205, - "lineto": 205, + "line": 304, + "lineto": 304, "args": [ { "name": "name", @@ -27455,1638 +23626,1308 @@ { "name": "value", "type": "const char *", - "comment": "The attribute value. May be NULL if the attribute is explicitly\n set to UNSPECIFIED using the '!' sign." - }, - { - "name": "payload", - "type": "void *", - "comment": "A user-specified pointer." - } - ], - "argline": "const char *name, const char *value, void *payload", - "sig": "const char *::const char *::void *", - "return": { - "type": "int", - "comment": " 0 to continue looping, non-zero to stop. This value will be returned\n from git_attr_foreach." - }, - "description": "The callback used with git_attr_foreach.
\n", - "comments": "This callback will be invoked only once per attribute name, even if there\n are multiple rules for a given file. The highest priority rule will be\n used.
\n" - }, - "git_checkout_notify_cb": { - "type": "callback", - "file": "git2/checkout.h", - "line": 223, - "lineto": 229, - "args": [ - { - "name": "why", - "type": "git_checkout_notify_t", - "comment": null - }, - { - "name": "path", - "type": "const char *", - "comment": null - }, - { - "name": "baseline", - "type": "const git_diff_file *", - "comment": null - }, - { - "name": "target", - "type": "const git_diff_file *", - "comment": null - }, - { - "name": "workdir", - "type": "const git_diff_file *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "git_checkout_notify_t why, const char *path, const git_diff_file *baseline, const git_diff_file *target, const git_diff_file *workdir, void *payload", - "sig": "git_checkout_notify_t::const char *::const git_diff_file *::const git_diff_file *::const git_diff_file *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Checkout notification callback function
\n", - "comments": "" - }, - "git_checkout_progress_cb": { - "type": "callback", - "file": "git2/checkout.h", - "line": 232, - "lineto": 236, - "args": [ - { - "name": "path", - "type": "const char *", - "comment": null - }, - { - "name": "completed_steps", - "type": "size_t", - "comment": null - }, - { - "name": "total_steps", - "type": "size_t", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "const char *path, size_t completed_steps, size_t total_steps, void *payload", - "sig": "const char *::size_t::size_t::void *", - "return": { - "type": "void", - "comment": null - }, - "description": "Checkout progress notification function
\n", - "comments": "" - }, - "git_checkout_perfdata_cb": { - "type": "callback", - "file": "git2/checkout.h", - "line": 239, - "lineto": 241, - "args": [ - { - "name": "perfdata", - "type": "const git_checkout_perfdata *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "const git_checkout_perfdata *perfdata, void *payload", - "sig": "const git_checkout_perfdata *::void *", - "return": { - "type": "void", - "comment": null - }, - "description": "Checkout perfdata notification function
\n", - "comments": "" - }, - "git_remote_create_cb": { - "type": "callback", - "file": "git2/clone.h", - "line": 69, - "lineto": 74, - "args": [ - { - "name": "out", - "type": "git_remote **", - "comment": "the resulting remote" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository in which to create the remote" - }, - { - "name": "name", - "type": "const char *", - "comment": "the remote's name" - }, - { - "name": "url", - "type": "const char *", - "comment": "the remote's url" - }, - { - "name": "payload", - "type": "void *", - "comment": "an opaque payload" - } - ], - "argline": "git_remote **out, git_repository *repo, const char *name, const char *url, void *payload", - "sig": "git_remote **::git_repository *::const char *::const char *::void *", - "return": { - "type": "int", - "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" - }, - "description": "The signature of a function matching git_remote_create, with an additional\n void* as a callback payload.
\n", - "comments": "Callers of git_clone may provide a function matching this signature to override\n the remote creation and customization process during a clone operation.
\n" - }, - "git_repository_create_cb": { - "type": "callback", - "file": "git2/clone.h", - "line": 90, - "lineto": 94, - "args": [ - { - "name": "out", - "type": "git_repository **", - "comment": "the resulting repository" - }, - { - "name": "path", - "type": "const char *", - "comment": "path in which to create the repository" - }, - { - "name": "bare", - "type": "int", - "comment": "whether the repository is bare. This is the value from the clone options" - }, - { - "name": "payload", - "type": "void *", - "comment": "payload specified by the options" - } - ], - "argline": "git_repository **out, const char *path, int bare, void *payload", - "sig": "git_repository **::const char *::int::void *", - "return": { - "type": "int", - "comment": " 0, or a negative value to indicate error" - }, - "description": "The signature of a function matchin git_repository_init, with an\n aditional void * as callback payload.
\n", - "comments": "Callers of git_clone my provide a function matching this signature\n to override the repository creation and customization process\n during a clone operation.
\n" - }, - "git_config_foreach_cb": { - "type": "callback", - "file": "git2/config.h", - "line": 84, - "lineto": 84, - "args": [ - { - "name": "entry", - "type": "const git_config_entry *", - "comment": "the entry currently being enumerated" - }, - { - "name": "payload", - "type": "void *", - "comment": "a user-specified pointer" - } - ], - "argline": "const git_config_entry *entry, void *payload", - "sig": "const git_config_entry *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "A config enumeration callback
\n", - "comments": "" - }, - "git_diff_notify_cb": { - "type": "callback", - "file": "git2/diff.h", - "line": 331, - "lineto": 335, - "args": [ - { - "name": "diff_so_far", - "type": "const git_diff *", - "comment": null - }, - { - "name": "delta_to_add", - "type": "const git_diff_delta *", - "comment": null - }, - { - "name": "matched_pathspec", - "type": "const char *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "const git_diff *diff_so_far, const git_diff_delta *delta_to_add, const char *matched_pathspec, void *payload", - "sig": "const git_diff *::const git_diff_delta *::const char *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Diff notification callback function.
\n", - "comments": "The callback will be called for each file, just before the git_diff_delta\n gets inserted into the diff.
When the callback:\n - returns \n<\n 0, the diff process will be aborted.\n - returns > 0, the delta will not be inserted into the diff, but the\n diff process continues.\n - returns 0, the delta is inserted into the diff, and the diff process\n continues.
\n" - }, - "git_diff_progress_cb": { - "type": "callback", - "file": "git2/diff.h", - "line": 347, - "lineto": 351, - "args": [ - { - "name": "diff_so_far", - "type": "const git_diff *", - "comment": "The diff being generated." - }, - { - "name": "old_path", - "type": "const char *", - "comment": "The path to the old file or NULL." - }, - { - "name": "new_path", - "type": "const char *", - "comment": "The path to the new file or NULL." - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "const git_diff *diff_so_far, const char *old_path, const char *new_path, void *payload", - "sig": "const git_diff *::const char *::const char *::void *", - "return": { - "type": "int", - "comment": " Non-zero to abort the diff." - }, - "description": "Diff progress callback.
\n", - "comments": "Called before each file comparison.
\n" - }, - "git_diff_file_cb": { - "type": "callback", - "file": "git2/diff.h", - "line": 465, - "lineto": 468, - "args": [ - { - "name": "delta", - "type": "const git_diff_delta *", - "comment": "A pointer to the delta data for the file" - }, - { - "name": "progress", - "type": "float", - "comment": "Goes from 0 to 1 over the diff" - }, - { - "name": "payload", - "type": "void *", - "comment": "User-specified pointer from foreach function" - } - ], - "argline": "const git_diff_delta *delta, float progress, void *payload", - "sig": "const git_diff_delta *::float::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "When iterating over a diff, callback that will be made per file.
\n", - "comments": "" - }, - "git_diff_binary_cb": { - "type": "callback", - "file": "git2/diff.h", - "line": 531, - "lineto": 534, - "args": [ - { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null - }, - { - "name": "binary", - "type": "const git_diff_binary *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "const git_diff_delta *delta, const git_diff_binary *binary, void *payload", - "sig": "const git_diff_delta *::const git_diff_binary *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "When iterating over a diff, callback that will be made for\n binary content within the diff.
\n", - "comments": "" - }, - "git_diff_hunk_cb": { - "type": "callback", - "file": "git2/diff.h", - "line": 557, - "lineto": 560, - "args": [ - { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null - }, - { - "name": "hunk", - "type": "const git_diff_hunk *", - "comment": null + "comment": "The attribute value. May be NULL if the attribute is explicitly\n set to UNSPECIFIED using the '!' sign." }, { "name": "payload", "type": "void *", - "comment": null + "comment": "A user-specified pointer." } ], - "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, void *payload", - "sig": "const git_diff_delta *::const git_diff_hunk *::void *", + "argline": "const char *name, const char *value, void *payload", + "sig": "const char *::const char *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 to continue looping, non-zero to stop. This value will be returned\n from git_attr_foreach." }, - "description": "When iterating over a diff, callback that will be made per hunk.
\n", - "comments": "" + "description": "The callback used with git_attr_foreach.
\n", + "comments": "This callback will be invoked only once per attribute name, even if there are multiple rules for a given file. The highest priority rule will be used.
\n" }, - "git_diff_line_cb": { + "git_transport_certificate_check_cb": { "type": "callback", - "file": "git2/diff.h", - "line": 618, - "lineto": 622, + "file": "git2/cert.h", + "line": 72, + "lineto": 72, "args": [ { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null + "name": "cert", + "type": "git_cert *", + "comment": "The host certificate" }, { - "name": "hunk", - "type": "const git_diff_hunk *", - "comment": null + "name": "valid", + "type": "int", + "comment": "Whether the libgit2 checks (OpenSSL or WinHTTP) think\n this certificate is valid" }, { - "name": "line", - "type": "const git_diff_line *", - "comment": null + "name": "host", + "type": "const char *", + "comment": "Hostname of the host libgit2 connected to" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload provided by the caller" } ], - "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload", - "sig": "const git_diff_delta *::const git_diff_hunk *::const git_diff_line *::void *", + "argline": "git_cert *cert, int valid, const char *host, void *payload", + "sig": "git_cert *::int::const char *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 to proceed with the connection, \n<\n 0 to fail the connection\n or > 0 to indicate that the callback refused to act and that\n the existing validity determination should be honored" }, - "description": "When iterating over a diff, callback that will be made per text diff\n line. In this context, the provided range will be NULL.
\n", - "comments": "When printing a diff, callback that will be made to output each line\n of text. This uses some extra GIT_DIFF_LINE_... constants for output\n of lines of file and hunk headers.
\n" + "description": "Callback for the user's custom certificate checks.
\n", + "comments": "" }, - "git_index_matched_path_cb": { + "git_checkout_notify_cb": { "type": "callback", - "file": "git2/index.h", - "line": 135, - "lineto": 136, + "file": "git2/checkout.h", + "line": 275, + "lineto": 281, "args": [ + { + "name": "why", + "type": "git_checkout_notify_t", + "comment": "the notification reason" + }, { "name": "path", "type": "const char *", - "comment": null + "comment": "the path to the file being checked out" }, { - "name": "matched_pathspec", - "type": "const char *", - "comment": null + "name": "baseline", + "type": "const git_diff_file *", + "comment": "the baseline's diff file information" }, { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "const char *path, const char *matched_pathspec, void *payload", - "sig": "const char *::const char *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback for APIs that add/remove/update files matching pathspec
\n", - "comments": "" - }, - "git_headlist_cb": { - "type": "callback", - "file": "git2/net.h", - "line": 55, - "lineto": 55, - "args": [ + "name": "target", + "type": "const git_diff_file *", + "comment": "the checkout target diff file information" + }, { - "name": "rhead", - "type": "git_remote_head *", - "comment": null + "name": "workdir", + "type": "const git_diff_file *", + "comment": "the working directory diff file information" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-supplied callback payload" } ], - "argline": "git_remote_head *rhead, void *payload", - "sig": "git_remote_head *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback for listing the remote heads
\n", + "argline": "git_checkout_notify_t why, const char *path, const git_diff_file *baseline, const git_diff_file *target, const git_diff_file *workdir, void *payload", + "sig": "git_checkout_notify_t::const char *::const git_diff_file *::const git_diff_file *::const git_diff_file *::void *", + "return": { "type": "int", "comment": " 0 on success, or an error code" }, + "description": "Checkout notification callback function.
\n", "comments": "" }, - "git_note_foreach_cb": { + "git_checkout_progress_cb": { "type": "callback", - "file": "git2/notes.h", - "line": 29, - "lineto": 30, + "file": "git2/checkout.h", + "line": 291, + "lineto": 295, "args": [ { - "name": "blob_id", - "type": "const git_oid *", - "comment": null + "name": "path", + "type": "const char *", + "comment": "the path to the file being checked out" }, { - "name": "annotated_object_id", - "type": "const git_oid *", - "comment": null + "name": "completed_steps", + "type": "size_t", + "comment": "number of checkout steps completed" + }, + { + "name": "total_steps", + "type": "size_t", + "comment": "number of total steps in the checkout process" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-supplied callback payload" } ], - "argline": "const git_oid *blob_id, const git_oid *annotated_object_id, void *payload", - "sig": "const git_oid *::const git_oid *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback for git_note_foreach.
\n", - "comments": "Receives:\n - blob_id: Oid of the blob containing the message\n - annotated_object_id: Oid of the git object being annotated\n - payload: Payload data passed to git_note_foreach
Checkout progress notification function.
\n", + "comments": "" }, - "git_odb_foreach_cb": { + "git_checkout_perfdata_cb": { "type": "callback", - "file": "git2/odb.h", - "line": 27, - "lineto": 27, + "file": "git2/checkout.h", + "line": 303, + "lineto": 305, "args": [ { - "name": "id", - "type": "const git_oid *", - "comment": null + "name": "perfdata", + "type": "const git_checkout_perfdata *", + "comment": "the performance data for the checkout" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-supplied callback payload" } ], - "argline": "const git_oid *id, void *payload", - "sig": "const git_oid *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Function type for callbacks from git_odb_foreach.
\n", + "argline": "const git_checkout_perfdata *perfdata, void *payload", + "sig": "const git_checkout_perfdata *::void *", + "return": { "type": "void", "comment": null }, + "description": "Checkout performance data reporting function.
\n", "comments": "" }, - "git_packbuilder_foreach_cb": { + "git_remote_create_cb": { "type": "callback", - "file": "git2/pack.h", - "line": 181, - "lineto": 181, + "file": "git2/clone.h", + "line": 73, + "lineto": 78, "args": [ { - "name": "buf", - "type": "void *", - "comment": null + "name": "out", + "type": "git_remote **", + "comment": "the resulting remote" }, { - "name": "size", - "type": "size_t", - "comment": null + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to create the remote" }, { - "name": "payload", - "type": "void *", - "comment": null - } + "name": "name", + "type": "const char *", + "comment": "the remote's name" + }, + { + "name": "url", + "type": "const char *", + "comment": "the remote's url" + }, + { "name": "payload", "type": "void *", "comment": "an opaque payload" } ], - "argline": "void *buf, size_t size, void *payload", - "sig": "void *::size_t::void *", + "argline": "git_remote **out, git_repository *repo, const char *name, const char *url, void *payload", + "sig": "git_remote **::git_repository *::const char *::const char *::void *", "return": { "type": "int", - "comment": null + "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, - "description": "", - "comments": "" + "description": "The signature of a function matching git_remote_create, with an additional\n void* as a callback payload.
\n", + "comments": "Callers of git_clone may provide a function matching this signature to override the remote creation and customization process during a clone operation.
\n" }, - "git_packbuilder_progress": { + "git_repository_create_cb": { "type": "callback", - "file": "git2/pack.h", - "line": 210, - "lineto": 214, + "file": "git2/clone.h", + "line": 94, + "lineto": 98, "args": [ { - "name": "stage", - "type": "int", - "comment": null + "name": "out", + "type": "git_repository **", + "comment": "the resulting repository" }, { - "name": "current", - "type": "int", - "comment": null + "name": "path", + "type": "const char *", + "comment": "path in which to create the repository" }, { - "name": "total", + "name": "bare", "type": "int", - "comment": null + "comment": "whether the repository is bare. This is the value from the clone options" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "payload specified by the options" } ], - "argline": "int stage, int current, int total, void *payload", - "sig": "int::int::int::void *", + "argline": "git_repository **out, const char *path, int bare, void *payload", + "sig": "git_repository **::const char *::int::void *", "return": { "type": "int", - "comment": null + "comment": " 0, or a negative value to indicate error" }, - "description": "Packbuilder progress notification function
\n", - "comments": "" + "description": "The signature of a function matching git_repository_init, with an\n additional void * as callback payload.
\n", + "comments": "Callers of git_clone my provide a function matching this signature to override the repository creation and customization process during a clone operation.
\n" }, - "git_reference_foreach_cb": { + "git_commit_create_cb": { "type": "callback", - "file": "git2/refs.h", - "line": 425, - "lineto": 425, + "file": "git2/commit.h", + "line": 643, + "lineto": 652, "args": [ { - "name": "reference", - "type": "git_reference *", - "comment": null + "name": "out", + "type": "git_oid *", + "comment": "pointer that this callback will populate with the object\n id of the commit that is created" + }, + { + "name": "author", + "type": "const git_signature *", + "comment": "the author name and time of the commit" + }, + { + "name": "committer", + "type": "const git_signature *", + "comment": "the committer name and time of the commit" + }, + { + "name": "message_encoding", + "type": "const char *", + "comment": "the encoding of the given message, or NULL\n to assume UTF8" + }, + { + "name": "message", + "type": "const char *", + "comment": "the commit message" + }, + { + "name": "tree", + "type": "const git_tree *", + "comment": "the tree to be committed" + }, + { + "name": "parent_count", + "type": "size_t", + "comment": "the number of parents for this commit" + }, + { + "name": "parents", + "type": "const git_commit *[]", + "comment": "the commit parents" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the payload pointer in the rebase options" } ], - "argline": "git_reference *reference, void *payload", - "sig": "git_reference *::void *", + "argline": "git_oid *out, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message, const git_tree *tree, size_t parent_count, const git_commit *[] parents, void *payload", + "sig": "git_oid *::const git_signature *::const git_signature *::const char *::const char *::const git_tree *::size_t::const git_commit *[]::void *", "return": { "type": "int", - "comment": null + "comment": " 0 if this callback has created the commit and populated the out\n parameter, GIT_PASSTHROUGH if the callback has not created a\n commit and wants the calling function to create the commit as\n if no callback had been specified, any other value to stop\n and return a failure" }, - "description": "", + "description": "Commit creation callback: used when a function is going to create\n commits (for example, in git_rebase_commit) to allow callers to\n override the commit creation behavior. For example, users may\n wish to sign commits by providing this information to\n git_commit_create_buffer, signing that buffer, then calling\n git_commit_create_with_signature. The resultant commit id\n should be set in the out object id parameter.
A config enumeration callback.
\n", "comments": "" }, - "git_push_transfer_progress": { + "git_credential_acquire_cb": { "type": "callback", - "file": "git2/remote.h", - "line": 425, - "lineto": 429, + "file": "git2/credential.h", + "line": 134, + "lineto": 139, "args": [ { - "name": "current", - "type": "unsigned int", - "comment": null + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { - "name": "total", - "type": "unsigned int", - "comment": null + "name": "url", + "type": "const char *", + "comment": "The resource for which we are demanding a credential." }, { - "name": "bytes", - "type": "size_t", - "comment": null + "name": "username_from_url", + "type": "const char *", + "comment": "The username that was embedded in a \"user\n@\nhost\"\n remote url, or NULL if not included." + }, + { + "name": "allowed_types", + "type": "unsigned int", + "comment": "A bitmask stating which credential types are OK to return." }, { "name": "payload", "type": "void *", - "comment": null + "comment": "The payload provided when specifying this callback." } ], - "argline": "unsigned int current, unsigned int total, size_t bytes, void *payload", - "sig": "unsigned int::unsigned int::size_t::void *", + "argline": "git_credential **out, const char *url, const char *username_from_url, unsigned int allowed_types, void *payload", + "sig": "git_credential **::const char *::const char *::unsigned int::void *", "return": { "type": "int", - "comment": null + "comment": " 0 for success, \n<\n 0 to indicate an error, > 0 to indicate\n no credential was acquired" }, - "description": "Push network progress notification function
\n", - "comments": "" + "description": "Credential acquisition callback.
\n", + "comments": "This callback is usually involved any time another system might need authentication. As such, you are expected to provide a valid git_credential object back, depending on allowed_types (a git_credential_t bitmask).
\n\nNote that most authentication details are your responsibility - this callback will be called until the authentication succeeds, or you report an error. As such, it's easy to get in a loop if you fail to stop providing the same incorrect credentials.
\n" }, - "git_push_negotiation": { + "git_credential_ssh_interactive_cb": { "type": "callback", - "file": "git2/remote.h", - "line": 460, - "lineto": 460, + "file": "git2/credential.h", + "line": 259, + "lineto": 265, "args": [ + { "name": "name", "type": "const char *", "comment": "the name" }, { - "name": "updates", - "type": "const git_push_update **", - "comment": "an array containing the updates which will be sent\n as commands to the destination." + "name": "name_len", + "type": "int", + "comment": "the length of the name" }, { - "name": "len", - "type": "size_t", - "comment": "number of elements in `updates`" + "name": "instruction", + "type": "const char *", + "comment": "the authentication instruction" }, { - "name": "payload", - "type": "void *", - "comment": "Payload provided by the caller" - } + "name": "instruction_len", + "type": "int", + "comment": "the length of the instruction" + }, + { + "name": "num_prompts", + "type": "int", + "comment": "the number of prompts" + }, + { + "name": "prompts", + "type": "const LIBSSH2_USERAUTH_KBDINT_PROMPT *", + "comment": "the prompts" + }, + { + "name": "responses", + "type": "LIBSSH2_USERAUTH_KBDINT_RESPONSE *", + "comment": "the responses" + }, + { "name": "abstract", "type": "void **", "comment": "the abstract" } ], - "argline": "const git_push_update **updates, size_t len, void *payload", - "sig": "const git_push_update **::size_t::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback used to inform of upcoming updates.
\n", + "argline": "const char *name, int name_len, const char *instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, void **abstract", + "sig": "const char *::int::const char *::int::int::const LIBSSH2_USERAUTH_KBDINT_PROMPT *::LIBSSH2_USERAUTH_KBDINT_RESPONSE *::void **", + "return": { "type": "void", "comment": null }, + "description": "Callback for interactive SSH credentials.
\n", "comments": "" }, - "git_push_update_reference_cb": { + "git_credential_sign_cb": { "type": "callback", - "file": "git2/remote.h", - "line": 474, - "lineto": 474, + "file": "git2/credential.h", + "line": 308, + "lineto": 312, "args": [ { - "name": "refname", - "type": "const char *", - "comment": "refname specifying to the remote ref" + "name": "session", + "type": "LIBSSH2_SESSION *", + "comment": "the libssh2 session" }, { - "name": "status", - "type": "const char *", - "comment": "status message sent from the remote" + "name": "sig", + "type": "unsigned char **", + "comment": "the signature" + }, + { + "name": "sig_len", + "type": "size_t *", + "comment": "the length of the signature" }, { "name": "data", - "type": "void *", - "comment": "data provided by the caller" - } + "type": "const unsigned char *", + "comment": "the data" + }, + { + "name": "data_len", + "type": "size_t", + "comment": "the length of the data" + }, + { "name": "abstract", "type": "void **", "comment": "the abstract" } ], - "argline": "const char *refname, const char *status, void *data", - "sig": "const char *::const char *::void *", + "argline": "LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract", + "sig": "LIBSSH2_SESSION *::unsigned char **::size_t *::const unsigned char *::size_t::void **", "return": { "type": "int", - "comment": " 0 on success, otherwise an error" + "comment": " 0 for success, \n<\n 0 to indicate an error, > 0 to indicate\n no credential was acquired" }, - "description": "Callback used to inform of the update status from the remote.
\n", - "comments": "Called for each updated reference on push. If status is\n not NULL, the update was rejected by the remote server\n and status contains the reason given.
Callback for credential signing.
\n", + "comments": "" }, - "git_repository_fetchhead_foreach_cb": { + "git_commit_signing_cb": { "type": "callback", - "file": "git2/repository.h", - "line": 643, - "lineto": 647, + "file": "git2/deprecated.h", + "line": 285, + "lineto": 289, + "args": [ + { "name": "signature", "type": "git_buf *", "comment": null }, + { "name": "signature_field", "type": "git_buf *", "comment": null }, + { "name": "commit_content", "type": "const char *", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } + ], + "argline": "git_buf *signature, git_buf *signature_field, const char *commit_content, void *payload", + "sig": "git_buf *::git_buf *::const char *::void *", + "return": { "type": "int", "comment": null }, + "description": "Provide a commit signature during commit creation.
\n", + "comments": "Callers should instead define a git_commit_create_cb that generates a commit buffer using git_commit_create_buffer, sign that buffer and call git_commit_create_with_signature.
Callback for listing the remote heads
\n", + "comments": "" + }, + "git_diff_notify_cb": { + "type": "callback", + "file": "git2/diff.h", + "line": 352, + "lineto": 356, "args": [ { - "name": "ref_name", - "type": "const char *", - "comment": null - }, - { - "name": "remote_url", - "type": "const char *", - "comment": null + "name": "diff_so_far", + "type": "const git_diff *", + "comment": "the diff structure as it currently exists" }, { - "name": "oid", - "type": "const git_oid *", - "comment": null + "name": "delta_to_add", + "type": "const git_diff_delta *", + "comment": "the delta that is to be added" }, { - "name": "is_merge", - "type": "unsigned int", - "comment": null + "name": "matched_pathspec", + "type": "const char *", + "comment": "the pathspec" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-specified callback payload" } ], - "argline": "const char *ref_name, const char *remote_url, const git_oid *oid, unsigned int is_merge, void *payload", - "sig": "const char *::const char *::const git_oid *::unsigned int::void *", + "argline": "const git_diff *diff_so_far, const git_diff_delta *delta_to_add, const char *matched_pathspec, void *payload", + "sig": "const git_diff *::const git_diff_delta *::const char *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, 1 to skip this delta, or an error code" }, - "description": "", - "comments": "" + "description": "Diff notification callback function.
\n", + "comments": "The callback will be called for each file, just before the git_diff_delta gets inserted into the diff.
When the callback: - returns < 0, the diff process will be aborted. - returns > 0, the delta will not be inserted into the diff, but the diff process continues. - returns 0, the delta is inserted into the diff, and the diff process continues.
\n" }, - "git_repository_mergehead_foreach_cb": { + "git_diff_progress_cb": { "type": "callback", - "file": "git2/repository.h", - "line": 665, - "lineto": 666, + "file": "git2/diff.h", + "line": 369, + "lineto": 373, "args": [ { - "name": "oid", - "type": "const git_oid *", - "comment": null + "name": "diff_so_far", + "type": "const git_diff *", + "comment": "The diff being generated." + }, + { + "name": "old_path", + "type": "const char *", + "comment": "The path to the old file or NULL." + }, + { + "name": "new_path", + "type": "const char *", + "comment": "The path to the new file or NULL." }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-specified callback payload" } ], - "argline": "const git_oid *oid, void *payload", - "sig": "const git_oid *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "" + "argline": "const git_diff *diff_so_far, const char *old_path, const char *new_path, void *payload", + "sig": "const git_diff *::const char *::const char *::void *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "Diff progress callback.
\n", + "comments": "Called before each file comparison.
\n" }, - "git_revwalk_hide_cb": { + "git_diff_file_cb": { "type": "callback", - "file": "git2/revwalk.h", - "line": 277, - "lineto": 279, + "file": "git2/diff.h", + "line": 504, + "lineto": 507, "args": [ { - "name": "commit_id", - "type": "const git_oid *", - "comment": "oid of Commit" + "name": "delta", + "type": "const git_diff_delta *", + "comment": "A pointer to the delta data for the file" + }, + { + "name": "progress", + "type": "float", + "comment": "Goes from 0 to 1 over the diff" }, { "name": "payload", "type": "void *", - "comment": "User-specified pointer to data to be passed as data payload" + "comment": "User-specified pointer from foreach function" } ], - "argline": "const git_oid *commit_id, void *payload", - "sig": "const git_oid *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "This is a callback function that user can provide to hide a\n commit and its parents. If the callback function returns non-zero value,\n then this commit and its parents will be hidden.
\n", + "argline": "const git_diff_delta *delta, float progress, void *payload", + "sig": "const git_diff_delta *::float::void *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "When iterating over a diff, callback that will be made per file.
\n", "comments": "" }, - "git_stash_apply_progress_cb": { + "git_diff_binary_cb": { "type": "callback", - "file": "git2/stash.h", - "line": 115, - "lineto": 117, + "file": "git2/diff.h", + "line": 576, + "lineto": 579, "args": [ { - "name": "progress", - "type": "git_stash_apply_progress_t", - "comment": null + "name": "delta", + "type": "const git_diff_delta *", + "comment": "the delta" + }, + { + "name": "binary", + "type": "const git_diff_binary *", + "comment": "the binary content" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-specified callback payload" } ], - "argline": "git_stash_apply_progress_t progress, void *payload", - "sig": "git_stash_apply_progress_t::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Stash application progress notification function.\n Return 0 to continue processing, or a negative value to\n abort the stash application.
\n", + "argline": "const git_diff_delta *delta, const git_diff_binary *binary, void *payload", + "sig": "const git_diff_delta *::const git_diff_binary *::void *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "When iterating over a diff, callback that will be made for\n binary content within the diff.
\n", "comments": "" }, - "git_stash_cb": { + "git_diff_hunk_cb": { "type": "callback", - "file": "git2/stash.h", - "line": 201, - "lineto": 205, + "file": "git2/diff.h", + "line": 607, + "lineto": 610, "args": [ { - "name": "index", - "type": "size_t", - "comment": "The position within the stash list. 0 points to the\n most recent stashed state." - }, - { - "name": "message", - "type": "const char *", - "comment": "The stash message." + "name": "delta", + "type": "const git_diff_delta *", + "comment": "the delta" }, { - "name": "stash_id", - "type": "const git_oid *", - "comment": "The commit oid of the stashed state." + "name": "hunk", + "type": "const git_diff_hunk *", + "comment": "the hunk" }, { "name": "payload", "type": "void *", - "comment": "Extra parameter to callback function." + "comment": "the user-specified callback payload" } ], - "argline": "size_t index, const char *message, const git_oid *stash_id, void *payload", - "sig": "size_t::const char *::const git_oid *::void *", - "return": { - "type": "int", - "comment": " 0 to continue iterating or non-zero to stop." - }, - "description": "This is a callback function you can provide to iterate over all the\n stashed states that will be invoked per entry.
\n", + "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, void *payload", + "sig": "const git_diff_delta *::const git_diff_hunk *::void *", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "When iterating over a diff, callback that will be made per hunk.
\n", "comments": "" }, - "git_status_cb": { + "git_diff_line_cb": { "type": "callback", - "file": "git2/status.h", - "line": 63, - "lineto": 64, + "file": "git2/diff.h", + "line": 674, + "lineto": 678, "args": [ { - "name": "path", - "type": "const char *", - "comment": null + "name": "delta", + "type": "const git_diff_delta *", + "comment": "the delta that contains the line" }, { - "name": "status_flags", - "type": "unsigned int", - "comment": null + "name": "hunk", + "type": "const git_diff_hunk *", + "comment": "the hunk that contains the line" + }, + { + "name": "line", + "type": "const git_diff_line *", + "comment": "the line in the diff" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-specified callback payload" } ], - "argline": "const char *path, unsigned int status_flags, void *payload", - "sig": "const char *::unsigned int::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Function pointer to receive status on individual files
\n", - "comments": "path is the relative path to the file from the root of the repository.
status_flags is a combination of git_status_t values that apply.
payload is the value you passed to the foreach function as payload.
When iterating over a diff, callback that will be made per text diff\n line. In this context, the provided range will be NULL.
\n", + "comments": "When printing a diff, callback that will be made to output each line of text. This uses some extra GIT_DIFF_LINE_... constants for output of lines of file and hunk headers.
\n" }, - "git_submodule_cb": { + "git_index_matched_path_cb": { "type": "callback", - "file": "git2/submodule.h", - "line": 118, - "lineto": 119, + "file": "git2/index.h", + "line": 158, + "lineto": 159, "args": [ + { "name": "path", "type": "const char *", "comment": "the path" }, { - "name": "sm", - "type": "git_submodule *", - "comment": "git_submodule currently being visited" - }, - { - "name": "name", + "name": "matched_pathspec", "type": "const char *", - "comment": "name of the submodule" + "comment": "the given pathspec" }, { "name": "payload", "type": "void *", - "comment": "value you passed to the foreach function as payload" + "comment": "the user-specified payload" } ], - "argline": "git_submodule *sm, const char *name, void *payload", - "sig": "git_submodule *::const char *::void *", + "argline": "const char *path, const char *matched_pathspec, void *payload", + "sig": "const char *::const char *::void *", "return": { "type": "int", - "comment": " 0 on success or error code" + "comment": " 0 to continue with the index operation, positive number to skip this file for the index operation, negative number on failure" }, - "description": "Function pointer to receive each submodule
\n", + "description": "Callback for APIs that add/remove/update files matching pathspec
\n", "comments": "" }, - "git_filter_init_fn": { + "git_indexer_progress_cb": { "type": "callback", - "file": "git2/sys/filter.h", - "line": 141, - "lineto": 141, + "file": "git2/indexer.h", + "line": 68, + "lineto": 68, "args": [ { - "name": "self", - "type": "git_filter *", - "comment": null - } - ], - "argline": "git_filter *self", - "sig": "git_filter *", - "return": { - "type": "int", - "comment": null - }, - "description": "Initialize callback on filter
\n", - "comments": "Specified as filter.initialize, this is an optional callback invoked\n before a filter is first used. It will be called once at most.
If non-NULL, the filter's initialize callback will be invoked right\n before the first use of the filter, so you can defer expensive\n initialization operations (in case libgit2 is being used in a way that\n doesn't need the filter).
Shutdown callback on filter
\n", - "comments": "Specified as filter.shutdown, this is an optional callback invoked\n when the filter is unregistered or when libgit2 is shutting down. It\n will be called once at most and should release resources as needed.\n This may be called even if the initialize callback was not made.
Typically this function will free the git_filter object itself.
Type for progress callbacks during indexing. Return a value less\n than zero to cancel the indexing or download.
\n", + "comments": "" }, - "git_filter_check_fn": { + "git_note_foreach_cb": { "type": "callback", - "file": "git2/sys/filter.h", - "line": 175, - "lineto": 179, + "file": "git2/notes.h", + "line": 29, + "lineto": 32, "args": [ { - "name": "self", - "type": "git_filter *", - "comment": null - }, - { - "name": "payload", - "type": "void **", - "comment": null + "name": "blob_id", + "type": "const git_oid *", + "comment": "object id of the blob containing the message" }, { - "name": "src", - "type": "const git_filter_source *", - "comment": null + "name": "annotated_object_id", + "type": "const git_oid *", + "comment": "the id of the object being annotated" }, { - "name": "attr_values", - "type": "const char **", - "comment": null + "name": "payload", + "type": "void *", + "comment": "user-specified data to the foreach function" } ], - "argline": "git_filter *self, void **payload, const git_filter_source *src, const char **attr_values", - "sig": "git_filter *::void **::const git_filter_source *::const char **", + "argline": "const git_oid *blob_id, const git_oid *annotated_object_id, void *payload", + "sig": "const git_oid *::const git_oid *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, or a negative number on failure" }, - "description": "Callback to decide if a given source needs this filter
\n", - "comments": "Specified as filter.check, this is an optional callback that checks\n if filtering is needed for a given source.
It should return 0 if the filter should be applied (i.e. success),\n GIT_PASSTHROUGH if the filter should not be applied, or an error code\n to fail out of the filter processing pipeline and return to the caller.
\n\nThe attr_values will be set to the values of any attributes given in\n the filter definition. See git_filter below for more detail.
The payload will be a pointer to a reference payload for the filter.\n This will start as NULL, but check can assign to this pointer for\n later use by the apply callback. Note that the value should be heap\n allocated (not stack), so that it doesn't go away before the apply\n callback can use it. If a filter allocates and assigns a value to the\n payload, it will need a cleanup callback to free the payload.
Callback for git_note_foreach.
\n", + "comments": "" }, - "git_filter_apply_fn": { + "git_odb_foreach_cb": { "type": "callback", - "file": "git2/sys/filter.h", - "line": 193, - "lineto": 198, + "file": "git2/odb.h", + "line": 43, + "lineto": 43, "args": [ { - "name": "self", - "type": "git_filter *", - "comment": null + "name": "id", + "type": "const git_oid *", + "comment": "an id of an object in the object database" }, { "name": "payload", - "type": "void **", - "comment": null - }, - { - "name": "to", - "type": "git_buf *", - "comment": null - }, - { - "name": "from", - "type": "const git_buf *", - "comment": null - }, - { - "name": "src", - "type": "const git_filter_source *", - "comment": null + "type": "void *", + "comment": "the payload from the initial call to git_odb_foreach" } ], - "argline": "git_filter *self, void **payload, git_buf *to, const git_buf *from, const git_filter_source *src", - "sig": "git_filter *::void **::git_buf *::const git_buf *::const git_filter_source *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback to actually perform the data filtering
\n", - "comments": "Specified as filter.apply, this is the callback that actually filters\n data. If it successfully writes the output, it should return 0. Like\n check, it can return GIT_PASSTHROUGH to indicate that the filter\n doesn't want to run. Other error codes will stop filter processing and\n return to the caller.
The payload value will refer to any payload that was set by the\n check callback. It may be read from or written to as needed.
Function type for callbacks from git_odb_foreach.
\n", + "comments": "" }, - "git_filter_stream_fn": { + "git_packbuilder_foreach_cb": { "type": "callback", - "file": "git2/sys/filter.h", - "line": 200, - "lineto": 205, + "file": "git2/pack.h", + "line": 208, + "lineto": 208, "args": [ { - "name": "out", - "type": "git_writestream **", - "comment": null + "name": "buf", + "type": "void *", + "comment": "A pointer to the object's data" }, { - "name": "self", - "type": "git_filter *", - "comment": null + "name": "size", + "type": "size_t", + "comment": "The size of the underlying object" }, { "name": "payload", - "type": "void **", - "comment": null - }, - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - }, - { - "name": "next", - "type": "git_writestream *", - "comment": null + "type": "void *", + "comment": "Payload passed to git_packbuilder_foreach" } ], - "argline": "git_writestream **out, git_filter *self, void **payload, const git_filter_source *src, git_writestream *next", - "sig": "git_writestream **::git_filter *::void **::const git_filter_source *::git_writestream *", + "argline": "void *buf, size_t size, void *payload", + "sig": "void *::size_t::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "Callback used to iterate over packed objects
\n", "comments": "" }, - "git_filter_cleanup_fn": { + "git_packbuilder_progress": { "type": "callback", - "file": "git2/sys/filter.h", - "line": 215, - "lineto": 217, + "file": "git2/pack.h", + "line": 245, + "lineto": 249, "args": [ { - "name": "self", - "type": "git_filter *", - "comment": null + "name": "stage", + "type": "int", + "comment": "the stage of the packbuilder" + }, + { + "name": "current", + "type": "uint32_t", + "comment": "the current object" + }, + { + "name": "total", + "type": "uint32_t", + "comment": "the total number of objects" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the callback payload" } ], - "argline": "git_filter *self, void *payload", - "sig": "git_filter *::void *", - "return": { - "type": "void", - "comment": null - }, - "description": "Callback to clean up after filtering has been applied
\n", - "comments": "Specified as filter.cleanup, this is an optional callback invoked\n after the filter has been applied. If the check or apply callbacks\n allocated a payload to keep per-source filter state, use this\n callback to free that payload and release resources as required.
Packbuilder progress notification function.
\n", + "comments": "" }, - "git_merge_driver_init_fn": { + "git_reference_foreach_cb": { "type": "callback", - "file": "git2/sys/merge.h", - "line": 76, - "lineto": 76, + "file": "git2/refs.h", + "line": 439, + "lineto": 439, "args": [ { - "name": "self", - "type": "git_merge_driver *", - "comment": null + "name": "reference", + "type": "git_reference *", + "comment": "The reference object" + }, + { + "name": "payload", + "type": "void *", + "comment": "Payload passed to git_reference_foreach" } ], - "argline": "git_merge_driver *self", - "sig": "git_merge_driver *", + "argline": "git_reference *reference, void *payload", + "sig": "git_reference *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "Initialize callback on merge driver
\n", - "comments": "Specified as driver.initialize, this is an optional callback invoked\n before a merge driver is first used. It will be called once at most\n per library lifetime.
If non-NULL, the merge driver's initialize callback will be invoked\n right before the first use of the driver, so you can defer expensive\n initialization operations (in case libgit2 is being used in a way that\n doesn't need the merge driver).
Callback used to iterate over references
\n", + "comments": "" }, - "git_merge_driver_shutdown_fn": { + "git_reference_foreach_name_cb": { "type": "callback", - "file": "git2/sys/merge.h", - "line": 88, - "lineto": 88, + "file": "git2/refs.h", + "line": 450, + "lineto": 450, "args": [ { - "name": "self", - "type": "git_merge_driver *", - "comment": null + "name": "name", + "type": "const char *", + "comment": "The reference name" + }, + { + "name": "payload", + "type": "void *", + "comment": "Payload passed to git_reference_foreach_name" } ], - "argline": "git_merge_driver *self", - "sig": "git_merge_driver *", + "argline": "const char *name, void *payload", + "sig": "const char *::void *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " non-zero to terminate the iteration" }, - "description": "Shutdown callback on merge driver
\n", - "comments": "Specified as driver.shutdown, this is an optional callback invoked\n when the merge driver is unregistered or when libgit2 is shutting down.\n It will be called once at most and should release resources as needed.\n This may be called even if the initialize callback was not made.
Typically this function will free the git_merge_driver object itself.
Callback used to iterate over reference names
\n", + "comments": "" }, - "git_merge_driver_apply_fn": { + "git_push_transfer_progress_cb": { "type": "callback", - "file": "git2/sys/merge.h", - "line": 108, - "lineto": 114, + "file": "git2/remote.h", + "line": 481, + "lineto": 485, "args": [ { - "name": "self", - "type": "git_merge_driver *", - "comment": null - }, - { - "name": "path_out", - "type": "const char **", - "comment": null - }, - { - "name": "mode_out", - "type": "int *", - "comment": null + "name": "current", + "type": "unsigned int", + "comment": "The number of objects pushed so far" }, { - "name": "merged_out", - "type": "git_buf *", - "comment": null + "name": "total", + "type": "unsigned int", + "comment": "The total number of objects to push" }, { - "name": "filter_name", - "type": "const char *", - "comment": null + "name": "bytes", + "type": "size_t", + "comment": "The number of bytes pushed" }, { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null + "name": "payload", + "type": "void *", + "comment": "The user-specified payload callback" } ], - "argline": "git_merge_driver *self, const char **path_out, int *mode_out, git_buf *merged_out, const char *filter_name, const git_merge_driver_source *src", - "sig": "git_merge_driver *::const char **::int *::git_buf *::const char *::const git_merge_driver_source *", + "argline": "unsigned int current, unsigned int total, size_t bytes, void *payload", + "sig": "unsigned int::unsigned int::size_t::void *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code to stop the transfer" }, - "description": "Callback to perform the merge.
\n", - "comments": "Specified as driver.apply, this is the callback that actually does the\n merge. If it can successfully perform a merge, it should populate\n path_out with a pointer to the filename to accept, mode_out with\n the resultant mode, and merged_out with the buffer of the merged file\n and then return 0. If the driver returns GIT_PASSTHROUGH, then the\n default merge driver should instead be run. It can also return\n GIT_EMERGECONFLICT if the driver is not able to produce a merge result,\n and the file will remain conflicted. Any other errors will fail and\n return to the caller.
The filter_name contains the name of the filter that was invoked, as\n specified by the file's attributes.
The src contains the data about the file to be merged.
Push network progress notification callback.
\n", + "comments": "" }, - "git_stream_cb": { + "git_push_negotiation": { "type": "callback", - "file": "git2/sys/stream.h", - "line": 117, - "lineto": 117, + "file": "git2/remote.h", + "line": 518, + "lineto": 521, "args": [ { - "name": "out", - "type": "git_stream **", - "comment": null + "name": "updates", + "type": "const git_push_update **", + "comment": "an array containing the updates which will be sent\n as commands to the destination." }, { - "name": "host", - "type": "const char *", - "comment": null + "name": "len", + "type": "size_t", + "comment": "number of elements in `updates`" }, { - "name": "port", - "type": "const char *", - "comment": null + "name": "payload", + "type": "void *", + "comment": "Payload provided by the caller" } ], - "argline": "git_stream **out, const char *host, const char *port", - "sig": "git_stream **::const char *::const char *", + "argline": "const git_push_update **updates, size_t len, void *payload", + "sig": "const git_push_update **::size_t::void *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code to stop the push" }, - "description": "", + "description": "Callback used to inform of upcoming updates.
\n", "comments": "" }, - "git_smart_subtransport_cb": { + "git_push_update_reference_cb": { "type": "callback", - "file": "git2/sys/transport.h", - "line": 364, - "lineto": 367, + "file": "git2/remote.h", + "line": 535, + "lineto": 535, "args": [ { - "name": "out", - "type": "git_smart_subtransport **", - "comment": null + "name": "refname", + "type": "const char *", + "comment": "refname specifying to the remote ref" }, { - "name": "owner", - "type": "git_transport *", - "comment": null + "name": "status", + "type": "const char *", + "comment": "status message sent from the remote" }, { - "name": "param", + "name": "data", "type": "void *", - "comment": null + "comment": "data provided by the caller" } ], - "argline": "git_smart_subtransport **out, git_transport *owner, void *param", - "sig": "git_smart_subtransport **::git_transport *::void *", + "argline": "const char *refname, const char *status, void *data", + "sig": "const char *::const char *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, otherwise an error" }, - "description": "A function which creates a new subtransport for the smart transport
\n", - "comments": "" + "description": "Callback used to inform of the update status from the remote.
\n", + "comments": "Called for each updated reference on push. If status is not NULL, the update was rejected by the remote server and status contains the reason given.
Callback to resolve URLs before connecting to remote
\n", + "comments": "If you return GIT_PASSTHROUGH, you don't need to write anything to url_resolved.
\n" }, - "git_trace_callback": { + "git_remote_ready_cb": { "type": "callback", - "file": "git2/trace.h", - "line": 52, - "lineto": 52, + "file": "git2/remote.h", + "line": 564, + "lineto": 564, "args": [ { - "name": "level", - "type": "git_trace_level_t", - "comment": null + "name": "remote", + "type": "git_remote *", + "comment": "The remote to be connected" }, { - "name": "msg", - "type": "const char *", - "comment": null + "name": "direction", + "type": "int", + "comment": "GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH" + }, + { + "name": "payload", + "type": "void *", + "comment": "Payload provided by the caller" } ], - "argline": "git_trace_level_t level, const char *msg", - "sig": "git_trace_level_t::const char *", - "return": { - "type": "void", - "comment": null - }, - "description": "An instance for a tracing function
\n", + "argline": "git_remote *remote, int direction, void *payload", + "sig": "git_remote *::int::void *", + "return": { "type": "int", "comment": " 0 on success, or an error" }, + "description": "Callback invoked immediately before we attempt to connect to the\n given url. Callers may change the URL before the connection by\n calling git_remote_set_instance_url in the callback.
Signature of a function which creates a transport
\n", + "description": "Callback used to iterate over each FETCH_HEAD entry
\n", "comments": "" }, - "git_cred_sign_callback": { + "git_repository_mergehead_foreach_cb": { "type": "callback", - "file": "git2/transport.h", - "line": 168, - "lineto": 168, + "file": "git2/repository.h", + "line": 777, + "lineto": 778, "args": [ { - "name": "session", - "type": "LIBSSH2_SESSION *", - "comment": null - }, - { - "name": "sig", - "type": "unsigned char **", - "comment": null - }, - { - "name": "sig_len", - "type": "size_t *", - "comment": null - }, - { - "name": "data", - "type": "const unsigned char *", - "comment": null - }, - { - "name": "data_len", - "type": "size_t", - "comment": null + "name": "oid", + "type": "const git_oid *", + "comment": "The merge OID" }, { - "name": "abstract", - "type": "void **", - "comment": null + "name": "payload", + "type": "void *", + "comment": "Payload passed to git_repository_mergehead_foreach" } ], - "argline": "LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract", - "sig": "LIBSSH2_SESSION *::unsigned char **::size_t *::const unsigned char *::size_t::void **", + "argline": "const git_oid *oid, void *payload", + "sig": "const git_oid *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "Callback used to iterate over each MERGE_HEAD entry
\n", "comments": "" }, - "git_cred_ssh_interactive_callback": { + "git_revwalk_hide_cb": { "type": "callback", - "file": "git2/transport.h", - "line": 169, - "lineto": 169, + "file": "git2/revwalk.h", + "line": 283, + "lineto": 285, "args": [ { - "name": "name", - "type": "const char *", - "comment": null - }, - { - "name": "name_len", - "type": "int", - "comment": null - }, - { - "name": "instruction", - "type": "const char *", - "comment": null - }, - { - "name": "instruction_len", - "type": "int", - "comment": null - }, - { - "name": "num_prompts", - "type": "int", - "comment": null - }, - { - "name": "prompts", - "type": "const LIBSSH2_USERAUTH_KBDINT_PROMPT *", - "comment": null - }, - { - "name": "responses", - "type": "LIBSSH2_USERAUTH_KBDINT_RESPONSE *", - "comment": null + "name": "commit_id", + "type": "const git_oid *", + "comment": "oid of Commit" }, { - "name": "abstract", - "type": "void **", - "comment": null + "name": "payload", + "type": "void *", + "comment": "User-specified pointer to data to be passed as data payload" } ], - "argline": "const char *name, int name_len, const char *instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, void **abstract", - "sig": "const char *::int::const char *::int::int::const LIBSSH2_USERAUTH_KBDINT_PROMPT *::LIBSSH2_USERAUTH_KBDINT_RESPONSE *::void **", + "argline": "const git_oid *commit_id, void *payload", + "sig": "const git_oid *::void *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " non-zero to hide the commmit and it parent." }, - "description": "", + "description": "This is a callback function that user can provide to hide a\n commit and its parents. If the callback function returns non-zero value,\n then this commit and its parents will be hidden.
\n", "comments": "" }, - "git_cred_acquire_cb": { + "git_stash_apply_progress_cb": { "type": "callback", - "file": "git2/transport.h", - "line": 362, - "lineto": 367, + "file": "git2/stash.h", + "line": 181, + "lineto": 183, "args": [ { - "name": "cred", - "type": "git_cred **", - "comment": "The newly created credential object." + "name": "progress", + "type": "git_stash_apply_progress_t", + "comment": "the progress information" }, { - "name": "url", - "type": "const char *", - "comment": "The resource for which we are demanding a credential." + "name": "payload", + "type": "void *", + "comment": "the user-specified payload to the apply function" + } + ], + "argline": "git_stash_apply_progress_t progress, void *payload", + "sig": "git_stash_apply_progress_t::void *", + "return": { "type": "int", "comment": " 0 on success, -1 on error" }, + "description": "Stash application progress notification function.\n Return 0 to continue processing, or a negative value to\n abort the stash application.
\n", + "comments": "" + }, + "git_stash_cb": { + "type": "callback", + "file": "git2/stash.h", + "line": 268, + "lineto": 272, + "args": [ + { + "name": "index", + "type": "size_t", + "comment": "The position within the stash list. 0 points to the\n most recent stashed state." }, { - "name": "username_from_url", + "name": "message", "type": "const char *", - "comment": "The username that was embedded in a \"user\n@\nhost\"\n remote url, or NULL if not included." + "comment": "The stash message." }, { - "name": "allowed_types", - "type": "unsigned int", - "comment": "A bitmask stating which cred types are OK to return." + "name": "stash_id", + "type": "const git_oid *", + "comment": "The commit oid of the stashed state." }, { "name": "payload", "type": "void *", - "comment": "The payload provided when specifying this callback." + "comment": "Extra parameter to callback function." } ], - "argline": "git_cred **cred, const char *url, const char *username_from_url, unsigned int allowed_types, void *payload", - "sig": "git_cred **::const char *::const char *::unsigned int::void *", + "argline": "size_t index, const char *message, const git_oid *stash_id, void *payload", + "sig": "size_t::const char *::const git_oid *::void *", "return": { "type": "int", - "comment": " 0 for success, \n<\n 0 to indicate an error, > 0 to indicate\n no credential was acquired" + "comment": " 0 to continue iterating or non-zero to stop." }, - "description": "Signature of a function which acquires a credential object.
\n", + "description": "This is a callback function you can provide to iterate over all the\n stashed states that will be invoked per entry.
\n", "comments": "" }, - "git_treebuilder_filter_cb": { + "git_status_cb": { "type": "callback", - "file": "git2/tree.h", - "line": 347, - "lineto": 348, + "file": "git2/status.h", + "line": 62, + "lineto": 63, "args": [ { - "name": "entry", - "type": "const git_tree_entry *", - "comment": null + "name": "path", + "type": "const char *", + "comment": "is the path to the file" + }, + { + "name": "status_flags", + "type": "unsigned int", + "comment": "the `git_status_t` values for file's status" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "the user-specified payload to the foreach function" } ], - "argline": "const git_tree_entry *entry, void *payload", - "sig": "const git_tree_entry *::void *", + "argline": "const char *path, unsigned int status_flags, void *payload", + "sig": "const char *::unsigned int::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, or a negative number on failure" }, - "description": "Callback for git_treebuilder_filter
\n", - "comments": "The return value is treated as a boolean, with zero indicating that the\n entry should be left alone and any non-zero value meaning that the\n entry should be removed from the treebuilder list (i.e. filtered out).
\n" + "description": "Function pointer to receive status on individual files
\n", + "comments": "" }, - "git_treewalk_cb": { + "git_submodule_cb": { "type": "callback", - "file": "git2/tree.h", - "line": 394, - "lineto": 395, + "file": "git2/submodule.h", + "line": 125, + "lineto": 126, "args": [ { - "name": "root", - "type": "const char *", - "comment": null + "name": "sm", + "type": "git_submodule *", + "comment": "git_submodule currently being visited" }, { - "name": "entry", - "type": "const git_tree_entry *", - "comment": null + "name": "name", + "type": "const char *", + "comment": "name of the submodule" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "value you passed to the foreach function as payload" } ], - "argline": "const char *root, const git_tree_entry *entry, void *payload", - "sig": "const char *::const git_tree_entry *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback for the tree traversal method
\n", + "argline": "git_submodule *sm, const char *name, void *payload", + "sig": "git_submodule *::const char *::void *", + "return": { "type": "int", "comment": " 0 on success or error code" }, + "description": "Function pointer to receive each submodule
\n", "comments": "" }, - "git_transfer_progress_cb": { + "git_tag_foreach_cb": { "type": "callback", - "file": "git2/types.h", - "line": 275, - "lineto": 275, + "file": "git2/tag.h", + "line": 330, + "lineto": 330, "args": [ - { - "name": "stats", - "type": "const git_transfer_progress *", - "comment": "Structure containing information about the state of the transfer" - }, + { "name": "name", "type": "const char *", "comment": "The tag name" }, + { "name": "oid", "type": "git_oid *", "comment": "The tag's OID" }, { "name": "payload", "type": "void *", - "comment": "Payload provided by caller" + "comment": "Payload passed to git_tag_foreach" } ], - "argline": "const git_transfer_progress *stats, void *payload", - "sig": "const git_transfer_progress *::void *", + "argline": "const char *name, git_oid *oid, void *payload", + "sig": "const char *::git_oid *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "Type for progress callbacks during indexing. Return a value less than zero\n to cancel the transfer.
\n", + "description": "Callback used to iterate over tag names
\n", + "comments": "" + }, + "git_trace_cb": { + "type": "callback", + "file": "git2/trace.h", + "line": 55, + "lineto": 57, + "args": [ + { + "name": "level", + "type": "git_trace_level_t", + "comment": "the trace level" + }, + { + "name": "msg", + "type": "const char *", + "comment": "the trace message" + } + ], + "argline": "git_trace_level_t level, const char *msg", + "sig": "git_trace_level_t::const char *", + "return": { "type": "void", "comment": null }, + "description": "An instance for a tracing function
\n", "comments": "" }, "git_transport_message_cb": { "type": "callback", - "file": "git2/types.h", - "line": 285, - "lineto": 285, + "file": "git2/transport.h", + "line": 35, + "lineto": 35, "args": [ { "name": "str", @@ -29106,248 +24947,98 @@ ], "argline": "const char *str, int len, void *payload", "sig": "const char *::int::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Type for messages delivered by the transport. Return a negative value\n to cancel the network operation.
\n", - "comments": "" + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Callback for messages received by the transport.
\n", + "comments": "Return a negative value to cancel the network operation.
\n" }, - "git_transport_certificate_check_cb": { + "git_transport_cb": { "type": "callback", - "file": "git2/types.h", - "line": 338, - "lineto": 338, + "file": "git2/transport.h", + "line": 45, + "lineto": 45, "args": [ { - "name": "cert", - "type": "git_cert *", - "comment": "The host certificate" + "name": "out", + "type": "git_transport **", + "comment": "the transport generate" }, { - "name": "valid", - "type": "int", - "comment": "Whether the libgit2 checks (OpenSSL or WinHTTP) think\n this certificate is valid" + "name": "owner", + "type": "git_remote *", + "comment": "the owner for the transport" }, { - "name": "host", + "name": "param", + "type": "void *", + "comment": "the param to the transport creation" + } + ], + "argline": "git_transport **out, git_remote *owner, void *param", + "sig": "git_transport **::git_remote *::void *", + "return": { "type": "int", "comment": " 0 on success or an error code" }, + "description": "Signature of a function which creates a transport.
\n", + "comments": "" + }, + "git_treebuilder_filter_cb": { + "type": "callback", + "file": "git2/tree.h", + "line": 353, + "lineto": 354, + "args": [ + { + "name": "entry", + "type": "const git_tree_entry *", + "comment": "the tree entry for the callback to examine" + }, + { + "name": "payload", + "type": "void *", + "comment": "the payload from the caller" + } + ], + "argline": "const git_tree_entry *entry, void *payload", + "sig": "const git_tree_entry *::void *", + "return": { + "type": "int", + "comment": " 0 to do nothing, non-zero to remove the entry" + }, + "description": "Callback for git_treebuilder_filter
\n", + "comments": "The return value is treated as a boolean, with zero indicating that the entry should be left alone and any non-zero value meaning that the entry should be removed from the treebuilder list (i.e. filtered out).
\n" + }, + "git_treewalk_cb": { + "type": "callback", + "file": "git2/tree.h", + "line": 394, + "lineto": 395, + "args": [ + { + "name": "root", "type": "const char *", - "comment": "Hostname of the host libgit2 connected to" + "comment": "the current (relative) root to the entry" + }, + { + "name": "entry", + "type": "const git_tree_entry *", + "comment": "the tree entry" }, { "name": "payload", "type": "void *", - "comment": "Payload provided by the caller" + "comment": "the caller-provided callback payload" } ], - "argline": "git_cert *cert, int valid, const char *host, void *payload", - "sig": "git_cert *::int::const char *::void *", + "argline": "const char *root, const git_tree_entry *entry, void *payload", + "sig": "const char *::const git_tree_entry *::void *", "return": { "type": "int", - "comment": " 0 to proceed with the connection, \n<\n 0 to fail the connection\n or > 0 to indicate that the callback refused to act and that\n the existing validity determination should be honored" + "comment": " a positive value to skip the entry, a negative value to stop the walk" }, - "description": "Callback for the user's custom certificate checks.
\n", + "description": "Callback for the tree traversal method.
\n", "comments": "" } }, "globals": {}, "types": [ - [ - "LIBSSH2_SESSION", - { - "decl": "LIBSSH2_SESSION", - "type": "struct", - "value": "LIBSSH2_SESSION", - "file": "git2/transport.h", - "line": 163, - "lineto": 163, - "tdef": "typedef", - "description": "", - "comments": "", - "used": { - "returns": [], - "needs": [ - "git_cred_sign_callback" - ] - } - } - ], - [ - "LIBSSH2_USERAUTH_KBDINT_PROMPT", - { - "decl": "LIBSSH2_USERAUTH_KBDINT_PROMPT", - "type": "struct", - "value": "LIBSSH2_USERAUTH_KBDINT_PROMPT", - "file": "git2/transport.h", - "line": 164, - "lineto": 164, - "tdef": "typedef", - "description": "", - "comments": "", - "used": { - "returns": [], - "needs": [ - "git_cred_ssh_interactive_callback" - ] - } - } - ], - [ - "LIBSSH2_USERAUTH_KBDINT_RESPONSE", - { - "decl": "LIBSSH2_USERAUTH_KBDINT_RESPONSE", - "type": "struct", - "value": "LIBSSH2_USERAUTH_KBDINT_RESPONSE", - "file": "git2/transport.h", - "line": 165, - "lineto": 165, - "tdef": "typedef", - "description": "", - "comments": "", - "used": { - "returns": [], - "needs": [ - "git_cred_ssh_interactive_callback" - ] - } - } - ], - [ - "_LIBSSH2_SESSION", - { - "decl": [], - "type": "struct", - "value": "_LIBSSH2_SESSION", - "file": "git2/transport.h", - "line": 163, - "lineto": 163, - "tdef": null, - "description": "", - "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "_LIBSSH2_USERAUTH_KBDINT_PROMPT", - { - "decl": [], - "type": "struct", - "value": "_LIBSSH2_USERAUTH_KBDINT_PROMPT", - "file": "git2/transport.h", - "line": 164, - "lineto": 164, - "tdef": null, - "description": "", - "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "_LIBSSH2_USERAUTH_KBDINT_RESPONSE", - { - "decl": [], - "type": "struct", - "value": "_LIBSSH2_USERAUTH_KBDINT_RESPONSE", - "file": "git2/transport.h", - "line": 165, - "lineto": 165, - "tdef": null, - "description": "", - "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_allocator", - { - "decl": [ - "void *(*)(size_t, const char *, int) gmalloc", - "void *(*)(size_t, size_t, const char *, int) gcalloc", - "char *(*)(const char *, const char *, int) gstrdup", - "char *(*)(const char *, size_t, const char *, int) gstrndup", - "char *(*)(const char *, size_t, const char *, int) gsubstrdup", - "void *(*)(void *, size_t, const char *, int) grealloc", - "void *(*)(void *, size_t, size_t, const char *, int) greallocarray", - "void *(*)(size_t, size_t, const char *, int) gmallocarray", - "void (*)(void *) gfree" - ], - "type": "struct", - "value": "git_allocator", - "file": "git2/sys/alloc.h", - "line": 23, - "lineto": 73, - "block": "void *(*)(size_t, const char *, int) gmalloc\nvoid *(*)(size_t, size_t, const char *, int) gcalloc\nchar *(*)(const char *, const char *, int) gstrdup\nchar *(*)(const char *, size_t, const char *, int) gstrndup\nchar *(*)(const char *, size_t, const char *, int) gsubstrdup\nvoid *(*)(void *, size_t, const char *, int) grealloc\nvoid *(*)(void *, size_t, size_t, const char *, int) greallocarray\nvoid *(*)(size_t, size_t, const char *, int) gmallocarray\nvoid (*)(void *) gfree", - "tdef": "typedef", - "description": " An instance for a custom memory allocator", - "comments": "Setting the pointers of this structure allows the developer to implement\n custom memory allocators. The global memory allocator can be set by using\n "GIT_OPT_SET_ALLOCATOR" with the git_libgit2_opts function. Keep in mind\n that all fields need to be set to a proper function.
For example, if a user wants to conceptually "merge HEAD", then the commit portion of an annotated commit will point to the HEAD commit, but the annotation will denote the ref HEAD. This allows git to perform the internal bookkeeping so that the system knows both the content of what is being merged but also how the content was looked up so that it can be recorded in the reflog appropriately.
When the callback: - returns < 0, the apply process will be aborted. - returns > 0, the hunk will not be applied, but the apply process continues - returns 0, the hunk is applied, and the apply process continues.
\n", + "fields": [ + { + "type": "int", + "name": "GIT_APPLY_CHECK", + "comments": "Don't actually make changes, just test that the patch applies.\n This is the equivalent of git apply --check.
Initialize with GIT_APPLY_OPTIONS_INIT. Alternatively, you can\n use git_apply_init_options.
When the callback: - returns < 0, the apply process will be aborted. - returns > 0, the hunk will not be applied, but the apply process continues - returns 0, the hunk is applied, and the apply process continues.
\n\nInitialize with GIT_APPLY_OPTIONS_INIT. Alternatively, you can use git_apply_options_init.
The attribute has been left unspecified
\n", "value": 0 }, { "type": "int", - "name": "GIT_ATTR_TRUE_T", + "name": "GIT_ATTR_VALUE_TRUE", "comments": "The attribute has been set
\n", "value": 1 }, { "type": "int", - "name": "GIT_ATTR_FALSE_T", + "name": "GIT_ATTR_VALUE_FALSE", "comments": "The attribute has been unset
\n", "value": 2 }, { "type": "int", - "name": "GIT_ATTR_VALUE_T", + "name": "GIT_ATTR_VALUE_STRING", "comments": "This attribute has a value
\n", "value": 3 } ], - "used": { - "returns": [ - "git_attr_value" - ], - "needs": [] - } + "used": { "returns": ["git_attr_value"], "needs": [] } } ], [ @@ -29533,24 +25281,32 @@ "type": "struct", "value": "git_blame", "file": "git2/blame.h", - "line": 149, - "lineto": 149, + "line": 236, + "lineto": 236, "tdef": "typedef", "description": " Opaque structure to hold blame results ", "comments": "", - "fields": [], "used": { "returns": [ "git_blame_get_hunk_byindex", - "git_blame_get_hunk_byline" + "git_blame_get_hunk_byline", + "git_blame_hunk_byindex", + "git_blame_hunk_byline", + "git_blame_line_byindex" ], "needs": [ "git_blame_buffer", - "git_blame_file", "git_blame_free", "git_blame_get_hunk_byindex", "git_blame_get_hunk_byline", - "git_blame_init_options" + "git_blame_get_hunk_count", + "git_blame_hunk_byindex", + "git_blame_hunk_byline", + "git_blame_hunkcount", + "git_blame_init_options", + "git_blame_line_byindex", + "git_blame_linecount", + "git_blame_options_init" ] } } @@ -29565,13 +25321,14 @@ "GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES", "GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES", "GIT_BLAME_FIRST_PARENT", - "GIT_BLAME_USE_MAILMAP" + "GIT_BLAME_USE_MAILMAP", + "GIT_BLAME_IGNORE_WHITESPACE" ], "type": "enum", "file": "git2/blame.h", - "line": 26, - "lineto": 50, - "block": "GIT_BLAME_NORMAL\nGIT_BLAME_TRACK_COPIES_SAME_FILE\nGIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES\nGIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES\nGIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES\nGIT_BLAME_FIRST_PARENT\nGIT_BLAME_USE_MAILMAP", + "line": 31, + "lineto": 82, + "block": "GIT_BLAME_NORMAL\nGIT_BLAME_TRACK_COPIES_SAME_FILE\nGIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES\nGIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES\nGIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES\nGIT_BLAME_FIRST_PARENT\nGIT_BLAME_USE_MAILMAP\nGIT_BLAME_IGNORE_WHITESPACE", "tdef": "typedef", "description": " Flags for indicating option behavior for git_blame APIs.", "comments": "", @@ -29585,123 +25342,67 @@ { "type": "int", "name": "GIT_BLAME_TRACK_COPIES_SAME_FILE", - "comments": "Track lines that have moved within a file (like git blame -M).\n NOT IMPLEMENTED.
Track lines that have moved within a file (like git blame -M).
This is not yet implemented and reserved for future use.
\n", "value": 1 }, { "type": "int", "name": "GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES", - "comments": "Track lines that have moved across files in the same commit (like git blame -C).\n NOT IMPLEMENTED.
Track lines that have moved across files in the same commit\n (like git blame -C).
This is not yet implemented and reserved for future use.
\n", "value": 2 }, { "type": "int", "name": "GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES", - "comments": "Track lines that have been copied from another file that exists in the\n same commit (like git blame -CC). Implies SAME_FILE.\n NOT IMPLEMENTED.
Track lines that have been copied from another file that exists\n in the same commit (like git blame -CC). Implies SAME_FILE.
This is not yet implemented and reserved for future use.
\n", "value": 4 }, { "type": "int", "name": "GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES", - "comments": "Track lines that have been copied from another file that exists in any\n commit (like git blame -CCC). Implies SAME_COMMIT_COPIES.\n NOT IMPLEMENTED.
Track lines that have been copied from another file that exists in\n any commit (like git blame -CCC). Implies SAME_COMMIT_COPIES.
This is not yet implemented and reserved for future use.
\n", "value": 8 }, { "type": "int", "name": "GIT_BLAME_FIRST_PARENT", - "comments": "Restrict the search of commits to those reachable following only the\n first parents.
\n", + "comments": "Restrict the search of commits to those reachable following only\n the first parents.
\n", "value": 16 }, { "type": "int", "name": "GIT_BLAME_USE_MAILMAP", - "comments": "Use mailmap file to map author and committer names and email addresses\n to canonical real names and email addresses. The mailmap will be read\n from the working directory, or HEAD in a bare repository.
\n", + "comments": "Use mailmap file to map author and committer names and email\n addresses to canonical real names and email addresses. The\n mailmap will be read from the working directory, or HEAD in a\n bare repository.
\n", "value": 32 + }, + { + "type": "int", + "name": "GIT_BLAME_IGNORE_WHITESPACE", + "comments": "Ignore whitespace differences
\n", + "value": 64 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_blame_hunk", + "git_blame_line", { - "decl": [ - "size_t lines_in_hunk", - "git_oid final_commit_id", - "size_t final_start_line_number", - "git_signature * final_signature", - "git_oid orig_commit_id", - "const char * orig_path", - "size_t orig_start_line_number", - "git_signature * orig_signature", - "char boundary" - ], + "decl": ["const char * ptr", "size_t len"], "type": "struct", - "value": "git_blame_hunk", + "value": "git_blame_line", "file": "git2/blame.h", - "line": 132, - "lineto": 145, - "block": "size_t lines_in_hunk\ngit_oid final_commit_id\nsize_t final_start_line_number\ngit_signature * final_signature\ngit_oid orig_commit_id\nconst char * orig_path\nsize_t orig_start_line_number\ngit_signature * orig_signature\nchar boundary", + "line": 230, + "lineto": 233, + "block": "const char * ptr\nsize_t len", "tdef": "typedef", - "description": " Structure that represents a blame hunk.", - "comments": "lines_in_hunk is the number of lines in this hunkfinal_commit_id is the OID of the commit where this line was last\nchanged.final_start_line_number is the 1-based line number where this hunk\nbegins, in the final version of the filefinal_signature is the author of final_commit_id. If\nGIT_BLAME_USE_MAILMAP has been specified, it will contain the canonical\nreal name and email address.orig_commit_id is the OID of the commit where this hunk was found. This\nwill usually be the same as final_commit_id, except when\nGIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES has been specified.orig_path is the path to the file where this hunk originated, as of the\ncommit specified by orig_commit_id.orig_start_line_number is the 1-based line number where this hunk begins\nin the file named by orig_path in the commit specified by\norig_commit_id.orig_signature is the author of orig_commit_id. If\nGIT_BLAME_USE_MAILMAP has been specified, it will contain the canonical\nreal name and email address.boundary is 1 iff the hunk has been tracked to a boundary commit (the\nroot, or the commit specified in git_blame_options.oldest_commit)Initialize with GIT_BLAME_OPTIONS_INIT. Alternatively, you can use git_blame_options_init.
When set, filters will not be applied to binary files.
\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_BLOB_FILTER_NO_SYSTEM_ATTRIBUTES", + "comments": "When set, filters will not load configuration from the\n system-wide gitattributes in /etc (or system equivalent).
When set, filters will be loaded from a .gitattributes file\n in the HEAD commit.
When set, filters will be loaded from a .gitattributes file\n in the specified commit.
Initialize with GIT_BLOB_FILTER_OPTIONS_INIT. Alternatively, you can use git_blob_filter_options_init.
[version] GIT_BLOB_FILTER_OPTIONS_VERSION [init_macro] GIT_BLOB_FILTER_OPTIONS_INIT [init_function] git_blob_filter_options_init
\n", + "fields": [ + { + "type": "int", + "name": "version", + "comments": " Version number of the options structure. " + }, + { + "type": "uint32_t", + "name": "flags", + "comments": " Flags to control the filtering process, see `git_blob_filter_flag_t` above.\n\n \n\n[flags] git_blob_filter_flag_t" + }, + { + "type": "git_oid *", + "name": "commit_id", + "comments": " This value is unused and reserved for API compatibility.\n\n " + }, + { + "type": "git_oid", + "name": "attr_commit_id", + "comments": " The commit to load attributes from, when\n `GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT` is specified." + } + ], + "used": { + "returns": [], + "needs": ["git_blob_filter", "git_blob_filter_options_init"] + } + } + ], [ "git_branch_iterator", { @@ -29815,12 +25603,11 @@ "type": "struct", "value": "git_branch_iterator", "file": "git2/branch.h", - "line": 88, - "lineto": 88, + "line": 97, + "lineto": 97, "tdef": "typedef", "description": " Iterator type for branches ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -29834,15 +25621,11 @@ [ "git_branch_t", { - "decl": [ - "GIT_BRANCH_LOCAL", - "GIT_BRANCH_REMOTE", - "GIT_BRANCH_ALL" - ], + "decl": ["GIT_BRANCH_LOCAL", "GIT_BRANCH_REMOTE", "GIT_BRANCH_ALL"], "type": "enum", "file": "git2/types.h", - "line": 203, - "lineto": 207, + "line": 231, + "lineto": 235, "block": "GIT_BRANCH_LOCAL\nGIT_BRANCH_REMOTE\nGIT_BRANCH_ALL", "tdef": "typedef", "description": " Basic type of any Git branch. ", @@ -29880,42 +25663,40 @@ [ "git_buf", { - "decl": [ - "char * ptr", - "size_t asize", - "size_t size" - ], + "decl": ["char * ptr", "size_t reserved", "size_t size"], "type": "struct", "value": "git_buf", "file": "git2/buffer.h", - "line": 52, + "line": 36, "lineto": 55, - "block": "char * ptr\nsize_t asize\nsize_t size", + "block": "char * ptr\nsize_t reserved\nsize_t size", "tdef": "typedef", "description": " A data buffer for exporting data from libgit2", - "comments": "Sometimes libgit2 wants to return an allocated data buffer to the\n caller and have the caller take responsibility for freeing that memory.\n This can be awkward if the caller does not have easy access to the same\n allocation functions that libgit2 is using. In those cases, libgit2\n will fill in a git_buf and the caller can use git_buf_dispose() to\n release it when they are done.
A git_buf may also be used for the caller to pass in a reference to\n a block of memory they hold. In this case, libgit2 will not resize or\n free the memory, but will read from it as needed.
A git_buf is a public structure with three fields:
ptr points to the start of the allocated memory. If it is NULL,\nthen the git_buf is considered empty and libgit2 will feel free\nto overwrite it with new data.
size holds the size (in bytes) of the data that is actually used.
asize holds the known total amount of allocated memory if the ptr\nwas allocated by libgit2. It may be larger than size. If ptr\nwas not allocated by libgit2 and should not be resized and/or freed,\nthen asize will be set to zero.
Some APIs may occasionally do something slightly unusual with a buffer,\n such as setting ptr to a value that was passed in by the user. In\n those cases, the behavior will be clearly documented by the API.
Sometimes libgit2 wants to return an allocated data buffer to the caller and have the caller take responsibility for freeing that memory. To make ownership clear in these cases, libgit2 uses git_buf to return this data. Callers should use git_buf_dispose() to release the memory when they are done.
A git_buf contains a pointer to a NUL-terminated C string, and the length of the string (not including the NUL terminator).
SHA-1 is available
\n", "value": 2 + }, + { + "type": "int", + "name": "GIT_CERT_SSH_SHA256", + "comments": "SHA-256 is available
\n", + "value": 4 + }, + { + "type": "int", + "name": "GIT_CERT_SSH_RAW", + "comments": "Raw hostkey is available
\n", + "value": 8 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -30086,9 +25894,9 @@ "GIT_CERT_STRARRAY" ], "type": "enum", - "file": "git2/types.h", - "line": 291, - "lineto": 314, + "file": "git2/cert.h", + "line": 25, + "lineto": 48, "block": "GIT_CERT_NONE\nGIT_CERT_X509\nGIT_CERT_HOSTKEY_LIBSSH2\nGIT_CERT_STRARRAY\nGIT_CERT_NONE\nGIT_CERT_X509\nGIT_CERT_HOSTKEY_LIBSSH2\nGIT_CERT_STRARRAY", "tdef": "typedef", "description": " Type of host certificate structure that is passed to the check callback", @@ -30119,25 +25927,18 @@ "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_cert_x509", { - "decl": [ - "git_cert parent", - "void * data", - "size_t len" - ], + "decl": ["git_cert parent", "void * data", "size_t len"], "type": "struct", "value": "git_cert_x509", - "file": "git2/transport.h", - "line": 64, - "lineto": 74, + "file": "git2/cert.h", + "line": 156, + "lineto": 168, "block": "git_cert parent\nvoid * data\nsize_t len", "tdef": "typedef", "description": " X.509 certificate information", @@ -30146,7 +25947,7 @@ { "type": "git_cert", "name": "parent", - "comments": "" + "comments": " The parent cert " }, { "type": "void *", @@ -30159,10 +25960,7 @@ "comments": " Length of the memory block pointed to by `data`." } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -30179,12 +25977,12 @@ ], "type": "enum", "file": "git2/checkout.h", - "line": 205, - "lineto": 214, + "line": 224, + "lineto": 255, "block": "GIT_CHECKOUT_NOTIFY_NONE\nGIT_CHECKOUT_NOTIFY_CONFLICT\nGIT_CHECKOUT_NOTIFY_DIRTY\nGIT_CHECKOUT_NOTIFY_UPDATED\nGIT_CHECKOUT_NOTIFY_UNTRACKED\nGIT_CHECKOUT_NOTIFY_IGNORED\nGIT_CHECKOUT_NOTIFY_ALL", "tdef": "typedef", "description": " Checkout notification flags", - "comments": "Checkout will invoke an options notification callback (notify_cb) for\n certain cases - you pick which ones via notify_flags:
GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.
GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that\ndo not need an update but no longer match the baseline. Core git\ndisplays these files when checkout runs, but won't stop the checkout.
GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.
GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.
GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.
Returning a non-zero value from this callback will cancel the checkout.\n The non-zero return value will be propagated back and returned by the\n git_checkout_... call.
\n\nNotification callbacks are made prior to modifying any files on disk,\n so canceling on any notification will still happen prior to any files\n being modified.
\n", + "comments": "Checkout will invoke an options notification callback (notify_cb) for certain cases - you pick which ones via notify_flags:
Returning a non-zero value from this callback will cancel the checkout. The non-zero return value will be propagated back and returned by the git_checkout_... call.
\n\nNotification callbacks are made prior to modifying any files on disk, so canceling on any notification will still happen prior to any files being modified.
\n", "fields": [ { "type": "int", @@ -30195,46 +25993,41 @@ { "type": "int", "name": "GIT_CHECKOUT_NOTIFY_CONFLICT", - "comments": "", + "comments": "Invokes checkout on conflicting paths.
\n", "value": 1 }, { "type": "int", "name": "GIT_CHECKOUT_NOTIFY_DIRTY", - "comments": "", + "comments": "Notifies about "dirty" files, i.e. those that do not need an update\n but no longer match the baseline. Core git displays these files when\n checkout runs, but won't stop the checkout.
\n", "value": 2 }, { "type": "int", "name": "GIT_CHECKOUT_NOTIFY_UPDATED", - "comments": "", + "comments": "Sends notification for any file changed.
\n", "value": 4 }, { "type": "int", "name": "GIT_CHECKOUT_NOTIFY_UNTRACKED", - "comments": "", + "comments": "Notifies about untracked files.
\n", "value": 8 }, { "type": "int", "name": "GIT_CHECKOUT_NOTIFY_IGNORED", - "comments": "", + "comments": "Notifies about ignored files.
\n", "value": 16 }, { "type": "int", "name": "GIT_CHECKOUT_NOTIFY_ALL", - "comments": "", + "comments": "Notifies about ignored files.
\n", "value": 65535 } ], - "used": { - "returns": [], - "needs": [ - "git_checkout_notify_cb" - ] - } + "used": { "returns": [], "needs": ["git_checkout_notify_cb"] } } ], [ @@ -30265,17 +26058,17 @@ "type": "struct", "value": "git_checkout_options", "file": "git2/checkout.h", - "line": 250, - "lineto": 294, + "line": 317, + "lineto": 391, "block": "unsigned int version\nunsigned int checkout_strategy\nint disable_filters\nunsigned int dir_mode\nunsigned int file_mode\nint file_open_flags\nunsigned int notify_flags\ngit_checkout_notify_cb notify_cb\nvoid * notify_payload\ngit_checkout_progress_cb progress_cb\nvoid * progress_payload\ngit_strarray paths\ngit_tree * baseline\ngit_index * baseline_index\nconst char * target_directory\nconst char * ancestor_label\nconst char * our_label\nconst char * their_label\ngit_checkout_perfdata_cb perfdata_cb\nvoid * perfdata_payload", "tdef": "typedef", "description": " Checkout options structure", - "comments": "Initialize with GIT_CHECKOUT_OPTIONS_INIT. Alternatively, you can\n use git_checkout_init_options.
Initialize with GIT_CHECKOUT_OPTIONS_INIT. Alternatively, you can use git_checkout_options_init.
[version] GIT_CHECKOUT_OPTIONS_VERSION [init_macro] GIT_CHECKOUT_OPTIONS_INIT [init_function] git_checkout_options_init
\n", "fields": [ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The version " }, { "type": "unsigned int", @@ -30305,17 +26098,17 @@ { "type": "unsigned int", "name": "notify_flags", - "comments": " see `git_checkout_notify_t` above " + "comments": " Checkout notification flags specify what operations the notify\n callback is invoked for.\n\n \n\n[flags] git_checkout_notify_t" }, { "type": "git_checkout_notify_cb", "name": "notify_cb", - "comments": "" + "comments": " Optional callback to get notifications on specific file states.\n " }, { "type": "void *", "name": "notify_payload", - "comments": "" + "comments": " Payload passed to notify_cb " }, { "type": "git_checkout_progress_cb", @@ -30325,22 +26118,22 @@ { "type": "void *", "name": "progress_payload", - "comments": "" + "comments": " Payload passed to progress_cb " }, { "type": "git_strarray", "name": "paths", - "comments": " When not zeroed out, array of fnmatch patterns specifying which\n paths should be taken into account, otherwise all files. Use\n GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as simple list." + "comments": " A list of wildmatch patterns or paths.\n\n By default, all paths are processed. If you pass an array of wildmatch\n patterns, those will be used to filter which paths should be taken into\n account.\n\n Use GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as a simple list." }, { "type": "git_tree *", "name": "baseline", - "comments": " The expected content of the working directory; defaults to HEAD.\n If the working directory does not match this baseline information,\n that will produce a checkout conflict." + "comments": " The expected content of the working directory; defaults to HEAD.\n\n If the working directory does not match this baseline information,\n that will produce a checkout conflict." }, { "type": "git_index *", "name": "baseline_index", - "comments": " expected content of workdir, expressed as an index. " + "comments": " Like `baseline` above, though expressed as an index. This\n option overrides `baseline`." }, { "type": "const char *", @@ -30370,7 +26163,7 @@ { "type": "void *", "name": "perfdata_payload", - "comments": "" + "comments": " Payload passed to perfdata_cb " } ], "used": { @@ -30378,7 +26171,7 @@ "needs": [ "git_checkout_head", "git_checkout_index", - "git_checkout_init_options", + "git_checkout_options_init", "git_checkout_tree", "git_merge", "git_reset", @@ -30398,42 +26191,24 @@ "type": "struct", "value": "git_checkout_perfdata", "file": "git2/checkout.h", - "line": 216, - "lineto": 220, + "line": 258, + "lineto": 262, "block": "size_t mkdir_calls\nsize_t stat_calls\nsize_t chmod_calls", "tdef": "typedef", - "description": "", + "description": " Checkout performance-reporting structure ", "comments": "", "fields": [ - { - "type": "size_t", - "name": "mkdir_calls", - "comments": "" - }, - { - "type": "size_t", - "name": "stat_calls", - "comments": "" - }, - { - "type": "size_t", - "name": "chmod_calls", - "comments": "" - } + { "type": "size_t", "name": "mkdir_calls", "comments": "" }, + { "type": "size_t", "name": "stat_calls", "comments": "" }, + { "type": "size_t", "name": "chmod_calls", "comments": "" } ], - "used": { - "returns": [], - "needs": [ - "git_checkout_perfdata_cb" - ] - } + "used": { "returns": [], "needs": ["git_checkout_perfdata_cb"] } } ], [ "git_checkout_strategy_t", { "decl": [ - "GIT_CHECKOUT_NONE", "GIT_CHECKOUT_SAFE", "GIT_CHECKOUT_FORCE", "GIT_CHECKOUT_RECREATE_MISSING", @@ -30453,34 +26228,31 @@ "GIT_CHECKOUT_CONFLICT_STYLE_DIFF3", "GIT_CHECKOUT_DONT_REMOVE_EXISTING", "GIT_CHECKOUT_DONT_WRITE_INDEX", + "GIT_CHECKOUT_DRY_RUN", + "GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3", + "GIT_CHECKOUT_NONE", "GIT_CHECKOUT_UPDATE_SUBMODULES", "GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED" ], "type": "enum", "file": "git2/checkout.h", - "line": 106, - "lineto": 177, - "block": "GIT_CHECKOUT_NONE\nGIT_CHECKOUT_SAFE\nGIT_CHECKOUT_FORCE\nGIT_CHECKOUT_RECREATE_MISSING\nGIT_CHECKOUT_ALLOW_CONFLICTS\nGIT_CHECKOUT_REMOVE_UNTRACKED\nGIT_CHECKOUT_REMOVE_IGNORED\nGIT_CHECKOUT_UPDATE_ONLY\nGIT_CHECKOUT_DONT_UPDATE_INDEX\nGIT_CHECKOUT_NO_REFRESH\nGIT_CHECKOUT_SKIP_UNMERGED\nGIT_CHECKOUT_USE_OURS\nGIT_CHECKOUT_USE_THEIRS\nGIT_CHECKOUT_DISABLE_PATHSPEC_MATCH\nGIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES\nGIT_CHECKOUT_DONT_OVERWRITE_IGNORED\nGIT_CHECKOUT_CONFLICT_STYLE_MERGE\nGIT_CHECKOUT_CONFLICT_STYLE_DIFF3\nGIT_CHECKOUT_DONT_REMOVE_EXISTING\nGIT_CHECKOUT_DONT_WRITE_INDEX\nGIT_CHECKOUT_UPDATE_SUBMODULES\nGIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED", + "line": 113, + "lineto": 206, + "block": "GIT_CHECKOUT_SAFE\nGIT_CHECKOUT_FORCE\nGIT_CHECKOUT_RECREATE_MISSING\nGIT_CHECKOUT_ALLOW_CONFLICTS\nGIT_CHECKOUT_REMOVE_UNTRACKED\nGIT_CHECKOUT_REMOVE_IGNORED\nGIT_CHECKOUT_UPDATE_ONLY\nGIT_CHECKOUT_DONT_UPDATE_INDEX\nGIT_CHECKOUT_NO_REFRESH\nGIT_CHECKOUT_SKIP_UNMERGED\nGIT_CHECKOUT_USE_OURS\nGIT_CHECKOUT_USE_THEIRS\nGIT_CHECKOUT_DISABLE_PATHSPEC_MATCH\nGIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES\nGIT_CHECKOUT_DONT_OVERWRITE_IGNORED\nGIT_CHECKOUT_CONFLICT_STYLE_MERGE\nGIT_CHECKOUT_CONFLICT_STYLE_DIFF3\nGIT_CHECKOUT_DONT_REMOVE_EXISTING\nGIT_CHECKOUT_DONT_WRITE_INDEX\nGIT_CHECKOUT_DRY_RUN\nGIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3\nGIT_CHECKOUT_NONE\nGIT_CHECKOUT_UPDATE_SUBMODULES\nGIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED", "tdef": "typedef", "description": " Checkout behavior flags", - "comments": "In libgit2, checkout is used to update the working directory and index\n to match a target tree. Unlike git checkout, it does not move the HEAD\n commit for you - use git_repository_set_head or the like to do that.
Checkout looks at (up to) four things: the "target" tree you want to\n check out, the "baseline" tree of what was checked out previously, the\n working directory for actual files, and the index for staged changes.
\n\nYou give checkout one of three strategies for update:
\n\nGIT_CHECKOUT_NONE is a dry-run strategy that checks for conflicts,\netc., but doesn't make any actual changes.
GIT_CHECKOUT_FORCE is at the opposite extreme, taking any action to\nmake the working directory match the target (including potentially\ndiscarding modified files).
GIT_CHECKOUT_SAFE is between these two options, it will only make\nmodifications that will not lose changes.
| target == baseline | target != baseline |\n\n\n---------------------|-----------------------|----------------------|\n workdir == baseline | no action | create, update, or |\n | | delete file |\n---------------------|-----------------------|----------------------|\n workdir exists and | no action | conflict (notify |\n is != baseline | notify dirty MODIFIED | and cancel checkout) |\n---------------------|-----------------------|----------------------|\n workdir missing, | notify dirty DELETED | create file |\n baseline present | | |\n---------------------|-----------------------|----------------------|
To emulate git checkout, use GIT_CHECKOUT_SAFE with a checkout\n notification callback (see below) that displays information about dirty\n files. The default behavior will cancel checkout on conflicts.
To emulate git checkout-index, use GIT_CHECKOUT_SAFE with a\n notification callback that cancels the operation if a dirty-but-existing\n file is found in the working directory. This core git command isn't\n quite "force" but is sensitive about some types of changes.
To emulate git checkout -f, use GIT_CHECKOUT_FORCE.
There are some additional flags to modify the behavior of checkout:
\n\nGIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates\neven if there are conflicts (instead of cancelling the checkout).
GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not\nin target, baseline, or index, and not ignored) from the working dir.
GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also\nuntracked) from the working directory as well.
GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that\nalready exist. Files will not be created nor deleted. This just skips\napplying adds, deletes, and typechanges.
GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the\nupdated files' information to the index.
Normally, checkout will reload the index and git attributes from disk\nbefore any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.
Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips\nfiles with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and\nGIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the\nstage 2 ("ours") or stage 3 ("theirs") version of files in the index.
GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being\noverwritten. Normally, files that are ignored in the working directory\nare not considered "precious" and may be overwritten if the checkout\ntarget contains that file.
GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing\nfiles or folders that fold to the same name on case insensitive\nfilesystems. This can cause files to retain their existing names\nand write through existing symbolic links.
In libgit2, checkout is used to update the working directory and index to match a target tree. Unlike git checkout, it does not move the HEAD commit for you - use git_repository_set_head or the like to do that.
Checkout looks at (up to) four things: the "target" tree you want to check out, the "baseline" tree of what was checked out previously, the working directory for actual files, and the index for staged changes.
\n\nYou give checkout one of two strategies for update:
\n\nGIT_CHECKOUT_SAFE is the default, and similar to git's default, which will make modifications that will not lose changes in the working directory.
| target == baseline | target != baseline | ---------------------|-----------------------|----------------------| workdir == baseline | no action | create, update, or | | | delete file | ---------------------|-----------------------|----------------------| workdir exists and | no action | conflict (notify | is != baseline | notify dirty MODIFIED | and cancel checkout) | ---------------------|-----------------------|----------------------| workdir missing, | notify dirty DELETED | create file | baseline present | | | ---------------------|-----------------------|----------------------|\nGIT_CHECKOUT_FORCE will take any action to make the working directory match the target (including potentially discarding modified files).
To emulate git checkout, use GIT_CHECKOUT_SAFE with a checkout notification callback (see below) that displays information about dirty files. The default behavior will cancel checkout on conflicts.
To emulate git checkout-index, use GIT_CHECKOUT_SAFE with a notification callback that cancels the operation if a dirty-but-existing file is found in the working directory. This core git command isn't quite "force" but is sensitive about some types of changes.
To emulate git checkout -f, use GIT_CHECKOUT_FORCE.
There are some additional flags to modify the behavior of checkout:
\n\nGIT_CHECKOUT_DRY_RUN is a dry-run strategy that checks for conflicts, etc., but doesn't make any actual changes.
GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates even if there are conflicts (instead of cancelling the checkout).
GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not in target, baseline, or index, and not ignored) from the working dir.
GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also untracked) from the working directory as well.
GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that already exist. Files will not be created nor deleted. This just skips applying adds, deletes, and typechanges.
GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the updated files' information to the index.
Normally, checkout will reload the index and git attributes from disk before any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.
Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips files with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and GIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the stage 2 ("ours") or stage 3 ("theirs") version of files in the index.
GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being overwritten. Normally, files that are ignored in the working directory are not considered "precious" and may be overwritten if the checkout target contains that file.
GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing files or folders that fold to the same name on case insensitive filesystems. This can cause files to retain their existing names and write through existing symbolic links.
default is a dry run, no actual updates
\n", - "value": 0 - }, { "type": "int", "name": "GIT_CHECKOUT_SAFE", - "comments": "Allow safe updates that cannot overwrite uncommitted data
\n", - "value": 1 + "comments": "Allow safe updates that cannot overwrite uncommitted data.\n If the uncommitted changes don't conflict with the checked\n out files, the checkout will still proceed, leaving the\n changes intact.
\n", + "value": 0 }, { "type": "int", "name": "GIT_CHECKOUT_FORCE", - "comments": "Allow all updates to force working directory to look like index
\n", + "comments": "Allow all updates to force working directory to look like\n the index, potentially losing data in the process.
\n", "value": 2 }, { @@ -30585,6 +26357,24 @@ "comments": "Normally checkout writes the index upon completion; this prevents that.
\n", "value": 8388608 }, + { + "type": "int", + "name": "GIT_CHECKOUT_DRY_RUN", + "comments": "Perform a "dry run", reporting what would be done but\n without actually making changes in the working directory\n or the index.
\n", + "value": 16777216 + }, + { + "type": "int", + "name": "GIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3", + "comments": "Include common ancestor data in zdiff3 format for conflicts
\n", + "value": 33554432 + }, + { + "type": "int", + "name": "GIT_CHECKOUT_NONE", + "comments": "Do not do a checkout and do not fire callbacks; this is primarily\n useful only for internal functions that will perform the\n checkout themselves but need to pass checkout options into\n another function, for example, git_clone.
Initialize with GIT_CLONE_OPTIONS_INIT. Alternatively, you can\n use git_clone_init_options.
Initialize with GIT_CLONE_OPTIONS_INIT. Alternatively, you can use git_clone_options_init.
[version] GIT_CLONE_OPTIONS_VERSION [init_macro] GIT_CLONE_OPTIONS_INIT [init_function] git_clone_options_init
\n", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "git_checkout_options", "name": "checkout_opts", - "comments": " These options are passed to the checkout step. To disable\n checkout, set the `checkout_strategy` to\n `GIT_CHECKOUT_NONE`." + "comments": " These options are passed to the checkout step. To disable\n checkout, set the `checkout_strategy` to `GIT_CHECKOUT_NONE`\n or `GIT_CHECKOUT_DRY_RUN`." }, { "type": "git_fetch_options", @@ -30780,10 +26553,7 @@ ], "used": { "returns": [], - "needs": [ - "git_clone", - "git_clone_init_options" - ] + "needs": ["git_clone", "git_clone_options_init"] } } ], @@ -30794,12 +26564,11 @@ "type": "struct", "value": "git_commit", "file": "git2/types.h", - "line": 124, - "lineto": 124, + "line": 141, + "lineto": 141, "tdef": "typedef", "description": " Parsed representation of a commit object. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -30814,7 +26583,8 @@ "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", + "git_commit_create_cb", + "git_commit_create_from_stage", "git_commit_dup", "git_commit_free", "git_commit_header_field", @@ -30835,18 +26605,94 @@ "git_commit_time_offset", "git_commit_tree", "git_commit_tree_id", + "git_commitarray_dispose", "git_diff_commit_as_email", + "git_email_create_from_commit", "git_merge_commits", - "git_note_commit_create", - "git_note_commit_iterator_new", - "git_note_commit_read", - "git_note_commit_remove", + "git_odb_set_commit_graph", + "git_repository_commit_parents", "git_revert", "git_revert_commit" ] } } ], + [ + "git_commit_graph", + { + "decl": "git_commit_graph", + "type": "struct", + "value": "git_commit_graph", + "file": "git2/types.h", + "line": 114, + "lineto": 114, + "tdef": "typedef", + "description": " A git commit-graph ", + "comments": "", + "used": { "returns": [], "needs": ["git_odb_set_commit_graph"] } + } + ], + [ + "git_commit_graph_split_strategy_t", + { + "decl": ["GIT_COMMIT_GRAPH_SPLIT_STRATEGY_SINGLE_FILE"], + "type": "enum", + "file": "git2/sys/commit_graph.h", + "line": 93, + "lineto": 99, + "block": "GIT_COMMIT_GRAPH_SPLIT_STRATEGY_SINGLE_FILE", + "tdef": "typedef", + "description": " The strategy to use when adding a new set of commits to a pre-existing\n commit-graph chain.", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_COMMIT_GRAPH_SPLIT_STRATEGY_SINGLE_FILE", + "comments": "Do not split commit-graph files. The other split strategy-related option\n fields are ignored.
\n", + "value": 0 + } + ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_commit_graph_writer", + { + "decl": "git_commit_graph_writer", + "type": "struct", + "value": "git_commit_graph_writer", + "file": "git2/types.h", + "line": 117, + "lineto": 117, + "tdef": "typedef", + "description": " a writer for commit-graph files. ", + "comments": "", + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_commitarray", + { + "decl": ["git_commit *const * commits", "size_t count"], + "type": "struct", + "value": "git_commitarray", + "file": "git2/commit.h", + "line": 655, + "lineto": 658, + "block": "git_commit *const * commits\nsize_t count", + "tdef": "typedef", + "description": " An array of commits returned from the library ", + "comments": "", + "fields": [ + { "type": "git_commit *const *", "name": "commits", "comments": "" }, + { "type": "size_t", "name": "count", "comments": "" } + ], + "used": { + "returns": [], + "needs": ["git_commitarray_dispose", "git_repository_commit_parents"] + } + } + ], [ "git_config", { @@ -30854,16 +26700,14 @@ "type": "struct", "value": "git_config", "file": "git2/types.h", - "line": 145, - "lineto": 145, + "line": 162, + "lineto": 162, "tdef": "typedef", "description": " Memory representation of a set of config files ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ - "git_config_add_backend", "git_config_add_file_ondisk", "git_config_backend_foreach_match", "git_config_delete_entry", @@ -30882,11 +26726,11 @@ "git_config_get_path", "git_config_get_string", "git_config_get_string_buf", - "git_config_init_backend", "git_config_iterator_free", "git_config_iterator_glob_new", "git_config_iterator_new", "git_config_lock", + "git_config_lookup_map_value", "git_config_multivar_iterator_new", "git_config_new", "git_config_next", @@ -30899,10 +26743,10 @@ "git_config_set_int64", "git_config_set_multivar", "git_config_set_string", + "git_config_set_writeorder", "git_config_snapshot", "git_repository_config", - "git_repository_config_snapshot", - "git_repository_set_config" + "git_repository_config_snapshot" ] } } @@ -30914,92 +26758,45 @@ "type": "struct", "value": "git_config_backend", "file": "git2/types.h", - "line": 148, - "lineto": 148, - "block": "unsigned int version\nint readonly\nstruct git_config * cfg\nint (*)(struct git_config_backend *, git_config_level_t, const git_repository *) open\nint (*)(struct git_config_backend *, const char *, git_config_entry **) get\nint (*)(struct git_config_backend *, const char *, const char *) set\nint (*)(git_config_backend *, const char *, const char *, const char *) set_multivar\nint (*)(struct git_config_backend *, const char *) del\nint (*)(struct git_config_backend *, const char *, const char *) del_multivar\nint (*)(git_config_iterator **, struct git_config_backend *) iterator\nint (*)(struct git_config_backend **, struct git_config_backend *) snapshot\nint (*)(struct git_config_backend *) lock\nint (*)(struct git_config_backend *, int) unlock\nvoid (*)(struct git_config_backend *) free", + "line": 165, + "lineto": 165, "tdef": "typedef", "description": " Interface to access a configuration file ", "comments": "", + "used": { "returns": [], "needs": ["git_config_backend_foreach_match"] } + } + ], + [ + "git_config_backend_memory_options", + { + "decl": [ + "unsigned int version", + "const char * backend_type", + "const char * origin_path" + ], + "type": "struct", + "value": "git_config_backend_memory_options", + "file": "git2/sys/config.h", + "line": 148, + "lineto": 162, + "block": "unsigned int version\nconst char * backend_type\nconst char * origin_path", + "tdef": "typedef", + "description": " Options for in-memory configuration backends. ", + "comments": "", "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "int", - "name": "readonly", - "comments": " True if this backend is for a snapshot " - }, - { - "type": "struct git_config *", - "name": "cfg", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, git_config_level_t, const git_repository *)", - "name": "open", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *, git_config_entry **)", - "name": "get", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *, const char *)", - "name": "set", - "comments": "" - }, - { - "type": "int (*)(git_config_backend *, const char *, const char *, const char *)", - "name": "set_multivar", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *)", - "name": "del", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *, const char *)", - "name": "del_multivar", - "comments": "" - }, - { - "type": "int (*)(git_config_iterator **, struct git_config_backend *)", - "name": "iterator", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend **, struct git_config_backend *)", - "name": "snapshot", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *)", - "name": "lock", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, int)", - "name": "unlock", - "comments": "" + "type": "const char *", + "name": "backend_type", + "comments": " The type of this backend (eg, \"command line\"). If this is\n NULL, then this will be \"in-memory\"." }, { - "type": "void (*)(struct git_config_backend *)", - "name": "free", - "comments": "" + "type": "const char *", + "name": "origin_path", + "comments": " The path to the origin; if this is NULL then it will be\n left unset in the resulting configuration entries." } ], - "used": { - "returns": [], - "needs": [ - "git_config_add_backend", - "git_config_backend_foreach_match", - "git_config_init_backend" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31008,17 +26805,17 @@ "decl": [ "const char * name", "const char * value", + "const char * backend_type", + "const char * origin_path", "unsigned int include_depth", - "git_config_level_t level", - "void (*)(struct git_config_entry *) free", - "void * payload" + "git_config_level_t level" ], "type": "struct", "value": "git_config_entry", "file": "git2/config.h", - "line": 64, - "lineto": 71, - "block": "const char * name\nconst char * value\nunsigned int include_depth\ngit_config_level_t level\nvoid (*)(struct git_config_entry *) free\nvoid * payload", + "line": 103, + "lineto": 124, + "block": "const char * name\nconst char * value\nconst char * backend_type\nconst char * origin_path\nunsigned int include_depth\ngit_config_level_t level", "tdef": "typedef", "description": " An entry in a configuration file", "comments": "", @@ -31026,32 +26823,32 @@ { "type": "const char *", "name": "name", - "comments": " Name of the entry (normalised) " + "comments": " Name of the configuration entry (normalized). " }, { "type": "const char *", "name": "value", - "comments": " String value of the entry " + "comments": " Literal (string) value of the entry. " }, { - "type": "unsigned int", - "name": "include_depth", - "comments": " Depth of includes where this variable was found " + "type": "const char *", + "name": "backend_type", + "comments": " The type of backend that this entry exists in (eg, \"file\"). " }, { - "type": "git_config_level_t", - "name": "level", - "comments": " Which config file this was found in " + "type": "const char *", + "name": "origin_path", + "comments": " The path to the origin of this entry. For config files, this is\n the path to the file." }, { - "type": "void (*)(struct git_config_entry *)", - "name": "free", - "comments": "" + "type": "unsigned int", + "name": "include_depth", + "comments": " Depth of includes where this variable was found. " }, { - "type": "void *", - "name": "payload", - "comments": " Opaque value for the free function. Do not read or write " + "type": "git_config_level_t", + "name": "level", + "comments": " Configuration level for the file this was found in. " } ], "used": { @@ -31072,33 +26869,11 @@ "type": "struct", "value": "git_config_iterator", "file": "git2/config.h", - "line": 89, - "lineto": 89, + "line": 145, + "lineto": 145, "tdef": "typedef", - "description": " An opaque structure for a configuration iterator", + "description": " An opaque structure for a configuration iterator.", "comments": "", - "fields": [ - { - "type": "git_config_backend *", - "name": "backend", - "comments": "" - }, - { - "type": "unsigned int", - "name": "flags", - "comments": "" - }, - { - "type": "int (*)(git_config_entry **, git_config_iterator *)", - "name": "next", - "comments": "" - }, - { - "type": "void (*)(git_config_iterator *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ @@ -31120,559 +26895,347 @@ "GIT_CONFIG_LEVEL_XDG", "GIT_CONFIG_LEVEL_GLOBAL", "GIT_CONFIG_LEVEL_LOCAL", + "GIT_CONFIG_LEVEL_WORKTREE", "GIT_CONFIG_LEVEL_APP", "GIT_CONFIG_HIGHEST_LEVEL" ], "type": "enum", "file": "git2/config.h", - "line": 31, - "lineto": 59, - "block": "GIT_CONFIG_LEVEL_PROGRAMDATA\nGIT_CONFIG_LEVEL_SYSTEM\nGIT_CONFIG_LEVEL_XDG\nGIT_CONFIG_LEVEL_GLOBAL\nGIT_CONFIG_LEVEL_LOCAL\nGIT_CONFIG_LEVEL_APP\nGIT_CONFIG_HIGHEST_LEVEL", + "line": 49, + "lineto": 98, + "block": "GIT_CONFIG_LEVEL_PROGRAMDATA\nGIT_CONFIG_LEVEL_SYSTEM\nGIT_CONFIG_LEVEL_XDG\nGIT_CONFIG_LEVEL_GLOBAL\nGIT_CONFIG_LEVEL_LOCAL\nGIT_CONFIG_LEVEL_WORKTREE\nGIT_CONFIG_LEVEL_APP\nGIT_CONFIG_HIGHEST_LEVEL", "tdef": "typedef", - "description": " Priority level of a config file.\n These priority levels correspond to the natural escalation logic\n (from higher to lower) when searching for config entries in git.git.", - "comments": "git_config_open_default() and git_repository_config() honor those\n priority levels as well.
\n", + "description": " Priority level of a config file.", + "comments": "These priority levels correspond to the natural escalation logic (from higher to lower) when reading or searching for config entries in git.git. Meaning that for the same key, the configuration in the local configuration is preferred over the configuration in the system configuration file.
\n\nCallers can add their own custom configuration, beginning at the GIT_CONFIG_LEVEL_APP level.
Writes, by default, occur in the highest priority level backend that is writable. This ordering can be overridden with git_config_set_writeorder.
git_config_open_default() and git_repository_config() honor those priority levels as well.
\n", "fields": [ { "type": "int", "name": "GIT_CONFIG_LEVEL_PROGRAMDATA", - "comments": "System-wide on Windows, for compatibility with portable git
\n", + "comments": "System-wide on Windows, for compatibility with "Portable Git".
\n", "value": 1 }, { "type": "int", "name": "GIT_CONFIG_LEVEL_SYSTEM", - "comments": "System-wide configuration file; /etc/gitconfig on Linux systems
\n", + "comments": "System-wide configuration file; /etc/gitconfig on Linux.
XDG compatible configuration file; typically ~/.config/git/config
\n", + "comments": "XDG compatible configuration file; typically\n ~/.config/git/config.
User-specific configuration file (also called Global configuration\n file); typically ~/.gitconfig
\n", + "comments": "Global configuration file is the user-specific configuration;\n typically ~/.gitconfig.
Repository specific configuration file; $WORK_DIR/.git/config on\n non-bare repos
\n", + "comments": "Local configuration, the repository-specific configuration file;\n typically $GIT_DIR/config.
Application specific configuration file; freely defined by applications
\n", + "name": "GIT_CONFIG_LEVEL_WORKTREE", + "comments": "Worktree-specific configuration; typically\n $GIT_DIR/config.worktree.
Application-specific configuration file. Callers into libgit2\n can add their own configuration beginning at this level.
\n", + "value": 7 + }, { "type": "int", "name": "GIT_CONFIG_HIGHEST_LEVEL", - "comments": "Represents the highest level available config file (i.e. the most\n specific config file available that actually is loaded)
\n", + "comments": "Not a configuration level; callers can use this value when\n querying configuration levels to specify that they want to\n have data from the highest-level currently configuration.\n This can be used to indicate that callers want the most\n specific config file available that actually is loaded.
\n", "value": -1 } ], "used": { "returns": [], "needs": [ - "git_config_add_backend", "git_config_add_file_ondisk", - "git_config_open_level" + "git_config_open_level", + "git_config_set_writeorder" ] } } ], [ - "git_cred", + "git_configmap", { - "decl": "git_cred", + "decl": [ + "git_configmap_t type", + "const char * str_match", + "int map_value" + ], "type": "struct", - "value": "git_cred", - "file": "git2/transport.h", - "line": 140, - "lineto": 140, + "value": "git_configmap", + "file": "git2/config.h", + "line": 160, + "lineto": 164, + "block": "git_configmap_t type\nconst char * str_match\nint map_value", "tdef": "typedef", - "description": " The base structure for all credential types", + "description": " Mapping from config variables to values.", "comments": "", "fields": [ - { - "type": "git_credtype_t", - "name": "credtype", - "comments": " A type of credential " - }, - { - "type": "void (*)(git_cred *)", - "name": "free", - "comments": "" - } + { "type": "git_configmap_t", "name": "type", "comments": "" }, + { "type": "const char *", "name": "str_match", "comments": "" }, + { "type": "int", "name": "map_value", "comments": "" } ], "used": { "returns": [], - "needs": [ - "git_cred_acquire_cb", - "git_cred_default_new", - "git_cred_free", - "git_cred_has_username", - "git_cred_ssh_custom_new", - "git_cred_ssh_interactive_new", - "git_cred_ssh_key_from_agent", - "git_cred_ssh_key_memory_new", - "git_cred_ssh_key_new", - "git_cred_username_new", - "git_cred_userpass", - "git_cred_userpass_plaintext_new", - "git_transport_smart_credentials" - ] + "needs": ["git_config_get_mapped", "git_config_lookup_map_value"] } } ], [ - "git_cred_default", - { - "decl": "git_cred_default", - "type": "struct", - "value": "git_cred_default", - "file": "git2/transport.h", - "line": 205, - "lineto": 205, - "tdef": "typedef", - "description": " A key for NTLM/Kerberos \"default\" credentials ", - "comments": "", - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_cred_ssh_custom", + "git_configmap_t", { "decl": [ - "git_cred parent", - "char * username", - "char * publickey", - "size_t publickey_len", - "git_cred_sign_callback sign_callback", - "void * payload" + "GIT_CONFIGMAP_FALSE", + "GIT_CONFIGMAP_TRUE", + "GIT_CONFIGMAP_INT32", + "GIT_CONFIGMAP_STRING" ], - "type": "struct", - "value": "git_cred_ssh_custom", - "file": "git2/transport.h", - "line": 195, - "lineto": 202, - "block": "git_cred parent\nchar * username\nchar * publickey\nsize_t publickey_len\ngit_cred_sign_callback sign_callback\nvoid * payload", + "type": "enum", + "file": "git2/config.h", + "line": 150, + "lineto": 155, + "block": "GIT_CONFIGMAP_FALSE\nGIT_CONFIGMAP_TRUE\nGIT_CONFIGMAP_INT32\nGIT_CONFIGMAP_STRING", "tdef": "typedef", - "description": " A key with a custom signature function", + "description": " Config var type", "comments": "", "fields": [ { - "type": "git_cred", - "name": "parent", - "comments": "" - }, - { - "type": "char *", - "name": "username", - "comments": "" - }, - { - "type": "char *", - "name": "publickey", - "comments": "" + "type": "int", + "name": "GIT_CONFIGMAP_FALSE", + "comments": "", + "value": 0 }, { - "type": "size_t", - "name": "publickey_len", - "comments": "" + "type": "int", + "name": "GIT_CONFIGMAP_TRUE", + "comments": "", + "value": 1 }, { - "type": "git_cred_sign_callback", - "name": "sign_callback", - "comments": "" + "type": "int", + "name": "GIT_CONFIGMAP_INT32", + "comments": "", + "value": 2 }, { - "type": "void *", - "name": "payload", - "comments": "" + "type": "int", + "name": "GIT_CONFIGMAP_STRING", + "comments": "", + "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cred_ssh_interactive", + "git_credential", { - "decl": [ - "git_cred parent", - "char * username", - "git_cred_ssh_interactive_callback prompt_callback", - "void * payload" - ], + "decl": "git_credential", "type": "struct", - "value": "git_cred_ssh_interactive", - "file": "git2/transport.h", - "line": 185, - "lineto": 190, - "block": "git_cred parent\nchar * username\ngit_cred_ssh_interactive_callback prompt_callback\nvoid * payload", + "value": "git_credential", + "file": "git2/credential.h", + "line": 87, + "lineto": 87, "tdef": "typedef", - "description": " Keyboard-interactive based ssh authentication", + "description": " The base structure for all credential types", "comments": "", - "fields": [ - { - "type": "git_cred", - "name": "parent", - "comments": "" - }, - { - "type": "char *", - "name": "username", - "comments": "" - }, - { - "type": "git_cred_ssh_interactive_callback", - "name": "prompt_callback", - "comments": "" - }, - { - "type": "void *", - "name": "payload", - "comments": "" - } - ], "used": { "returns": [], "needs": [ - "git_cred_ssh_interactive_new" + "git_credential_acquire_cb", + "git_credential_default_new", + "git_credential_free", + "git_credential_get_username", + "git_credential_has_username", + "git_credential_ssh_custom_new", + "git_credential_ssh_interactive_new", + "git_credential_ssh_key_from_agent", + "git_credential_ssh_key_memory_new", + "git_credential_ssh_key_new", + "git_credential_username_new", + "git_credential_userpass", + "git_credential_userpass_plaintext_new" ] } } ], [ - "git_cred_ssh_key", + "git_credential_default", { - "decl": [ - "git_cred parent", - "char * username", - "char * publickey", - "char * privatekey", - "char * passphrase" - ], + "decl": "git_credential_default", "type": "struct", - "value": "git_cred_ssh_key", - "file": "git2/transport.h", - "line": 174, - "lineto": 180, - "block": "git_cred parent\nchar * username\nchar * publickey\nchar * privatekey\nchar * passphrase", + "value": "git_credential_default", + "file": "git2/credential.h", + "line": 95, + "lineto": 95, "tdef": "typedef", - "description": " A ssh key from disk", + "description": " A key for NTLM/Kerberos \"default\" credentials ", "comments": "", - "fields": [ - { - "type": "git_cred", - "name": "parent", - "comments": "" - }, - { - "type": "char *", - "name": "username", - "comments": "" - }, - { - "type": "char *", - "name": "publickey", - "comments": "" - }, - { - "type": "char *", - "name": "privatekey", - "comments": "" - }, - { - "type": "char *", - "name": "passphrase", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cred_username", + "git_credential_ssh_custom", { - "decl": [ - "git_cred parent", - "char [1] username" - ], + "decl": "git_credential_ssh_custom", "type": "struct", - "value": "git_cred_username", - "file": "git2/transport.h", - "line": 208, - "lineto": 211, - "block": "git_cred parent\nchar [1] username", + "value": "git_credential_ssh_custom", + "file": "git2/credential.h", + "line": 110, + "lineto": 110, "tdef": "typedef", - "description": " Username-only credential information ", + "description": " A key with a custom signature function", "comments": "", - "fields": [ - { - "type": "git_cred", - "name": "parent", - "comments": "" - }, - { - "type": "char [1]", - "name": "username", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cred_userpass_payload", + "git_credential_ssh_interactive", { - "decl": [ - "const char * username", - "const char * password" - ], + "decl": "git_credential_ssh_interactive", "type": "struct", - "value": "git_cred_userpass_payload", - "file": "git2/cred_helpers.h", - "line": 24, - "lineto": 27, - "block": "const char * username\nconst char * password", + "value": "git_credential_ssh_interactive", + "file": "git2/credential.h", + "line": 105, + "lineto": 105, "tdef": "typedef", - "description": " Payload for git_cred_stock_userpass_plaintext.", + "description": " Keyboard-interactive based ssh authentication", "comments": "", - "fields": [ - { - "type": "const char *", - "name": "username", - "comments": "" - }, - { - "type": "const char *", - "name": "password", - "comments": "" - } - ], "used": { "returns": [], - "needs": [] + "needs": ["git_credential_ssh_interactive_new"] } } ], [ - "git_cred_userpass_plaintext", + "git_credential_ssh_key", { - "decl": [ - "git_cred parent", - "char * username", - "char * password" - ], + "decl": "git_credential_ssh_key", "type": "struct", - "value": "git_cred_userpass_plaintext", - "file": "git2/transport.h", - "line": 151, - "lineto": 155, - "block": "git_cred parent\nchar * username\nchar * password", + "value": "git_credential_ssh_key", + "file": "git2/credential.h", + "line": 100, + "lineto": 100, "tdef": "typedef", - "description": " A plaintext username and password ", + "description": " A ssh key from disk", "comments": "", - "fields": [ - { - "type": "git_cred", - "name": "parent", - "comments": "" - }, - { - "type": "char *", - "name": "username", - "comments": "" - }, - { - "type": "char *", - "name": "password", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_credtype_t", + "git_credential_t", { "decl": [ - "GIT_CREDTYPE_USERPASS_PLAINTEXT", - "GIT_CREDTYPE_SSH_KEY", - "GIT_CREDTYPE_SSH_CUSTOM", - "GIT_CREDTYPE_DEFAULT", - "GIT_CREDTYPE_SSH_INTERACTIVE", - "GIT_CREDTYPE_USERNAME", - "GIT_CREDTYPE_SSH_MEMORY" + "GIT_CREDENTIAL_USERPASS_PLAINTEXT", + "GIT_CREDENTIAL_SSH_KEY", + "GIT_CREDENTIAL_SSH_CUSTOM", + "GIT_CREDENTIAL_DEFAULT", + "GIT_CREDENTIAL_SSH_INTERACTIVE", + "GIT_CREDENTIAL_USERNAME", + "GIT_CREDENTIAL_SSH_MEMORY" ], "type": "enum", - "file": "git2/transport.h", - "line": 86, - "lineto": 138, - "block": "GIT_CREDTYPE_USERPASS_PLAINTEXT\nGIT_CREDTYPE_SSH_KEY\nGIT_CREDTYPE_SSH_CUSTOM\nGIT_CREDTYPE_DEFAULT\nGIT_CREDTYPE_SSH_INTERACTIVE\nGIT_CREDTYPE_USERNAME\nGIT_CREDTYPE_SSH_MEMORY", + "file": "git2/credential.h", + "line": 30, + "lineto": 82, + "block": "GIT_CREDENTIAL_USERPASS_PLAINTEXT\nGIT_CREDENTIAL_SSH_KEY\nGIT_CREDENTIAL_SSH_CUSTOM\nGIT_CREDENTIAL_DEFAULT\nGIT_CREDENTIAL_SSH_INTERACTIVE\nGIT_CREDENTIAL_USERNAME\nGIT_CREDENTIAL_SSH_MEMORY", "tdef": "typedef", "description": " Supported credential types", - "comments": "This represents the various types of authentication methods supported by\n the library.
\n", + "comments": "This represents the various types of authentication methods supported by the library.
\n", "fields": [ { "type": "int", - "name": "GIT_CREDTYPE_USERPASS_PLAINTEXT", + "name": "GIT_CREDENTIAL_USERPASS_PLAINTEXT", "comments": "A vanilla user/password request
\n", "value": 1 }, { "type": "int", - "name": "GIT_CREDTYPE_SSH_KEY", + "name": "GIT_CREDENTIAL_SSH_KEY", "comments": "An SSH key-based authentication request
\n", "value": 2 }, { "type": "int", - "name": "GIT_CREDTYPE_SSH_CUSTOM", + "name": "GIT_CREDENTIAL_SSH_CUSTOM", "comments": "An SSH key-based authentication request, with a custom signature
\n", "value": 4 }, { "type": "int", - "name": "GIT_CREDTYPE_DEFAULT", + "name": "GIT_CREDENTIAL_DEFAULT", "comments": "An NTLM/Negotiate-based authentication request.
\n", "value": 8 }, { "type": "int", - "name": "GIT_CREDTYPE_SSH_INTERACTIVE", + "name": "GIT_CREDENTIAL_SSH_INTERACTIVE", "comments": "An SSH interactive authentication request
\n", "value": 16 }, { "type": "int", - "name": "GIT_CREDTYPE_USERNAME", + "name": "GIT_CREDENTIAL_USERNAME", "comments": "Username-only authentication request
\n\nUsed as a pre-authentication step if the underlying transport\n (eg. SSH, with no username in its URL) does not know which username\n to use.
\n", "value": 32 }, { "type": "int", - "name": "GIT_CREDTYPE_SSH_MEMORY", + "name": "GIT_CREDENTIAL_SSH_MEMORY", "comments": "An SSH key-based authentication request
\n\nAllows credentials to be read from memory instead of files.\n Note that because of differences in crypto backend support, it might\n not be functional.
\n", "value": 64 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cvar_map", + "git_credential_username", { - "decl": [ - "git_cvar_t cvar_type", - "const char * str_match", - "int map_value" - ], + "decl": "git_credential_username", "type": "struct", - "value": "git_cvar_map", - "file": "git2/config.h", - "line": 104, - "lineto": 108, - "block": "git_cvar_t cvar_type\nconst char * str_match\nint map_value", + "value": "git_credential_username", + "file": "git2/credential.h", + "line": 92, + "lineto": 92, "tdef": "typedef", - "description": " Mapping from config variables to values.", + "description": " Username-only credential information ", "comments": "", - "fields": [ - { - "type": "git_cvar_t", - "name": "cvar_type", - "comments": "" - }, - { - "type": "const char *", - "name": "str_match", - "comments": "" - }, - { - "type": "int", - "name": "map_value", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_config_get_mapped", - "git_config_lookup_map_value" - ] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cvar_t", + "git_credential_userpass_payload", { - "decl": [ - "GIT_CVAR_FALSE", - "GIT_CVAR_TRUE", - "GIT_CVAR_INT32", - "GIT_CVAR_STRING" - ], - "type": "enum", - "file": "git2/config.h", - "line": 94, - "lineto": 99, - "block": "GIT_CVAR_FALSE\nGIT_CVAR_TRUE\nGIT_CVAR_INT32\nGIT_CVAR_STRING", + "decl": ["const char * username", "const char * password"], + "type": "struct", + "value": "git_credential_userpass_payload", + "file": "git2/credential_helpers.h", + "line": 24, + "lineto": 27, + "block": "const char * username\nconst char * password", "tdef": "typedef", - "description": " Config var type", + "description": " Payload for git_credential_userpass_plaintext.", "comments": "", "fields": [ - { - "type": "int", - "name": "GIT_CVAR_FALSE", - "comments": "", - "value": 0 - }, - { - "type": "int", - "name": "GIT_CVAR_TRUE", - "comments": "", - "value": 1 - }, - { - "type": "int", - "name": "GIT_CVAR_INT32", - "comments": "", - "value": 2 - }, - { - "type": "int", - "name": "GIT_CVAR_STRING", - "comments": "", - "value": 3 - } + { "type": "const char *", "name": "username", "comments": "" }, + { "type": "const char *", "name": "password", "comments": "" } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31693,12 +27256,12 @@ ], "type": "enum", "file": "git2/diff.h", - "line": 220, - "lineto": 232, + "line": 224, + "lineto": 236, "block": "GIT_DELTA_UNMODIFIED\nGIT_DELTA_ADDED\nGIT_DELTA_DELETED\nGIT_DELTA_MODIFIED\nGIT_DELTA_RENAMED\nGIT_DELTA_COPIED\nGIT_DELTA_IGNORED\nGIT_DELTA_UNTRACKED\nGIT_DELTA_TYPECHANGE\nGIT_DELTA_UNREADABLE\nGIT_DELTA_CONFLICTED", "tdef": "typedef", "description": " What type of change is described by a git_diff_delta?", - "comments": "GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run\n git_diff_find_similar() on the diff object.
GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE\n in the option flags (otherwise type changes will be split into ADDED /\n DELETED pairs).
GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run git_diff_find_similar() on the diff object.
GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE in the option flags (otherwise type changes will be split into ADDED / DELETED pairs).
Initialize with GIT_DESCRIBE_FORMAT_OPTIONS_INIT. Alternatively, you can\n use git_describe_format_init_options.
Initialize with GIT_DESCRIBE_FORMAT_OPTIONS_INIT. Alternatively, you can use git_describe_format_options_init.
Initialize with GIT_DESCRIBE_OPTIONS_INIT. Alternatively, you can\n use git_describe_init_options.
Initialize with GIT_DESCRIBE_OPTIONS_INIT. Alternatively, you can use git_describe_options_init.
These behave like the --tags and --all options to git-describe,\n namely they say to look for any reference in either refs/tags/ or\n refs/ respectively.
\n", + "comments": "These behave like the --tags and --all options to git-describe, namely they say to look for any reference in either refs/tags/ or refs/ respectively.
\n", "fields": [ { "type": "int", @@ -31947,10 +27491,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31960,12 +27501,11 @@ "type": "struct", "value": "git_diff", "file": "git2/diff.h", - "line": 193, - "lineto": 193, + "line": 196, + "lineto": 196, "tdef": "typedef", "description": " The diff object that contains all individual file deltas.", - "comments": "A diff represents the cumulative list of differences between two\n snapshots of a repository (possibly filtered by a set of file name\n patterns).
Calculating diffs is generally done in two phases: building a list of\n diffs then traversing it. This makes is easier to share logic across\n the various types of diffs (tree vs tree, workdir vs index, etc.), and\n also allows you to insert optional diff post-processing phases,\n such as rename detection, in between the steps. When you are done with\n a diff object, it must be freed.
\n\nThis is an opaque structure which will be allocated by one of the diff\n generator functions below (such as git_diff_tree_to_tree). You are\n responsible for releasing the object memory when done, using the\n git_diff_free() function.
A diff represents the cumulative list of differences between two snapshots of a repository (possibly filtered by a set of file name patterns).
Calculating diffs is generally done in two phases: building a list of diffs then traversing it. This makes is easier to share logic across the various types of diffs (tree vs tree, workdir vs index, etc.), and also allows you to insert optional diff post-processing phases, such as rename detection, in between the steps. When you are done with a diff object, it must be freed.
\n\nThis is an opaque structure which will be allocated by one of the diff generator functions below (such as git_diff_tree_to_tree). You are responsible for releasing the object memory when done, using the git_diff_free() function.
A binary file / delta is a file (or pair) for which no text diffs\n should be generated. A diff can contain delta entries that are\n binary, but no diff content will be output for those files. There is\n a base heuristic for binary detection and you can further tune the\n behavior with git attributes or diff flags and option settings.
A binary file / delta is a file (or pair) for which no text diffs should be generated. A diff can contain delta entries that are binary, but no diff content will be output for those files. There is a base heuristic for binary detection and you can further tune the behavior with git attributes or diff flags and option settings.
A delta is a file pair with an old and new revision. The old version may be absent if the file was just created and the new version may be absent if the file was deleted. A diff is mostly just a list of deltas.
When iterating over a diff, this will be passed to most callbacks and you can use the contents to understand exactly what has changed.
\n\nThe old_file represents the "from" side of the diff and the new_file represents to "to" side of the diff. What those means depend on the function that was used to generate the diff and will be documented below. You can also use the GIT_DIFF_REVERSE flag to flip it around.
Although the two sides of the delta are named "old_file" and "new_file", they actually may correspond to entries that represent a file, a symbolic link, a submodule commit id, or even a tree (if you are tracking type changes or ignored/untracked directories).
\n\nUnder some circumstances, in the name of efficiency, not all fields will be filled in, but we generally try to fill in as much as possible. One example is that the "flags" field may not have either the BINARY or the NOT_BINARY flag set to avoid examining file contents if you do not pass in hunk and/or line callbacks to the diff foreach iteration function. It will just use the git attributes for those files.
The similarity score is zero unless you call git_diff_find_similar() which does a similarity analysis of files in the diff. Use that function to do rename and copy detection, and to split heavily modified files in add/delete pairs. After that call, deltas with a status of GIT_DELTA_RENAMED or GIT_DELTA_COPIED will have a similarity score between 0 and 100 indicating how similar the old and new sides are.
If you ask git_diff_find_similar to find heavily modified files to break, but to not actually break the records, then GIT_DELTA_MODIFIED records may have a non-zero similarity score if the self-similarity is below the split threshold. To display this value like core Git, invert the score (a la printf("M%03d", 100 - delta->similarity)).
Although this is called a "file", it could represent a file, a symbolic link, a submodule commit id, or even a tree (although that only if you are tracking type changes or ignored/untracked directories).
\n", "fields": [ { "type": "git_oid", "name": "id", - "comments": "" + "comments": " The `git_oid` of the item. If the entry represents an\n absent side of a diff (e.g. the `old_file` of a `GIT_DELTA_ADDED` delta),\n then the oid will be zeroes." }, { "type": "const char *", "name": "path", - "comments": "" + "comments": " The NUL-terminated path to the entry relative to the working\n directory of the repository." }, { - "type": "git_off_t", + "type": "git_object_size_t", "name": "size", - "comments": "" + "comments": " The size of the entry in bytes." }, { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " A combination of the `git_diff_flag_t` types" }, { - "type": "int", + "type": "uint16_t", "name": "mode", - "comments": "" + "comments": " Roughly, the stat() `st_mode` value for the item. This will\n be restricted to one of the `git_filemode_t` values." }, { - "type": "int", + "type": "uint16_t", "name": "id_abbrev", - "comments": "" + "comments": " Represents the known length of the `id` field, when\n converted to a hex string. It is generally `GIT_OID_SHA1_HEXSIZE`, unless this\n delta was created from reading a patch file, in which case it may be\n abbreviated to something reasonable, like 7 characters." } ], "used": { @@ -32307,58 +27823,54 @@ { "decl": [ "unsigned int version", - "int flags", - "int rename_threshold", - "int rename_from_rewrite_threshold", - "int copy_threshold", - "int break_rewrite_threshold", + "uint32_t flags", + "uint16_t rename_threshold", + "uint16_t rename_from_rewrite_threshold", + "uint16_t copy_threshold", + "uint16_t break_rewrite_threshold", "size_t rename_limit", "git_diff_similarity_metric * metric" ], "type": "struct", "value": "git_diff_find_options", "file": "git2/diff.h", - "line": 718, - "lineto": 772, - "block": "unsigned int version\nint flags\nint rename_threshold\nint rename_from_rewrite_threshold\nint copy_threshold\nint break_rewrite_threshold\nsize_t rename_limit\ngit_diff_similarity_metric * metric", + "line": 774, + "lineto": 828, + "block": "unsigned int version\nuint32_t flags\nuint16_t rename_threshold\nuint16_t rename_from_rewrite_threshold\nuint16_t copy_threshold\nuint16_t break_rewrite_threshold\nsize_t rename_limit\ngit_diff_similarity_metric * metric", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Control behavior of rename and copy detection", + "comments": "These options mostly mimic parameters that can be passed to git-diff.
\n", "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " Combination of git_diff_find_t values (default GIT_DIFF_FIND_BY_CONFIG).\n NOTE: if you don't explicitly set this, `diff.renames` could be set\n to false, resulting in `git_diff_find_similar` doing nothing." }, { - "type": "int", + "type": "uint16_t", "name": "rename_threshold", - "comments": "" + "comments": " Threshold above which similar files will be considered renames.\n This is equivalent to the -M option. Defaults to 50." }, { - "type": "int", + "type": "uint16_t", "name": "rename_from_rewrite_threshold", - "comments": "" + "comments": " Threshold below which similar files will be eligible to be a rename source.\n This is equivalent to the first part of the -B option. Defaults to 50." }, { - "type": "int", + "type": "uint16_t", "name": "copy_threshold", - "comments": "" + "comments": " Threshold above which similar files will be considered copies.\n This is equivalent to the -C option. Defaults to 50." }, { - "type": "int", + "type": "uint16_t", "name": "break_rewrite_threshold", - "comments": "" + "comments": " Threshold below which similar files will be split into a delete/add pair.\n This is equivalent to the last part of the -B option. Defaults to 60." }, { "type": "size_t", "name": "rename_limit", - "comments": " Maximum number of matches to consider for a particular file.\n\n This is a little different from the `-l` option from Git because we\n will still process up to this many matches before abandoning the search.\n Defaults to 200." + "comments": " Maximum number of matches to consider for a particular file.\n\n This is a little different from the `-l` option from Git because we\n will still process up to this many matches before abandoning the search.\n Defaults to 1000." }, { "type": "git_diff_similarity_metric *", @@ -32368,10 +27880,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_find_init_options", - "git_diff_find_similar" - ] + "needs": ["git_diff_find_options_init", "git_diff_find_similar"] } } ], @@ -32398,8 +27907,8 @@ ], "type": "enum", "file": "git2/diff.h", - "line": 627, - "lineto": 696, + "line": 683, + "lineto": 752, "block": "GIT_DIFF_FIND_BY_CONFIG\nGIT_DIFF_FIND_RENAMES\nGIT_DIFF_FIND_RENAMES_FROM_REWRITES\nGIT_DIFF_FIND_COPIES\nGIT_DIFF_FIND_COPIES_FROM_UNMODIFIED\nGIT_DIFF_FIND_REWRITES\nGIT_DIFF_BREAK_REWRITES\nGIT_DIFF_FIND_AND_BREAK_REWRITES\nGIT_DIFF_FIND_FOR_UNTRACKED\nGIT_DIFF_FIND_ALL\nGIT_DIFF_FIND_IGNORE_LEADING_WHITESPACE\nGIT_DIFF_FIND_IGNORE_WHITESPACE\nGIT_DIFF_FIND_DONT_IGNORE_WHITESPACE\nGIT_DIFF_FIND_EXACT_MATCH_ONLY\nGIT_DIFF_BREAK_REWRITES_FOR_RENAMES_ONLY\nGIT_DIFF_FIND_REMOVE_UNMODIFIED", "tdef": "typedef", "description": " Flags to control the behavior of diff rename/copy detection.", @@ -32502,10 +28011,7 @@ "value": 65536 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -32515,16 +28021,17 @@ "GIT_DIFF_FLAG_BINARY", "GIT_DIFF_FLAG_NOT_BINARY", "GIT_DIFF_FLAG_VALID_ID", - "GIT_DIFF_FLAG_EXISTS" + "GIT_DIFF_FLAG_EXISTS", + "GIT_DIFF_FLAG_VALID_SIZE" ], "type": "enum", "file": "git2/diff.h", - "line": 203, - "lineto": 208, - "block": "GIT_DIFF_FLAG_BINARY\nGIT_DIFF_FLAG_NOT_BINARY\nGIT_DIFF_FLAG_VALID_ID\nGIT_DIFF_FLAG_EXISTS", + "line": 206, + "lineto": 212, + "block": "GIT_DIFF_FLAG_BINARY\nGIT_DIFF_FLAG_NOT_BINARY\nGIT_DIFF_FLAG_VALID_ID\nGIT_DIFF_FLAG_EXISTS\nGIT_DIFF_FLAG_VALID_SIZE", "tdef": "typedef", "description": " Flags for the delta object and the file objects on each side.", - "comments": "These flags are used for both the flags value of the git_diff_delta\n and the flags for the git_diff_file objects representing the old and\n new sides of the delta. Values outside of this public range should be\n considered reserved for internal or future use.
These flags are used for both the flags value of the git_diff_delta and the flags for the git_diff_file objects representing the old and new sides of the delta. Values outside of this public range should be considered reserved for internal or future use.
file exists at this side of the delta
\n", "value": 8 + }, + { + "type": "int", + "name": "GIT_DIFF_FLAG_VALID_SIZE", + "comments": "file size value is known correct
\n", + "value": 16 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -32565,9 +28075,9 @@ "GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER" ], "type": "enum", - "file": "git2/diff.h", - "line": 1366, - "lineto": 1373, + "file": "git2/deprecated.h", + "line": 325, + "lineto": 331, "block": "GIT_DIFF_FORMAT_EMAIL_NONE\nGIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER", "tdef": "typedef", "description": " Formatting options for diff e-mail generation", @@ -32586,12 +28096,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [ - "git_diff_commit_as_email" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -32599,7 +28104,7 @@ { "decl": [ "unsigned int version", - "git_diff_format_email_flags_t flags", + "uint32_t flags", "size_t patch_no", "size_t total_patches", "const git_oid * id", @@ -32609,23 +28114,19 @@ ], "type": "struct", "value": "git_diff_format_email_options", - "file": "git2/diff.h", - "line": 1378, - "lineto": 1400, - "block": "unsigned int version\ngit_diff_format_email_flags_t flags\nsize_t patch_no\nsize_t total_patches\nconst git_oid * id\nconst char * summary\nconst char * body\nconst git_signature * author", + "file": "git2/deprecated.h", + "line": 338, + "lineto": 361, + "block": "unsigned int version\nuint32_t flags\nsize_t patch_no\nsize_t total_patches\nconst git_oid * id\nconst char * summary\nconst char * body\nconst git_signature * author", "tdef": "typedef", "description": " Options for controlling the formatting of the generated e-mail.", "comments": "", "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "git_diff_format_email_flags_t", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " see `git_diff_format_email_flags_t` above " }, { "type": "size_t", @@ -32662,7 +28163,7 @@ "returns": [], "needs": [ "git_diff_format_email", - "git_diff_format_email_init_options" + "git_diff_format_email_options_init" ] } } @@ -32675,13 +28176,14 @@ "GIT_DIFF_FORMAT_PATCH_HEADER", "GIT_DIFF_FORMAT_RAW", "GIT_DIFF_FORMAT_NAME_ONLY", - "GIT_DIFF_FORMAT_NAME_STATUS" + "GIT_DIFF_FORMAT_NAME_STATUS", + "GIT_DIFF_FORMAT_PATCH_ID" ], "type": "enum", "file": "git2/diff.h", - "line": 1090, - "lineto": 1096, - "block": "GIT_DIFF_FORMAT_PATCH\nGIT_DIFF_FORMAT_PATCH_HEADER\nGIT_DIFF_FORMAT_RAW\nGIT_DIFF_FORMAT_NAME_ONLY\nGIT_DIFF_FORMAT_NAME_STATUS", + "line": 1156, + "lineto": 1163, + "block": "GIT_DIFF_FORMAT_PATCH\nGIT_DIFF_FORMAT_PATCH_HEADER\nGIT_DIFF_FORMAT_RAW\nGIT_DIFF_FORMAT_NAME_ONLY\nGIT_DIFF_FORMAT_NAME_STATUS\nGIT_DIFF_FORMAT_PATCH_ID", "tdef": "typedef", "description": " Possible output formats for diff data", "comments": "", @@ -32715,14 +28217,17 @@ "name": "GIT_DIFF_FORMAT_NAME_STATUS", "comments": "like git diff --name-status
\n", "value": 5 + }, + { + "type": "int", + "name": "GIT_DIFF_FORMAT_PATCH_ID", + "comments": "git diff as used by git patch-id
\n", + "value": 6 } ], "used": { "returns": [], - "needs": [ - "git_diff_print", - "git_diff_to_buf" - ] + "needs": ["git_diff_print", "git_diff_to_buf"] } } ], @@ -32740,12 +28245,12 @@ "type": "struct", "value": "git_diff_hunk", "file": "git2/diff.h", - "line": 545, - "lineto": 552, + "line": 590, + "lineto": 597, "block": "int old_start\nint old_lines\nint new_start\nint new_lines\nsize_t header_len\nchar [128] header", "tdef": "typedef", "description": " Structure describing a hunk of a diff.", - "comments": "A hunk is a span of modified lines in a delta along with some stable\n surrounding context. You can configure the amount of context and other\n properties of how hunks are generated. Each hunk also comes with a\n header that described where it starts and ends in both the old and new\n versions in the delta.
A hunk is a span of modified lines in a delta along with some stable surrounding context. You can configure the amount of context and other properties of how hunks are generated. Each hunk also comes with a header that described where it starts and ends in both the old and new versions in the delta.
A line is a range of characters inside a hunk. It could be a context\n line (i.e. in both old and new versions), an added line (i.e. only in\n the new version), or a removed line (i.e. only in the old version).\n Unfortunately, we don't know anything about the encoding of data in the\n file being diffed, so we cannot tell you much about the line content.\n Line data will not be NUL-byte terminated, however, because it will be\n just a span of bytes inside the larger file.
A line is a range of characters inside a hunk. It could be a context line (i.e. in both old and new versions), an added line (i.e. only in the new version), or a removed line (i.e. only in the old version). Unfortunately, we don't know anything about the encoding of data in the file being diffed, so we cannot tell you much about the line content. Line data will not be NUL-byte terminated, however, because it will be just a span of bytes inside the larger file.
These values describe where a line came from and will be passed to\n the git_diff_line_cb when iterating over a diff. There are some\n special origin constants at the end that are used for the text\n output callbacks to demarcate lines that are actually part of\n the file or hunk headers.
\n", + "comments": "These values describe where a line came from and will be passed to the git_diff_line_cb when iterating over a diff. There are some special origin constants at the end that are used for the text output callbacks to demarcate lines that are actually part of the file or hunk headers.
\n", "fields": [ { "type": "int", @@ -32948,10 +28449,7 @@ "value": 66 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -32978,6 +28476,7 @@ "GIT_DIFF_INCLUDE_UNREADABLE", "GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED", "GIT_DIFF_INDENT_HEURISTIC", + "GIT_DIFF_IGNORE_BLANK_LINES", "GIT_DIFF_FORCE_TEXT", "GIT_DIFF_FORCE_BINARY", "GIT_DIFF_IGNORE_WHITESPACE", @@ -32992,8 +28491,8 @@ "type": "enum", "file": "git2/diff.h", "line": 28, - "lineto": 171, - "block": "GIT_DIFF_NORMAL\nGIT_DIFF_REVERSE\nGIT_DIFF_INCLUDE_IGNORED\nGIT_DIFF_RECURSE_IGNORED_DIRS\nGIT_DIFF_INCLUDE_UNTRACKED\nGIT_DIFF_RECURSE_UNTRACKED_DIRS\nGIT_DIFF_INCLUDE_UNMODIFIED\nGIT_DIFF_INCLUDE_TYPECHANGE\nGIT_DIFF_INCLUDE_TYPECHANGE_TREES\nGIT_DIFF_IGNORE_FILEMODE\nGIT_DIFF_IGNORE_SUBMODULES\nGIT_DIFF_IGNORE_CASE\nGIT_DIFF_INCLUDE_CASECHANGE\nGIT_DIFF_DISABLE_PATHSPEC_MATCH\nGIT_DIFF_SKIP_BINARY_CHECK\nGIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS\nGIT_DIFF_UPDATE_INDEX\nGIT_DIFF_INCLUDE_UNREADABLE\nGIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED\nGIT_DIFF_INDENT_HEURISTIC\nGIT_DIFF_FORCE_TEXT\nGIT_DIFF_FORCE_BINARY\nGIT_DIFF_IGNORE_WHITESPACE\nGIT_DIFF_IGNORE_WHITESPACE_CHANGE\nGIT_DIFF_IGNORE_WHITESPACE_EOL\nGIT_DIFF_SHOW_UNTRACKED_CONTENT\nGIT_DIFF_SHOW_UNMODIFIED\nGIT_DIFF_PATIENCE\nGIT_DIFF_MINIMAL\nGIT_DIFF_SHOW_BINARY", + "lineto": 174, + "block": "GIT_DIFF_NORMAL\nGIT_DIFF_REVERSE\nGIT_DIFF_INCLUDE_IGNORED\nGIT_DIFF_RECURSE_IGNORED_DIRS\nGIT_DIFF_INCLUDE_UNTRACKED\nGIT_DIFF_RECURSE_UNTRACKED_DIRS\nGIT_DIFF_INCLUDE_UNMODIFIED\nGIT_DIFF_INCLUDE_TYPECHANGE\nGIT_DIFF_INCLUDE_TYPECHANGE_TREES\nGIT_DIFF_IGNORE_FILEMODE\nGIT_DIFF_IGNORE_SUBMODULES\nGIT_DIFF_IGNORE_CASE\nGIT_DIFF_INCLUDE_CASECHANGE\nGIT_DIFF_DISABLE_PATHSPEC_MATCH\nGIT_DIFF_SKIP_BINARY_CHECK\nGIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS\nGIT_DIFF_UPDATE_INDEX\nGIT_DIFF_INCLUDE_UNREADABLE\nGIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED\nGIT_DIFF_INDENT_HEURISTIC\nGIT_DIFF_IGNORE_BLANK_LINES\nGIT_DIFF_FORCE_TEXT\nGIT_DIFF_FORCE_BINARY\nGIT_DIFF_IGNORE_WHITESPACE\nGIT_DIFF_IGNORE_WHITESPACE_CHANGE\nGIT_DIFF_IGNORE_WHITESPACE_EOL\nGIT_DIFF_SHOW_UNTRACKED_CONTENT\nGIT_DIFF_SHOW_UNMODIFIED\nGIT_DIFF_PATIENCE\nGIT_DIFF_MINIMAL\nGIT_DIFF_SHOW_BINARY", "tdef": "typedef", "description": " Flags for diff options. A combination of these flags can be passed\n in via the `flags` value in the `git_diff_options`.", "comments": "", @@ -33118,6 +28617,12 @@ "comments": "Use a heuristic that takes indentation and whitespace into account\n which generally can produce better diffs when dealing with ambiguous\n diff hunks.
\n", "value": 262144 }, + { + "type": "int", + "name": "GIT_DIFF_IGNORE_BLANK_LINES", + "comments": "Ignore blank lines
\n", + "value": 524288 + }, { "type": "int", "name": "GIT_DIFF_FORCE_TEXT", @@ -33179,10 +28684,7 @@ "value": 1073741824 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -33190,15 +28692,16 @@ { "decl": [ "unsigned int version", - "int flags", + "uint32_t flags", "git_submodule_ignore_t ignore_submodules", "git_strarray pathspec", "git_diff_notify_cb notify_cb", "git_diff_progress_cb progress_cb", "void * payload", - "int context_lines", - "int interhunk_lines", - "int id_abbrev", + "uint32_t context_lines", + "uint32_t interhunk_lines", + "git_oid_t oid_type", + "uint16_t id_abbrev", "git_off_t max_size", "const char * old_prefix", "const char * new_prefix" @@ -33206,12 +28709,12 @@ "type": "struct", "value": "git_diff_options", "file": "git2/diff.h", - "line": 361, - "lineto": 433, - "block": "unsigned int version\nint flags\ngit_submodule_ignore_t ignore_submodules\ngit_strarray pathspec\ngit_diff_notify_cb notify_cb\ngit_diff_progress_cb progress_cb\nvoid * payload\nint context_lines\nint interhunk_lines\nint id_abbrev\ngit_off_t max_size\nconst char * old_prefix\nconst char * new_prefix", + "line": 383, + "lineto": 471, + "block": "unsigned int version\nuint32_t flags\ngit_submodule_ignore_t ignore_submodules\ngit_strarray pathspec\ngit_diff_notify_cb notify_cb\ngit_diff_progress_cb progress_cb\nvoid * payload\nuint32_t context_lines\nuint32_t interhunk_lines\ngit_oid_t oid_type\nuint16_t id_abbrev\ngit_off_t max_size\nconst char * old_prefix\nconst char * new_prefix", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Structure describing options about how the diff should be executed.", + "comments": "Setting all values of the structure to zero will yield the default values. Similarly, passing NULL for the options structure will give the defaults. The default values are marked below.
\n", "fields": [ { "type": "unsigned int", @@ -33219,9 +28722,9 @@ "comments": " version for the struct " }, { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " A combination of `git_diff_option_t` values above.\n Defaults to GIT_DIFF_NORMAL" }, { "type": "git_submodule_ignore_t", @@ -33249,19 +28752,24 @@ "comments": " The payload to pass to the callback functions. " }, { - "type": "int", + "type": "uint32_t", "name": "context_lines", - "comments": "" + "comments": " The number of unchanged lines that define the boundary of a hunk\n (and to display before and after). Defaults to 3." }, { - "type": "int", + "type": "uint32_t", "name": "interhunk_lines", - "comments": "" + "comments": " The maximum number of unchanged lines between hunk boundaries before\n the hunks will be merged into one. Defaults to 0." }, { - "type": "int", + "type": "git_oid_t", + "name": "oid_type", + "comments": " The object ID type to emit in diffs; this is used by functions\n that operate without a repository - namely `git_diff_buffers`,\n or `git_diff_blobs` and `git_diff_blob_to_buffer` when one blob\n is `NULL`.\n\n This may be omitted (set to `0`). If a repository is available,\n the object ID format of the repository will be used. If no\n repository is available then the default is `GIT_OID_SHA`.\n\n If this is specified and a repository is available, then the\n specified `oid_type` must match the repository's object ID\n format." + }, + { + "type": "uint16_t", "name": "id_abbrev", - "comments": "" + "comments": " The abbreviation length to use when formatting object ids.\n Defaults to the value of 'core.abbrev' from the config, or 7 if unset." }, { "type": "git_off_t", @@ -33288,7 +28796,7 @@ "git_diff_commit_as_email", "git_diff_index_to_index", "git_diff_index_to_workdir", - "git_diff_init_options", + "git_diff_options_init", "git_diff_tree_to_index", "git_diff_tree_to_tree", "git_diff_tree_to_workdir", @@ -33301,76 +28809,44 @@ } ], [ - "git_diff_patchid_options", + "git_diff_parse_options", { - "decl": [ - "unsigned int version" - ], + "decl": ["unsigned int version", "git_oid_t oid_type"], "type": "struct", - "value": "git_diff_patchid_options", + "value": "git_diff_parse_options", "file": "git2/diff.h", - "line": 1462, - "lineto": 1464, - "block": "unsigned int version", + "line": 1322, + "lineto": 1325, + "block": "unsigned int version\ngit_oid_t oid_type", "tdef": "typedef", - "description": " Patch ID options structure", - "comments": "Initialize with GIT_PATCHID_OPTIONS_INIT. Alternatively, you can\n use git_patchid_init_options.
Initialize with GIT_PATCHID_OPTIONS_INIT. Alternatively, you can use git_diff_patchid_options_init.
We need this because we need to know whether we should call\n git-upload-pack or git-receive-pack on the remote end when get_refs\n gets called.
\n", + "comments": "We need this because we need to know whether we should call git-upload-pack or git-receive-pack on the remote end when get_refs gets called.
\n", "fields": [ { "type": "int", @@ -33540,50 +29000,140 @@ } ], "used": { - "returns": [ - "git_refspec_direction" - ], - "needs": [ - "git_remote_connect" - ] + "returns": ["git_refspec_direction"], + "needs": ["git_remote_connect", "git_remote_connect_ext"] } } ], [ - "git_error", + "git_email_create_flags_t", { "decl": [ - "char * message", - "int klass" + "GIT_EMAIL_CREATE_DEFAULT", + "GIT_EMAIL_CREATE_OMIT_NUMBERS", + "GIT_EMAIL_CREATE_ALWAYS_NUMBER", + "GIT_EMAIL_CREATE_NO_RENAMES" + ], + "type": "enum", + "file": "git2/email.h", + "line": 24, + "lineto": 39, + "block": "GIT_EMAIL_CREATE_DEFAULT\nGIT_EMAIL_CREATE_OMIT_NUMBERS\nGIT_EMAIL_CREATE_ALWAYS_NUMBER\nGIT_EMAIL_CREATE_NO_RENAMES", + "tdef": "typedef", + "description": " Formatting options for diff e-mail generation", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_EMAIL_CREATE_DEFAULT", + "comments": "Normal patch, the default
\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_EMAIL_CREATE_OMIT_NUMBERS", + "comments": "Do not include patch numbers in the subject prefix.
\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_EMAIL_CREATE_ALWAYS_NUMBER", + "comments": "Include numbers in the subject prefix even when the\n patch is for a single commit (1/1).
\n", + "value": 2 + }, + { + "type": "int", + "name": "GIT_EMAIL_CREATE_NO_RENAMES", + "comments": "Do not perform rename or similarity detection.
\n", + "value": 4 + } + ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_email_create_options", + { + "decl": [ + "unsigned int version", + "uint32_t flags", + "git_diff_options diff_opts", + "git_diff_find_options diff_find_opts", + "const char * subject_prefix", + "size_t start_number", + "size_t reroll_number" + ], + "type": "struct", + "value": "git_email_create_options", + "file": "git2/email.h", + "line": 44, + "lineto": 72, + "block": "unsigned int version\nuint32_t flags\ngit_diff_options diff_opts\ngit_diff_find_options diff_find_opts\nconst char * subject_prefix\nsize_t start_number\nsize_t reroll_number", + "tdef": "typedef", + "description": " Options for controlling the formatting of the generated e-mail.", + "comments": "", + "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, + { + "type": "uint32_t", + "name": "flags", + "comments": " see `git_email_create_flags_t` above " + }, + { + "type": "git_diff_options", + "name": "diff_opts", + "comments": " Options to use when creating diffs " + }, + { + "type": "git_diff_find_options", + "name": "diff_find_opts", + "comments": " Options for finding similarities within diffs " + }, + { + "type": "const char *", + "name": "subject_prefix", + "comments": " The subject prefix, by default \"PATCH\". If set to an empty\n string (\"\") then only the patch numbers will be shown in the\n prefix. If the subject_prefix is empty and patch numbers\n are not being shown, the prefix will be omitted entirely." + }, + { + "type": "size_t", + "name": "start_number", + "comments": " The starting patch number; this cannot be 0. By default,\n this is 1." + }, + { + "type": "size_t", + "name": "reroll_number", + "comments": " The \"re-roll\" number. By default, there is no re-roll. " + } ], + "used": { "returns": [], "needs": ["git_email_create_from_commit"] } + } + ], + [ + "git_error", + { + "decl": ["char * message", "int klass"], "type": "struct", "value": "git_error", "file": "git2/errors.h", - "line": 69, - "lineto": 72, + "line": 125, + "lineto": 128, "block": "char * message\nint klass", "tdef": "typedef", "description": " Structure to store extra details of the last error that occurred.", - "comments": "This is kept on a per-thread basis if GIT_THREADS was defined when the\n library was build, otherwise one is kept globally for the library
\n", + "comments": "This is kept on a per-thread basis if GIT_THREADS was defined when the library was build, otherwise one is kept globally for the library
\n", "fields": [ { "type": "char *", "name": "message", - "comments": "" + "comments": " The error message for the last error. " }, { "type": "int", "name": "klass", - "comments": "" + "comments": " The category of the last error. \n\n git_error_t " } ], - "used": { - "returns": [ - "git_error_last", - "giterr_last" - ], - "needs": [] - } + "used": { "returns": ["git_error_last", "giterr_last"], "needs": [] } } ], [ @@ -33619,13 +29169,18 @@ "GIT_RETRY", "GIT_EMISMATCH", "GIT_EINDEXDIRTY", - "GIT_EAPPLYFAIL" + "GIT_EAPPLYFAIL", + "GIT_EOWNER", + "GIT_TIMEOUT", + "GIT_EUNCHANGED", + "GIT_ENOTSUPPORTED", + "GIT_EREADONLY" ], "type": "enum", "file": "git2/errors.h", "line": 21, - "lineto": 61, - "block": "GIT_OK\nGIT_ERROR\nGIT_ENOTFOUND\nGIT_EEXISTS\nGIT_EAMBIGUOUS\nGIT_EBUFS\nGIT_EUSER\nGIT_EBAREREPO\nGIT_EUNBORNBRANCH\nGIT_EUNMERGED\nGIT_ENONFASTFORWARD\nGIT_EINVALIDSPEC\nGIT_ECONFLICT\nGIT_ELOCKED\nGIT_EMODIFIED\nGIT_EAUTH\nGIT_ECERTIFICATE\nGIT_EAPPLIED\nGIT_EPEEL\nGIT_EEOF\nGIT_EINVALID\nGIT_EUNCOMMITTED\nGIT_EDIRECTORY\nGIT_EMERGECONFLICT\nGIT_PASSTHROUGH\nGIT_ITEROVER\nGIT_RETRY\nGIT_EMISMATCH\nGIT_EINDEXDIRTY\nGIT_EAPPLYFAIL", + "lineto": 73, + "block": "GIT_OK\nGIT_ERROR\nGIT_ENOTFOUND\nGIT_EEXISTS\nGIT_EAMBIGUOUS\nGIT_EBUFS\nGIT_EUSER\nGIT_EBAREREPO\nGIT_EUNBORNBRANCH\nGIT_EUNMERGED\nGIT_ENONFASTFORWARD\nGIT_EINVALIDSPEC\nGIT_ECONFLICT\nGIT_ELOCKED\nGIT_EMODIFIED\nGIT_EAUTH\nGIT_ECERTIFICATE\nGIT_EAPPLIED\nGIT_EPEEL\nGIT_EEOF\nGIT_EINVALID\nGIT_EUNCOMMITTED\nGIT_EDIRECTORY\nGIT_EMERGECONFLICT\nGIT_PASSTHROUGH\nGIT_ITEROVER\nGIT_RETRY\nGIT_EMISMATCH\nGIT_EINDEXDIRTY\nGIT_EAPPLYFAIL\nGIT_EOWNER\nGIT_TIMEOUT\nGIT_EUNCHANGED\nGIT_ENOTSUPPORTED\nGIT_EREADONLY", "tdef": "typedef", "description": " Generic return codes ", "comments": "", @@ -33633,37 +29188,37 @@ { "type": "int", "name": "GIT_OK", - "comments": "No error
\n", + "comments": "No error occurred; the call was successful.
\n", "value": 0 }, { "type": "int", "name": "GIT_ERROR", - "comments": "Generic error
\n", + "comments": "An error occurred; call git_error_last for more information.
Requested object could not be found
\n", + "comments": "Requested object could not be found.
\n", "value": -3 }, { "type": "int", "name": "GIT_EEXISTS", - "comments": "Object exists preventing operation
\n", + "comments": "Object exists preventing operation.
\n", "value": -4 }, { "type": "int", "name": "GIT_EAMBIGUOUS", - "comments": "More than one object matches
\n", + "comments": "More than one object matches.
\n", "value": -5 }, { "type": "int", "name": "GIT_EBUFS", - "comments": "Output buffer too short to hold data
\n", + "comments": "Output buffer too short to hold data.
\n", "value": -6 }, { @@ -33675,13 +29230,13 @@ { "type": "int", "name": "GIT_EBAREREPO", - "comments": "Operation not allowed on bare repository
\n", + "comments": "Operation not allowed on bare repository.
\n", "value": -8 }, { "type": "int", "name": "GIT_EUNBORNBRANCH", - "comments": "HEAD refers to branch with no commits
\n", + "comments": "HEAD refers to branch with no commits.
\n", "value": -9 }, { @@ -33809,12 +29364,39 @@ "name": "GIT_EAPPLYFAIL", "comments": "Patch application failed
\n", "value": -35 + }, + { + "type": "int", + "name": "GIT_EOWNER", + "comments": "The object is not owned by the current user
\n", + "value": -36 + }, + { + "type": "int", + "name": "GIT_TIMEOUT", + "comments": "The operation timed out
\n", + "value": -37 + }, + { + "type": "int", + "name": "GIT_EUNCHANGED", + "comments": "There were no changes
\n", + "value": -38 + }, + { + "type": "int", + "name": "GIT_ENOTSUPPORTED", + "comments": "An option is not supported
\n", + "value": -39 + }, + { + "type": "int", + "name": "GIT_EREADONLY", + "comments": "The subject is read-only
\n", + "value": -40 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -33854,15 +29436,18 @@ "GIT_ERROR_FILESYSTEM", "GIT_ERROR_PATCH", "GIT_ERROR_WORKTREE", - "GIT_ERROR_SHA1" + "GIT_ERROR_SHA", + "GIT_ERROR_HTTP", + "GIT_ERROR_INTERNAL", + "GIT_ERROR_GRAFTS" ], "type": "enum", "file": "git2/errors.h", - "line": 75, - "lineto": 110, - "block": "GIT_ERROR_NONE\nGIT_ERROR_NOMEMORY\nGIT_ERROR_OS\nGIT_ERROR_INVALID\nGIT_ERROR_REFERENCE\nGIT_ERROR_ZLIB\nGIT_ERROR_REPOSITORY\nGIT_ERROR_CONFIG\nGIT_ERROR_REGEX\nGIT_ERROR_ODB\nGIT_ERROR_INDEX\nGIT_ERROR_OBJECT\nGIT_ERROR_NET\nGIT_ERROR_TAG\nGIT_ERROR_TREE\nGIT_ERROR_INDEXER\nGIT_ERROR_SSL\nGIT_ERROR_SUBMODULE\nGIT_ERROR_THREAD\nGIT_ERROR_STASH\nGIT_ERROR_CHECKOUT\nGIT_ERROR_FETCHHEAD\nGIT_ERROR_MERGE\nGIT_ERROR_SSH\nGIT_ERROR_FILTER\nGIT_ERROR_REVERT\nGIT_ERROR_CALLBACK\nGIT_ERROR_CHERRYPICK\nGIT_ERROR_DESCRIBE\nGIT_ERROR_REBASE\nGIT_ERROR_FILESYSTEM\nGIT_ERROR_PATCH\nGIT_ERROR_WORKTREE\nGIT_ERROR_SHA1", + "line": 79, + "lineto": 117, + "block": "GIT_ERROR_NONE\nGIT_ERROR_NOMEMORY\nGIT_ERROR_OS\nGIT_ERROR_INVALID\nGIT_ERROR_REFERENCE\nGIT_ERROR_ZLIB\nGIT_ERROR_REPOSITORY\nGIT_ERROR_CONFIG\nGIT_ERROR_REGEX\nGIT_ERROR_ODB\nGIT_ERROR_INDEX\nGIT_ERROR_OBJECT\nGIT_ERROR_NET\nGIT_ERROR_TAG\nGIT_ERROR_TREE\nGIT_ERROR_INDEXER\nGIT_ERROR_SSL\nGIT_ERROR_SUBMODULE\nGIT_ERROR_THREAD\nGIT_ERROR_STASH\nGIT_ERROR_CHECKOUT\nGIT_ERROR_FETCHHEAD\nGIT_ERROR_MERGE\nGIT_ERROR_SSH\nGIT_ERROR_FILTER\nGIT_ERROR_REVERT\nGIT_ERROR_CALLBACK\nGIT_ERROR_CHERRYPICK\nGIT_ERROR_DESCRIBE\nGIT_ERROR_REBASE\nGIT_ERROR_FILESYSTEM\nGIT_ERROR_PATCH\nGIT_ERROR_WORKTREE\nGIT_ERROR_SHA\nGIT_ERROR_HTTP\nGIT_ERROR_INTERNAL\nGIT_ERROR_GRAFTS", "tdef": "typedef", - "description": " Error classes ", + "description": " Error classes are the category of error. They reflect the area of the\n code where an error occurred.", "comments": "", "fields": [ { @@ -33877,12 +29462,7 @@ "comments": "", "value": 1 }, - { - "type": "int", - "name": "GIT_ERROR_OS", - "comments": "", - "value": 2 - }, + { "type": "int", "name": "GIT_ERROR_OS", "comments": "", "value": 2 }, { "type": "int", "name": "GIT_ERROR_INVALID", @@ -34065,15 +29645,30 @@ }, { "type": "int", - "name": "GIT_ERROR_SHA1", + "name": "GIT_ERROR_SHA", "comments": "", "value": 33 + }, + { + "type": "int", + "name": "GIT_ERROR_HTTP", + "comments": "", + "value": 34 + }, + { + "type": "int", + "name": "GIT_ERROR_INTERNAL", + "comments": "", + "value": 35 + }, + { + "type": "int", + "name": "GIT_ERROR_GRAFTS", + "comments": "", + "value": 36 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34083,46 +29678,128 @@ "GIT_FEATURE_THREADS", "GIT_FEATURE_HTTPS", "GIT_FEATURE_SSH", - "GIT_FEATURE_NSEC" + "GIT_FEATURE_NSEC", + "GIT_FEATURE_HTTP_PARSER", + "GIT_FEATURE_REGEX", + "GIT_FEATURE_I18N", + "GIT_FEATURE_AUTH_NTLM", + "GIT_FEATURE_AUTH_NEGOTIATE", + "GIT_FEATURE_COMPRESSION", + "GIT_FEATURE_SHA1", + "GIT_FEATURE_SHA256" ], "type": "enum", "file": "git2/common.h", - "line": 130, - "lineto": 153, - "block": "GIT_FEATURE_THREADS\nGIT_FEATURE_HTTPS\nGIT_FEATURE_SSH\nGIT_FEATURE_NSEC", + "line": 138, + "lineto": 177, + "block": "GIT_FEATURE_THREADS\nGIT_FEATURE_HTTPS\nGIT_FEATURE_SSH\nGIT_FEATURE_NSEC\nGIT_FEATURE_HTTP_PARSER\nGIT_FEATURE_REGEX\nGIT_FEATURE_I18N\nGIT_FEATURE_AUTH_NTLM\nGIT_FEATURE_AUTH_NEGOTIATE\nGIT_FEATURE_COMPRESSION\nGIT_FEATURE_SHA1\nGIT_FEATURE_SHA256", "tdef": "typedef", - "description": " Combinations of these values describe the features with which libgit2\n was compiled", + "description": " Configurable features of libgit2; either optional settings (like\n threading), or features that can be enabled by one of a number of\n different backend \"providers\" (like HTTPS, which can be provided by\n OpenSSL, mbedTLS, or system libraries).", "comments": "", "fields": [ { "type": "int", "name": "GIT_FEATURE_THREADS", - "comments": "If set, libgit2 was built thread-aware and can be safely used from multiple\n threads.
\n", + "comments": "libgit2 is thread-aware and can be used from multiple threads\n (as described in the documentation).
\n", "value": 1 }, { "type": "int", "name": "GIT_FEATURE_HTTPS", - "comments": "If set, libgit2 was built with and linked against a TLS implementation.\n Custom TLS streams may still be added by the user to support HTTPS\n regardless of this.
\n", + "comments": "HTTPS remotes
\n", "value": 2 }, { "type": "int", "name": "GIT_FEATURE_SSH", - "comments": "If set, libgit2 was built with and linked against libssh2. A custom\n transport may still be added by the user to support libssh2 regardless of\n this.
\n", + "comments": "SSH remotes
\n", "value": 4 }, { "type": "int", "name": "GIT_FEATURE_NSEC", - "comments": "If set, libgit2 was built with support for sub-second resolution in file\n modification times.
\n", + "comments": "Sub-second resolution in index timestamps
\n", "value": 8 + }, + { + "type": "int", + "name": "GIT_FEATURE_HTTP_PARSER", + "comments": "HTTP parsing; always available
\n", + "value": 16 + }, + { + "type": "int", + "name": "GIT_FEATURE_REGEX", + "comments": "Regular expression support; always available
\n", + "value": 32 + }, + { + "type": "int", + "name": "GIT_FEATURE_I18N", + "comments": "Internationalization support for filename translation
\n", + "value": 64 + }, + { + "type": "int", + "name": "GIT_FEATURE_AUTH_NTLM", + "comments": "NTLM support over HTTPS
\n", + "value": 128 + }, + { + "type": "int", + "name": "GIT_FEATURE_AUTH_NEGOTIATE", + "comments": "Kerberos (SPNEGO) authentication support over HTTPS
\n", + "value": 256 + }, + { + "type": "int", + "name": "GIT_FEATURE_COMPRESSION", + "comments": "zlib support; always available
\n", + "value": 512 + }, + { + "type": "int", + "name": "GIT_FEATURE_SHA1", + "comments": "SHA1 object support; always available
\n", + "value": 1024 + }, + { + "type": "int", + "name": "GIT_FEATURE_SHA256", + "comments": "SHA256 object support
\n", + "value": 2048 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": ["git_libgit2_feature_backend"] } + } + ], + [ + "git_fetch_depth_t", + { + "decl": ["GIT_FETCH_DEPTH_FULL", "GIT_FETCH_DEPTH_UNSHALLOW"], + "type": "enum", + "file": "git2/remote.h", + "line": 760, + "lineto": 766, + "block": "GIT_FETCH_DEPTH_FULL\nGIT_FETCH_DEPTH_UNSHALLOW", + "tdef": "typedef", + "description": " Constants for fetch depth (shallowness of fetch). ", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_FETCH_DEPTH_FULL", + "comments": "The fetch is "full" (not shallow). This is the default.
\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_FETCH_DEPTH_UNSHALLOW", + "comments": "The fetch should "unshallow" and fetch missing data.
\n", + "value": 2147483647 + } + ], + "used": { "returns": [], "needs": [] } } ], [ @@ -34132,26 +29809,24 @@ "int version", "git_remote_callbacks callbacks", "git_fetch_prune_t prune", - "int update_fetchhead", + "unsigned int update_fetchhead", "git_remote_autotag_option_t download_tags", "git_proxy_options proxy_opts", + "int depth", + "git_remote_redirect_t follow_redirects", "git_strarray custom_headers" ], "type": "struct", "value": "git_fetch_options", "file": "git2/remote.h", - "line": 629, - "lineto": 666, - "block": "int version\ngit_remote_callbacks callbacks\ngit_fetch_prune_t prune\nint update_fetchhead\ngit_remote_autotag_option_t download_tags\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", + "line": 776, + "lineto": 828, + "block": "int version\ngit_remote_callbacks callbacks\ngit_fetch_prune_t prune\nunsigned int update_fetchhead\ngit_remote_autotag_option_t download_tags\ngit_proxy_options proxy_opts\nint depth\ngit_remote_redirect_t follow_redirects\ngit_strarray custom_headers", "tdef": "typedef", "description": " Fetch options structure.", - "comments": "Zero out for defaults. Initialize with GIT_FETCH_OPTIONS_INIT macro to\n correctly set the version field. E.g.
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;\n\n",
+ "comments": "Zero out for defaults. Initialize with GIT_FETCH_OPTIONS_INIT macro to correctly set the version field. E.g.
git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;\n\n",
"fields": [
- {
- "type": "int",
- "name": "version",
- "comments": ""
- },
+ { "type": "int", "name": "version", "comments": "" },
{
"type": "git_remote_callbacks",
"name": "callbacks",
@@ -34163,9 +29838,9 @@
"comments": " Whether to perform a prune after the fetch"
},
{
- "type": "int",
+ "type": "unsigned int",
"name": "update_fetchhead",
- "comments": " Whether to write the results to FETCH_HEAD. Defaults to\n on. Leave this default in order to behave like git."
+ "comments": " How to handle reference updates; see `git_remote_update_flags`."
},
{
"type": "git_remote_autotag_option_t",
@@ -34177,6 +29852,16 @@
"name": "proxy_opts",
"comments": " Proxy options to use, by default no proxy is used."
},
+ {
+ "type": "int",
+ "name": "depth",
+ "comments": " Depth of the fetch to perform, or `GIT_FETCH_DEPTH_FULL`\n (or `0`) for full history, or `GIT_FETCH_DEPTH_UNSHALLOW`\n to \"unshallow\" a shallow repository.\n\n The default is full (`GIT_FETCH_DEPTH_FULL` or `0`)."
+ },
+ {
+ "type": "git_remote_redirect_t",
+ "name": "follow_redirects",
+ "comments": " Whether to allow off-site redirects. If this is not\n specified, the `http.followRedirects` configuration setting\n will be consulted."
+ },
{
"type": "git_strarray",
"name": "custom_headers",
@@ -34186,7 +29871,7 @@
"used": {
"returns": [],
"needs": [
- "git_fetch_init_options",
+ "git_fetch_options_init",
"git_remote_download",
"git_remote_fetch"
]
@@ -34203,11 +29888,11 @@
],
"type": "enum",
"file": "git2/remote.h",
- "line": 581,
- "lineto": 594,
+ "line": 719,
+ "lineto": 732,
"block": "GIT_FETCH_PRUNE_UNSPECIFIED\nGIT_FETCH_PRUNE\nGIT_FETCH_NO_PRUNE",
"tdef": "typedef",
- "description": "",
+ "description": " Acceptable prune settings when fetching ",
"comments": "",
"fields": [
{
@@ -34229,10 +29914,7 @@
"value": 2
}
],
- "used": {
- "returns": [],
- "needs": []
- }
+ "used": { "returns": [], "needs": [] }
}
],
[
@@ -34248,8 +29930,8 @@
],
"type": "enum",
"file": "git2/types.h",
- "line": 210,
- "lineto": 217,
+ "line": 238,
+ "lineto": 245,
"block": "GIT_FILEMODE_UNREADABLE\nGIT_FILEMODE_TREE\nGIT_FILEMODE_BLOB\nGIT_FILEMODE_BLOB_EXECUTABLE\nGIT_FILEMODE_LINK\nGIT_FILEMODE_COMMIT",
"tdef": "typedef",
"description": " Valid modes for index and tree entries. ",
@@ -34293,13 +29975,8 @@
}
],
"used": {
- "returns": [
- "git_tree_entry_filemode",
- "git_tree_entry_filemode_raw"
- ],
- "needs": [
- "git_treebuilder_insert"
- ]
+ "returns": ["git_tree_entry_filemode", "git_tree_entry_filemode_raw"],
+ "needs": ["git_treebuilder_insert"]
}
}
],
@@ -34310,83 +29987,26 @@
"type": "struct",
"value": "git_filter",
"file": "git2/filter.h",
- "line": 61,
- "lineto": 61,
+ "line": 109,
+ "lineto": 109,
"tdef": "typedef",
"description": " A filter that can transform file data",
- "comments": "This represents a filter that can be used to transform or even replace\n file data. Libgit2 includes one built in filter and it is possible to\n write your own (see git2/sys/filter.h for information on that).
\n\nThe two builtin filters are:
\n\nThis represents a filter that can be used to transform or even replace file data. Libgit2 includes one built in filter and it is possible to write your own (see git2/sys/filter.h for information on that).
\n\nThe two builtin filters are:
\n\nDon't error for safecrlf violations, allow them to continue.
Don't load /etc/gitattributes (or the system equivalent)
Load attributes from .gitattributes in the root of HEAD
Load attributes from .gitattributes in a given commit.\n This can only be specified in a git_filter_options.
This represents a list of filters to be applied to a file / blob. You\n can build the list with one call, apply it with another, and dispose it\n with a third. In typical usage, there are not many occasions where a\n git_filter_list is needed directly since the library will generally\n handle conversions for you, but it can be convenient to be able to\n build and apply the list sometimes.
\n", - "fields": [], + "comments": "This represents a list of filters to be applied to a file / blob. You can build the list with one call, apply it with another, and dispose it with a third. In typical usage, there are not many occasions where a git_filter_list is needed directly since the library will generally handle conversions for you, but it can be convenient to be able to build and apply the list sometimes.
\n", "used": { "returns": [], "needs": [ "git_filter_list_apply_to_blob", + "git_filter_list_apply_to_buffer", "git_filter_list_apply_to_data", "git_filter_list_apply_to_file", "git_filter_list_contains", "git_filter_list_free", - "git_filter_list_length", "git_filter_list_load", - "git_filter_list_new", - "git_filter_list_push", + "git_filter_list_load_ext", "git_filter_list_stream_blob", + "git_filter_list_stream_buffer", "git_filter_list_stream_data", "git_filter_list_stream_file" ] @@ -34469,8 +30106,8 @@ ], "type": "enum", "file": "git2/filter.h", - "line": 31, - "lineto": 36, + "line": 37, + "lineto": 42, "block": "GIT_FILTER_TO_WORKTREE\nGIT_FILTER_SMUDGE\nGIT_FILTER_TO_ODB\nGIT_FILTER_CLEAN", "tdef": "typedef", "description": " Filters are applied in one of two directions: smudging - which is\n exporting a file from the Git object database to the working directory,\n and cleaning - which is importing a file from the working directory to\n the Git object database. These values control which direction of\n change is being applied.", @@ -34502,65 +30139,59 @@ } ], "used": { - "returns": [ - "git_filter_source_mode" - ], - "needs": [ - "git_filter_list_load", - "git_filter_list_new" - ] + "returns": [], + "needs": ["git_filter_list_load", "git_filter_list_load_ext"] } } ], [ - "git_filter_source", + "git_filter_options", { - "decl": "git_filter_source", + "decl": [ + "unsigned int version", + "uint32_t flags", + "git_oid * commit_id", + "git_oid attr_commit_id" + ], "type": "struct", - "value": "git_filter_source", - "file": "git2/sys/filter.h", - "line": 95, - "lineto": 95, + "value": "git_filter_options", + "file": "git2/filter.h", + "line": 69, + "lineto": 86, + "block": "unsigned int version\nuint32_t flags\ngit_oid * commit_id\ngit_oid attr_commit_id", "tdef": "typedef", - "description": " A filter source represents a file/blob to be processed", + "description": " Filtering options", "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [ - "git_filter_apply_fn", - "git_filter_check_fn", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_path", - "git_filter_source_repo", - "git_filter_stream_fn" - ] - } + "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, + { + "type": "uint32_t", + "name": "flags", + "comments": " See `git_filter_flag_t` above " + }, + { "type": "git_oid *", "name": "commit_id", "comments": "" }, + { + "type": "git_oid", + "name": "attr_commit_id", + "comments": " The commit to load attributes from, when\n `GIT_FILTER_ATTRIBUTES_FROM_COMMIT` is specified." + } + ], + "used": { "returns": [], "needs": ["git_filter_list_load_ext"] } } ], [ - "git_hashsig", + "git_filter_source", { - "decl": "git_hashsig", + "decl": "git_filter_source", "type": "struct", - "value": "git_hashsig", - "file": "git2/sys/hashsig.h", - "line": 17, - "lineto": 17, + "value": "git_filter_source", + "file": "git2/sys/filter.h", + "line": 109, + "lineto": 109, "tdef": "typedef", - "description": " Similarity signature of arbitrary text content based on line hashes", + "description": " A filter source represents a file/blob to be processed", "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [ - "git_hashsig_compare", - "git_hashsig_create", - "git_hashsig_create_fromfile", - "git_hashsig_free" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34574,12 +30205,12 @@ ], "type": "enum", "file": "git2/sys/hashsig.h", - "line": 25, - "lineto": 45, + "line": 35, + "lineto": 55, "block": "GIT_HASHSIG_NORMAL\nGIT_HASHSIG_IGNORE_WHITESPACE\nGIT_HASHSIG_SMART_WHITESPACE\nGIT_HASHSIG_ALLOW_SMALL_FILES", "tdef": "typedef", "description": " Options for hashsig computation", - "comments": "The options GIT_HASHSIG_NORMAL, GIT_HASHSIG_IGNORE_WHITESPACE,\n GIT_HASHSIG_SMART_WHITESPACE are exclusive and should not be combined.
\n", + "comments": "The options GIT_HASHSIG_NORMAL, GIT_HASHSIG_IGNORE_WHITESPACE, GIT_HASHSIG_SMART_WHITESPACE are exclusive and should not be combined.
\n", "fields": [ { "type": "int", @@ -34606,13 +30237,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [ - "git_hashsig_create", - "git_hashsig_create_fromfile" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34622,22 +30247,16 @@ "type": "struct", "value": "git_index", "file": "git2/types.h", - "line": 136, - "lineto": 136, + "line": 153, + "lineto": 153, "tdef": "typedef", "description": " Memory representation of an index file. ", "comments": "", - "fields": [], "used": { "returns": [ "git_index_get_byindex", "git_index_get_bypath", - "git_index_name_get_byindex", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_ours", - "git_merge_driver_source_theirs" + "git_remote_stats" ], "needs": [ "git_apply_to_tree", @@ -34649,7 +30268,7 @@ "git_index_add", "git_index_add_all", "git_index_add_bypath", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_caps", "git_index_checksum", "git_index_clear", @@ -34672,10 +30291,6 @@ "git_index_iterator_free", "git_index_iterator_new", "git_index_iterator_next", - "git_index_name_add", - "git_index_name_clear", - "git_index_name_entrycount", - "git_index_name_get_byindex", "git_index_new", "git_index_open", "git_index_owner", @@ -34686,13 +30301,6 @@ "git_index_remove_all", "git_index_remove_bypath", "git_index_remove_directory", - "git_index_reuc_add", - "git_index_reuc_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_index_reuc_remove", "git_index_set_caps", "git_index_set_version", "git_index_update_all", @@ -34704,15 +30312,18 @@ "git_indexer_commit", "git_indexer_free", "git_indexer_hash", - "git_indexer_init_options", + "git_indexer_name", "git_indexer_new", + "git_indexer_options_init", + "git_indexer_progress_cb", "git_merge_commits", "git_merge_file_from_index", "git_merge_trees", + "git_odb_write_pack", + "git_packbuilder_write", "git_pathspec_match_index", "git_rebase_inmemory_index", "git_repository_index", - "git_repository_set_index", "git_revert_commit" ] } @@ -34729,8 +30340,8 @@ ], "type": "enum", "file": "git2/index.h", - "line": 139, - "lineto": 144, + "line": 162, + "lineto": 167, "block": "GIT_INDEX_ADD_DEFAULT\nGIT_INDEX_ADD_FORCE\nGIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\nGIT_INDEX_ADD_CHECK_PATHSPEC", "tdef": "typedef", "description": " Flags for APIs that add files matching pathspec ", @@ -34761,10 +30372,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34778,8 +30386,8 @@ ], "type": "enum", "file": "git2/index.h", - "line": 126, - "lineto": 131, + "line": 142, + "lineto": 147, "block": "GIT_INDEX_CAPABILITY_IGNORE_CASE\nGIT_INDEX_CAPABILITY_NO_FILEMODE\nGIT_INDEX_CAPABILITY_NO_SYMLINKS\nGIT_INDEX_CAPABILITY_FROM_OWNER", "tdef": "typedef", "description": " Capabilities of system that affect index actions. ", @@ -34810,10 +30418,7 @@ "value": -1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34823,12 +30428,11 @@ "type": "struct", "value": "git_index_conflict_iterator", "file": "git2/types.h", - "line": 142, - "lineto": 142, + "line": 159, + "lineto": 159, "tdef": "typedef", "description": " An iterator for conflicts in the index. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -34845,99 +30449,45 @@ "decl": [ "git_index_time ctime", "git_index_time mtime", - "int dev", - "int ino", - "int mode", - "int uid", - "int gid", - "int file_size", + "uint32_t dev", + "uint32_t ino", + "uint32_t mode", + "uint32_t uid", + "uint32_t gid", + "uint32_t file_size", "git_oid id", - "int flags", - "int flags_extended", + "uint16_t flags", + "uint16_t flags_extended", "const char * path" ], "type": "struct", "value": "git_index_entry", "file": "git2/index.h", - "line": 53, - "lineto": 70, - "block": "git_index_time ctime\ngit_index_time mtime\nint dev\nint ino\nint mode\nint uid\nint gid\nint file_size\ngit_oid id\nint flags\nint flags_extended\nconst char * path", + "line": 58, + "lineto": 75, + "block": "git_index_time ctime\ngit_index_time mtime\nuint32_t dev\nuint32_t ino\nuint32_t mode\nuint32_t uid\nuint32_t gid\nuint32_t file_size\ngit_oid id\nuint16_t flags\nuint16_t flags_extended\nconst char * path", "tdef": "typedef", - "description": "", - "comments": "", + "description": " In-memory representation of a file entry in the index.", + "comments": "This is a public structure that represents a file entry in the index. The meaning of the fields corresponds to core Git's documentation (in "Documentation/technical/index-format.txt").
\n\nThe flags field consists of a number of bit fields which can be accessed via the first set of GIT_INDEX_ENTRY_... bitmasks below. These flags are all read from and persisted to disk.
The flags_extended field also has a number of bit fields which can be accessed via the later GIT_INDEX_ENTRY_... bitmasks below. Some of these flags are read from and written to disk, but some are set aside for in-memory only reference.
Note that the time and size fields are truncated to 32 bits. This is enough to detect changes, which is enough for the index to function as a cache, but it should not be taken as an authoritative source for that data.
\n", "fields": [ - { - "type": "git_index_time", - "name": "ctime", - "comments": "" - }, - { - "type": "git_index_time", - "name": "mtime", - "comments": "" - }, - { - "type": "int", - "name": "dev", - "comments": "" - }, - { - "type": "int", - "name": "ino", - "comments": "" - }, - { - "type": "int", - "name": "mode", - "comments": "" - }, - { - "type": "int", - "name": "uid", - "comments": "" - }, - { - "type": "int", - "name": "gid", - "comments": "" - }, - { - "type": "int", - "name": "file_size", - "comments": "" - }, - { - "type": "git_oid", - "name": "id", - "comments": "" - }, - { - "type": "int", - "name": "flags", - "comments": "" - }, - { - "type": "int", - "name": "flags_extended", - "comments": "" - }, - { - "type": "const char *", - "name": "path", - "comments": "" - } + { "type": "git_index_time", "name": "ctime", "comments": "" }, + { "type": "git_index_time", "name": "mtime", "comments": "" }, + { "type": "uint32_t", "name": "dev", "comments": "" }, + { "type": "uint32_t", "name": "ino", "comments": "" }, + { "type": "uint32_t", "name": "mode", "comments": "" }, + { "type": "uint32_t", "name": "uid", "comments": "" }, + { "type": "uint32_t", "name": "gid", "comments": "" }, + { "type": "uint32_t", "name": "file_size", "comments": "" }, + { "type": "git_oid", "name": "id", "comments": "" }, + { "type": "uint16_t", "name": "flags", "comments": "" }, + { "type": "uint16_t", "name": "flags_extended", "comments": "" }, + { "type": "const char *", "name": "path", "comments": "" } ], "used": { - "returns": [ - "git_index_get_byindex", - "git_index_get_bypath", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_ours", - "git_merge_driver_source_theirs" - ], + "returns": ["git_index_get_byindex", "git_index_get_bypath"], "needs": [ "git_index_add", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_conflict_add", "git_index_conflict_get", "git_index_conflict_next", @@ -34960,12 +30510,12 @@ ], "type": "enum", "file": "git2/index.h", - "line": 116, - "lineto": 123, + "line": 132, + "lineto": 139, "block": "GIT_INDEX_ENTRY_INTENT_TO_ADD\nGIT_INDEX_ENTRY_SKIP_WORKTREE\nGIT_INDEX_ENTRY_EXTENDED_FLAGS\nGIT_INDEX_ENTRY_UPTODATE", "tdef": "typedef", "description": " Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`", - "comments": "In memory, the flags_extended fields are divided into two parts: the\n fields that are read from and written to disk, and other fields that\n in-memory only and used by libgit2. Only the flags in\n GIT_INDEX_ENTRY_EXTENDED_FLAGS will get saved on-disk.
Thee first three bitmasks match the three fields in the\n git_index_entry flags_extended value that belong on disk. You\n can use them to interpret the data in the flags_extended.
The rest of the bitmasks match the other fields in the git_index_entry\n flags_extended value that are only used in-memory by libgit2.\n You can use them to interpret the data in the flags_extended.
In memory, the flags_extended fields are divided into two parts: the fields that are read from and written to disk, and other fields that in-memory only and used by libgit2. Only the flags in GIT_INDEX_ENTRY_EXTENDED_FLAGS will get saved on-disk.
Thee first three bitmasks match the three fields in the git_index_entry flags_extended value that belong on disk. You can use them to interpret the data in the flags_extended.
The rest of the bitmasks match the other fields in the git_index_entry flags_extended value that are only used in-memory by libgit2. You can use them to interpret the data in the flags_extended.
These are used to select which global option to set or get and are\n used in git_libgit2_opts().
These are used to select which global option to set or get and are used in git_libgit2_opts().
@\n{
\n", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": " The `version` should be set to `GIT_MERGE_DRIVER_VERSION`. " - }, - { - "type": "git_merge_driver_init_fn", - "name": "initialize", - "comments": " Called when the merge driver is first used for any file. " - }, - { - "type": "git_merge_driver_shutdown_fn", - "name": "shutdown", - "comments": " Called when the merge driver is unregistered from the system. " - }, - { - "type": "git_merge_driver_apply_fn", - "name": "apply", - "comments": " Called to merge the contents of a conflict. If this function\n returns `GIT_PASSTHROUGH` then the default (`text`) merge driver\n will instead be invoked. If this function returns\n `GIT_EMERGECONFLICT` then the file will remain conflicted." - } - ], - "used": { - "returns": [ - "git_merge_driver_lookup" - ], - "needs": [ - "git_merge_driver_apply_fn", - "git_merge_driver_init_fn", - "git_merge_driver_register", - "git_merge_driver_shutdown_fn", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_file_options", - "git_merge_driver_source_ours", - "git_merge_driver_source_repo", - "git_merge_driver_source_theirs" - ] + "needs": ["git_merge_analysis", "git_merge_analysis_for_ref"] } } ], @@ -35682,23 +31241,12 @@ "type": "struct", "value": "git_merge_driver_source", "file": "git2/sys/merge.h", - "line": 41, - "lineto": 41, + "line": 49, + "lineto": 49, "tdef": "typedef", "description": " A merge driver source represents the file to be merged", "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [ - "git_merge_driver_apply_fn", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_file_options", - "git_merge_driver_source_ours", - "git_merge_driver_source_repo", - "git_merge_driver_source_theirs" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -35712,8 +31260,8 @@ ], "type": "enum", "file": "git2/merge.h", - "line": 101, - "lineto": 131, + "line": 115, + "lineto": 145, "block": "GIT_MERGE_FILE_FAVOR_NORMAL\nGIT_MERGE_FILE_FAVOR_OURS\nGIT_MERGE_FILE_FAVOR_THEIRS\nGIT_MERGE_FILE_FAVOR_UNION", "tdef": "typedef", "description": " Merge file favor options for `git_merge_options` instruct the file-level\n merging functionality how to deal with conflicting regions of the files.", @@ -35744,10 +31292,7 @@ "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -35762,13 +31307,15 @@ "GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE", "GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL", "GIT_MERGE_FILE_DIFF_PATIENCE", - "GIT_MERGE_FILE_DIFF_MINIMAL" + "GIT_MERGE_FILE_DIFF_MINIMAL", + "GIT_MERGE_FILE_STYLE_ZDIFF3", + "GIT_MERGE_FILE_ACCEPT_CONFLICTS" ], "type": "enum", "file": "git2/merge.h", - "line": 136, - "lineto": 163, - "block": "GIT_MERGE_FILE_DEFAULT\nGIT_MERGE_FILE_STYLE_MERGE\nGIT_MERGE_FILE_STYLE_DIFF3\nGIT_MERGE_FILE_SIMPLIFY_ALNUM\nGIT_MERGE_FILE_IGNORE_WHITESPACE\nGIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE\nGIT_MERGE_FILE_IGNORE_WHITESPACE_EOL\nGIT_MERGE_FILE_DIFF_PATIENCE\nGIT_MERGE_FILE_DIFF_MINIMAL", + "line": 150, + "lineto": 187, + "block": "GIT_MERGE_FILE_DEFAULT\nGIT_MERGE_FILE_STYLE_MERGE\nGIT_MERGE_FILE_STYLE_DIFF3\nGIT_MERGE_FILE_SIMPLIFY_ALNUM\nGIT_MERGE_FILE_IGNORE_WHITESPACE\nGIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE\nGIT_MERGE_FILE_IGNORE_WHITESPACE_EOL\nGIT_MERGE_FILE_DIFF_PATIENCE\nGIT_MERGE_FILE_DIFF_MINIMAL\nGIT_MERGE_FILE_STYLE_ZDIFF3\nGIT_MERGE_FILE_ACCEPT_CONFLICTS", "tdef": "typedef", "description": " File merging flags", "comments": "", @@ -35826,12 +31373,21 @@ "name": "GIT_MERGE_FILE_DIFF_MINIMAL", "comments": "Take extra time to find minimal diff
\n", "value": 128 + }, + { + "type": "int", + "name": "GIT_MERGE_FILE_STYLE_ZDIFF3", + "comments": "Create zdiff3 ("zealous diff3")-style files
\n", + "value": 256 + }, + { + "type": "int", + "name": "GIT_MERGE_FILE_ACCEPT_CONFLICTS", + "comments": "Do not produce file conflicts when common regions have\n changed; keep the conflict markers in the file and accept\n that as the merge result.
\n", + "value": 512 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -35847,18 +31403,14 @@ "type": "struct", "value": "git_merge_file_input", "file": "git2/merge.h", - "line": 32, - "lineto": 46, + "line": 35, + "lineto": 49, "block": "unsigned int version\nconst char * ptr\nsize_t size\nconst char * path\nunsigned int mode", "tdef": "typedef", "description": " The file inputs to `git_merge_file`. Callers should populate the\n `git_merge_file_input` structure with descriptions of the files in\n each side of the conflict for use in producing the merge file.", "comments": "", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "const char *", "name": "ptr", @@ -35882,10 +31434,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_file", - "git_merge_file_init_input" - ] + "needs": ["git_merge_file", "git_merge_file_input_init"] } } ], @@ -35898,24 +31447,20 @@ "const char * our_label", "const char * their_label", "git_merge_file_favor_t favor", - "git_merge_file_flag_t flags", + "uint32_t flags", "unsigned short marker_size" ], "type": "struct", "value": "git_merge_file_options", "file": "git2/merge.h", - "line": 170, - "lineto": 200, - "block": "unsigned int version\nconst char * ancestor_label\nconst char * our_label\nconst char * their_label\ngit_merge_file_favor_t favor\ngit_merge_file_flag_t flags\nunsigned short marker_size", + "line": 195, + "lineto": 225, + "block": "unsigned int version\nconst char * ancestor_label\nconst char * our_label\nconst char * their_label\ngit_merge_file_favor_t favor\nuint32_t flags\nunsigned short marker_size", "tdef": "typedef", "description": " Options for merging a file", "comments": "", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "const char *", "name": "ancestor_label", @@ -35937,7 +31482,7 @@ "comments": " The file to favor in region conflicts. " }, { - "type": "git_merge_file_flag_t", + "type": "uint32_t", "name": "flags", "comments": " see `git_merge_file_flag_t` above " }, @@ -35948,13 +31493,11 @@ } ], "used": { - "returns": [ - "git_merge_driver_source_file_options" - ], + "returns": [], "needs": [ "git_merge_file", "git_merge_file_from_index", - "git_merge_file_init_options" + "git_merge_file_options_init" ] } } @@ -35972,8 +31515,8 @@ "type": "struct", "value": "git_merge_file_result", "file": "git2/merge.h", - "line": 222, - "lineto": 243, + "line": 248, + "lineto": 269, "block": "unsigned int automergeable\nconst char * path\nunsigned int mode\nconst char * ptr\nsize_t len", "tdef": "typedef", "description": " Information about file-level merging", @@ -36022,13 +31565,14 @@ "GIT_MERGE_FIND_RENAMES", "GIT_MERGE_FAIL_ON_CONFLICT", "GIT_MERGE_SKIP_REUC", - "GIT_MERGE_NO_RECURSIVE" + "GIT_MERGE_NO_RECURSIVE", + "GIT_MERGE_VIRTUAL_BASE" ], "type": "enum", "file": "git2/merge.h", - "line": 68, - "lineto": 95, - "block": "GIT_MERGE_FIND_RENAMES\nGIT_MERGE_FAIL_ON_CONFLICT\nGIT_MERGE_SKIP_REUC\nGIT_MERGE_NO_RECURSIVE", + "line": 74, + "lineto": 109, + "block": "GIT_MERGE_FIND_RENAMES\nGIT_MERGE_FAIL_ON_CONFLICT\nGIT_MERGE_SKIP_REUC\nGIT_MERGE_NO_RECURSIVE\nGIT_MERGE_VIRTUAL_BASE", "tdef": "typedef", "description": " Flags for `git_merge` options. A combination of these flags can be\n passed in via the `flags` value in the `git_merge_options`.", "comments": "", @@ -36056,12 +31600,15 @@ "name": "GIT_MERGE_NO_RECURSIVE", "comments": "If the commits being merged have multiple merge bases, do not build\n a recursive merge base (by merging the multiple merge bases),\n instead simply use the first base. This flag provides a similar\n merge base to git-merge-resolve.
Treat this merge as if it is to produce the virtual base\n of a recursive merge. This will ensure that there are\n no conflicts, any conflicting regions will keep conflict\n markers in the merge result.
\n", + "value": 16 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -36069,32 +31616,28 @@ { "decl": [ "unsigned int version", - "git_merge_flag_t flags", + "uint32_t flags", "unsigned int rename_threshold", "unsigned int target_limit", "git_diff_similarity_metric * metric", "unsigned int recursion_limit", "const char * default_driver", "git_merge_file_favor_t file_favor", - "git_merge_file_flag_t file_flags" + "uint32_t file_flags" ], "type": "struct", "value": "git_merge_options", "file": "git2/merge.h", - "line": 248, - "lineto": 297, - "block": "unsigned int version\ngit_merge_flag_t flags\nunsigned int rename_threshold\nunsigned int target_limit\ngit_diff_similarity_metric * metric\nunsigned int recursion_limit\nconst char * default_driver\ngit_merge_file_favor_t file_favor\ngit_merge_file_flag_t file_flags", + "line": 274, + "lineto": 323, + "block": "unsigned int version\nuint32_t flags\nunsigned int rename_threshold\nunsigned int target_limit\ngit_diff_similarity_metric * metric\nunsigned int recursion_limit\nconst char * default_driver\ngit_merge_file_favor_t file_favor\nuint32_t file_flags", "tdef": "typedef", "description": " Merging options", "comments": "", "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "git_merge_flag_t", + "type": "uint32_t", "name": "flags", "comments": " See `git_merge_flag_t` above " }, @@ -36129,7 +31672,7 @@ "comments": " Flags for handling conflicting content, to be used with the standard\n (`text`) merge driver." }, { - "type": "git_merge_file_flag_t", + "type": "uint32_t", "name": "file_flags", "comments": " see `git_merge_file_flag_t` above " } @@ -36140,7 +31683,7 @@ "git_cherrypick_commit", "git_merge", "git_merge_commits", - "git_merge_init_options", + "git_merge_options_init", "git_merge_trees", "git_revert_commit" ] @@ -36157,8 +31700,8 @@ ], "type": "enum", "file": "git2/merge.h", - "line": 354, - "lineto": 372, + "line": 381, + "lineto": 399, "block": "GIT_MERGE_PREFERENCE_NONE\nGIT_MERGE_PREFERENCE_NO_FASTFORWARD\nGIT_MERGE_PREFERENCE_FASTFORWARD_ONLY", "tdef": "typedef", "description": " The user's stated preference for merges.", @@ -36185,20 +31728,14 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_analysis", - "git_merge_analysis_for_ref" - ] + "needs": ["git_merge_analysis", "git_merge_analysis_for_ref"] } } ], [ "git_message_trailer", { - "decl": [ - "const char * key", - "const char * value" - ], + "decl": ["const char * key", "const char * value"], "type": "struct", "value": "git_message_trailer", "file": "git2/message.h", @@ -36209,23 +31746,12 @@ "description": " Represents a single git message trailer.", "comments": "", "fields": [ - { - "type": "const char *", - "name": "key", - "comments": "" - }, - { - "type": "const char *", - "name": "value", - "comments": "" - } + { "type": "const char *", "name": "key", "comments": "" }, + { "type": "const char *", "name": "value", "comments": "" } ], "used": { "returns": [], - "needs": [ - "git_message_trailer_array_free", - "git_message_trailers" - ] + "needs": ["git_message_trailer_array_free", "git_message_trailers"] } } ], @@ -36245,33 +31771,37 @@ "block": "git_message_trailer * trailers\nsize_t count\nchar * _trailer_block", "tdef": "typedef", "description": " Represents an array of git message trailers.", - "comments": "Struct members under the private comment are private, subject to change\n and should not be used by callers.
\n", + "comments": "Struct members under the private comment are private, subject to change and should not be used by callers.
\n", "fields": [ { "type": "git_message_trailer *", "name": "trailers", "comments": "" }, - { - "type": "size_t", - "name": "count", - "comments": "" - }, - { - "type": "char *", - "name": "_trailer_block", - "comments": "" - } + { "type": "size_t", "name": "count", "comments": "" }, + { "type": "char *", "name": "_trailer_block", "comments": "" } ], "used": { "returns": [], - "needs": [ - "git_message_trailer_array_free", - "git_message_trailers" - ] + "needs": ["git_message_trailer_array_free", "git_message_trailers"] } } ], + [ + "git_midx_writer", + { + "decl": "git_midx_writer", + "type": "struct", + "value": "git_midx_writer", + "file": "git2/types.h", + "line": 105, + "lineto": 105, + "tdef": "typedef", + "description": " a writer for multi-pack-index files. ", + "comments": "", + "used": { "returns": [], "needs": [] } + } + ], [ "git_note", { @@ -36279,28 +31809,14 @@ "type": "struct", "value": "git_note", "file": "git2/types.h", - "line": 157, - "lineto": 157, + "line": 174, + "lineto": 174, "tdef": "typedef", "description": " Representation of a git note ", "comments": "", - "fields": [], "used": { "returns": [], - "needs": [ - "git_note_author", - "git_note_commit_iterator_new", - "git_note_commit_read", - "git_note_committer", - "git_note_foreach", - "git_note_free", - "git_note_id", - "git_note_iterator_free", - "git_note_iterator_new", - "git_note_message", - "git_note_next", - "git_note_read" - ] + "needs": ["git_note_iterator_free", "git_note_next"] } } ], @@ -36311,19 +31827,14 @@ "type": "struct", "value": "git_note_iterator", "file": "git2/notes.h", - "line": 35, - "lineto": 35, + "line": 37, + "lineto": 37, "tdef": "typedef", "description": " note iterator", "comments": "", "used": { "returns": [], - "needs": [ - "git_note_commit_iterator_new", - "git_note_iterator_free", - "git_note_iterator_new", - "git_note_next" - ] + "needs": ["git_note_iterator_free", "git_note_next"] } } ], @@ -36334,14 +31845,14 @@ "type": "struct", "value": "git_object", "file": "git2/types.h", - "line": 112, - "lineto": 112, + "line": 129, + "lineto": 129, "tdef": "typedef", "description": " Representation of a generic object in a repository ", "comments": "", - "fields": [], "used": { "returns": [ + "git_blob_rawsize", "git_object_string2type", "git_object_type", "git_odb_object_type", @@ -36360,6 +31871,7 @@ "git_object_lookup_prefix", "git_object_owner", "git_object_peel", + "git_object_rawcontent_is_valid", "git_object_short_id", "git_object_type", "git_object_type2string", @@ -36401,8 +31913,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 70, - "lineto": 79, + "line": 73, + "lineto": 82, "block": "GIT_OBJECT_ANY\nGIT_OBJECT_INVALID\nGIT_OBJECT_COMMIT\nGIT_OBJECT_TREE\nGIT_OBJECT_BLOB\nGIT_OBJECT_TAG\nGIT_OBJECT_OFS_DELTA\nGIT_OBJECT_REF_DELTA", "tdef": "typedef", "description": " Basic type (loose or packed) of any Git object. ", @@ -36471,6 +31983,7 @@ "git_object_lookup_bypath", "git_object_lookup_prefix", "git_object_peel", + "git_object_rawcontent_is_valid", "git_object_type2string", "git_object_typeisloose", "git_odb_hash", @@ -36492,33 +32005,28 @@ "type": "struct", "value": "git_odb", "file": "git2/types.h", - "line": 82, - "lineto": 82, + "line": 88, + "lineto": 88, "tdef": "typedef", - "description": " An open object database handle. ", + "description": " An object database stores the objects (commit, trees, blobs, tags,\n etc) for a repository.", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ "git_indexer_new", - "git_mempack_dump", - "git_mempack_new", - "git_mempack_reset", "git_odb_add_alternate", "git_odb_add_backend", "git_odb_add_disk_alternate", "git_odb_backend_loose", - "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", "git_odb_exists", + "git_odb_exists_ext", "git_odb_exists_prefix", "git_odb_expand_ids", "git_odb_foreach", "git_odb_free", "git_odb_get_backend", - "git_odb_init_backend", "git_odb_new", "git_odb_num_backends", "git_odb_object_data", @@ -36534,14 +32042,15 @@ "git_odb_read_header", "git_odb_read_prefix", "git_odb_refresh", + "git_odb_set_commit_graph", "git_odb_stream_finalize_write", "git_odb_stream_free", "git_odb_stream_read", "git_odb_stream_write", "git_odb_write", + "git_odb_write_multi_pack_index", "git_odb_write_pack", "git_repository_odb", - "git_repository_set_odb", "git_repository_wrap_odb" ] } @@ -36554,120 +32063,116 @@ "type": "struct", "value": "git_odb_backend", "file": "git2/types.h", - "line": 85, - "lineto": 85, - "block": "unsigned int version\ngit_odb * odb\nint (*)(void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *) read\nint (*)(git_oid *, void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *, size_t) read_prefix\nint (*)(size_t *, git_object_t *, git_odb_backend *, const git_oid *) read_header\nint (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_object_t) write\nint (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_object_t) writestream\nint (*)(git_odb_stream **, size_t *, git_object_t *, git_odb_backend *, const git_oid *) readstream\nint (*)(git_odb_backend *, const git_oid *) exists\nint (*)(git_oid *, git_odb_backend *, const git_oid *, size_t) exists_prefix\nint (*)(git_odb_backend *) refresh\nint (*)(git_odb_backend *, git_odb_foreach_cb, void *) foreach\nint (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *) writepack\nint (*)(git_odb_backend *, const git_oid *) freshen\nvoid (*)(git_odb_backend *) free", + "line": 91, + "lineto": 91, "tdef": "typedef", "description": " A custom backend in an ODB ", "comments": "", + "used": { + "returns": [], + "needs": [ + "git_odb_add_alternate", + "git_odb_add_backend", + "git_odb_backend_loose", + "git_odb_backend_one_pack", + "git_odb_backend_pack", + "git_odb_get_backend" + ] + } + } + ], + [ + "git_odb_backend_loose_options", + { + "decl": [ + "unsigned int version", + "uint32_t flags", + "int compression_level", + "unsigned int dir_mode", + "unsigned int file_mode", + "git_oid_t oid_type" + ], + "type": "struct", + "value": "git_odb_backend_loose_options", + "file": "git2/odb_backend.h", + "line": 49, + "lineto": 75, + "block": "unsigned int version\nuint32_t flags\nint compression_level\nunsigned int dir_mode\nunsigned int file_mode\ngit_oid_t oid_type", + "tdef": "typedef", + "description": " Options for configuring a loose object backend. ", + "comments": "", "fields": [ { "type": "unsigned int", "name": "version", - "comments": "" - }, - { - "type": "git_odb *", - "name": "odb", - "comments": "" - }, - { - "type": "int (*)(void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *)", - "name": "read", - "comments": "" - }, - { - "type": "int (*)(git_oid *, void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *, size_t)", - "name": "read_prefix", - "comments": "" - }, - { - "type": "int (*)(size_t *, git_object_t *, git_odb_backend *, const git_oid *)", - "name": "read_header", - "comments": "" - }, - { - "type": "int (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_object_t)", - "name": "write", - "comments": "" - }, - { - "type": "int (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_object_t)", - "name": "writestream", - "comments": "" - }, - { - "type": "int (*)(git_odb_stream **, size_t *, git_object_t *, git_odb_backend *, const git_oid *)", - "name": "readstream", - "comments": "" + "comments": " version for the struct " }, { - "type": "int (*)(git_odb_backend *, const git_oid *)", - "name": "exists", - "comments": "" + "type": "uint32_t", + "name": "flags", + "comments": " A combination of the `git_odb_backend_loose_flag_t` types. " }, { - "type": "int (*)(git_oid *, git_odb_backend *, const git_oid *, size_t)", - "name": "exists_prefix", - "comments": "" + "type": "int", + "name": "compression_level", + "comments": " zlib compression level to use (0-9), where 1 is the fastest\n at the expense of larger files, and 9 produces the best\n compression at the expense of speed. 0 indicates that no\n compression should be performed. -1 is the default (currently\n optimizing for speed)." }, { - "type": "int (*)(git_odb_backend *)", - "name": "refresh", - "comments": "" + "type": "unsigned int", + "name": "dir_mode", + "comments": " Permissions to use creating a directory or 0 for defaults " }, { - "type": "int (*)(git_odb_backend *, git_odb_foreach_cb, void *)", - "name": "foreach", - "comments": "" + "type": "unsigned int", + "name": "file_mode", + "comments": " Permissions to use creating a file or 0 for defaults " }, { - "type": "int (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *)", - "name": "writepack", - "comments": "" - }, + "type": "git_oid_t", + "name": "oid_type", + "comments": " Type of object IDs to use for this object database, or\n 0 for default (currently SHA1)." + } + ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_odb_backend_pack_options", + { + "decl": ["unsigned int version", "git_oid_t oid_type"], + "type": "struct", + "value": "git_odb_backend_pack_options", + "file": "git2/odb_backend.h", + "line": 24, + "lineto": 32, + "block": "unsigned int version\ngit_oid_t oid_type", + "tdef": "typedef", + "description": " Options for configuring a packfile object backend. ", + "comments": "", + "fields": [ { - "type": "int (*)(git_odb_backend *, const git_oid *)", - "name": "freshen", - "comments": "" + "type": "unsigned int", + "name": "version", + "comments": " version for the struct " }, { - "type": "void (*)(git_odb_backend *)", - "name": "free", - "comments": "" + "type": "git_oid_t", + "name": "oid_type", + "comments": " Type of object IDs to use for this object database, or\n 0 for default (currently SHA1)." } ], - "used": { - "returns": [], - "needs": [ - "git_mempack_dump", - "git_mempack_new", - "git_mempack_reset", - "git_odb_add_alternate", - "git_odb_add_backend", - "git_odb_backend_loose", - "git_odb_backend_malloc", - "git_odb_backend_one_pack", - "git_odb_backend_pack", - "git_odb_get_backend", - "git_odb_init_backend" - ] - } + "used": { "returns": [], "needs": [] } } ], [ "git_odb_expand_id", { - "decl": [ - "git_oid id", - "unsigned short length", - "git_object_t type" - ], + "decl": ["git_oid id", "unsigned short length", "git_object_t type"], "type": "struct", "value": "git_odb_expand_id", "file": "git2/odb.h", - "line": 180, - "lineto": 195, + "line": 250, + "lineto": 265, "block": "git_oid id\nunsigned short length\ngit_object_t type", "tdef": "typedef", "description": " The information about object IDs to query in `git_odb_expand_ids`,\n which will be populated upon return.", @@ -36689,12 +32194,30 @@ "comments": " The (optional) type of the object to search for; leave as `0` or set\n to `GIT_OBJECT_ANY` to query for any object matching the ID." } ], - "used": { - "returns": [], - "needs": [ - "git_odb_expand_ids" - ] - } + "used": { "returns": [], "needs": ["git_odb_expand_ids"] } + } + ], + [ + "git_odb_lookup_flags_t", + { + "decl": ["GIT_ODB_LOOKUP_NO_REFRESH"], + "type": "enum", + "file": "git2/odb.h", + "line": 26, + "lineto": 34, + "block": "GIT_ODB_LOOKUP_NO_REFRESH", + "tdef": "typedef", + "description": " Flags controlling the behavior of ODB lookup operations ", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_ODB_LOOKUP_NO_REFRESH", + "comments": "Don't call git_odb_refresh if the lookup fails. Useful when doing\n a batch of lookup operations for objects that may legitimately not\n exist. When using this flag, you may wish to manually call\n git_odb_refresh before processing a batch of objects.
SHA1
\n", + "value": 1 + } ], + "used": { "returns": ["git_repository_oid_type"], "needs": [] } + } + ], + [ + "git_oidarray", + { + "decl": ["git_oid * ids", "size_t count"], "type": "struct", "value": "git_oidarray", "file": "git2/oidarray.h", - "line": 16, - "lineto": 19, + "line": 23, + "lineto": 26, "block": "git_oid * ids\nsize_t count", "tdef": "typedef", "description": " Array of object ids ", "comments": "", "fields": [ - { - "type": "git_oid *", - "name": "ids", - "comments": "" - }, - { - "type": "size_t", - "name": "count", - "comments": "" - } + { "type": "git_oid *", "name": "ids", "comments": "" }, + { "type": "size_t", "name": "count", "comments": "" } ], "used": { "returns": [], "needs": [ "git_merge_bases", "git_merge_bases_many", + "git_oidarray_dispose", "git_oidarray_free" ] } @@ -37110,12 +32629,11 @@ "type": "struct", "value": "git_packbuilder", "file": "git2/types.h", - "line": 160, - "lineto": 160, + "line": 177, + "lineto": 177, "tdef": "typedef", "description": " Representation of a git packbuilder ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -37127,6 +32645,7 @@ "git_packbuilder_insert_recur", "git_packbuilder_insert_tree", "git_packbuilder_insert_walk", + "git_packbuilder_name", "git_packbuilder_new", "git_packbuilder_object_count", "git_packbuilder_set_callbacks", @@ -37147,8 +32666,8 @@ ], "type": "enum", "file": "git2/pack.h", - "line": 51, - "lineto": 54, + "line": 52, + "lineto": 55, "block": "GIT_PACKBUILDER_ADDING_OBJECTS\nGIT_PACKBUILDER_DELTAFICATION", "tdef": "typedef", "description": " Stages that are reported by the packbuilder progress callback.", @@ -37167,10 +32686,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -37184,8 +32700,7 @@ "lineto": 29, "tdef": "typedef", "description": " The diff patch is used to store all the text diffs for a delta.", - "comments": "You can easily loop over the content of patches and get information about\n them.
\n", - "fields": [], + "comments": "You can easily loop over the content of patches and get information about them.
\n", "used": { "returns": [], "needs": [ @@ -37200,6 +32715,7 @@ "git_patch_line_stats", "git_patch_num_hunks", "git_patch_num_lines_in_hunk", + "git_patch_owner", "git_patch_print", "git_patch_size", "git_patch_to_buf" @@ -37210,15 +32726,11 @@ [ "git_path_fs", { - "decl": [ - "GIT_PATH_FS_GENERIC", - "GIT_PATH_FS_NTFS", - "GIT_PATH_FS_HFS" - ], + "decl": ["GIT_PATH_FS_GENERIC", "GIT_PATH_FS_NTFS", "GIT_PATH_FS_HFS"], "type": "enum", "file": "git2/sys/path.h", - "line": 34, - "lineto": 41, + "line": 44, + "lineto": 51, "block": "GIT_PATH_FS_GENERIC\nGIT_PATH_FS_NTFS\nGIT_PATH_FS_HFS", "tdef": "typedef", "description": " The kinds of checks to perform according to which filesystem we are trying to\n protect.", @@ -37243,56 +32755,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [ - "git_path_is_gitfile" - ] - } - } - ], - [ - "git_path_gitfile", - { - "decl": [ - "GIT_PATH_GITFILE_GITIGNORE", - "GIT_PATH_GITFILE_GITMODULES", - "GIT_PATH_GITFILE_GITATTRIBUTES" - ], - "type": "enum", - "file": "git2/sys/path.h", - "line": 21, - "lineto": 28, - "block": "GIT_PATH_GITFILE_GITIGNORE\nGIT_PATH_GITFILE_GITMODULES\nGIT_PATH_GITFILE_GITATTRIBUTES", - "tdef": "typedef", - "description": " The kinds of git-specific files we know about.", - "comments": "The order needs to stay the same to not break the gitfiles\n array in path.c
Check for the .gitignore file
\n", - "value": 0 - }, - { - "type": "int", - "name": "GIT_PATH_GITFILE_GITMODULES", - "comments": "Check for the .gitmodules file
\n", - "value": 1 - }, - { - "type": "int", - "name": "GIT_PATH_GITFILE_GITATTRIBUTES", - "comments": "Check for the .gitattributes file
\n", - "value": 2 - } - ], - "used": { - "returns": [], - "needs": [ - "git_path_is_gitfile" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -37302,12 +32765,11 @@ "type": "struct", "value": "git_pathspec", "file": "git2/pathspec.h", - "line": 20, - "lineto": 20, + "line": 27, + "lineto": 27, "tdef": "typedef", "description": " Compiled pathspec", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -37342,8 +32804,8 @@ ], "type": "enum", "file": "git2/pathspec.h", - "line": 30, - "lineto": 73, + "line": 37, + "lineto": 80, "block": "GIT_PATHSPEC_DEFAULT\nGIT_PATHSPEC_IGNORE_CASE\nGIT_PATHSPEC_USE_CASE\nGIT_PATHSPEC_NO_GLOB\nGIT_PATHSPEC_NO_MATCH_ERROR\nGIT_PATHSPEC_FIND_FAILURES\nGIT_PATHSPEC_FAILURES_ONLY", "tdef": "typedef", "description": " Options controlling how pathspec match should be executed", @@ -37392,10 +32854,7 @@ "value": 32 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -37405,12 +32864,11 @@ "type": "struct", "value": "git_pathspec_match_list", "file": "git2/pathspec.h", - "line": 25, - "lineto": 25, + "line": 32, + "lineto": 32, "tdef": "typedef", "description": " List of filenames matching a pathspec", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -37435,25 +32893,21 @@ "unsigned int version", "git_proxy_t type", "const char * url", - "git_cred_acquire_cb credentials", + "git_credential_acquire_cb credentials", "git_transport_certificate_check_cb certificate_check", "void * payload" ], "type": "struct", "value": "git_proxy_options", "file": "git2/proxy.h", - "line": 42, - "lineto": 77, - "block": "unsigned int version\ngit_proxy_t type\nconst char * url\ngit_cred_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\nvoid * payload", + "line": 50, + "lineto": 85, + "block": "unsigned int version\ngit_proxy_t type\nconst char * url\ngit_credential_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\nvoid * payload", "tdef": "typedef", "description": " Options for connecting through a proxy", - "comments": "Note that not all types may be supported, depending on the platform\n and compilation options.
\n", + "comments": "Note that not all types may be supported, depending on the platform and compilation options.
\n", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "git_proxy_t", "name": "type", @@ -37465,7 +32919,7 @@ "comments": " The URL of the proxy." }, { - "type": "git_cred_acquire_cb", + "type": "git_credential_acquire_cb", "name": "credentials", "comments": " This will be called if the remote host requires\n authentication in order to connect to it.\n\n Returning GIT_PASSTHROUGH will make libgit2 behave as\n though this field isn't set." }, @@ -37482,26 +32936,18 @@ ], "used": { "returns": [], - "needs": [ - "git_proxy_init_options", - "git_remote_connect", - "git_transport_smart_proxy_options" - ] + "needs": ["git_proxy_options_init", "git_remote_connect"] } } ], [ "git_proxy_t", { - "decl": [ - "GIT_PROXY_NONE", - "GIT_PROXY_AUTO", - "GIT_PROXY_SPECIFIED" - ], + "decl": ["GIT_PROXY_NONE", "GIT_PROXY_AUTO", "GIT_PROXY_SPECIFIED"], "type": "enum", "file": "git2/proxy.h", - "line": 18, - "lineto": 34, + "line": 26, + "lineto": 42, "block": "GIT_PROXY_NONE\nGIT_PROXY_AUTO\nGIT_PROXY_SPECIFIED", "tdef": "typedef", "description": " The type of proxy to use.", @@ -37526,10 +32972,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -37539,17 +32982,16 @@ "type": "struct", "value": "git_push", "file": "git2/types.h", - "line": 241, - "lineto": 241, + "line": 269, + "lineto": 269, "tdef": "typedef", "description": " Preparation for a push operation. Can be used to configure what to\n push and the level of parallelism of the packfile builder.", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ - "git_push_init_options", "git_push_negotiation", + "git_push_options_init", "git_remote_push", "git_remote_upload" ] @@ -37564,23 +33006,21 @@ "unsigned int pb_parallelism", "git_remote_callbacks callbacks", "git_proxy_options proxy_opts", - "git_strarray custom_headers" + "git_remote_redirect_t follow_redirects", + "git_strarray custom_headers", + "git_strarray remote_push_options" ], "type": "struct", "value": "git_push_options", "file": "git2/remote.h", - "line": 690, - "lineto": 717, - "block": "unsigned int version\nunsigned int pb_parallelism\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", + "line": 860, + "lineto": 899, + "block": "unsigned int version\nunsigned int pb_parallelism\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_remote_redirect_t follow_redirects\ngit_strarray custom_headers\ngit_strarray remote_push_options", "tdef": "typedef", "description": " Controls the behavior of a git_push object.", "comments": "", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "unsigned int", "name": "pb_parallelism", @@ -37596,16 +33036,26 @@ "name": "proxy_opts", "comments": " Proxy options to use, by default no proxy is used." }, + { + "type": "git_remote_redirect_t", + "name": "follow_redirects", + "comments": " Whether to allow off-site redirects. If this is not\n specified, the `http.followRedirects` configuration setting\n will be consulted." + }, { "type": "git_strarray", "name": "custom_headers", "comments": " Extra headers for this push operation" + }, + { + "type": "git_strarray", + "name": "remote_push_options", + "comments": " \"Push options\" to deliver to the remote." } ], "used": { "returns": [], "needs": [ - "git_push_init_options", + "git_push_options_init", "git_remote_push", "git_remote_upload" ] @@ -37624,8 +33074,8 @@ "type": "struct", "value": "git_push_update", "file": "git2/remote.h", - "line": 433, - "lineto": 450, + "line": 490, + "lineto": 507, "block": "char * src_refname\nchar * dst_refname\ngit_oid src\ngit_oid dst", "tdef": "typedef", "description": " Represents an update which will be performed on the remote during push", @@ -37652,12 +33102,7 @@ "comments": " The new target for the reference" } ], - "used": { - "returns": [], - "needs": [ - "git_push_negotiation" - ] - } + "used": { "returns": [], "needs": ["git_push_negotiation"] } } ], [ @@ -37667,29 +33112,30 @@ "type": "struct", "value": "git_rebase", "file": "git2/types.h", - "line": 192, - "lineto": 192, + "line": 220, + "lineto": 220, "tdef": "typedef", "description": " Representation of a rebase ", "comments": "", - "fields": [], "used": { - "returns": [ - "git_rebase_operation_byindex" - ], + "returns": ["git_rebase_operation_byindex"], "needs": [ "git_rebase_abort", "git_rebase_commit", "git_rebase_finish", "git_rebase_free", "git_rebase_init", - "git_rebase_init_options", "git_rebase_inmemory_index", "git_rebase_next", + "git_rebase_onto_id", + "git_rebase_onto_name", "git_rebase_open", "git_rebase_operation_byindex", "git_rebase_operation_current", - "git_rebase_operation_entrycount" + "git_rebase_operation_entrycount", + "git_rebase_options_init", + "git_rebase_orig_head_id", + "git_rebase_orig_head_name" ] } } @@ -37705,12 +33151,12 @@ "type": "struct", "value": "git_rebase_operation", "file": "git2/rebase.h", - "line": 132, - "lineto": 147, + "line": 174, + "lineto": 189, "block": "git_rebase_operation_t type\nconst git_oid id\nconst char * exec", "tdef": "typedef", "description": " A rebase operation", - "comments": "Describes a single instruction/operation to be performed during the\n rebase.
\n", + "comments": "Describes a single instruction/operation to be performed during the rebase.
\n", "fields": [ { "type": "git_rebase_operation_t", @@ -37729,12 +33175,8 @@ } ], "used": { - "returns": [ - "git_rebase_operation_byindex" - ], - "needs": [ - "git_rebase_next" - ] + "returns": ["git_rebase_operation_byindex"], + "needs": ["git_rebase_next"] } } ], @@ -37751,8 +33193,8 @@ ], "type": "enum", "file": "git2/rebase.h", - "line": 80, - "lineto": 116, + "line": 119, + "lineto": 155, "block": "GIT_REBASE_OPERATION_PICK\nGIT_REBASE_OPERATION_REWORD\nGIT_REBASE_OPERATION_EDIT\nGIT_REBASE_OPERATION_SQUASH\nGIT_REBASE_OPERATION_FIXUP\nGIT_REBASE_OPERATION_EXEC", "tdef": "typedef", "description": " Type of rebase operation in-progress after calling `git_rebase_next`.", @@ -37795,10 +33237,7 @@ "value": 5 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -37810,23 +33249,22 @@ "int inmemory", "const char * rewrite_notes_ref", "git_merge_options merge_options", - "git_checkout_options checkout_options" + "git_checkout_options checkout_options", + "git_commit_create_cb commit_create_cb", + "int (*)(git_buf *, git_buf *, const char *, void *) signing_cb", + "void * payload" ], "type": "struct", "value": "git_rebase_options", "file": "git2/rebase.h", - "line": 31, - "lineto": 75, - "block": "unsigned int version\nint quiet\nint inmemory\nconst char * rewrite_notes_ref\ngit_merge_options merge_options\ngit_checkout_options checkout_options", + "line": 32, + "lineto": 114, + "block": "unsigned int version\nint quiet\nint inmemory\nconst char * rewrite_notes_ref\ngit_merge_options merge_options\ngit_checkout_options checkout_options\ngit_commit_create_cb commit_create_cb\nint (*)(git_buf *, git_buf *, const char *, void *) signing_cb\nvoid * payload", "tdef": "typedef", "description": " Rebase options", "comments": "Use to tell the rebase machinery how to operate.
\n", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "int", "name": "quiet", @@ -37850,15 +33288,30 @@ { "type": "git_checkout_options", "name": "checkout_options", - "comments": " Options to control how files are written during `git_rebase_init`,\n `git_rebase_next` and `git_rebase_abort`. Note that a minimum\n strategy of `GIT_CHECKOUT_SAFE` is defaulted in `init` and `next`,\n and a minimum strategy of `GIT_CHECKOUT_FORCE` is defaulted in\n `abort` to match git semantics." + "comments": " Options to control how files are written during `git_rebase_init`,\n `git_rebase_next` and `git_rebase_abort`. Note that during\n `abort`, these options will add an implied `GIT_CHECKOUT_FORCE`\n to match git semantics." + }, + { + "type": "git_commit_create_cb", + "name": "commit_create_cb", + "comments": " Optional callback that allows users to override commit\n creation in `git_rebase_commit`. If specified, users can\n create their own commit and provide the commit ID, which\n may be useful for signing commits or otherwise customizing\n the commit creation.\n\n If this callback returns `GIT_PASSTHROUGH`, then\n `git_rebase_commit` will continue to create the commit." + }, + { + "type": "int (*)(git_buf *, git_buf *, const char *, void *)", + "name": "signing_cb", + "comments": " If provided, this will be called with the commit content, allowing\n a signature to be added to the rebase commit. Can be skipped with\n GIT_PASSTHROUGH. If GIT_PASSTHROUGH is returned, a commit will be made\n without a signature.\n\n This field is only used when performing git_rebase_commit.\n\n This callback is not invoked if a `git_commit_create_cb` is\n specified.\n\n This callback is deprecated; users should provide a\n creation callback as `commit_create_cb` that produces a\n commit buffer, signs it, and commits it." + }, + { + "type": "void *", + "name": "payload", + "comments": " This will be passed to each of the callbacks in this struct\n as the last parameter." } ], "used": { "returns": [], "needs": [ "git_rebase_init", - "git_rebase_init_options", - "git_rebase_open" + "git_rebase_open", + "git_rebase_options_init" ] } } @@ -37870,24 +33323,19 @@ "type": "struct", "value": "git_refdb", "file": "git2/types.h", - "line": 97, - "lineto": 97, + "line": 108, + "lineto": 108, "tdef": "typedef", "description": " An open refs database handle. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ - "git_refdb_backend_fs", "git_refdb_compress", "git_refdb_free", - "git_refdb_init_backend", "git_refdb_new", "git_refdb_open", - "git_refdb_set_backend", - "git_repository_refdb", - "git_repository_set_refdb" + "git_repository_refdb" ] } } @@ -37899,107 +33347,12 @@ "type": "struct", "value": "git_refdb_backend", "file": "git2/types.h", - "line": 100, - "lineto": 100, - "block": "unsigned int version\nint (*)(int *, git_refdb_backend *, const char *) exists\nint (*)(git_reference **, git_refdb_backend *, const char *) lookup\nint (*)(git_reference_iterator **, struct git_refdb_backend *, const char *) iterator\nint (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *) write\nint (*)(git_reference **, git_refdb_backend *, const char *, const char *, int, const git_signature *, const char *) rename\nint (*)(git_refdb_backend *, const char *, const git_oid *, const char *) del\nint (*)(git_refdb_backend *) compress\nint (*)(git_refdb_backend *, const char *) has_log\nint (*)(git_refdb_backend *, const char *) ensure_log\nvoid (*)(git_refdb_backend *) free\nint (*)(git_reflog **, git_refdb_backend *, const char *) reflog_read\nint (*)(git_refdb_backend *, git_reflog *) reflog_write\nint (*)(git_refdb_backend *, const char *, const char *) reflog_rename\nint (*)(git_refdb_backend *, const char *) reflog_delete\nint (*)(void **, git_refdb_backend *, const char *) lock\nint (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *) unlock", + "line": 111, + "lineto": 111, "tdef": "typedef", "description": " A custom backend for refs ", "comments": "", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "int (*)(int *, git_refdb_backend *, const char *)", - "name": "exists", - "comments": "" - }, - { - "type": "int (*)(git_reference **, git_refdb_backend *, const char *)", - "name": "lookup", - "comments": "" - }, - { - "type": "int (*)(git_reference_iterator **, struct git_refdb_backend *, const char *)", - "name": "iterator", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *)", - "name": "write", - "comments": "" - }, - { - "type": "int (*)(git_reference **, git_refdb_backend *, const char *, const char *, int, const git_signature *, const char *)", - "name": "rename", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *, const git_oid *, const char *)", - "name": "del", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *)", - "name": "compress", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *)", - "name": "has_log", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *)", - "name": "ensure_log", - "comments": "" - }, - { - "type": "void (*)(git_refdb_backend *)", - "name": "free", - "comments": "" - }, - { - "type": "int (*)(git_reflog **, git_refdb_backend *, const char *)", - "name": "reflog_read", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, git_reflog *)", - "name": "reflog_write", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *, const char *)", - "name": "reflog_rename", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *)", - "name": "reflog_delete", - "comments": "" - }, - { - "type": "int (*)(void **, git_refdb_backend *, const char *)", - "name": "lock", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *)", - "name": "unlock", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_refdb_backend_fs", - "git_refdb_init_backend", - "git_refdb_set_backend" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -38009,18 +33362,13 @@ "type": "struct", "value": "git_reference", "file": "git2/types.h", - "line": 177, - "lineto": 177, + "line": 194, + "lineto": 194, "tdef": "typedef", "description": " In-memory representation of a reference. ", "comments": "", - "fields": [], "used": { - "returns": [ - "git_reference__alloc", - "git_reference__alloc_symbolic", - "git_reference_type" - ], + "returns": ["git_reference_type"], "needs": [ "git_annotated_commit_from_ref", "git_branch_create", @@ -38088,8 +33436,8 @@ ], "type": "enum", "file": "git2/refs.h", - "line": 639, - "lineto": 668, + "line": 663, + "lineto": 692, "block": "GIT_REFERENCE_FORMAT_NORMAL\nGIT_REFERENCE_FORMAT_ALLOW_ONELEVEL\nGIT_REFERENCE_FORMAT_REFSPEC_PATTERN\nGIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND", "tdef": "typedef", "description": " Normalization options for reference lookup", @@ -38120,10 +33468,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -38133,34 +33478,11 @@ "type": "struct", "value": "git_reference_iterator", "file": "git2/types.h", - "line": 180, - "lineto": 180, - "block": "git_refdb * db\nint (*)(git_reference **, git_reference_iterator *) next\nint (*)(const char **, git_reference_iterator *) next_name\nvoid (*)(git_reference_iterator *) free", + "line": 197, + "lineto": 197, "tdef": "typedef", "description": " Iterator for references ", "comments": "", - "fields": [ - { - "type": "git_refdb *", - "name": "db", - "comments": "" - }, - { - "type": "int (*)(git_reference **, git_reference_iterator *)", - "name": "next", - "comments": "" - }, - { - "type": "int (*)(const char **, git_reference_iterator *)", - "name": "next_name", - "comments": "" - }, - { - "type": "void (*)(git_reference_iterator *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ @@ -38184,8 +33506,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 195, - "lineto": 200, + "line": 223, + "lineto": 228, "block": "GIT_REFERENCE_INVALID\nGIT_REFERENCE_DIRECT\nGIT_REFERENCE_SYMBOLIC\nGIT_REFERENCE_ALL", "tdef": "typedef", "description": " Basic type of any Git reference. ", @@ -38216,12 +33538,7 @@ "value": 3 } ], - "used": { - "returns": [ - "git_reference_type" - ], - "needs": [] - } + "used": { "returns": ["git_reference_type"], "needs": [] } } ], [ @@ -38231,21 +33548,16 @@ "type": "struct", "value": "git_reflog", "file": "git2/types.h", - "line": 154, - "lineto": 154, + "line": 171, + "lineto": 171, "tdef": "typedef", "description": " Representation of a reference log ", "comments": "", - "fields": [], "used": { - "returns": [ - "git_reflog_entry__alloc", - "git_reflog_entry_byindex" - ], + "returns": ["git_reflog_entry_byindex"], "needs": [ "git_reflog_append", "git_reflog_drop", - "git_reflog_entry__free", "git_reflog_entry_byindex", "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -38267,19 +33579,14 @@ "type": "struct", "value": "git_reflog_entry", "file": "git2/types.h", - "line": 151, - "lineto": 151, + "line": 168, + "lineto": 168, "tdef": "typedef", "description": " Representation of a reference log entry ", "comments": "", - "fields": [], "used": { - "returns": [ - "git_reflog_entry__alloc", - "git_reflog_entry_byindex" - ], + "returns": ["git_reflog_entry_byindex"], "needs": [ - "git_reflog_entry__free", "git_reflog_entry_committer", "git_reflog_entry_id_new", "git_reflog_entry_id_old", @@ -38295,16 +33602,13 @@ "type": "struct", "value": "git_refspec", "file": "git2/types.h", - "line": 223, - "lineto": 223, + "line": 251, + "lineto": 251, "tdef": "typedef", "description": " A refspec specifies the mapping between remote and local reference\n names when fetch or pushing.", "comments": "", - "fields": [], "used": { - "returns": [ - "git_remote_get_refspec" - ], + "returns": ["git_remote_get_refspec"], "needs": [ "git_refspec_direction", "git_refspec_dst", @@ -38315,6 +33619,7 @@ "git_refspec_rtransform", "git_refspec_src", "git_refspec_src_matches", + "git_refspec_src_matches_negative", "git_refspec_string", "git_refspec_transform" ] @@ -38328,26 +33633,25 @@ "type": "struct", "value": "git_remote", "file": "git2/types.h", - "line": 229, - "lineto": 229, + "line": 257, + "lineto": 257, "tdef": "typedef", - "description": " Git's idea of a remote repository. A remote can be anonymous (in\n which case it does not have backing configuration entires).", + "description": " Git's idea of a remote repository. A remote can be anonymous (in\n which case it does not have backing configuration entries).", "comments": "", - "fields": [], "used": { - "returns": [ - "git_remote_autotag" - ], + "returns": ["git_remote_autotag"], "needs": [ "git_headlist_cb", "git_remote_autotag", "git_remote_connect", + "git_remote_connect_ext", + "git_remote_connect_options_init", "git_remote_connected", "git_remote_create", "git_remote_create_anonymous", "git_remote_create_cb", "git_remote_create_detached", - "git_remote_create_init_options", + "git_remote_create_options_init", "git_remote_create_with_fetchspec", "git_remote_create_with_opts", "git_remote_default_branch", @@ -38368,19 +33672,17 @@ "git_remote_prune_refs", "git_remote_push", "git_remote_pushurl", + "git_remote_ready_cb", "git_remote_refspec_count", "git_remote_set_autotag", + "git_remote_set_instance_pushurl", + "git_remote_set_instance_url", "git_remote_stats", "git_remote_stop", "git_remote_update_tips", "git_remote_upload", "git_remote_url", - "git_transport_cb", - "git_transport_dummy", - "git_transport_local", - "git_transport_new", - "git_transport_smart", - "git_transport_ssh_with_paths" + "git_transport_cb" ] } } @@ -38396,8 +33698,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 601, - "lineto": 619, + "line": 739, + "lineto": 757, "block": "GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED\nGIT_REMOTE_DOWNLOAD_TAGS_AUTO\nGIT_REMOTE_DOWNLOAD_TAGS_NONE\nGIT_REMOTE_DOWNLOAD_TAGS_ALL", "tdef": "typedef", "description": " Automatic tag following option", @@ -38429,34 +33731,46 @@ } ], "used": { - "returns": [ - "git_remote_autotag" - ], - "needs": [ - "git_remote_set_autotag", - "git_remote_update_tips" - ] + "returns": ["git_remote_autotag"], + "needs": ["git_remote_set_autotag", "git_remote_update_tips"] } } ], [ "git_remote_callbacks", { - "decl": "git_remote_callbacks", + "decl": [ + "unsigned int version", + "git_transport_message_cb sideband_progress", + "int (*)(git_remote_completion_t, void *) completion", + "git_credential_acquire_cb credentials", + "git_transport_certificate_check_cb certificate_check", + "git_indexer_progress_cb transfer_progress", + "int (*)(const char *, const git_oid *, const git_oid *, void *) update_tips", + "git_packbuilder_progress pack_progress", + "git_push_transfer_progress_cb push_transfer_progress", + "git_push_update_reference_cb push_update_reference", + "git_push_negotiation push_negotiation", + "git_transport_cb transport", + "git_remote_ready_cb remote_ready", + "void * payload", + "git_url_resolve_cb resolve_url", + "int (*)(const char *, const git_oid *, const git_oid *, git_refspec *, void *) update_refs" + ], "type": "struct", "value": "git_remote_callbacks", - "file": "git2/types.h", - "line": 245, - "lineto": 245, - "block": "unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_type, void *) completion\ngit_cred_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\ngit_transfer_progress_cb transfer_progress\nint (*)(const char *, const git_oid *, const git_oid *, void *) update_tips\ngit_packbuilder_progress pack_progress\ngit_push_transfer_progress push_transfer_progress\ngit_push_update_reference_cb push_update_reference\ngit_push_negotiation push_negotiation\ngit_transport_cb transport\nvoid * payload", - "tdef": "typedef", - "description": "", - "comments": "", + "file": "git2/remote.h", + "line": 572, + "lineto": 698, + "block": "unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_t, void *) completion\ngit_credential_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\ngit_indexer_progress_cb transfer_progress\nint (*)(const char *, const git_oid *, const git_oid *, void *) update_tips\ngit_packbuilder_progress pack_progress\ngit_push_transfer_progress_cb push_transfer_progress\ngit_push_update_reference_cb push_update_reference\ngit_push_negotiation push_negotiation\ngit_transport_cb transport\ngit_remote_ready_cb remote_ready\nvoid * payload\ngit_url_resolve_cb resolve_url\nint (*)(const char *, const git_oid *, const git_oid *, git_refspec *, void *) update_refs", + "tdef": null, + "description": " The callback settings structure", + "comments": "Set the callbacks to be called by the remote when informing the user about the progress of the network operations.
\n", "fields": [ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The version " }, { "type": "git_transport_message_cb", @@ -38464,12 +33778,12 @@ "comments": " Textual progress from the remote. Text send over the\n progress side-band will be passed to this function (this is\n the 'counting objects' output)." }, { - "type": "int (*)(git_remote_completion_type, void *)", + "type": "int (*)(git_remote_completion_t, void *)", "name": "completion", "comments": "" }, { - "type": "git_cred_acquire_cb", + "type": "git_credential_acquire_cb", "name": "credentials", "comments": " This will be called if the remote host requires\n authentication in order to connect to it.\n\n Returning GIT_PASSTHROUGH will make libgit2 behave as\n though this field isn't set." }, @@ -38479,7 +33793,7 @@ "comments": " If cert verification fails, this will be called to let the\n user make the final decision of whether to allow the\n connection to proceed. Returns 0 to allow the connection\n or a negative value to indicate an error." }, { - "type": "git_transfer_progress_cb", + "type": "git_indexer_progress_cb", "name": "transfer_progress", "comments": " During the download of new data, this will be regularly\n called with the current count of progress done by the\n indexer." }, @@ -38494,7 +33808,7 @@ "comments": " Function to call with progress information during pack\n building. Be aware that this is called inline with pack\n building operations, so performance may be affected." }, { - "type": "git_push_transfer_progress", + "type": "git_push_transfer_progress_cb", "name": "push_transfer_progress", "comments": " Function to call with progress information during the\n upload portion of a push. Be aware that this is called\n inline with pack building operations, so performance may be\n affected." }, @@ -38513,10 +33827,25 @@ "name": "transport", "comments": " Create the transport to use for this operation. Leave NULL\n to auto-detect." }, + { + "type": "git_remote_ready_cb", + "name": "remote_ready", + "comments": " Callback when the remote is ready to connect." + }, { "type": "void *", "name": "payload", "comments": " This will be passed to each of the callbacks in this struct\n as the last parameter." + }, + { + "type": "git_url_resolve_cb", + "name": "resolve_url", + "comments": " Resolve URL before connecting to remote.\n The returned URL will be used to connect to the remote instead.\n\n This callback is deprecated; users should use\n git_remote_ready_cb and configure the instance URL instead." + }, + { + "type": "int (*)(const char *, const git_oid *, const git_oid *, git_refspec *, void *)", + "name": "update_refs", + "comments": "" } ], "used": { @@ -38531,7 +33860,7 @@ } ], [ - "git_remote_completion_type", + "git_remote_completion_t", { "decl": [ "GIT_REMOTE_COMPLETION_DOWNLOAD", @@ -38540,8 +33869,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 418, - "lineto": 422, + "line": 466, + "lineto": 470, "block": "GIT_REMOTE_COMPLETION_DOWNLOAD\nGIT_REMOTE_COMPLETION_INDEXING\nGIT_REMOTE_COMPLETION_ERROR\nGIT_REMOTE_COMPLETION_DOWNLOAD\nGIT_REMOTE_COMPLETION_INDEXING\nGIT_REMOTE_COMPLETION_ERROR", "tdef": "typedef", "description": " Argument to the completion callback which tells it which operation\n finished.", @@ -38566,9 +33895,54 @@ "value": 2 } ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_remote_connect_options", + { + "decl": [ + "unsigned int version", + "git_remote_callbacks callbacks", + "git_proxy_options proxy_opts", + "git_remote_redirect_t follow_redirects", + "git_strarray custom_headers" + ], + "type": "struct", + "value": "git_remote_connect_options", + "file": "git2/remote.h", + "line": 928, + "lineto": 946, + "block": "unsigned int version\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_remote_redirect_t follow_redirects\ngit_strarray custom_headers", + "tdef": "typedef", + "description": " Remote creation options structure", + "comments": "Initialize with GIT_REMOTE_CREATE_OPTIONS_INIT. Alternatively, you can use git_remote_create_options_init.
Initialize with GIT_REMOTE_CREATE_OPTIONS_INIT. Alternatively, you can\n use git_remote_create_init_options.
Initialize with GIT_REMOTE_CREATE_OPTIONS_INIT. Alternatively, you can use git_remote_create_options_init.
Do not follow any off-site redirects at any stage of\n the fetch or push.
\n", + "value": 1 }, { - "type": "git_oid", - "name": "oid", - "comments": "" + "type": "int", + "name": "GIT_REMOTE_REDIRECT_INITIAL", + "comments": "Allow off-site redirects only upon the initial request.\n This is the default.
\n", + "value": 2 }, { - "type": "git_oid", - "name": "loid", - "comments": "" - }, + "type": "int", + "name": "GIT_REMOTE_REDIRECT_ALL", + "comments": "Allow redirects at any stage in the fetch or push.
\n", + "value": 4 + } + ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_remote_update_flags", + { + "decl": [ + "GIT_REMOTE_UPDATE_FETCHHEAD", + "GIT_REMOTE_UPDATE_REPORT_UNCHANGED" + ], + "type": "enum", + "file": "git2/remote.h", + "line": 82, + "lineto": 88, + "block": "GIT_REMOTE_UPDATE_FETCHHEAD\nGIT_REMOTE_UPDATE_REPORT_UNCHANGED", + "tdef": "typedef", + "description": " How to handle reference updates.", + "comments": "", + "fields": [ { - "type": "char *", - "name": "name", - "comments": "" + "type": "int", + "name": "GIT_REMOTE_UPDATE_FETCHHEAD", + "comments": "", + "value": 1 }, { - "type": "char *", - "name": "symref_target", - "comments": " If the server send a symref mapping for this ref, this will\n point to the target." + "type": "int", + "name": "GIT_REMOTE_UPDATE_REPORT_UNCHANGED", + "comments": "", + "value": 2 } ], - "used": { - "returns": [], - "needs": [ - "git_headlist_cb", - "git_remote_ls" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -38718,20 +34140,18 @@ "type": "struct", "value": "git_repository", "file": "git2/types.h", - "line": 106, - "lineto": 106, + "line": 123, + "lineto": 123, "tdef": "typedef", "description": " Representation of an existing git repository,\n including all its object contents", "comments": "", - "fields": [], "used": { "returns": [ "git_blob_owner", "git_commit_owner", - "git_filter_source_repo", "git_index_owner", - "git_merge_driver_source_repo", "git_object_owner", + "git_patch_owner", "git_reference_owner", "git_remote_owner", "git_revwalk_repository", @@ -38749,13 +34169,15 @@ "git_attr_add_macro", "git_attr_cache_flush", "git_attr_foreach", + "git_attr_foreach_ext", "git_attr_get", + "git_attr_get_ext", "git_attr_get_many", - "git_blame_file", - "git_blob_create_frombuffer", - "git_blob_create_fromdisk", - "git_blob_create_fromstream", - "git_blob_create_fromworkdir", + "git_attr_get_many_ext", + "git_blob_create_from_buffer", + "git_blob_create_from_disk", + "git_blob_create_from_stream", + "git_blob_create_from_workdir", "git_blob_lookup", "git_blob_lookup_prefix", "git_branch_create", @@ -38763,6 +34185,7 @@ "git_branch_iterator_new", "git_branch_lookup", "git_branch_remote_name", + "git_branch_upstream_merge", "git_branch_upstream_name", "git_branch_upstream_remote", "git_checkout_head", @@ -38773,14 +34196,12 @@ "git_clone", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", - "git_commit_create_from_ids", + "git_commit_create_from_stage", "git_commit_create_v", "git_commit_create_with_signature", "git_commit_extract_signature", "git_commit_lookup", "git_commit_lookup_prefix", - "git_config_add_backend", "git_config_add_file_ondisk", "git_describe_workdir", "git_diff_commit_as_email", @@ -38792,16 +34213,16 @@ "git_diff_tree_to_workdir_with_index", "git_filter_list_apply_to_file", "git_filter_list_load", - "git_filter_list_new", + "git_filter_list_load_ext", "git_filter_list_stream_file", "git_graph_ahead_behind", "git_graph_descendant_of", + "git_graph_reachable_from_any", "git_ignore_add_rule", "git_ignore_clear_internal_rules", "git_ignore_path_is_ignored", "git_index_write_tree_to", "git_mailmap_from_repository", - "git_mempack_dump", "git_merge", "git_merge_analysis", "git_merge_analysis_for_ref", @@ -38813,22 +34234,12 @@ "git_merge_commits", "git_merge_file_from_index", "git_merge_trees", - "git_note_commit_create", - "git_note_commit_read", - "git_note_commit_remove", - "git_note_create", - "git_note_default_ref", - "git_note_foreach", - "git_note_iterator_new", - "git_note_read", - "git_note_remove", "git_object_lookup", "git_object_lookup_prefix", "git_packbuilder_new", "git_pathspec_match_workdir", "git_rebase_init", "git_rebase_open", - "git_refdb_backend_fs", "git_refdb_new", "git_refdb_open", "git_reference_create", @@ -38863,7 +34274,7 @@ "git_remote_set_autotag", "git_remote_set_pushurl", "git_remote_set_url", - "git_repository__cleanup", + "git_repository_commit_parents", "git_repository_commondir", "git_repository_config", "git_repository_config_snapshot", @@ -38882,7 +34293,7 @@ "git_repository_index", "git_repository_init", "git_repository_init_ext", - "git_repository_init_init_options", + "git_repository_init_options_init", "git_repository_is_bare", "git_repository_is_empty", "git_repository_is_shallow", @@ -38891,30 +34302,22 @@ "git_repository_mergehead_foreach", "git_repository_message", "git_repository_message_remove", - "git_repository_new", "git_repository_odb", + "git_repository_oid_type", "git_repository_open", "git_repository_open_bare", "git_repository_open_ext", "git_repository_open_from_worktree", "git_repository_path", "git_repository_refdb", - "git_repository_reinit_filesystem", - "git_repository_set_bare", - "git_repository_set_config", "git_repository_set_head", "git_repository_set_head_detached", "git_repository_set_head_detached_from_annotated", "git_repository_set_ident", - "git_repository_set_index", "git_repository_set_namespace", - "git_repository_set_odb", - "git_repository_set_refdb", "git_repository_set_workdir", "git_repository_state", "git_repository_state_cleanup", - "git_repository_submodule_cache_all", - "git_repository_submodule_cache_clear", "git_repository_workdir", "git_repository_wrap_odb", "git_reset", @@ -38927,17 +34330,20 @@ "git_revparse_single", "git_revwalk_new", "git_signature_default", + "git_signature_default_from_env", "git_stash_apply", "git_stash_drop", "git_stash_foreach", "git_stash_pop", "git_stash_save", + "git_stash_save_with_opts", "git_status_file", "git_status_foreach", "git_status_foreach_ext", "git_status_list_new", "git_status_should_ignore", "git_submodule_add_setup", + "git_submodule_clone", "git_submodule_foreach", "git_submodule_lookup", "git_submodule_open", @@ -38951,7 +34357,7 @@ "git_submodule_status", "git_tag_annotation_create", "git_tag_create", - "git_tag_create_frombuffer", + "git_tag_create_from_buffer", "git_tag_create_lightweight", "git_tag_delete", "git_tag_foreach", @@ -38987,60 +34393,57 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 245, - "lineto": 253, + "line": 249, + "lineto": 295, "block": "GIT_REPOSITORY_INIT_BARE\nGIT_REPOSITORY_INIT_NO_REINIT\nGIT_REPOSITORY_INIT_NO_DOTGIT_DIR\nGIT_REPOSITORY_INIT_MKDIR\nGIT_REPOSITORY_INIT_MKPATH\nGIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE\nGIT_REPOSITORY_INIT_RELATIVE_GITLINK", "tdef": "typedef", "description": " Option flags for `git_repository_init_ext`.", - "comments": "These flags configure extra behaviors to git_repository_init_ext.\n In every case, the default behavior is the zero value (i.e. flag is\n not set). Just OR the flag values together for the flags parameter\n when initializing a new repo. Details of individual values are:
init.templatedir global config if not, or falling back on\n "/usr/share/git-core/templates" if it exists.These flags configure extra behaviors to git_repository_init_ext. In every case, the default behavior is the zero value (i.e. flag is not set). Just OR the flag values together for the flags parameter when initializing a new repo.
Create a bare repository with no working directory.
\n", "value": 1 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_NO_REINIT", - "comments": "", + "comments": "Return an GIT_EEXISTS error if the repo_path appears to already be\n an git repository.
\n", "value": 2 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_NO_DOTGIT_DIR", - "comments": "", + "comments": "Normally a "/.git/" will be appended to the repo path for\n non-bare repos (if it is not already there), but passing this flag\n prevents that behavior.
\n", "value": 4 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_MKDIR", - "comments": "", + "comments": "Make the repo_path (and workdir_path) as needed. Init is always willing\n to create the ".git" directory even without this flag. This flag tells\n init to create the trailing component of the repo and workdir paths\n as needed.
\n", "value": 8 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_MKPATH", - "comments": "", + "comments": "Recursively make all components of the repo and workdir paths as\n necessary.
\n", "value": 16 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE", - "comments": "", + "comments": "libgit2 normally uses internal templates to initialize a new repo.\n This flags enables external templates, looking the "template_path" from\n the options if set, or the init.templatedir global config if not,\n or falling back on "/usr/share/git-core/templates" if it exists.
If an alternate workdir is specified, use relative paths for the gitdir\n and core.worktree.
\n", "value": 64 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -39053,36 +34456,33 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 268, - "lineto": 272, + "line": 304, + "lineto": 320, "block": "GIT_REPOSITORY_INIT_SHARED_UMASK\nGIT_REPOSITORY_INIT_SHARED_GROUP\nGIT_REPOSITORY_INIT_SHARED_ALL", "tdef": "typedef", "description": " Mode options for `git_repository_init_ext`.", - "comments": "Set the mode field of the git_repository_init_options structure\n either to the custom mode that you would like, or to one of the\n following modes:
Set the mode field of the git_repository_init_options structure either to the custom mode that you would like, or to one of the defined modes.
Use permissions configured by umask - the default.
\n", "value": 0 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_SHARED_GROUP", - "comments": "", + "comments": "Use "--shared=group" behavior, chmod'ing the new repo to be group\n writable and "g+sx" for sticky group assignment.
\n", "value": 1533 }, { "type": "int", "name": "GIT_REPOSITORY_INIT_SHARED_ALL", - "comments": "", + "comments": "Use "--shared=all" behavior, adding world readability.
\n", "value": 1535 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -39090,8 +34490,8 @@ { "decl": [ "unsigned int version", - "int flags", - "int mode", + "uint32_t flags", + "uint32_t mode", "const char * workdir_path", "const char * description", "const char * template_path", @@ -39101,59 +34501,55 @@ "type": "struct", "value": "git_repository_init_options", "file": "git2/repository.h", - "line": 302, - "lineto": 311, - "block": "unsigned int version\nint flags\nint mode\nconst char * workdir_path\nconst char * description\nconst char * template_path\nconst char * initial_head\nconst char * origin_url", + "line": 328, + "lineto": 387, + "block": "unsigned int version\nuint32_t flags\nuint32_t mode\nconst char * workdir_path\nconst char * description\nconst char * template_path\nconst char * initial_head\nconst char * origin_url", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Extended options structure for `git_repository_init_ext`.", + "comments": "This contains extra options for git_repository_init_ext that enable additional initialization features.
These values represent possible states for the repository to be in,\n based on the current operation which is ongoing.
\n", + "comments": "These values represent possible states for the repository to be in, based on the current operation which is ongoing.
\n", "fields": [ { "type": "int", @@ -39434,20 +34836,13 @@ "value": 11 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_reset_t", { - "decl": [ - "GIT_RESET_SOFT", - "GIT_RESET_MIXED", - "GIT_RESET_HARD" - ], + "decl": ["GIT_RESET_SOFT", "GIT_RESET_MIXED", "GIT_RESET_HARD"], "type": "enum", "file": "git2/reset.h", "line": 26, @@ -39478,10 +34873,7 @@ ], "used": { "returns": [], - "needs": [ - "git_reset", - "git_reset_from_annotated" - ] + "needs": ["git_reset", "git_reset_from_annotated"] } } ], @@ -39504,11 +34896,7 @@ "description": " Options for revert", "comments": "", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "unsigned int", "name": "mainline", @@ -39527,95 +34915,80 @@ ], "used": { "returns": [], - "needs": [ - "git_revert", - "git_revert_init_options" - ] + "needs": ["git_revert", "git_revert_options_init"] } } ], [ - "git_revparse_mode_t", + "git_revspec", { - "decl": [ - "GIT_REVPARSE_SINGLE", - "GIT_REVPARSE_RANGE", - "GIT_REVPARSE_MERGE_BASE" - ], - "type": "enum", + "decl": ["git_object * from", "git_object * to", "unsigned int flags"], + "type": "struct", + "value": "git_revspec", "file": "git2/revparse.h", - "line": 71, - "lineto": 78, - "block": "GIT_REVPARSE_SINGLE\nGIT_REVPARSE_RANGE\nGIT_REVPARSE_MERGE_BASE", + "line": 83, + "lineto": 90, + "block": "git_object * from\ngit_object * to\nunsigned int flags", "tdef": "typedef", - "description": " Revparse flags. These indicate the intended behavior of the spec passed to\n git_revparse.", + "description": " Git Revision Spec: output of a `git_revparse` operation", "comments": "", "fields": [ { - "type": "int", - "name": "GIT_REVPARSE_SINGLE", - "comments": "The spec targeted a single object.
\n", - "value": 1 + "type": "git_object *", + "name": "from", + "comments": " The left element of the revspec; must be freed by the user " }, { - "type": "int", - "name": "GIT_REVPARSE_RANGE", - "comments": "The spec targeted a range of commits.
\n", - "value": 2 + "type": "git_object *", + "name": "to", + "comments": " The right element of the revspec; must be freed by the user " }, { - "type": "int", - "name": "GIT_REVPARSE_MERGE_BASE", - "comments": "The spec used the '...' operator, which invokes special semantics.
\n", - "value": 4 + "type": "unsigned int", + "name": "flags", + "comments": " The intent of the revspec (i.e. `git_revspec_mode_t` flags) " } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": ["git_revparse"] } } ], [ - "git_revspec", + "git_revspec_t", { "decl": [ - "git_object * from", - "git_object * to", - "unsigned int flags" + "GIT_REVSPEC_SINGLE", + "GIT_REVSPEC_RANGE", + "GIT_REVSPEC_MERGE_BASE" ], - "type": "struct", - "value": "git_revspec", + "type": "enum", "file": "git2/revparse.h", - "line": 83, - "lineto": 90, - "block": "git_object * from\ngit_object * to\nunsigned int flags", + "line": 71, + "lineto": 78, + "block": "GIT_REVSPEC_SINGLE\nGIT_REVSPEC_RANGE\nGIT_REVSPEC_MERGE_BASE", "tdef": "typedef", - "description": " Git Revision Spec: output of a `git_revparse` operation", + "description": " Revparse flags. These indicate the intended behavior of the spec passed to\n git_revparse.", "comments": "", "fields": [ { - "type": "git_object *", - "name": "from", - "comments": " The left element of the revspec; must be freed by the user " + "type": "int", + "name": "GIT_REVSPEC_SINGLE", + "comments": "The spec targeted a single object.
\n", + "value": 1 }, { - "type": "git_object *", - "name": "to", - "comments": " The right element of the revspec; must be freed by the user " + "type": "int", + "name": "GIT_REVSPEC_RANGE", + "comments": "The spec targeted a range of commits.
\n", + "value": 2 }, { - "type": "unsigned int", - "name": "flags", - "comments": " The intent of the revspec (i.e. `git_revparse_mode_t` flags) " + "type": "int", + "name": "GIT_REVSPEC_MERGE_BASE", + "comments": "The spec used the '...' operator, which invokes special semantics.
\n", + "value": 4 } ], - "used": { - "returns": [], - "needs": [ - "git_revparse" - ] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -39625,12 +34998,11 @@ "type": "struct", "value": "git_revwalk", "file": "git2/types.h", - "line": 115, - "lineto": 115, + "line": 132, + "lineto": 132, "tdef": "typedef", "description": " Representation of an in-progress walk through the commits in a repo ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -39659,16 +35031,12 @@ [ "git_signature", { - "decl": [ - "char * name", - "char * email", - "git_time when" - ], + "decl": ["char * name", "char * email", "git_time when"], "type": "struct", "value": "git_signature", "file": "git2/types.h", - "line": 170, - "lineto": 174, + "line": 187, + "lineto": 191, "block": "char * name\nchar * email\ngit_time when", "tdef": "typedef", "description": " An action signature (e.g. for committers, taggers, etc) ", @@ -39694,8 +35062,6 @@ "returns": [ "git_commit_author", "git_commit_committer", - "git_note_author", - "git_note_committer", "git_reflog_entry_committer", "git_tag_tagger" ], @@ -39705,18 +35071,14 @@ "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", - "git_commit_create_from_ids", + "git_commit_create_cb", "git_commit_create_v", "git_mailmap_resolve_signature", - "git_note_commit_create", - "git_note_commit_remove", - "git_note_create", - "git_note_remove", "git_rebase_commit", "git_rebase_finish", "git_reflog_append", "git_signature_default", + "git_signature_default_from_env", "git_signature_dup", "git_signature_free", "git_signature_from_buffer", @@ -39742,8 +35104,8 @@ ], "type": "enum", "file": "git2/sys/transport.h", - "line": 287, - "lineto": 292, + "line": 323, + "lineto": 328, "block": "GIT_SERVICE_UPLOADPACK_LS\nGIT_SERVICE_UPLOADPACK\nGIT_SERVICE_RECEIVEPACK_LS\nGIT_SERVICE_RECEIVEPACK", "tdef": "typedef", "description": " Actions that the smart transport can ask a subtransport to perform ", @@ -39774,130 +35136,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_smart_subtransport", - { - "decl": "git_smart_subtransport", - "type": "struct", - "value": "git_smart_subtransport", - "file": "git2/sys/transport.h", - "line": 294, - "lineto": 294, - "tdef": "typedef", - "description": " An implementation of a subtransport which carries data for the\n smart transport", - "comments": "", - "fields": [ - { - "type": "int (*)(git_smart_subtransport_stream **, git_smart_subtransport *, const char *, git_smart_service_t)", - "name": "action", - "comments": "" - }, - { - "type": "int (*)(git_smart_subtransport *)", - "name": "close", - "comments": "" - }, - { - "type": "void (*)(git_smart_subtransport *)", - "name": "free", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_smart_subtransport_cb", - "git_smart_subtransport_git", - "git_smart_subtransport_http", - "git_smart_subtransport_ssh" - ] - } - } - ], - [ - "git_smart_subtransport_definition", - { - "decl": [ - "git_smart_subtransport_cb callback", - "unsigned int rpc", - "void * param" - ], - "type": "struct", - "value": "git_smart_subtransport_definition", - "file": "git2/sys/transport.h", - "line": 383, - "lineto": 395, - "block": "git_smart_subtransport_cb callback\nunsigned int rpc\nvoid * param", - "tdef": "typedef", - "description": " Definition for a \"subtransport\"", - "comments": "The smart transport knows how to speak the git protocol, but it has no\n knowledge of how to establish a connection between it and another endpoint,\n or how to move data back and forth. For this, a subtransport interface is\n declared, and the smart transport delegates this work to the subtransports.
\n\nThree subtransports are provided by libgit2: ssh, git, http(s).
\n\nSubtransports can either be RPC = 0 (persistent connection) or RPC = 1\n (request/response). The smart transport handles the differences in its own\n logic. The git subtransport is RPC = 0, while http is RPC = 1.
\n", - "fields": [ - { - "type": "git_smart_subtransport_cb", - "name": "callback", - "comments": " The function to use to create the git_smart_subtransport " - }, - { - "type": "unsigned int", - "name": "rpc", - "comments": " True if the protocol is stateless; false otherwise. For example,\n http:// is stateless, but git:// is not." - }, - { - "type": "void *", - "name": "param", - "comments": " User-specified parameter passed to the callback " - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_smart_subtransport_stream", - { - "decl": "git_smart_subtransport_stream", - "type": "struct", - "value": "git_smart_subtransport_stream", - "file": "git2/sys/transport.h", - "line": 295, - "lineto": 295, - "tdef": "typedef", - "description": " A stream used by the smart transport to read and write data\n from a subtransport.", - "comments": "This provides a customization point in case you need to\n support some other communication method.
\n", - "fields": [ - { - "type": "git_smart_subtransport *", - "name": "subtransport", - "comments": " The owning subtransport " - }, - { - "type": "int (*)(git_smart_subtransport_stream *, char *, size_t, size_t *)", - "name": "read", - "comments": "" - }, - { - "type": "int (*)(git_smart_subtransport_stream *, const char *, size_t)", - "name": "write", - "comments": "" - }, - { - "type": "void (*)(git_smart_subtransport_stream *)", - "name": "free", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -39943,23 +35182,17 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_stash_apply_flags", { - "decl": [ - "GIT_STASH_APPLY_DEFAULT", - "GIT_STASH_APPLY_REINSTATE_INDEX" - ], + "decl": ["GIT_STASH_APPLY_DEFAULT", "GIT_STASH_APPLY_REINSTATE_INDEX"], "type": "enum", "file": "git2/stash.h", - "line": 75, - "lineto": 82, + "line": 137, + "lineto": 144, "block": "GIT_STASH_APPLY_DEFAULT\nGIT_STASH_APPLY_REINSTATE_INDEX", "tdef": "typedef", "description": " Stash application flags. ", @@ -39978,10 +35211,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -39989,7 +35219,7 @@ { "decl": [ "unsigned int version", - "git_stash_apply_flags flags", + "uint32_t flags", "git_checkout_options checkout_options", "git_stash_apply_progress_cb progress_cb", "void * progress_payload" @@ -39997,22 +35227,18 @@ "type": "struct", "value": "git_stash_apply_options", "file": "git2/stash.h", - "line": 126, - "lineto": 138, - "block": "unsigned int version\ngit_stash_apply_flags flags\ngit_checkout_options checkout_options\ngit_stash_apply_progress_cb progress_cb\nvoid * progress_payload", + "line": 192, + "lineto": 204, + "block": "unsigned int version\nuint32_t flags\ngit_checkout_options checkout_options\ngit_stash_apply_progress_cb progress_cb\nvoid * progress_payload", "tdef": "typedef", "description": " Stash application options structure", - "comments": "Initialize with GIT_STASH_APPLY_OPTIONS_INIT. Alternatively, you can\n use git_stash_apply_init_options.
Initialize with GIT_STASH_APPLY_OPTIONS_INIT. Alternatively, you can use git_stash_apply_options_init.
All ignored files are also stashed and then cleaned up from\n the working directory
\n", "value": 4 + }, + { + "type": "int", + "name": "GIT_STASH_KEEP_ALL", + "comments": "All changes in the index and working directory are left intact
\n", + "value": 8 + } + ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_stash_save_options", + { + "decl": [ + "unsigned int version", + "uint32_t flags", + "const git_signature * stasher", + "const char * message", + "git_strarray paths" + ], + "type": "struct", + "value": "git_stash_save_options", + "file": "git2/stash.h", + "line": 86, + "lineto": 100, + "block": "unsigned int version\nuint32_t flags\nconst git_signature * stasher\nconst char * message\ngit_strarray paths", + "tdef": "typedef", + "description": " Stash save options structure", + "comments": "Initialize with GIT_STASH_SAVE_OPTIONS_INIT. Alternatively, you can use git_stash_save_options_init.
The status value provides the status flags for this file.
The head_to_index value provides detailed information about the\n differences between the file in HEAD and the file in the index.
The index_to_workdir value provides detailed information about the\n differences between the file in the index and the file in the\n working directory.
The status value provides the status flags for this file.
The head_to_index value provides detailed information about the differences between the file in HEAD and the file in the index.
The index_to_workdir value provides detailed information about the differences between the file in the index and the file in the working directory.
git ls-files -o -i --exclude-standard with core git.Calling git_status_foreach() is like calling the extended version\n with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,\n and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled\n together as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.
Calling git_status_foreach() is like calling the extended version with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED, and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled together as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.
Says that callbacks should be made on untracked files.\n These will only be made if the workdir files are included in the status\n "show" option.
\n", "value": 1 }, { "type": "int", "name": "GIT_STATUS_OPT_INCLUDE_IGNORED", - "comments": "", + "comments": "Says that ignored files get callbacks.\n Again, these callbacks will only be made if the workdir files are\n included in the status "show" option.
\n", "value": 2 }, { "type": "int", "name": "GIT_STATUS_OPT_INCLUDE_UNMODIFIED", - "comments": "", + "comments": "Indicates that callback should be made even on unmodified files.
\n", "value": 4 }, { "type": "int", "name": "GIT_STATUS_OPT_EXCLUDE_SUBMODULES", - "comments": "", + "comments": "Indicates that submodules should be skipped.\n This only applies if there are no pending typechanges to the submodule\n (either from or to another type).
\n", "value": 8 }, { "type": "int", "name": "GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS", - "comments": "", + "comments": "Indicates that all files in untracked directories should be included.\n Normally if an entire directory is new, then just the top-level\n directory is included (with a trailing slash on the entry name).\n This flag says to include all of the individual files in the directory\n instead.
\n", "value": 16 }, { "type": "int", "name": "GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH", - "comments": "", + "comments": "Indicates that the given path should be treated as a literal path,\n and not as a pathspec pattern.
\n", "value": 32 }, { "type": "int", "name": "GIT_STATUS_OPT_RECURSE_IGNORED_DIRS", - "comments": "", + "comments": "Indicates that the contents of ignored directories should be included\n in the status. This is like doing git ls-files -o -i --exclude-standard\n with core git.
Indicates that rename detection should be processed between the head and\n the index and enables the GIT_STATUS_INDEX_RENAMED as a possible status\n flag.
\n", "value": 128 }, { "type": "int", "name": "GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR", - "comments": "", + "comments": "Indicates that rename detection should be run between the index and the\n working directory and enabled GIT_STATUS_WT_RENAMED as a possible status\n flag.
\n", "value": 256 }, { "type": "int", "name": "GIT_STATUS_OPT_SORT_CASE_SENSITIVELY", - "comments": "", + "comments": "Overrides the native case sensitivity for the file system and forces\n the output to be in case-sensitive order.
\n", "value": 512 }, { "type": "int", "name": "GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY", - "comments": "", + "comments": "Overrides the native case sensitivity for the file system and forces\n the output to be in case-insensitive order.
\n", "value": 1024 }, { "type": "int", "name": "GIT_STATUS_OPT_RENAMES_FROM_REWRITES", - "comments": "", + "comments": "Iindicates that rename detection should include rewritten files.
\n", "value": 2048 }, { "type": "int", "name": "GIT_STATUS_OPT_NO_REFRESH", - "comments": "", + "comments": "Bypasses the default status behavior of doing a "soft" index reload\n (i.e. reloading the index data if the file on disk has been modified\n outside libgit2).
\n", "value": 4096 }, { "type": "int", "name": "GIT_STATUS_OPT_UPDATE_INDEX", - "comments": "", + "comments": "Tells libgit2 to refresh the stat cache in the index for files that are\n unchanged but have out of date stat einformation in the index.\n It will result in less work being done on subsequent calls to get status.\n This is mutually exclusive with the NO_REFRESH option.
\n", "value": 8192 }, { "type": "int", "name": "GIT_STATUS_OPT_INCLUDE_UNREADABLE", - "comments": "", + "comments": "Normally files that cannot be opened or read are ignored as\n these are often transient files; this option will return\n unreadable files as GIT_STATUS_WT_UNREADABLE.
Unreadable files will be detected and given the status\n untracked instead of unreadable.
\n", "value": 32768 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -40376,50 +35631,56 @@ "git_status_show_t show", "unsigned int flags", "git_strarray pathspec", - "git_tree * baseline" + "git_tree * baseline", + "uint16_t rename_threshold" ], "type": "struct", "value": "git_status_options", "file": "git2/status.h", - "line": 182, - "lineto": 188, - "block": "unsigned int version\ngit_status_show_t show\nunsigned int flags\ngit_strarray pathspec\ngit_tree * baseline", + "line": 222, + "lineto": 262, + "block": "unsigned int version\ngit_status_show_t show\nunsigned int flags\ngit_strarray pathspec\ngit_tree * baseline\nuint16_t rename_threshold", "tdef": "typedef", "description": " Options to control how `git_status_foreach_ext()` will issue callbacks.", - "comments": "This structure is set so that zeroing it out will give you relatively\n sane defaults.
\n\nThe show value is one of the git_status_show_t constants that\n control which files to scan and in what order.
The flags value is an OR'ed combination of the git_status_opt_t\n values above.
The pathspec is an array of path patterns to match (using\n fnmatch-style matching), or just an array of paths to match exactly if\n GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH is specified in the flags.
The baseline is the tree to be used for comparison to the working directory\n and index; defaults to HEAD.
Initialize with GIT_STATUS_OPTIONS_INIT. Alternatively, you can use git_status_options_init.
With git_status_foreach_ext, this will control which changes get\n callbacks. With git_status_list_new, these will control which\n changes are included in the list.
git status --porcelain regarding which files are\nincluded and in what order.With git_status_foreach_ext, this will control which changes get callbacks. With git_status_list_new, these will control which changes are included in the list.
The default. This roughly matches git status --porcelain regarding\n which files are included and in what order.
Only gives status based on HEAD to index comparison, not looking at\n working directory changes.
\n", "value": 1 }, { "type": "int", "name": "GIT_STATUS_SHOW_WORKDIR_ONLY", - "comments": "", + "comments": "Only gives status based on index to working directory comparison,\n not comparing the index to the HEAD.
\n", "value": 2 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -40492,7 +35750,7 @@ "block": "GIT_STATUS_CURRENT\nGIT_STATUS_INDEX_NEW\nGIT_STATUS_INDEX_MODIFIED\nGIT_STATUS_INDEX_DELETED\nGIT_STATUS_INDEX_RENAMED\nGIT_STATUS_INDEX_TYPECHANGE\nGIT_STATUS_WT_NEW\nGIT_STATUS_WT_MODIFIED\nGIT_STATUS_WT_DELETED\nGIT_STATUS_WT_TYPECHANGE\nGIT_STATUS_WT_RENAMED\nGIT_STATUS_WT_UNREADABLE\nGIT_STATUS_IGNORED\nGIT_STATUS_CONFLICTED", "tdef": "typedef", "description": " Status flags for a single file.", - "comments": "A combination of these values will be returned to indicate the status of\n a file. Status compares the working directory, the index, and the\n current HEAD of the repository. The GIT_STATUS_INDEX set of flags\n represents the status of file in the index relative to the HEAD, and the\n GIT_STATUS_WT set of flags represent the status of the file in the\n working directory relative to the index.
A combination of these values will be returned to indicate the status of a file. Status compares the working directory, the index, and the current HEAD of the repository. The GIT_STATUS_INDEX set of flags represents the status of file in the index relative to the HEAD, and the GIT_STATUS_WT set of flags represent the status of the file in the working directory relative to the index.
These values represent settings for the submodule.$name.ignore\n configuration value which says how deeply to look at the working\n directory when getting submodule status.
You can override this value in memory on a per-submodule basis with\n git_submodule_set_ignore() and can write the changed value to disk\n with git_submodule_save(). If you have overwritten the value, you\n can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.
The values are:
\n\nThese values represent settings for the submodule.$name.ignore configuration value which says how deeply to look at the working directory when getting submodule status.
You can override this value in memory on a per-submodule basis with git_submodule_set_ignore() and can write the changed value to disk with git_submodule_save(). If you have overwritten the value, you can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.
The values are:
\n\nRepresent the value of submodule.$name.fetchRecurseSubmodules
Represent the value of submodule.$name.fetchRecurseSubmodules
A combination of these flags will be returned to describe the status of a\n submodule. Depending on the "ignore" property of the submodule, some of\n the flags may never be returned because they indicate changes that are\n supposed to be ignored.
\n\nSubmodule info is contained in 4 places: the HEAD tree, the index, config\n files (both .git/config and .gitmodules), and the working directory. Any\n or all of those places might be missing information about the submodule\n depending on what state the repo is in. We consider all four places to\n build the combination of status flags.
\n\nThere are four values that are not really status, but give basic info\n about what sources of submodule data are available. These will be\n returned even if ignore is set to "ALL".
\n\nThe following values will be returned so long as ignore is not "ALL".
\n\nThe following can only be returned if ignore is "NONE" or "UNTRACKED".
\n\nLastly, the following will only be returned for ignore "NONE".
\n\nA combination of these flags will be returned to describe the status of a submodule. Depending on the "ignore" property of the submodule, some of the flags may never be returned because they indicate changes that are supposed to be ignored.
\n\nSubmodule info is contained in 4 places: the HEAD tree, the index, config files (both .git/config and .gitmodules), and the working directory. Any or all of those places might be missing information about the submodule depending on what state the repo is in. We consider all four places to build the combination of status flags.
\n\nThere are four values that are not really status, but give basic info about what sources of submodule data are available. These will be returned even if ignore is set to "ALL".
\n\nThe following values will be returned so long as ignore is not "ALL".
\n\nThe following can only be returned if ignore is "NONE" or "UNTRACKED".
\n\nLastly, the following will only be returned for ignore "NONE".
\n\nInitialize with GIT_SUBMODULE_UPDATE_OPTIONS_INIT. Alternatively, you can\n use git_submodule_update_init_options.
Initialize with GIT_SUBMODULE_UPDATE_OPTIONS_INIT. Alternatively, you can use git_submodule_update_options_init.
These values represent settings for the submodule.$name.update\n configuration value which says how to handle git submodule update for\n this submodule. The value is usually set in the ".gitmodules" file and\n copied to ".git/config" when the submodule is initialized.
You can override this setting on a per-submodule basis with\n git_submodule_set_update() and write the changed value to disk using\n git_submodule_save(). If you have overwritten the value, you can\n revert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.
The values are:
\n\nThese values represent settings for the submodule.$name.update configuration value which says how to handle git submodule update for this submodule. The value is usually set in the ".gitmodules" file and copied to ".git/config" when the submodule is initialized.
You can override this setting on a per-submodule basis with git_submodule_set_update() and write the changed value to disk using git_submodule_save(). If you have overwritten the value, you can revert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.
The values are:
\n\nCurrently unused.
\n", - "fields": [ - { - "type": "int", - "name": "GIT_TRANSPORTFLAGS_NONE", - "comments": "", - "value": 0 - } - ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": ["git_transport_cb"] } } ], [ @@ -41577,12 +36471,11 @@ "type": "struct", "value": "git_tree", "file": "git2/types.h", - "line": 130, - "lineto": 130, + "line": 147, + "lineto": 147, "tdef": "typedef", "description": " Representation of a tree object. ", "comments": "", - "fields": [], "used": { "returns": [ "git_tree_entry_byid", @@ -41595,6 +36488,7 @@ "git_commit_amend", "git_commit_create", "git_commit_create_buffer", + "git_commit_create_cb", "git_commit_create_v", "git_commit_tree", "git_diff_tree_to_index", @@ -41649,12 +36543,11 @@ "type": "struct", "value": "git_tree_entry", "file": "git2/types.h", - "line": 127, - "lineto": 127, + "line": 144, + "lineto": 144, "tdef": "typedef", "description": " Representation of each one of the entries in a tree object. ", "comments": "", - "fields": [], "used": { "returns": [ "git_tree_entry_byid", @@ -41692,8 +36585,8 @@ "type": "struct", "value": "git_tree_update", "file": "git2/tree.h", - "line": 448, - "lineto": 457, + "line": 449, + "lineto": 458, "block": "git_tree_update_t action\ngit_oid id\ngit_filemode_t filemode\nconst char * path", "tdef": "typedef", "description": " An action to perform during the update of a tree", @@ -41704,11 +36597,7 @@ "name": "action", "comments": " Update action. If it's an removal, only the path is looked at " }, - { - "type": "git_oid", - "name": "id", - "comments": " The entry's id " - }, + { "type": "git_oid", "name": "id", "comments": " The entry's id " }, { "type": "git_filemode_t", "name": "filemode", @@ -41720,25 +36609,17 @@ "comments": " The full path from the root tree " } ], - "used": { - "returns": [], - "needs": [ - "git_tree_create_updated" - ] - } + "used": { "returns": [], "needs": ["git_tree_create_updated"] } } ], [ "git_tree_update_t", { - "decl": [ - "GIT_TREE_UPDATE_UPSERT", - "GIT_TREE_UPDATE_REMOVE" - ], + "decl": ["GIT_TREE_UPDATE_UPSERT", "GIT_TREE_UPDATE_REMOVE"], "type": "enum", "file": "git2/tree.h", - "line": 438, - "lineto": 443, + "line": 439, + "lineto": 444, "block": "GIT_TREE_UPDATE_UPSERT\nGIT_TREE_UPDATE_REMOVE", "tdef": "typedef", "description": " The kind of update to perform", @@ -41757,10 +36638,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -41770,12 +36648,11 @@ "type": "struct", "value": "git_treebuilder", "file": "git2/types.h", - "line": 133, - "lineto": 133, + "line": 150, + "lineto": 150, "tdef": "typedef", "description": " Constructor for in-memory trees ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -41796,10 +36673,7 @@ [ "git_treewalk_mode", { - "decl": [ - "GIT_TREEWALK_PRE", - "GIT_TREEWALK_POST" - ], + "decl": ["GIT_TREEWALK_PRE", "GIT_TREEWALK_POST"], "type": "enum", "file": "git2/tree.h", "line": 398, @@ -41822,12 +36696,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [ - "git_tree_walk" - ] - } + "used": { "returns": [], "needs": ["git_tree_walk"] } } ], [ @@ -41837,18 +36706,17 @@ "type": "struct", "value": "git_worktree", "file": "git2/types.h", - "line": 109, - "lineto": 109, + "line": 126, + "lineto": 126, "tdef": "typedef", "description": " Representation of a working tree ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ "git_repository_open_from_worktree", "git_worktree_add", - "git_worktree_add_init_options", + "git_worktree_add_options_init", "git_worktree_free", "git_worktree_is_locked", "git_worktree_is_prunable", @@ -41858,7 +36726,7 @@ "git_worktree_open_from_repository", "git_worktree_path", "git_worktree_prune", - "git_worktree_prune_init_options", + "git_worktree_prune_options_init", "git_worktree_unlock", "git_worktree_validate" ] @@ -41871,69 +36739,67 @@ "decl": [ "unsigned int version", "int lock", - "git_reference * ref" + "int checkout_existing", + "git_reference * ref", + "git_checkout_options checkout_options" ], "type": "struct", "value": "git_worktree_add_options", "file": "git2/worktree.h", - "line": 84, - "lineto": 89, - "block": "unsigned int version\nint lock\ngit_reference * ref", + "line": 86, + "lineto": 97, + "block": "unsigned int version\nint lock\nint checkout_existing\ngit_reference * ref\ngit_checkout_options checkout_options", "tdef": "typedef", "description": " Worktree add options structure", - "comments": "Initialize with GIT_WORKTREE_ADD_OPTIONS_INIT. Alternatively, you can\n use git_worktree_add_init_options.
Initialize with GIT_WORKTREE_ADD_OPTIONS_INIT. Alternatively, you can use git_worktree_add_options_init.
Initialize with GIT_WORKTREE_PRUNE_OPTIONS_INIT. Alternatively, you can use git_worktree_prune_options_init.