diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 89c64db28..3a2f8cc7a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,60 +10,110 @@ on: name: Testing jobs: - nix-tests: - name: "*nix Tests" + linux-tests: + name: "Linux Tests" strategy: matrix: - node: [8, 10, 12] - os: [ubuntu-16.04, macOS-10.14] - runs-on: ${{ matrix.os }} + 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: | - mkdir ~/.ssh - chmod 700 ~/.ssh - 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* + 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/checkout@master + - uses: actions/setup-python@v5 + with: + python-version: "3.11" - - name: Use Node.js 8.x - uses: actions/setup-node@master + - name: Use Node.js + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - - - name: Install Dependencies for Ubuntu - if: startsWith(matrix.os, 'ubuntu') - run: sudo apt install build-essential libssl-dev libkrb5-dev libc++-dev + 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: - CC: clang - CXX: clang++ - npm_config_clang: 1 - GYP_DEFINES: use_obsolete_asm=true - # There is a race condition in node/generate that needs to be fixed - run: node utils/retry npm install + 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] + fail-fast: false + runs-on: macOS-13 + # This is mostly the same as the Linux steps, waiting for anchor support + # https://github.com/actions/runner/issues/1182 + 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/id_rsa + 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 }} - node_pre_gyp_accessKeyId: ${{ secrets.node_pre_gyp_accessKeyId }} - node_pre_gyp_secretAccessKey: ${{ secrets.node_pre_gyp_secretAccessKey }} + AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} run: | - npm install -g node-pre-gyp aws-sdk + npm install -g @mapbox/node-pre-gyp aws-sdk node lifecycleScripts/clean node-pre-gyp package node-pre-gyp publish @@ -72,9 +122,13 @@ jobs: name: Windows Tests strategy: matrix: - node: [8, 10, 12] + node: [20, 22, 24] arch: [x86, x64] - runs-on: windows-2016 + exclude: + - node: 24 + arch: x86 + fail-fast: false + runs-on: windows-2022 steps: - name: Setup Environment run: | @@ -84,13 +138,14 @@ jobs: git config --global user.name "John Doe" git config --global user.email johndoe@example.com - - uses: actions/checkout@master + - uses: actions/checkout@v4 - - name: Use Node.js 8.x - uses: implausible/setup-node@feature/expose-architecture-override + - name: Use Node.js + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - node-arch: ${{ matrix.arch }} + check-latest: true + architecture: ${{ matrix.arch }} - name: Install run: npm install @@ -107,7 +162,7 @@ jobs: # 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 node-pre-gyp aws-sdk + run: npm install -g @mapbox/node-pre-gyp aws-sdk - name: Deploy (Clean) if: startsWith(github.ref, 'refs/tags/v') @@ -121,6 +176,6 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') env: node_pre_gyp_bucket: ${{ secrets.node_pre_gyp_bucket }} - node_pre_gyp_accessKeyId: ${{ secrets.node_pre_gyp_accessKeyId }} - node_pre_gyp_secretAccessKey: ${{ secrets.node_pre_gyp_secretAccessKey }} + AWS_ACCESS_KEY_ID: ${{ secrets.node_pre_gyp_accessKeyId }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.node_pre_gyp_secretAccessKey }} run: node-pre-gyp publish diff --git a/.gitignore b/.gitignore index 3d571d1c7..feb22eaa2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ /build/ /coverage/ -/dist/ /include/ /lib/enums.js /lib/nodegit.js @@ -35,10 +34,14 @@ /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 diff --git a/.jshintrc b/.jshintrc index 0fd02f29b..437878c8c 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/CHANGELOG.md b/CHANGELOG.md index 9c63dbf20..12d3a9dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,816 @@ # Change Log +## v0.28.0-alpha.34 [(2025-06-03)](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) @@ -3349,8 +4160,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 6e0dde815..72442d791 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,7 @@ > Node bindings to the [libgit2](http://libgit2.github.com/) project. - -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) +[](https://github.com/nodegit/nodegit/actions) **Stable (libgit2@v0.28.3): 0.28.3** diff --git a/examples/add-and-commit.js b/examples/add-and-commit.js index 4f4959dd7..42215257b 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 1c7e3e9f5..1df93fbbc 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 a567fcf75..13dcd4e21 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 f68d0fcfb..b3d6d7510 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 b6ae7efc9..b06c4d795 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 77e78340e..55fb87d3b 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 991a5ae39..9da5ed175 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/input/README.md b/generate/input/README.md index 9ab9b51d6..f0d7573ee 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 0d8720b79..aa0842995 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,7 +56,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_checkout_notify_cb": { @@ -88,7 +91,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": 0 } }, "git_checkout_progress_cb": { @@ -111,10 +115,7 @@ } ], "return": { - "type": "int", - "noResults": 1, - "success": 0, - "error": -1, + "type": "void", "throttle": 100 } }, @@ -130,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": "commit_content", + "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 * []" + }, { "name": "payload", "cType": "void *" @@ -159,7 +179,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_config_foreach_cb": { @@ -177,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 }, { @@ -208,7 +230,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_binary_cb": { @@ -230,7 +253,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_file_cb": { @@ -253,7 +277,7 @@ "noResults": 1, "success": 0, "error": -1, - "throttle": 100 + "cancel": -1 } }, "git_diff_hunk_cb": { @@ -275,7 +299,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_line_cb": { @@ -301,7 +326,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_notify_cb": { @@ -328,7 +354,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_diff_progress_cb": { @@ -355,7 +382,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_apply_fn": { @@ -385,7 +413,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_check_fn": { @@ -411,7 +440,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_cleanup_fn": { @@ -440,7 +470,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_filter_shutdown_fn": { @@ -473,7 +504,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_indexer_progress_cb": { @@ -492,6 +524,7 @@ "noResults": 0, "success": 0, "error": -1, + "cancel": -1, "throttle": 100 } }, @@ -514,7 +547,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_odb_foreach_cb": { @@ -527,7 +561,14 @@ "name": "payload", "cType": "void *" } - ] + ], + "return": { + "type": "int", + "noResults": 0, + "success": 0, + "error": -1, + "cancel": -1 + } }, "git_packbuilder_foreach_cb": { "args": [ @@ -548,7 +589,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_push_update_reference_cb": { @@ -570,7 +612,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_remote_create_cb": { @@ -601,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": { @@ -628,7 +693,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": 1, + "cancel": -1 } }, "git_reference_foreach_cb": { @@ -646,7 +712,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_reference_foreach_name_cb": { @@ -664,7 +731,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_repository_fetchhead_foreach_cb": { @@ -694,7 +762,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": -1, + "cancel": -1 } }, "git_repository_mergehead_foreach_cb": { @@ -712,7 +781,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": 1 + "error": -1, + "cancel": -1 } }, "git_revwalk_hide_cb": { @@ -730,7 +800,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_stash_apply_progress_cb": { @@ -749,6 +820,7 @@ "noResults":0, "success": 0, "error": -1, + "cancel": -1, "throttle": 100 } }, @@ -775,7 +847,8 @@ "type": "int", "noResults":0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_status_cb": { @@ -797,7 +870,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_submodule_cb": { @@ -819,7 +893,8 @@ "type": "int", "noResults": 0, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_tag_foreach_cb": { @@ -841,7 +916,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_push_transfer_progress_cb": { @@ -868,6 +944,7 @@ "noResults": 0, "success": 0, "error": -1, + "cancel": -1, "throttle": 100 } }, @@ -891,7 +968,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_transport_certificate_check_cb": { @@ -917,7 +995,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_transport_message_cb": { @@ -939,7 +1018,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_treebuilder_filter_cb": { @@ -957,7 +1037,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": 0 } }, "git_treewalk_cb": { @@ -979,7 +1060,8 @@ "type": "int", "noResults": 1, "success": 0, - "error": -1 + "error": -1, + "cancel": -1 } }, "git_url_resolve_cb": { @@ -1005,7 +1087,8 @@ "type": "int", "noResults": -30, "success": 0, - "error": -1 + "error": -1, + "cancel": -30 } } } diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 92772180c..3e305900d 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -33,6 +33,10 @@ } } }, + "credential": { + "JsName": "TYPE", + "owner": "Credential" + }, "describe_strategy": { "ignore": true }, @@ -66,6 +70,10 @@ "owner": "Object", "removeString": "OBJ_" }, + "oid": { + "JsName": "TYPE", + "owner": "Oid" + }, "proxy": { "JsName": "PROXY", "isMask": false @@ -78,6 +86,10 @@ "JsName": "TYPE", "isMask": false }, + "revspec": { + "JsName": "TYPE", + "isMask": false + }, "sort": { "owner": "Revwalk" }, @@ -106,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"] + } } } } @@ -130,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 }, @@ -290,6 +333,9 @@ "isErrorCode": true } }, + "git_blob_filter_options_init": { + "ignore": true + }, "git_blob_filtered_content": { "isAsync": true, "isPrototypeMethod": false, @@ -521,6 +567,9 @@ }, "git_checkout_index": { "args": { + "index": { + "isOptional": true + }, "opts": { "isOptional": true } @@ -555,11 +604,23 @@ "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 }, @@ -738,6 +799,16 @@ } } }, + "commitarray": { + "fields": { + "commits": { + "ignore": true + }, + "count": { + "ignore": true + } + } + }, "config": { "selfFreeing": true, "functions": { @@ -1002,6 +1073,7 @@ "selfFreeing": true }, "config_iterator": { + "needsForwardDeclaration": false, "selfFreeing": true, "fields": { "backend": { @@ -1066,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": { @@ -1448,6 +1526,9 @@ } } }, + "email_create_options": { + "hasConstructor": true + }, "fetch": { "functions": { "git_fetch_init_options": { @@ -1470,6 +1551,9 @@ "git2/sys/filter.h" ], "fields": { + "cleanup": { + "ignore": true + }, "stream": { "ignore": true } @@ -1610,6 +1694,20 @@ "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 + } } } }, @@ -1956,6 +2054,7 @@ } }, "index_entry": { + "isReturnable": true, "hasConstructor": true, "ignoreInit": true }, @@ -1996,7 +2095,10 @@ "git_index_name_clear": { "cppFunctionName": "Clear", "jsFunctionName": "clear", - "isAsync": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_index_name_entrycount": { "cppFunctionName": "Entrycount", @@ -2031,7 +2133,10 @@ "cppFunctionName": "Clear", "jsFunctionName": "clear", "isAsync": true, - "isPrototypeMethod": false + "isPrototypeMethod": false, + "return": { + "isErrorCode": true + } }, "git_index_reuc_entrycount": { "cppFunctionName": "Entrycount", @@ -2075,6 +2180,11 @@ "git2/sys/index.h" ] }, + "index_time": { + "isReturnable": true, + "hasConstructor": true, + "ignoreInit": true + }, "indexer": { "ignore": true }, @@ -2173,10 +2283,12 @@ "jsClassName": "Number" }, "merge_opts": { + "isOptional": true, "cType": "git_merge_options *", "cppClassName": "GitMergeOptions" }, "checkout_opts": { + "isOptional": true, "cType": "git_checkout_options *", "cppClassName": "GitCheckoutOptions" } @@ -2207,6 +2319,9 @@ "cppClassName": "Number", "jsClassName": "Number" } + }, + "return": { + "isErrorCode": true } }, "git_merge_analysis_for_ref": { @@ -2335,6 +2450,9 @@ "notes_commit_out": { "isReturn": true } + }, + "return": { + "isErrorCode": true } }, "git_note_comitter": { @@ -2571,10 +2689,17 @@ "shouldAlloc": true, "functions": { "git_oid_cpy": { + "isAsync": false, "args": { + "src": { + "shouldAlloc": false + }, "out": { "isReturn": true } + }, + "return": { + "isErrorCode": true } }, "git_oid_fmt": { @@ -2591,7 +2716,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 @@ -2695,10 +2831,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 }, @@ -2707,8 +2870,10 @@ }, "git_patch_from_diff": { "isAsync": true, - "return": { - "ownedBy": ["diff"] + "args": { + "out": { + "ownedBy": ["diff"] + } } }, "git_patch_get_delta": { @@ -2911,6 +3076,7 @@ "git_rebase_init": { "args": { "out": { + "isSelf": true, "ownedBy": ["repo"] }, "upstream": { @@ -2923,6 +3089,7 @@ "isOptional": true }, "opts": { + "preserveOnThis": true, "isOptional": true } } @@ -2954,6 +3121,10 @@ "out": { "isSelf": true, "ownedBy": ["repo"] + }, + "opts": { + "isOptional": true, + "preserveOnThis": true } } }, @@ -2972,6 +3143,57 @@ } } }, + "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 *" + } + ] + } + } + }, "refdb": { "selfFreeing": true, "functions": { @@ -3198,17 +3420,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, @@ -3240,6 +3487,9 @@ }, "git_remote_fetch": { "args": { + "opts": { + "isOptional": true + }, "reflog_message": { "isOptional": true }, @@ -3312,7 +3562,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, @@ -3320,6 +3594,9 @@ "isErrorCode": true }, "args": { + "refspecs": { + "isOptional": true + }, "opts": { "isOptional": true } @@ -3351,6 +3628,11 @@ } }, "git_remote_upload": { + "args": { + "refspecs": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true @@ -3358,6 +3640,11 @@ } } }, + "remote_connect_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "remote_callbacks": { "fields": { "completion": { @@ -3370,7 +3657,7 @@ "ignore": true }, "sideband_progress": { - "ignore": true + "ignore": false }, "update_tips": { "ignore": true @@ -3390,12 +3677,34 @@ "isSingleton": true, "dependencies": [ "git2/sys/repository.h", + "../include/commit.h", "../include/submodule.h", "../include/remote.h" ], "functions": { "git_repository__cleanup": { - "isAsync": true + "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": { @@ -3446,9 +3755,6 @@ }, "isAsync": false }, - "git_repository_init_init_options": { - "ignore": true - }, "git_repository_init_options_init": { "ignore": true }, @@ -3512,6 +3818,9 @@ "index": { "isOptional": true } + }, + "return": { + "isErrorCode": true } }, "git_repository_set_odb": { @@ -3520,6 +3829,9 @@ "git_repository_set_refdb": { "ignore": true }, + "git_repository_statistics": { + "isAsync": true + }, "git_repository_submodule_cache_all": { "return": { "isErrorCode": true @@ -3615,9 +3927,6 @@ } } }, - "revspec": { - "ignore": true - }, "revwalk": { "selfFreeing": true, "ownerFn": { @@ -3697,6 +4006,11 @@ "stash": { "functions": { "git_stash_apply": { + "args": { + "options": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true @@ -3708,6 +4022,9 @@ "git_stash_apply_options_init": { "ignore": true }, + "git_stash_save_options_init": { + "ignore": true + }, "git_stash_drop": { "isAsync": true, "return": { @@ -3721,6 +4038,11 @@ } }, "git_stash_pop": { + "args": { + "options": { + "isOptional": true + } + }, "isAsync": true, "return": { "isErrorCode": true @@ -3739,6 +4061,11 @@ } } }, + "stash_save_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "stdalloc": { "ignore": true }, @@ -3824,7 +4151,11 @@ }, "strarray": { "selfFreeing": true, + "freeFunctionName": "git_strarray_dispose", "functions": { + "git_strarray_dispose": { + "ignore": true + }, "git_strarray_free": { "ignore": true } @@ -4308,6 +4639,11 @@ "treebuilder": { "selfFreeing": true, "functions": { + "git_treebuilder_clear": { + "return": { + "isErrorCode": true + } + }, "git_treebuilder_filter": { "ignore": true }, @@ -4407,6 +4743,14 @@ "git_worktree_free": { "ignore": true }, + "git_worktree_is_prunable": { + "args": { + "opts": { + "isOptional": true + } + }, + "isAsync": true + }, "git_worktree_lookup": { "args": { "out": { @@ -4426,6 +4770,17 @@ }, "git_worktree_prune_options_init": { "ignore": true + }, + "git_worktree_prune": { + "args": { + "opts": { + "isOptional": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } } }, "dependencies": [ diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index cb1361c66..5870c608a 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -19,25 +19,29 @@ "functions": [ "git_apply_delta_cb", "git_apply_hunk_cb", + "git_apply_options_init", "git_apply_to_tree", "git_apply" ], "meta": {}, - "lines": 145 + "lines": 161 }, { "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": 258 + "lines": 363 }, { "file": "git2/blame.h", @@ -51,7 +55,7 @@ "git_blame_free" ], "meta": {}, - "lines": 224 + "lines": 280 }, { "file": "git2/blob.h", @@ -63,6 +67,7 @@ "git_blob_owner", "git_blob_rawcontent", "git_blob_rawsize", + "git_blob_filter_options_init", "git_blob_filter", "git_blob_create_from_workdir", "git_blob_create_from_disk", @@ -70,10 +75,11 @@ "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": 260 + "lines": 307 }, { "file": "git2/branch.h", @@ -93,30 +99,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": 305 + "lines": 332 }, { "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": 128 + "lines": 68 }, { "file": "git2/cert.h", - "functions": [ - "git_transport_certificate_check_cb" - ], + "functions": ["git_transport_certificate_check_cb"], "meta": {}, - "lines": 131 + "lines": 168 }, { "file": "git2/checkout.h", @@ -130,7 +130,7 @@ "git_checkout_tree" ], "meta": {}, - "lines": 394 + "lines": 413 }, { "file": "git2/cherrypick.h", @@ -183,24 +183,27 @@ "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_signing_cb" + "git_commit_create_cb", + "git_commitarray_dispose" ], "meta": {}, - "lines": 524 + "lines": 603 }, { "file": "git2/common.h", "functions": [ "git_libgit2_version", + "git_libgit2_prerelease", "git_libgit2_features", "git_libgit2_opts" ], "meta": {}, - "lines": 404 + "lines": 530 }, { "file": "git2/config.h", @@ -251,52 +254,64 @@ "git_config_lock" ], "meta": {}, - "lines": 762 + "lines": 818 }, { - "file": "git2/cred.h", + "file": "git2/credential.h", "functions": [ - "git_cred_acquire_cb", - "git_cred_free", - "git_cred_has_username", - "git_cred_get_username", - "git_cred_userpass_plaintext_new", - "git_cred_default_new", - "git_cred_username_new", - "git_cred_ssh_key_new", - "git_cred_ssh_key_memory_new", - "git_cred_ssh_interactive_new", - "git_cred_ssh_key_from_agent", - "git_cred_ssh_custom_new" + "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_new", + "git_credential_ssh_key_from_agent", + "git_credential_ssh_custom_new" ], "meta": {}, - "lines": 304 + "lines": 311 }, { - "file": "git2/cred_helpers.h", - "functions": [ - "git_cred_userpass" - ], + "file": "git2/credential_helpers.h", + "functions": ["git_credential_userpass"], "meta": {}, - "lines": 48 + "lines": 49 }, { "file": "git2/deprecated.h", "functions": [ - "git_blob_create_fromworkdir", "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", "git_object__size", - "git_oid_iszero", + "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": 459 + "lines": 905 }, { "file": "git2/describe.h", @@ -309,7 +324,7 @@ "git_describe_result_free" ], "meta": {}, - "lines": 184 + "lines": 189 }, { "file": "git2/diff.h", @@ -349,48 +364,47 @@ "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_options_init", "git_diff_patchid_options_init", "git_diff_patchid" ], "meta": {}, - "lines": 1504 + "lines": 1471 }, { - "file": "git2/errors.h", + "file": "git2/email.h", "functions": [ - "git_error_last", - "git_error_clear", - "git_error_set_str", - "git_error_set_oom" + "git_email_create_from_diff", + "git_email_create_from_commit" ], "meta": {}, - "lines": 157 + "lines": 122 + }, + { + "file": "git2/errors.h", + "functions": ["git_error_last"], + "meta": {}, + "lines": 139 }, { "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": 218 + "lines": 269 }, { "file": "git2/global.h", - "functions": [ - "git_libgit2_init", - "git_libgit2_shutdown" - ], + "functions": ["git_libgit2_init", "git_libgit2_shutdown"], "meta": {}, "lines": 39 }, @@ -398,10 +412,11 @@ "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", @@ -417,8 +432,6 @@ "file": "git2/index.h", "functions": [ "git_index_matched_path_cb", - "git_index_open", - "git_index_new", "git_index_free", "git_index_owner", "git_index_caps", @@ -462,7 +475,7 @@ "git_index_conflict_iterator_free" ], "meta": {}, - "lines": 830 + "lines": 844 }, { "file": "git2/indexer.h", @@ -473,10 +486,11 @@ "git_indexer_append", "git_indexer_commit", "git_indexer_hash", + "git_indexer_name", "git_indexer_free" ], "meta": {}, - "lines": 142 + "lines": 191 }, { "file": "git2/mailmap.h", @@ -513,7 +527,7 @@ "git_merge" ], "meta": {}, - "lines": 602 + "lines": 622 }, { "file": "git2/message.h", @@ -523,14 +537,9 @@ "git_message_trailer_array_free" ], "meta": {}, - "lines": 79 - }, - { - "file": "git2/net.h", - "functions": [], - "meta": {}, - "lines": 50 + "lines": 81 }, + { "file": "git2/net.h", "functions": [], "meta": {}, "lines": 50 }, { "file": "git2/notes.h", "functions": [ @@ -571,23 +580,23 @@ "git_object_string2type", "git_object_typeisloose", "git_object_peel", - "git_object_dup" + "git_object_dup", + "git_object_rawcontent_is_valid" ], "meta": {}, - "lines": 225 + "lines": 273 }, { "file": "git2/odb.h", "functions": [ "git_odb_foreach_cb", - "git_odb_new", - "git_odb_open", "git_odb_add_disk_alternate", "git_odb_free", "git_odb_read", "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", @@ -600,8 +609,7 @@ "git_odb_stream_free", "git_odb_open_rstream", "git_odb_write_pack", - "git_odb_hash", - "git_odb_hashfile", + "git_odb_write_multi_pack_index", "git_odb_object_dup", "git_odb_object_free", "git_odb_object_id", @@ -611,28 +619,16 @@ "git_odb_add_backend", "git_odb_add_alternate", "git_odb_num_backends", - "git_odb_get_backend" - ], - "meta": {}, - "lines": 545 - }, - { - "file": "git2/odb_backend.h", - "functions": [ - "git_odb_backend_pack", - "git_odb_backend_loose", - "git_odb_backend_one_pack" + "git_odb_get_backend", + "git_odb_set_commit_graph" ], "meta": {}, - "lines": 131 + "lines": 650 }, + { "file": "git2/odb_backend.h", "functions": [], "meta": {}, "lines": 219 }, { "file": "git2/oid.h", "functions": [ - "git_oid_fromstr", - "git_oid_fromstrp", - "git_oid_fromstrn", - "git_oid_fromraw", "git_oid_fmt", "git_oid_nfmt", "git_oid_pathfmt", @@ -650,15 +646,13 @@ "git_oid_shorten_free" ], "meta": {}, - "lines": 264 + "lines": 369 }, { "file": "git2/oidarray.h", - "functions": [ - "git_oidarray_free" - ], + "functions": ["git_oidarray_dispose"], "meta": {}, - "lines": 34 + "lines": 31 }, { "file": "git2/pack.h", @@ -673,6 +667,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", @@ -682,11 +677,12 @@ "git_packbuilder_free" ], "meta": {}, - "lines": 247 + "lines": 263 }, { "file": "git2/patch.h", "functions": [ + "git_patch_owner", "git_patch_from_diff", "git_patch_from_blobs", "git_patch_from_blob_and_buffer", @@ -703,7 +699,7 @@ "git_patch_to_buf" ], "meta": {}, - "lines": 268 + "lines": 284 }, { "file": "git2/pathspec.h", @@ -727,9 +723,7 @@ }, { "file": "git2/proxy.h", - "functions": [ - "git_proxy_options_init" - ], + "functions": ["git_proxy_options_init"], "meta": {}, "lines": 94 }, @@ -754,7 +748,7 @@ "git_rebase_free" ], "meta": {}, - "lines": 363 + "lines": 395 }, { "file": "git2/refdb.h", @@ -765,7 +759,7 @@ "git_refdb_free" ], "meta": {}, - "lines": 63 + "lines": 66 }, { "file": "git2/reflog.h", @@ -831,11 +825,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": 763 + "lines": 767 }, { "file": "git2/refspec.h", @@ -872,13 +866,14 @@ "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", @@ -889,9 +884,13 @@ "git_push_negotiation", "git_push_update_reference_cb", "git_url_resolve_cb", + "git_remote_ready_cb", "git_remote_init_callbacks", "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", @@ -903,19 +902,18 @@ "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": 949 + "lines": 1189 }, { "file": "git2/repository.h", "functions": [ "git_repository_open", "git_repository_open_from_worktree", - "git_repository_wrap_odb", "git_repository_discover", "git_repository_open_ext", "git_repository_open_bare", @@ -958,10 +956,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": 899 + "lines": 992 }, { "file": "git2/reset.h", @@ -985,11 +985,7 @@ }, { "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 }, @@ -1016,7 +1012,7 @@ "git_revwalk_add_hide_cb" ], "meta": {}, - "lines": 291 + "lines": 298 }, { "file": "git2/signature.h", @@ -1035,6 +1031,8 @@ "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_options_init", "git_stash_apply", @@ -1044,7 +1042,7 @@ "git_stash_pop" ], "meta": {}, - "lines": 256 + "lines": 310 }, { "file": "git2/status.h", @@ -1061,16 +1059,13 @@ "git_status_should_ignore" ], "meta": {}, - "lines": 383 + "lines": 448 }, { "file": "git2/strarray.h", - "functions": [ - "git_strarray_free", - "git_strarray_copy" - ], + "functions": ["git_strarray_dispose"], "meta": {}, - "lines": 53 + "lines": 37 }, { "file": "git2/submodule.h", @@ -1079,6 +1074,7 @@ "git_submodule_update_options_init", "git_submodule_update", "git_submodule_lookup", + "git_submodule_dup", "git_submodule_free", "git_submodule_foreach", "git_submodule_add_setup", @@ -1111,43 +1107,25 @@ "git_submodule_location" ], "meta": {}, - "lines": 650 - }, - { - "file": "git2/sys/filter.h", - "functions": [], - "meta": {}, - "lines": 95 - }, - { - "file": "git2/sys/hashsig.h", - "functions": [], - "meta": {}, - "lines": 45 - }, - { - "file": "git2/sys/merge.h", - "functions": [], - "meta": {}, - "lines": 41 - }, - { - "file": "git2/sys/path.h", - "functions": [], - "meta": {}, - "lines": 41 + "lines": 664 }, { - "file": "git2/sys/stream.h", + "file": "git2/sys/commit_graph.h", "functions": [], "meta": {}, - "lines": 83 + "lines": 108 }, + { "file": "git2/sys/config.h", "functions": [], "meta": {}, "lines": 143 }, + { "file": "git2/sys/filter.h", "functions": [], "meta": {}, "lines": 95 }, + { "file": "git2/sys/hashsig.h", "functions": [], "meta": {}, "lines": 45 }, + { "file": "git2/sys/merge.h", "functions": [], "meta": {}, "lines": 41 }, + { "file": "git2/sys/path.h", "functions": [], "meta": {}, "lines": 41 }, + { "file": "git2/sys/stream.h", "functions": [], "meta": {}, "lines": 97 }, { "file": "git2/sys/transport.h", "functions": [], "meta": {}, - "lines": 292 + "lines": 318 }, { "file": "git2/tag.h", @@ -1173,17 +1151,15 @@ "git_tag_foreach_cb", "git_tag_foreach", "git_tag_peel", - "git_tag_dup" + "git_tag_dup", + "git_tag_name_is_valid" ], "meta": {}, - "lines": 366 + "lines": 379 }, { "file": "git2/trace.h", - "functions": [ - "git_trace_cb", - "git_trace_set" - ], + "functions": ["git_trace_cb", "git_trace_set"], "meta": {}, "lines": 63 }, @@ -1204,10 +1180,7 @@ }, { "file": "git2/transport.h", - "functions": [ - "git_transport_message_cb", - "git_transport_cb" - ], + "functions": ["git_transport_message_cb", "git_transport_cb"], "meta": {}, "lines": 37 }, @@ -1243,21 +1216,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": [], - "meta": {}, - "lines": 357 + "lines": 470 }, + { "file": "git2/types.h", "functions": [], "meta": {}, "lines": 366 }, { "file": "git2/worktree.h", "functions": [ @@ -1278,7 +1245,7 @@ "git_worktree_prune" ], "meta": {}, - "lines": 251 + "lines": 267 } ], "functions": { @@ -1306,16 +1273,13 @@ ], "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 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.
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.
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": 203, + "lineto": 208, + "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": 188, - "lineto": 194, + "line": 240, + "lineto": 246, "args": [ { "name": "values_out", @@ -1695,19 +1687,60 @@ ], "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": null - }, + "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": 265, + "lineto": 271, + "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": 227, - "lineto": 232, + "line": 304, + "lineto": 309, "args": [ { "name": "repo", @@ -1745,24 +1778,63 @@ "comments": "", "group": "attr" }, + "git_attr_foreach_ext": { + "type": "function", + "file": "git2/attr.h", + "line": 324, + "lineto": 329, + "args": [ + { + "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": "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, 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": " 0 on success, non-zero callback return value, or error code" + }, + "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": 242, - "lineto": 243, + "line": 342, + "lineto": 343, "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 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" @@ -1770,40 +1842,37 @@ "git_attr_add_macro": { "type": "function", "file": "git2/attr.h", - "line": 255, - "lineto": 258, + "line": 360, + "lineto": 363, "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
file of the repository (plus the build-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",
+ "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_options_init": {
"type": "function",
"file": "git2/blame.h",
- "line": 103,
- "lineto": 105,
+ "line": 138,
+ "lineto": 140,
"args": [
{
"name": "opts",
@@ -1829,21 +1898,18 @@
"git_blame_get_hunk_count": {
"type": "function",
"file": "git2/blame.h",
- "line": 154,
- "lineto": 154,
+ "line": 210,
+ "lineto": 210,
"args": [
{
"name": "blame",
"type": "git_blame *",
- "comment": null
+ "comment": "The blame structure to query."
}
],
"argline": "git_blame *blame",
"sig": "git_blame *",
- "return": {
- "type": "uint32_t",
- "comment": null
- },
+ "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" @@ -1851,8 +1917,8 @@ "git_blame_get_hunk_byindex": { "type": "function", "file": "git2/blame.h", - "line": 163, - "lineto": 165, + "line": 219, + "lineto": 221, "args": [ { "name": "blame", @@ -1878,8 +1944,8 @@ "git_blame_get_hunk_byline": { "type": "function", "file": "git2/blame.h", - "line": 174, - "lineto": 176, + "line": 230, + "lineto": 232, "args": [ { "name": "blame", @@ -1902,16 +1968,14 @@ "comments": "", "group": "blame", "examples": { - "blame.c": [ - "ex/HEAD/blame.html#git_blame_get_hunk_byline-1" - ] + "blame.c": ["ex/v1.8.4/blame.html#git_blame_get_hunk_byline-1"] } }, "git_blame_file": { "type": "function", "file": "git2/blame.h", - "line": 189, - "lineto": 193, + "line": 245, + "lineto": 249, "args": [ { "name": "out", @@ -1943,17 +2007,13 @@ "description": "Get the blame for a single file.
\n", "comments": "", "group": "blame", - "examples": { - "blame.c": [ - "ex/HEAD/blame.html#git_blame_file-2" - ] - } + "examples": { "blame.c": ["ex/v1.8.4/blame.html#git_blame_file-2"] } }, "git_blame_buffer": { "type": "function", "file": "git2/blame.h", - "line": 213, - "lineto": 217, + "line": 269, + "lineto": 273, "args": [ { "name": "out", @@ -1989,8 +2049,8 @@ "git_blame_free": { "type": "function", "file": "git2/blame.h", - "line": 224, - "lineto": 224, + "line": 280, + "lineto": 280, "args": [ { "name": "blame", @@ -2000,18 +2060,11 @@ ], "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/HEAD/blame.html#git_blame_free-3" - ] - } + "examples": { "blame.c": ["ex/v1.8.4/blame.html#git_blame_free-3"] } }, "git_blob_lookup": { "type": "function", @@ -2037,20 +2090,13 @@ ], "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/HEAD/blame.html#git_blob_lookup-4" - ], - "general.c": [ - "ex/HEAD/general.html#git_blob_lookup-1" - ] + "blame.c": ["ex/v1.8.4/blame.html#git_blob_lookup-4"], + "general.c": ["ex/v1.8.4/general.html#git_blob_lookup-1"] } }, "git_blob_lookup_prefix": { @@ -2082,10 +2128,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" @@ -2096,28 +2139,17 @@ "line": 60, "lineto": 60, "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: 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/HEAD/blame.html#git_blob_free-5" - ], - "general.c": [ - "ex/HEAD/general.html#git_blob_free-2" - ] + "blame.c": ["ex/v1.8.4/blame.html#git_blob_free-5"], + "general.c": ["ex/v1.8.4/general.html#git_blob_free-2"] } }, "git_blob_id": { @@ -2180,21 +2212,15 @@ "sig": "const git_blob *", "return": { "type": "const void *", - "comment": " the pointer" + "comment": " 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; 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/HEAD/blame.html#git_blob_rawcontent-6" - ], - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_blob_rawcontent-1" - ], - "general.c": [ - "ex/HEAD/general.html#git_blob_rawcontent-3" - ] + "blame.c": ["ex/v1.8.4/blame.html#git_blob_rawcontent-6"], + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_blob_rawcontent-1"], + "general.c": ["ex/v1.8.4/general.html#git_blob_rawcontent-3"] } }, "git_blob_rawsize": { @@ -2211,31 +2237,51 @@ ], "argline": "const git_blob *blob", "sig": "const git_blob *", - "return": { - "type": "git_object_size_t", - "comment": " size on bytes" - }, + "return": { "type": "git_object_size_t", "comment": " size on bytes" }, "description": "Get the size in bytes of the contents of a blob
\n", "comments": "", "group": "blob", "examples": { - "blame.c": [ - "ex/HEAD/blame.html#git_blob_rawsize-7" - ], - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_blob_rawsize-2" - ], + "blame.c": ["ex/v1.8.4/blame.html#git_blob_rawsize-7"], + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_blob_rawsize-2"], "general.c": [ - "ex/HEAD/general.html#git_blob_rawsize-4", - "ex/HEAD/general.html#git_blob_rawsize-5" + "ex/v1.8.4/general.html#git_blob_rawsize-4", + "ex/v1.8.4/general.html#git_blob_rawsize-5" ] } }, + "git_blob_filter_options_init": { + "type": "function", + "file": "git2/blob.h", + "line": 164, + "lineto": 164, + "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 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 free 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", "comments": "", "group": "blob" @@ -2303,8 +2343,8 @@ "git_blob_create_from_disk": { "type": "function", "file": "git2/blob.h", - "line": 183, - "lineto": 183, + "line": 217, + "lineto": 217, "args": [ { "name": "id", @@ -2324,10 +2364,7 @@ ], "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" - }, + "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", "comments": "", "group": "blob" @@ -2335,8 +2372,8 @@ "git_blob_create_from_stream": { "type": "function", "file": "git2/blob.h", - "line": 210, - "lineto": 213, + "line": 244, + "lineto": 247, "args": [ { "name": "out", @@ -2356,10 +2393,7 @@ ], "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" - }, + "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 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", "comments": "The stream will be closed and freed.
\n", "group": "blob" @@ -2394,8 +2425,8 @@ "git_blob_create_from_buffer": { "type": "function", "file": "git2/blob.h", - "line": 237, - "lineto": 238, + "line": 271, + "lineto": 272, "args": [ { "name": "id", @@ -2405,25 +2436,18 @@ { "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" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Write an in-memory buffer to the ODB as a blob
\n", "comments": "", "group": "blob" @@ -2431,8 +2455,8 @@ "git_blob_is_binary": { "type": "function", "file": "git2/blob.h", - "line": 251, - "lineto": 251, + "line": 285, + "lineto": 285, "args": [ { "name": "blob", @@ -2450,11 +2474,34 @@ "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": 297, + "lineto": 297, + "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 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" @@ -2480,8 +2524,8 @@ "git_branch_create": { "type": "function", "file": "git2/branch.h", - "line": 50, - "lineto": 55, + "line": 52, + "lineto": 57, "args": [ { "name": "out", @@ -2491,7 +2535,7 @@ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "the repository to create the branch in." }, { "name": "branch_name", @@ -2522,55 +2566,36 @@ "git_branch_create_from_annotated": { "type": "function", "file": "git2/branch.h", - "line": 68, - "lineto": 73, + "line": 70, + "lineto": 75, "args": [ - { - "name": "ref_out", - "type": "git_reference **", - "comment": null - }, - { - "name": "repository", - "type": "git_repository *", - "comment": null - }, - { - "name": "branch_name", - "type": "const char *", - "comment": null - }, + { "name": "ref_out", "type": "git_reference **", "comment": null }, + { "name": "repository", "type": "git_repository *", "comment": null }, + { "name": "branch_name", "type": "const char *", "comment": null }, { "name": "commit", "type": "const git_annotated_commit *", "comment": null }, - { - "name": "force", - "type": "int", - "comment": null - } + { "name": "force", "type": "int", "comment": null } ], "argline": "git_reference **ref_out, git_repository *repository, const char *branch_name, const git_annotated_commit *commit, int force", "sig": "git_reference **::git_repository *::const char *::const git_annotated_commit *::int", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "description": "Create a new branch pointing at a target commit
\n", "comments": "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.
See the documentation for git_branch_create()
.
Create an iterator which loops over the requested branches.
\n", "comments": "", "group": "branch" @@ -2623,8 +2645,8 @@ "git_branch_next": { "type": "function", "file": "git2/branch.h", - "line": 114, - "lineto": 114, + "line": 116, + "lineto": 116, "args": [ { "name": "out", @@ -2655,8 +2677,8 @@ "git_branch_iterator_free": { "type": "function", "file": "git2/branch.h", - "line": 121, - "lineto": 121, + "line": 123, + "lineto": 123, "args": [ { "name": "iter", @@ -2666,10 +2688,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" @@ -2677,8 +2696,8 @@ "git_branch_move": { "type": "function", "file": "git2/branch.h", - "line": 144, - "lineto": 148, + "line": 146, + "lineto": 150, "args": [ { "name": "out", @@ -2708,14 +2727,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. 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()
.
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()
.
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/HEAD/merge.html#git_branch_name-4" - ] - } + "examples": { "merge.c": ["ex/v1.8.4/merge.html#git_branch_name-4"] } }, "git_branch_upstream": { "type": "function", "file": "git2/branch.h", - "line": 207, - "lineto": 209, + "line": 209, + "lineto": 211, "args": [ { "name": "out", @@ -2810,8 +2825,8 @@ "git_branch_set_upstream": { "type": "function", "file": "git2/branch.h", - "line": 226, - "lineto": 228, + "line": 228, + "lineto": 230, "args": [ { "name": "branch", @@ -2837,8 +2852,8 @@ "git_branch_upstream_name": { "type": "function", "file": "git2/branch.h", - "line": 244, - "lineto": 247, + "line": 246, + "lineto": 249, "args": [ { "name": "out", @@ -2869,8 +2884,8 @@ "git_branch_is_head": { "type": "function", "file": "git2/branch.h", - "line": 257, - "lineto": 258, + "line": 259, + "lineto": 260, "args": [ { "name": "branch", @@ -2891,8 +2906,8 @@ "git_branch_is_checked_out": { "type": "function", "file": "git2/branch.h", - "line": 270, - "lineto": 271, + "line": 272, + "lineto": 273, "args": [ { "name": "branch", @@ -2913,8 +2928,8 @@ "git_branch_remote_name": { "type": "function", "file": "git2/branch.h", - "line": 289, - "lineto": 292, + "line": 291, + "lineto": 294, "args": [ { "name": "out", @@ -2945,8 +2960,8 @@ "git_branch_upstream_remote": { "type": "function", "file": "git2/branch.h", - "line": 305, - "lineto": 305, + "line": 307, + "lineto": 307, "args": [ { "name": "buf", @@ -2966,153 +2981,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" - }, + "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": 78, - "lineto": 78, + "file": "git2/branch.h", + "line": 320, + "lineto": 320, "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 pointed to by buffer->ptr
. This will not free the memory if it looks like it was not allocated internally, but it will clear the buffer back 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. 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" + "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": 111, - "lineto": 112, + "file": "git2/branch.h", + "line": 332, + "lineto": 332, "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": 120, - "lineto": 120, - "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
.
Lookup a commit object from a repository.
\n", "comments": "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 longer needed.
Close an open commit
\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/HEAD/checkout.html#git_commit_free-10" - ], + "checkout.c": ["ex/v1.8.4/checkout.html#git_commit_free-10"], "general.c": [ - "ex/HEAD/general.html#git_commit_free-9", - "ex/HEAD/general.html#git_commit_free-10", - "ex/HEAD/general.html#git_commit_free-11", - "ex/HEAD/general.html#git_commit_free-12", - "ex/HEAD/general.html#git_commit_free-13" + "ex/v1.8.4/general.html#git_commit_free-9", + "ex/v1.8.4/general.html#git_commit_free-10", + "ex/v1.8.4/general.html#git_commit_free-11", + "ex/v1.8.4/general.html#git_commit_free-12", + "ex/v1.8.4/general.html#git_commit_free-13" ], "log.c": [ - "ex/HEAD/log.html#git_commit_free-2", - "ex/HEAD/log.html#git_commit_free-3", - "ex/HEAD/log.html#git_commit_free-4", - "ex/HEAD/log.html#git_commit_free-5" + "ex/v1.8.4/log.html#git_commit_free-2", + "ex/v1.8.4/log.html#git_commit_free-3", + "ex/v1.8.4/log.html#git_commit_free-4", + "ex/v1.8.4/log.html#git_commit_free-5" ] } }, @@ -3551,12 +3487,8 @@ "comments": "", "group": "commit", "examples": { - "general.c": [ - "ex/HEAD/general.html#git_commit_id-14" - ], - "log.c": [ - "ex/HEAD/log.html#git_commit_id-6" - ] + "general.c": ["ex/v1.8.4/general.html#git_commit_id-14"], + "log.c": ["ex/v1.8.4/log.html#git_commit_id-6"] } }, "git_commit_owner": { @@ -3582,8 +3514,8 @@ "group": "commit", "examples": { "log.c": [ - "ex/HEAD/log.html#git_commit_owner-7", - "ex/HEAD/log.html#git_commit_owner-8" + "ex/v1.8.4/log.html#git_commit_owner-7", + "ex/v1.8.4/log.html#git_commit_owner-8" ] } }, @@ -3601,10 +3533,7 @@ ], "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 in the commit is missing; in that case UTF-8 is assumed.
Get the commit time (i.e. committer time) of a commit.
\n", "comments": "", "group": "commit", "examples": { "general.c": [ - "ex/HEAD/general.html#git_commit_time-18", - "ex/HEAD/general.html#git_commit_time-19" + "ex/v1.8.4/general.html#git_commit_time-18", + "ex/v1.8.4/general.html#git_commit_time-19" ] } }, @@ -3788,15 +3712,9 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_committer-5" - ], - "general.c": [ - "ex/HEAD/general.html#git_commit_committer-20" - ], - "log.c": [ - "ex/HEAD/log.html#git_commit_committer-12" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_commit_committer-5"], + "general.c": ["ex/v1.8.4/general.html#git_commit_committer-20"], + "log.c": ["ex/v1.8.4/log.html#git_commit_committer-12"] } }, "git_commit_author": { @@ -3821,16 +3739,14 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_author-6" - ], + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_commit_author-6"], "general.c": [ - "ex/HEAD/general.html#git_commit_author-21", - "ex/HEAD/general.html#git_commit_author-22" + "ex/v1.8.4/general.html#git_commit_author-21", + "ex/v1.8.4/general.html#git_commit_author-22" ], "log.c": [ - "ex/HEAD/log.html#git_commit_author-13", - "ex/HEAD/log.html#git_commit_author-14" + "ex/v1.8.4/log.html#git_commit_author-13", + "ex/v1.8.4/log.html#git_commit_author-14" ] } }, @@ -3858,10 +3774,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/HEAD/log.html#git_commit_tree-15", - "ex/HEAD/log.html#git_commit_tree-16", - "ex/HEAD/log.html#git_commit_tree-17", - "ex/HEAD/log.html#git_commit_tree-18", - "ex/HEAD/log.html#git_commit_tree-19" + "ex/v1.8.4/log.html#git_commit_tree-15", + "ex/v1.8.4/log.html#git_commit_tree-16", + "ex/v1.8.4/log.html#git_commit_tree-17", + "ex/v1.8.4/log.html#git_commit_tree-18", + "ex/v1.8.4/log.html#git_commit_tree-19" ] } }, @@ -3978,9 +3885,7 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_tree_id-7" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_commit_tree_id-7"] } }, "git_commit_parentcount": { @@ -4005,15 +3910,11 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_parentcount-8" - ], - "general.c": [ - "ex/HEAD/general.html#git_commit_parentcount-23" - ], + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_commit_parentcount-8"], + "general.c": ["ex/v1.8.4/general.html#git_commit_parentcount-23"], "log.c": [ - "ex/HEAD/log.html#git_commit_parentcount-20", - "ex/HEAD/log.html#git_commit_parentcount-21" + "ex/v1.8.4/log.html#git_commit_parentcount-20", + "ex/v1.8.4/log.html#git_commit_parentcount-21" ] } }, @@ -4041,20 +3942,15 @@ ], "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/HEAD/general.html#git_commit_parent-24" - ], + "general.c": ["ex/v1.8.4/general.html#git_commit_parent-24"], "log.c": [ - "ex/HEAD/log.html#git_commit_parent-22", - "ex/HEAD/log.html#git_commit_parent-23" + "ex/v1.8.4/log.html#git_commit_parent-22", + "ex/v1.8.4/log.html#git_commit_parent-23" ] } }, @@ -4085,12 +3981,8 @@ "comments": "", "group": "commit", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_parent_id-9" - ], - "log.c": [ - "ex/HEAD/log.html#git_commit_parent_id-24" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_commit_parent_id-9"], + "log.c": ["ex/v1.8.4/log.html#git_commit_parent_id-24"] } }, "git_commit_nth_gen_ancestor": { @@ -4265,11 +4157,7 @@ "description": "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 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 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": 461, + "lineto": 469, + "args": [ + { "name": "id", "type": "git_oid *", "comment": null }, + { + "name": "commit_to_amend", + "type": "const git_commit *", "comment": null }, + { "name": "update_ref", "type": "const char *", "comment": null }, + { "name": "author", "type": "const git_signature *", "comment": null }, { "name": "committer", "type": "const git_signature *", "comment": null }, - { - "name": "message_encoding", - "type": "const char *", - "comment": null - }, - { - "name": "message", - "type": "const char *", - "comment": null - }, - { - "name": "tree", - "type": "const git_tree *", - "comment": null - } + { "name": "message_encoding", "type": "const char *", "comment": null }, + { "name": "message", "type": "const char *", "comment": null }, + { "name": "tree", "type": "const git_tree *", "comment": null } ], "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 - }, + "return": { "type": "int", "comment": null }, "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, 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 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 header field in which to store the signature, attach the signature to the commit and write it into the given repository.
\n", "group": "commit" @@ -4505,8 +4359,8 @@ "git_commit_dup": { "type": "function", "file": "git2/commit.h", - "line": 503, - "lineto": 503, + "line": 548, + "lineto": 548, "args": [ { "name": "out", @@ -4521,19 +4375,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": 603, + "lineto": 603, + "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": 128, + "lineto": 128, + "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": 170, - "lineto": 170, + "line": 180, + "lineto": 180, "args": [], "argline": "", "sig": "", @@ -4574,21 +4460,15 @@ "comment": " A combination of GIT_FEATURE_* values." }, "description": "Query compile time options for libgit2.
\n", - "comments": "GIT_FEATURE_THREADS Libgit2 was compiled with thread support. Note that thread support is still to be seen as a 'work in progress' - basic object lookups are believed to be threadsafe, but other operations may not be.
GIT_FEATURE_HTTPS Libgit2 supports the https:// protocol. This requires the openssl library to be found when compiling libgit2.
GIT_FEATURE_SSH Libgit2 supports the SSH protocol for network operations. This requires the libssh2 library to be found when compiling libgit2
GIT_FEATURE_THREADS Libgit2 was compiled with thread support. Note that thread support is still to be seen as a 'work in progress' - basic object lookups are believed to be threadsafe, but other operations may not be.
GIT_FEATURE_HTTPS Libgit2 supports the https:// protocol. This requires the openssl library to be found when compiling libgit2.
GIT_FEATURE_SSH Libgit2 supports the SSH protocol for network operations. This requires the libssh2 library to be found when compiling libgit2
GIT_FEATURE_NSEC Libgit2 supports the sub-second resolution in file modification times.
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 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 > 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. > > 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 > appended to "git/1.0", for compatibility with other git clients. > > - `user_agent` is the value that will be delivered as the > 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. > 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\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 > 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\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n > Validate the target of a symbolic ref when creating it. For > example, `foobar` is not a valid ref, therefore `foobar` is > not a valid target for a symbolic ref by default, whereas > `refs/heads/foobar` is. Disabling this bypasses validation > so that an arbitrary strings such as `foobar` can be used > 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. > > - `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, > 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\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n > Enable synchronized writes of files in the gitdir using `fsync` > (or the platform equivalent) to ensure that new object data > is written to permanent storage, not simply cached. This > defaults to disabled.\n\n 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 opts(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 opts(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 opts(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 opts(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 opts(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
\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. > > 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 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\n* opts(GIT_OPT_GET_USER_AGENT, git_buf *out)\n\n > Get the value of the User-Agent header. > The User-Agent is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_USER_AGENT_PRODUCT, const char *user_agent_product)\n\n > Set 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/<version> for > 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.\n\n* opts(GIT_OPT_GET_USER_AGENT_PRODUCT, git_buf *out)\n\n > Get the value of the User-Agent product header. > The User-Agent product is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)\n\n > Set 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\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 > 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\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n > Validate the target of a symbolic ref when creating it. For > example, `foobar` is not a valid ref, therefore `foobar` is > not a valid target for a symbolic ref by default, whereas > `refs/heads/foobar` is. Disabling this bypasses validation > so that an arbitrary strings such as `foobar` can be used > 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. > > - `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, > 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\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n > Enable synchronized writes of files in the gitdir using `fsync` > (or the platform equivalent) to ensure that new object data > is written to permanent storage, not simply cached. This > defaults to disabled.\n\n 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 opts(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 opts(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 opts(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 opts(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 opts(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\n opts(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.\n
\n\nopts(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": 113, + "lineto": 113, "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 - }, + "return": { "type": "void", "comment": null }, "description": "Free a config entry
\n", "comments": "", - "group": "config" + "group": "config", + "examples": { + "config.c": [ + "ex/v1.8.4/config.html#git_config_entry_free-1", + "ex/v1.8.4/config.html#git_config_entry_free-2" + ] + } }, "git_config_find_global": { "type": "function", "file": "git2/config.h", - "line": 127, - "lineto": 127, + "line": 165, + "lineto": 165, "args": [ { "name": "out", @@ -4640,14 +4523,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 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).
\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 system configuration file
\n", - "comments": "If /etc/gitconfig doesn't exist, it will look for %PROGRAMFILES%.
\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% used 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 and opens them into a single prioritized config object that can be used when accessing default config data outside a repository.
\n", "group": "config" @@ -4734,8 +4614,8 @@ "git_config_new": { "type": "function", "file": "git2/config.h", - "line": 190, - "lineto": 190, + "line": 228, + "lineto": 228, "args": [ { "name": "out", @@ -4745,10 +4625,7 @@ ], "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 can do anything with it.
\n", "group": "config" @@ -4756,8 +4633,8 @@ "git_config_add_file_ondisk": { "type": "function", "file": "git2/config.h", - "line": 219, - "lineto": 224, + "line": 257, + "lineto": 262, "args": [ { "name": "cfg", @@ -4798,8 +4675,8 @@ "git_config_open_ondisk": { "type": "function", "file": "git2/config.h", - "line": 238, - "lineto": 238, + "line": 276, + "lineto": 276, "args": [ { "name": "out", @@ -4814,24 +4691,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 of calls: - git_config_new - git_config_add_file_ondisk
\n", "group": "config", "examples": { - "general.c": [ - "ex/HEAD/general.html#git_config_open_ondisk-26" - ] + "general.c": ["ex/v1.8.4/general.html#git_config_open_ondisk-26"] } }, "git_config_open_level": { "type": "function", "file": "git2/config.h", - "line": 256, - "lineto": 259, + "line": 294, + "lineto": 297, "args": [ { "name": "out", @@ -4862,8 +4734,8 @@ "git_config_open_global": { "type": "function", "file": "git2/config.h", - "line": 273, - "lineto": 273, + "line": 312, + "lineto": 312, "args": [ { "name": "out", @@ -4878,19 +4750,16 @@ ], "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 $HOME/.gitconfig
or $XDG_CONFIG_HOME/git/config
. For backwards compatability, 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.
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.
Create a snapshot of the configuration
\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" @@ -4916,8 +4782,8 @@ "git_config_free": { "type": "function", "file": "git2/config.h", - "line": 296, - "lineto": 296, + "line": 340, + "lineto": 340, "args": [ { "name": "cfg", @@ -4927,25 +4793,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.8.4/config.html#git_config_free-3"], "general.c": [ - "ex/HEAD/general.html#git_config_free-27", - "ex/HEAD/general.html#git_config_free-28" + "ex/v1.8.4/general.html#git_config_free-27", + "ex/v1.8.4/general.html#git_config_free-28" ] } }, "git_config_get_entry": { "type": "function", "file": "git2/config.h", - "line": 308, - "lineto": 311, + "line": 352, + "lineto": 355, "args": [ { "name": "out", @@ -4965,19 +4829,19 @@ ], "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/HEAD/general.html#git_config_get_int32-29", - "ex/HEAD/general.html#git_config_get_int32-30" + "ex/v1.8.4/general.html#git_config_get_int32-29", + "ex/v1.8.4/general.html#git_config_get_int32-30" ] } }, "git_config_get_int64": { "type": "function", "file": "git2/config.h", - "line": 339, - "lineto": 339, + "line": 383, + "lineto": 383, "args": [ { "name": "out", @@ -5035,10 +4896,7 @@ ], "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" - }, + "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" @@ -5046,8 +4904,8 @@ "git_config_get_bool": { "type": "function", "file": "git2/config.h", - "line": 356, - "lineto": 356, + "line": 400, + "lineto": 400, "args": [ { "name": "out", @@ -5067,10 +4925,7 @@ ], "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 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" @@ -5078,8 +4933,8 @@ "git_config_get_path": { "type": "function", "file": "git2/config.h", - "line": 374, - "lineto": 374, + "line": 418, + "lineto": 418, "args": [ { "name": "out", @@ -5099,10 +4954,7 @@ ], "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 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" @@ -5110,8 +4962,8 @@ "git_config_get_string": { "type": "function", "file": "git2/config.h", - "line": 392, - "lineto": 392, + "line": 436, + "lineto": 436, "args": [ { "name": "out", @@ -5131,25 +4983,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 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/HEAD/general.html#git_config_get_string-31", - "ex/HEAD/general.html#git_config_get_string-32" + "ex/v1.8.4/general.html#git_config_get_string-31", + "ex/v1.8.4/general.html#git_config_get_string-32" ] } }, "git_config_get_string_buf": { "type": "function", "file": "git2/config.h", - "line": 408, - "lineto": 408, + "line": 452, + "lineto": 452, "args": [ { "name": "out", @@ -5169,10 +5018,7 @@ ], "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 defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.
\n", "group": "config" @@ -5180,8 +5026,8 @@ "git_config_get_multivar_foreach": { "type": "function", "file": "git2/config.h", - "line": 426, - "lineto": 426, + "line": 471, + "lineto": 471, "args": [ { "name": "cfg", @@ -5211,10 +5057,7 @@ ], "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 the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n", "group": "config" @@ -5222,8 +5065,8 @@ "git_config_multivar_iterator_new": { "type": "function", "file": "git2/config.h", - "line": 441, - "lineto": 441, + "line": 487, + "lineto": 487, "args": [ { "name": "out", @@ -5248,10 +5091,7 @@ ], "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 the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.
\n", "group": "config" @@ -5259,8 +5099,8 @@ "git_config_next": { "type": "function", "file": "git2/config.h", - "line": 453, - "lineto": 453, + "line": 499, + "lineto": 499, "args": [ { "name": "entry", @@ -5280,14 +5120,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 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" @@ -5308,8 +5145,8 @@ "git_config_set_int32": { "type": "function", "file": "git2/config.h", - "line": 471, - "lineto": 471, + "line": 517, + "lineto": 517, "args": [ { "name": "cfg", @@ -5329,10 +5166,7 @@ ], "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" - }, + "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" @@ -5340,8 +5174,8 @@ "git_config_set_int64": { "type": "function", "file": "git2/config.h", - "line": 482, - "lineto": 482, + "line": 528, + "lineto": 528, "args": [ { "name": "cfg", @@ -5361,10 +5195,7 @@ ], "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" - }, + "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" @@ -5372,8 +5203,8 @@ "git_config_set_bool": { "type": "function", "file": "git2/config.h", - "line": 493, - "lineto": 493, + "line": 539, + "lineto": 539, "args": [ { "name": "cfg", @@ -5385,18 +5216,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" @@ -5404,8 +5228,8 @@ "git_config_set_string": { "type": "function", "file": "git2/config.h", - "line": 507, - "lineto": 507, + "line": 553, + "lineto": 553, "args": [ { "name": "cfg", @@ -5425,19 +5249,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 afterwards.
\n", - "group": "config" + "group": "config", + "examples": { + "config.c": ["ex/v1.8.4/config.html#git_config_set_string-5"] + } }, "git_config_set_multivar": { "type": "function", "file": "git2/config.h", - "line": 519, - "lineto": 519, + "line": 566, + "lineto": 566, "args": [ { "name": "cfg", @@ -5454,18 +5278,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" @@ -5473,8 +5290,8 @@ "git_config_delete_entry": { "type": "function", "file": "git2/config.h", - "line": 528, - "lineto": 528, + "line": 576, + "lineto": 576, "args": [ { "name": "cfg", @@ -5489,10 +5306,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" @@ -5500,8 +5314,8 @@ "git_config_delete_multivar": { "type": "function", "file": "git2/config.h", - "line": 541, - "lineto": 541, + "line": 589, + "lineto": 589, "args": [ { "name": "cfg", @@ -5521,10 +5335,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" @@ -5532,8 +5343,8 @@ "git_config_foreach": { "type": "function", "file": "git2/config.h", - "line": 559, - "lineto": 562, + "line": 607, + "lineto": 610, "args": [ { "name": "cfg", @@ -5564,8 +5375,8 @@ "git_config_iterator_new": { "type": "function", "file": "git2/config.h", - "line": 573, - "lineto": 573, + "line": 622, + "lineto": 622, "args": [ { "name": "out", @@ -5575,15 +5386,12 @@ { "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 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 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" @@ -5623,8 +5428,8 @@ "git_config_foreach_match": { "type": "function", "file": "git2/config.h", - "line": 611, - "lineto": 615, + "line": 661, + "lineto": 665, "args": [ { "name": "cfg", @@ -5660,8 +5465,8 @@ "git_config_get_mapped": { "type": "function", "file": "git2/config.h", - "line": 651, - "lineto": 656, + "line": 701, + "lineto": 706, "args": [ { "name": "out", @@ -5702,8 +5507,8 @@ "git_config_lookup_map_value": { "type": "function", "file": "git2/config.h", - "line": 666, - "lineto": 670, + "line": 717, + "lineto": 721, "args": [ { "name": "out", @@ -5720,18 +5525,11 @@ "type": "size_t", "comment": "number of mapping objects in `maps`" }, - { - "name": "value", - "type": "const char *", - "comment": "value to parse" - } + { "name": "value", "type": "const char *", "comment": "value to parse" } ], "argline": "int *out, const git_configmap *maps, size_t map_n, const char *value", "sig": "int *::const git_configmap *::size_t::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Maps a string value to an integer constant
\n", "comments": "", "group": "config" @@ -5739,26 +5537,19 @@ "git_config_parse_bool": { "type": "function", "file": "git2/config.h", - "line": 682, - "lineto": 682, + "line": 734, + "lineto": 734, "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 number different from 0 Valid values for false are: 'false', 'no', 'off', 0
\n", "group": "config" @@ -5766,26 +5557,19 @@ "git_config_parse_int32": { "type": "function", "file": "git2/config.h", - "line": 694, - "lineto": 694, + "line": 747, + "lineto": 747, "args": [ { "name": "out", "type": "int32_t *", "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": "int32_t *out, const char *value", "sig": "int32_t *::const char *", - "return": { - "type": "int", - "comment": null - }, + "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" @@ -5793,26 +5577,19 @@ "git_config_parse_int64": { "type": "function", "file": "git2/config.h", - "line": 706, - "lineto": 706, + "line": 760, + "lineto": 760, "args": [ { "name": "out", "type": "int64_t *", "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": "int64_t *out, const char *value", "sig": "int64_t *::const char *", - "return": { - "type": "int", - "comment": null - }, + "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" @@ -5820,8 +5597,8 @@ "git_config_parse_path": { "type": "function", "file": "git2/config.h", - "line": 721, - "lineto": 721, + "line": 776, + "lineto": 776, "args": [ { "name": "out", @@ -5836,10 +5613,7 @@ ], "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 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" @@ -5847,8 +5621,8 @@ "git_config_backend_foreach_match": { "type": "function", "file": "git2/config.h", - "line": 739, - "lineto": 743, + "line": 795, + "lineto": 799, "args": [ { "name": "backend", @@ -5873,10 +5647,7 @@ ], "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 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" @@ -5884,8 +5655,8 @@ "git_config_lock": { "type": "function", "file": "git2/config.h", - "line": 762, - "lineto": 762, + "line": 818, + "lineto": 818, "args": [ { "name": "tx", @@ -5900,89 +5671,83 @@ ], "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 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": "cred" + "group": "credential" }, - "git_cred_has_username": { + "git_credential_has_username": { "type": "function", - "file": "git2/cred.h", - "line": 153, - "lineto": 153, + "file": "git2/credential.h", + "line": 154, + "lineto": 154, "args": [ { "name": "cred", - "type": "git_cred *", + "type": "git_credential *", "comment": "object to check" } ], - "argline": "git_cred *cred", - "sig": "git_cred *", + "argline": "git_credential *cred", + "sig": "git_credential *", "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" + "group": "credential" }, - "git_cred_get_username": { + "git_credential_get_username": { "type": "function", - "file": "git2/cred.h", - "line": 161, - "lineto": 161, + "file": "git2/credential.h", + "line": 162, + "lineto": 162, "args": [ { "name": "cred", - "type": "git_cred *", + "type": "git_credential *", "comment": "object to check" } ], - "argline": "git_cred *cred", - "sig": "git_cred *", + "argline": "git_credential *cred", + "sig": "git_credential *", "return": { "type": "const char *", "comment": " the credential username, or NULL if not applicable" }, "description": "Return the username associated with a credential object.
\n", "comments": "", - "group": "cred" + "group": "credential" }, - "git_cred_userpass_plaintext_new": { + "git_credential_userpass_plaintext_new": { "type": "function", - "file": "git2/cred.h", - "line": 172, - "lineto": 175, + "file": "git2/credential.h", + "line": 173, + "lineto": 176, "args": [ { "name": "out", - "type": "git_cred **", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -5996,74 +5761,74 @@ "comment": "The password of the credential." } ], - "argline": "git_cred **out, const char *username, const char *password", - "sig": "git_cred **::const char *::const char *", + "argline": "git_credential **out, const char *username, const char *password", + "sig": "git_credential **::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" + "group": "credential" }, - "git_cred_default_new": { + "git_credential_default_new": { "type": "function", - "file": "git2/cred.h", - "line": 183, - "lineto": 183, + "file": "git2/credential.h", + "line": 185, + "lineto": 185, "args": [ { "name": "out", - "type": "git_cred **", - "comment": null + "type": "git_credential **", + "comment": "The newly created credential object." } ], - "argline": "git_cred **out", - "sig": "git_cred **", + "argline": "git_credential **out", + "sig": "git_credential **", "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" + "group": "credential" }, - "git_cred_username_new": { + "git_credential_username_new": { "type": "function", - "file": "git2/cred.h", - "line": 191, - "lineto": 191, + "file": "git2/credential.h", + "line": 197, + "lineto": 197, "args": [ { - "name": "cred", - "type": "git_cred **", - "comment": null + "name": "out", + "type": "git_credential **", + "comment": "The newly created credential object." }, { "name": "username", "type": "const char *", - "comment": null + "comment": "The username to authenticate with" } ], - "argline": "git_cred **cred, const char *username", - "sig": "git_cred **::const char *", + "argline": "git_credential **out, const char *username", + "sig": "git_credential **::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 for success or an error code for failure" }, "description": "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": "cred" + "group": "credential" }, - "git_cred_ssh_key_new": { + "git_credential_ssh_key_new": { "type": "function", - "file": "git2/cred.h", - "line": 204, - "lineto": 209, + "file": "git2/credential.h", + "line": 210, + "lineto": 215, "args": [ { "name": "out", - "type": "git_cred **", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -6087,25 +5852,25 @@ "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 *", + "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": " 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" + "group": "credential" }, - "git_cred_ssh_key_memory_new": { + "git_credential_ssh_key_memory_new": { "type": "function", - "file": "git2/cred.h", - "line": 221, - "lineto": 226, + "file": "git2/credential.h", + "line": 227, + "lineto": 232, "args": [ { "name": "out", - "type": "git_cred **", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -6129,26 +5894,26 @@ "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 *", + "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": " 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" + "group": "credential" }, - "git_cred_ssh_interactive_new": { + "git_credential_ssh_interactive_new": { "type": "function", - "file": "git2/cred.h", - "line": 256, - "lineto": 260, + "file": "git2/credential.h", + "line": 263, + "lineto": 267, "args": [ { "name": "out", - "type": "git_cred **", - "comment": null + "type": "git_credential **", + "comment": "The newly created credential object." }, { "name": "username", @@ -6157,7 +5922,7 @@ }, { "name": "prompt_callback", - "type": "git_cred_ssh_interactive_cb", + "type": "git_credential_ssh_interactive_cb", "comment": "The callback method used for prompts." }, { @@ -6166,25 +5931,25 @@ "comment": "Additional data to pass to the callback." } ], - "argline": "git_cred **out, const char *username, git_cred_ssh_interactive_cb prompt_callback, void *payload", - "sig": "git_cred **::const char *::git_cred_ssh_interactive_cb::void *", + "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": " 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" + "group": "credential" }, - "git_cred_ssh_key_from_agent": { + "git_credential_ssh_key_from_agent": { "type": "function", - "file": "git2/cred.h", - "line": 270, - "lineto": 272, + "file": "git2/credential.h", + "line": 277, + "lineto": 279, "args": [ { "name": "out", - "type": "git_cred **", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -6193,25 +5958,25 @@ "comment": "username to use to authenticate" } ], - "argline": "git_cred **out, const char *username", - "sig": "git_cred **::const char *", + "argline": "git_credential **out, const char *username", + "sig": "git_credential **::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" + "group": "credential" }, - "git_cred_ssh_custom_new": { + "git_credential_ssh_custom_new": { "type": "function", - "file": "git2/cred.h", - "line": 298, - "lineto": 304, + "file": "git2/credential.h", + "line": 305, + "lineto": 311, "args": [ { "name": "out", - "type": "git_cred **", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -6231,7 +5996,7 @@ }, { "name": "sign_callback", - "type": "git_cred_sign_cb", + "type": "git_credential_sign_cb", "comment": "The callback method to sign the data during the challenge." }, { @@ -6240,25 +6005,25 @@ "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_cb sign_callback, void *payload", - "sig": "git_cred **::const char *::const char *::size_t::git_cred_sign_cb::void *", + "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": " 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 and wraps libssh2_userauth_publickey()
, which is undocumented.
The supplied credential parameter will be internally duplicated.
\n", - "group": "cred" + "group": "credential" }, - "git_cred_userpass": { + "git_credential_userpass": { "type": "function", - "file": "git2/cred_helpers.h", - "line": 43, - "lineto": 48, + "file": "git2/credential_helpers.h", + "line": 44, + "lineto": 49, "args": [ { - "name": "cred", - "type": "git_cred **", + "name": "out", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -6274,127 +6039,288 @@ { "name": "allowed_types", "type": "unsigned int", - "comment": "A bitmask stating which cred types are OK to return." + "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_cred_userpass_payload*`.)" + "comment": "The payload provided when specifying this callback. (This is\n interpreted as a `git_credential_userpass_payload*`.)" } ], - "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 *", - "return": { - "type": "int", - "comment": null - }, - "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.
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.
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": 220, + "lineto": 220, "args": [ { - "name": "id", - "type": "git_oid *", - "comment": null - }, - { - "name": "repo", - "type": "git_repository *", - "comment": null + "name": "buffer", + "type": "git_buf *", + "comment": "The buffer to be resized; may or may not be allocated yet" }, { - "name": "relative_path", - "type": "const char *", - "comment": null + "name": "target_size", + "type": "size_t", + "comment": "The desired available size" } ], - "argline": "git_oid *id, git_repository *repo, const char *relative_path", - "sig": "git_oid *::git_repository *::const char *", + "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": "", - "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 values at this time.
\n\n@{
\n", - "group": "blob" + "description": "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_blob_filtered_content": { + "git_buf_set": { "type": "function", "file": "git2/deprecated.h", - "line": 97, - "lineto": 101, + "line": 230, + "lineto": 231, "args": [ { - "name": "out", + "name": "buffer", "type": "git_buf *", - "comment": null + "comment": "The buffer to set" }, { - "name": "blob", - "type": "git_blob *", - "comment": null + "name": "data", + "type": "const void *", + "comment": "The data to copy into the buffer" }, { - "name": "as_path", - "type": "const char *", - "comment": null - }, + "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/deprecated.h", + "line": 239, + "lineto": 239, + "args": [ { - "name": "check_for_binary_data", - "type": "int", - "comment": null + "name": "buf", + "type": "const git_buf *", + "comment": "Buffer to check" } ], - "argline": "git_buf *out, git_blob *blob, const char *as_path, int check_for_binary_data", - "sig": "git_buf *::git_blob *::const char *::int", + "argline": "const git_buf *buf", + "sig": "const git_buf *", "return": { "type": "int", - "comment": null + "comment": " 1 if buffer looks like non-text data" }, - "description": "Deprecated in favor of
\n", + "description": "Check quickly if buffer looks like it contains binary data
\n", "comments": "", - "group": "blob" + "group": "buf" }, - "git_buf_free": { + "git_buf_contains_nul": { "type": "function", "file": "git2/deprecated.h", - "line": 126, - "lineto": 126, + "line": 247, + "lineto": 247, "args": [ { - "name": "buffer", - "type": "git_buf *", - "comment": null + "name": "buf", + "type": "const git_buf *", + "comment": "Buffer to check" } ], - "argline": "git_buf *buffer", - "sig": "git_buf *", + "argline": "const git_buf *buf", + "sig": "const git_buf *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 1 if buffer contains a NUL byte" }, + "description": "Check quickly if buffer contains a NUL byte
\n", + "comments": "", + "group": "buf" + }, + "git_buf_free": { + "type": "function", + "file": "git2/deprecated.h", + "line": 259, + "lineto": 259, + "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": 357, + "lineto": 360, + "args": [ + { "name": "out", "type": "git_buf *", "comment": null }, + { "name": "diff", "type": "git_diff *", "comment": null }, + { + "name": "opts", + "type": "const git_diff_format_email_options *", + "comment": null + } + ], + "argline": "git_buf *out, git_diff *diff, const git_diff_format_email_options *opts", + "sig": "git_buf *::git_diff *::const git_diff_format_email_options *", + "return": { "type": "int", "comment": null }, + "description": "Create an e-mail ready patch from a diff.
\n", + "comments": "", + "group": "diff" + }, + "git_diff_commit_as_email": { + "type": "function", + "file": "git2/deprecated.h", + "line": 368, + "lineto": 375, + "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": "diff_opts", + "type": "const git_diff_options *", + "comment": null + } + ], + "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": "diff" + }, + "git_diff_format_email_options_init": { + "type": "function", + "file": "git2/deprecated.h", + "line": 387, + "lineto": 389, + "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 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" @@ -6402,15 +6328,12 @@ "giterr_clear": { "type": "function", "file": "git2/deprecated.h", - "line": 212, - "lineto": 212, + "line": 464, + "lineto": 464, "args": [], "argline": "", "sig": "", - "return": { - "type": "void", - "comment": null - }, + "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" @@ -6418,26 +6341,15 @@ "giterr_set_str": { "type": "function", "file": "git2/deprecated.h", - "line": 224, - "lineto": 224, + "line": 476, + "lineto": 476, "args": [ - { - "name": "error_class", - "type": "int", - "comment": null - }, - { - "name": "string", - "type": "const char *", - "comment": null - } + { "name": "error_class", "type": "int", "comment": null }, + { "name": "string", "type": "const char *", "comment": null } ], "argline": "int error_class, const char *string", "sig": "int::const char *", - "return": { - "type": "void", - "comment": null - }, + "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" @@ -6445,24 +6357,21 @@ "giterr_set_oom": { "type": "function", "file": "git2/deprecated.h", - "line": 236, - "lineto": 236, + "line": 488, + "lineto": 488, "args": [], "argline": "", "sig": "", - "return": { - "type": "void", - "comment": null - }, - "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.
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": 326, - "lineto": 326, + "line": 578, + "lineto": 578, "args": [ { "name": "type", @@ -6472,59 +6381,112 @@ ], "argline": "git_object_t type", "sig": "git_object_t", - "return": { - "type": "size_t", - "comment": " size in bytes of the object" - }, + "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.
These types are retained for backward compatibility. The newer versions of these values should be preferred in all new code.
\n\nThere is no plan to remove these backward compatibility values at this time.
\n\n@{
\n", - "group": "oid" + "description": "Ensure the remote name is well-formed.
\n", + "comments": "", + "group": "remote" }, - "git_blame_init_options": { + "git_reference_is_valid_name": { "type": "function", "file": "git2/deprecated.h", - "line": 459, - "lineto": 459, + "line": 643, + "lineto": 643, "args": [ { - "name": "opts", - "type": "git_blame_options *", - "comment": null - }, - { - "name": "version", - "type": "unsigned int", - "comment": null + "name": "refname", + "type": "const char *", + "comment": "name to be checked." } ], - "argline": "git_blame_options *opts, unsigned int version", - "sig": "git_blame_options *::unsigned int", + "argline": "const char *refname", + "sig": "const char *", "return": { "type": "int", - "comment": null + "comment": " 1 if the reference name is acceptable; 0 if it isn't" + }, + "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": 879, + "lineto": 879, + "args": [ + { "name": "tgt", "type": "git_strarray *", "comment": "target" }, + { "name": "src", "type": "const git_strarray *", "comment": "source" } + ], + "argline": "git_strarray *tgt, const git_strarray *src", + "sig": "git_strarray *::const git_strarray *", + "return": { + "type": "int", + "comment": " 0 on success, \n<\n 0 on allocation failure" }, + "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_strarray_free": { + "type": "function", + "file": "git2/deprecated.h", + "line": 891, + "lineto": 891, + "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": 905, + "lineto": 905, + "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" @@ -6556,9 +6518,7 @@ "comments": "Initializes a git_describe_options
with default values. Equivalent to creating an instance with GIT_DESCRIBE_OPTIONS_INIT.
Describe a commit
\n", "comments": "Perform the describe operation on the given committish object.
\n", "group": "describe", "examples": { - "describe.c": [ - "ex/HEAD/describe.html#git_describe_commit-3" - ] + "describe.c": ["ex/v1.8.4/describe.html#git_describe_commit-3"] } }, "git_describe_workdir": { "type": "function", "file": "git2/describe.h", - "line": 163, - "lineto": 166, + "line": 165, + "lineto": 168, "args": [ { "name": "out", @@ -6654,24 +6609,19 @@ ], "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": null - }, + "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 peforming describe on HEAD, a status is run and the description is considered to be dirty if there are.
\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/HEAD/describe.html#git_describe_workdir-4" - ] + "describe.c": ["ex/v1.8.4/describe.html#git_describe_workdir-4"] } }, "git_describe_format": { "type": "function", "file": "git2/describe.h", - "line": 176, - "lineto": 179, + "line": 179, + "lineto": 182, "args": [ { "name": "out", @@ -6691,37 +6641,29 @@ ], "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": null - }, + "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/HEAD/describe.html#git_describe_format-5" - ] + "describe.c": ["ex/v1.8.4/describe.html#git_describe_format-5"] } }, "git_describe_result_free": { "type": "function", "file": "git2/describe.h", - "line": 184, - "lineto": 184, + "line": 189, + "lineto": 189, "args": [ { "name": "result", "type": "git_describe_result *", - "comment": null + "comment": "The result to free." } ], "argline": "git_describe_result *result", "sig": "git_describe_result *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the describe result.
\n", "comments": "", "group": "describe" @@ -6729,8 +6671,8 @@ "git_diff_options_init": { "type": "function", "file": "git2/diff.h", - "line": 454, - "lineto": 456, + "line": 485, + "lineto": 487, "args": [ { "name": "opts", @@ -6756,8 +6698,8 @@ "git_diff_find_options_init": { "type": "function", "file": "git2/diff.h", - "line": 787, - "lineto": 789, + "line": 818, + "lineto": 820, "args": [ { "name": "opts", @@ -6783,8 +6725,8 @@ "git_diff_free": { "type": "function", "file": "git2/diff.h", - "line": 803, - "lineto": 803, + "line": 834, + "lineto": 834, "args": [ { "name": "diff", @@ -6794,28 +6736,23 @@ ], "argline": "git_diff *diff", "sig": "git_diff *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Deallocate a diff.
\n", "comments": "", "group": "diff", "examples": { - "diff.c": [ - "ex/HEAD/diff.html#git_diff_free-3" - ], + "diff.c": ["ex/v1.8.4/diff.html#git_diff_free-3"], "log.c": [ - "ex/HEAD/log.html#git_diff_free-25", - "ex/HEAD/log.html#git_diff_free-26" + "ex/v1.8.4/log.html#git_diff_free-25", + "ex/v1.8.4/log.html#git_diff_free-26" ] } }, "git_diff_tree_to_tree": { "type": "function", "file": "git2/diff.h", - "line": 821, - "lineto": 826, + "line": 853, + "lineto": 858, "args": [ { "name": "diff", @@ -6845,28 +6782,23 @@ ], "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": null - }, + "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
.
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.
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.
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 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.
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" @@ -7080,8 +6987,8 @@ "git_diff_merge": { "type": "function", "file": "git2/diff.h", - "line": 960, - "lineto": 962, + "line": 998, + "lineto": 1000, "args": [ { "name": "onto", @@ -7096,10 +7003,7 @@ ], "argline": "git_diff *onto, const git_diff *from", "sig": "git_diff *::const git_diff *", - "return": { - "type": "int", - "comment": null - }, + "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" @@ -7107,8 +7011,8 @@ "git_diff_find_similar": { "type": "function", "file": "git2/diff.h", - "line": 976, - "lineto": 978, + "line": 1014, + "lineto": 1016, "args": [ { "name": "diff", @@ -7123,24 +7027,17 @@ ], "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" - }, + "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/HEAD/diff.html#git_diff_find_similar-9" - ] - } + "examples": { "diff.c": ["ex/v1.8.4/diff.html#git_diff_find_similar-9"] } }, "git_diff_num_deltas": { "type": "function", "file": "git2/diff.h", - "line": 996, - "lineto": 996, + "line": 1034, + "lineto": 1034, "args": [ { "name": "diff", @@ -7157,17 +7054,13 @@ "description": "Query how many diff records are there in a diff.
\n", "comments": "", "group": "diff", - "examples": { - "log.c": [ - "ex/HEAD/log.html#git_diff_num_deltas-29" - ] - } + "examples": { "log.c": ["ex/v1.8.4/log.html#git_diff_num_deltas-29"] } }, "git_diff_num_deltas_of_type": { "type": "function", "file": "git2/diff.h", - "line": 1009, - "lineto": 1010, + "line": 1047, + "lineto": 1048, "args": [ { "name": "diff", @@ -7187,25 +7080,21 @@ "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 that is a git_delta_t
and returns just the count of how many deltas match that particular type.
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.
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/HEAD/diff.html#git_diff_print-10" - ], - "log.c": [ - "ex/HEAD/log.html#git_diff_print-30" - ] + "diff.c": ["ex/v1.8.4/diff.html#git_diff_print-10"], + "log.c": ["ex/v1.8.4/log.html#git_diff_print-30"] } }, "git_diff_to_buf": { "type": "function", "file": "git2/diff.h", - "line": 1127, - "lineto": 1130, + "line": 1165, + "lineto": 1168, "args": [ { "name": "out", @@ -7377,10 +7262,7 @@ ], "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" - }, + "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" @@ -7388,8 +7270,8 @@ "git_diff_blobs": { "type": "function", "file": "git2/diff.h", - "line": 1167, - "lineto": 1177, + "line": 1204, + "lineto": 1214, "args": [ { "name": "old_blob", @@ -7455,8 +7337,8 @@ "git_diff_blob_to_buffer": { "type": "function", "file": "git2/diff.h", - "line": 1204, - "lineto": 1215, + "line": 1241, + "lineto": 1252, "args": [ { "name": "old_blob", @@ -7527,8 +7409,8 @@ "git_diff_buffers": { "type": "function", "file": "git2/diff.h", - "line": 1238, - "lineto": 1250, + "line": 1275, + "lineto": 1287, "args": [ { "name": "old_buffer", @@ -7604,8 +7486,8 @@ "git_diff_from_buffer": { "type": "function", "file": "git2/diff.h", - "line": 1271, - "lineto": 1274, + "line": 1327, + "lineto": 1334, "args": [ { "name": "out", @@ -7625,29 +7507,27 @@ ], "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" - }, + "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.
Accumulate diff statistics for all patches.
\n", "comments": "", "group": "diff", - "examples": { - "diff.c": [ - "ex/HEAD/diff.html#git_diff_get_stats-12" - ] - } + "examples": { "diff.c": ["ex/v1.8.4/diff.html#git_diff_get_stats-13"] } }, "git_diff_stats_files_changed": { "type": "function", "file": "git2/diff.h", - "line": 1320, - "lineto": 1321, + "line": 1380, + "lineto": 1381, "args": [ { "name": "stats", @@ -7695,8 +7571,8 @@ "git_diff_stats_insertions": { "type": "function", "file": "git2/diff.h", - "line": 1329, - "lineto": 1330, + "line": 1389, + "lineto": 1390, "args": [ { "name": "stats", @@ -7717,8 +7593,8 @@ "git_diff_stats_deletions": { "type": "function", "file": "git2/diff.h", - "line": 1338, - "lineto": 1339, + "line": 1398, + "lineto": 1399, "args": [ { "name": "stats", @@ -7739,8 +7615,8 @@ "git_diff_stats_to_buf": { "type": "function", "file": "git2/diff.h", - "line": 1350, - "lineto": 1354, + "line": 1410, + "lineto": 1414, "args": [ { "name": "out", @@ -7772,17 +7648,13 @@ "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": 1434, - "lineto": 1441, - "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": "uint32_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, 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": " 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_options_init": { - "type": "function", - "file": "git2/diff.h", - "line": 1453, - "lineto": 1455, - "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 to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
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_email_create_from_diff": { + "type": "function", + "file": "git2/email.h", + "line": 100, + "lineto": 109, + "args": [ + { + "name": "out", + "type": "git_buf *", + "comment": "buffer to store the e-mail patch in" + }, + { + "name": "diff", + "type": "git_diff *", + "comment": "the changes to include in the email" + }, + { "name": "patch_idx", "type": "size_t", "comment": "the patch index" }, + { + "name": "patch_count", + "type": "size_t", + "comment": "the total number of patches that will be included" + }, + { + "name": "commit_id", + "type": "const git_oid *", + "comment": "the commit id for this change" + }, + { + "name": "summary", + "type": "const char *", + "comment": "the commit message for this change" + }, + { + "name": "body", + "type": "const char *", + "comment": "optional text to include above the diffstat" + }, + { + "name": "author", + "type": "const git_signature *", + "comment": "the person who authored this commit" + }, + { + "name": "opts", + "type": "const git_email_create_options *", + "comment": "email creation options" + } + ], + "argline": "git_buf *out, git_diff *diff, size_t patch_idx, size_t patch_count, const git_oid *commit_id, const char *summary, const char *body, const git_signature *author, const git_email_create_options *opts", + "sig": "git_buf *::git_diff *::size_t::size_t::const git_oid *::const char *::const char *::const git_signature *::const git_email_create_options *", + "return": { "type": "int", "comment": null }, + "description": "Create a diff for a commit in mbox format for sending via email.
\n", + "comments": "", + "group": "email" + }, + "git_email_create_from_commit": { + "type": "function", + "file": "git2/email.h", + "line": 119, + "lineto": 122, + "args": [ + { + "name": "out", + "type": "git_buf *", + "comment": "buffer to store the e-mail patch in" + }, + { + "name": "commit", + "type": "git_commit *", + "comment": "commit to create a patch for" + }, + { + "name": "opts", + "type": "const git_email_create_options *", + "comment": "email creation 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": null }, + "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": 123, - "lineto": 123, + "line": 139, + "lineto": 139, "args": [], "argline": "", "sig": "", @@ -7988,88 +7826,80 @@ "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. However, libgit2's error strings are not cleared aggressively, so a prior (unrelated) error may be returned. This can be avoided by only calling this function if the prior call to a libgit2 API returned an error.
\n", + "comments": "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/HEAD/checkout.html#git_error_last-11", - "ex/HEAD/checkout.html#git_error_last-12", - "ex/HEAD/checkout.html#git_error_last-13", - "ex/HEAD/checkout.html#git_error_last-14" - ], - "general.c": [ - "ex/HEAD/general.html#git_error_last-33" - ], + "ex/v1.8.4/checkout.html#git_error_last-11", + "ex/v1.8.4/checkout.html#git_error_last-12", + "ex/v1.8.4/checkout.html#git_error_last-13", + "ex/v1.8.4/checkout.html#git_error_last-14" + ], + "commit.c": ["ex/v1.8.4/commit.html#git_error_last-2"], + "config.c": [ + "ex/v1.8.4/config.html#git_error_last-6", + "ex/v1.8.4/config.html#git_error_last-7", + "ex/v1.8.4/config.html#git_error_last-8" + ], + "general.c": ["ex/v1.8.4/general.html#git_error_last-33"], "merge.c": [ - "ex/HEAD/merge.html#git_error_last-8", - "ex/HEAD/merge.html#git_error_last-9" + "ex/v1.8.4/merge.html#git_error_last-8", + "ex/v1.8.4/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": { + "git_filter_list_load": { "type": "function", - "file": "git2/errors.h", - "line": 146, - "lineto": 146, + "file": "git2/filter.h", + "line": 129, + "lineto": 135, "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": "filters", + "type": "git_filter_list **", + "comment": "Output newly created git_filter_list (or NULL)" + }, + { + "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": "string", + "name": "path", "type": "const char *", - "comment": "The formatted error message to keep" + "comment": "Relative path of the file to be filtered" + }, + { + "name": "mode", + "type": "git_filter_mode_t", + "comment": "Filtering direction (WT->ODB or ODB->WT)" + }, + { + "name": "flags", + "type": "uint32_t", + "comment": "Combination of `git_filter_flag_t` flags" } ], - "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 relay an error message through libgit2. Most regular users of libgit2 will never need to call this function -- actually, calling it in most circumstances (for example, calling from within a callback function) will just end up having the value overwritten by libgit2 internals.
\n\nThis error message is stored in thread-local storage and only applies 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": "", + "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": "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": "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 string that is passed in. This is not a good idea when the error in question is a memory allocation failure. That circumstance has a special setter function that sets the error string to a known and statically allocated internal value.
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_filter_list_load": { + "git_filter_list_load_ext": { "type": "function", "file": "git2/filter.h", - "line": 98, - "lineto": 104, + "line": 152, + "lineto": 158, "args": [ { "name": "filters", @@ -8097,13 +7927,13 @@ "comment": "Filtering direction (WT->ODB or ODB->WT)" }, { - "name": "flags", - "type": "uint32_t", - "comment": "Combination of `git_filter_flag_t` flags" + "name": "opts", + "type": "git_filter_options *", + "comment": "The `git_filter_options` to use when loading filters" } ], - "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", + "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": "int", "comment": " 0 on success (which could still return NULL if no filters are\n needed for the requested file), \n<\n0 on error" @@ -8115,8 +7945,8 @@ "git_filter_list_contains": { "type": "function", "file": "git2/filter.h", - "line": 118, - "lineto": 120, + "line": 172, + "lineto": 174, "args": [ { "name": "filters", @@ -8139,11 +7969,11 @@ "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_filter_list_apply_to_data": { + "git_filter_list_apply_to_buffer": { "type": "function", "file": "git2/filter.h", - "line": 142, - "lineto": 145, + "line": 185, + "lineto": 189, "args": [ { "name": "out", @@ -8157,25 +7987,30 @@ }, { "name": "in", - "type": "git_buf *", + "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_buf *out, git_filter_list *filters, git_buf *in", - "sig": "git_buf *::git_filter_list *::git_buf *", + "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 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 not zero), then it will be overwritten when applying the filters. If not, then it will be left untouched.
If there are no filters to apply (or filters
is NULL), then the out
buffer will reference the in
buffer data (with asize
set to zero) instead of allocating data. This keeps allocations to a minimum, but it means you have to be careful about freeing the in
data since out
may be pointing to it!
Apply a filter list to the contents of a file on disk
\n", "comments": "", "group": "filter" @@ -8211,8 +8043,8 @@ "git_filter_list_apply_to_blob": { "type": "function", "file": "git2/filter.h", - "line": 169, - "lineto": 172, + "line": 215, + "lineto": 218, "args": [ { "name": "out", @@ -8232,19 +8064,16 @@ ], "argline": "git_buf *out, git_filter_list *filters, git_blob *blob", "sig": "git_buf *::git_filter_list *::git_blob *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Apply a filter list to the contents of a blob
\n", "comments": "", "group": "filter" }, - "git_filter_list_stream_data": { + "git_filter_list_stream_buffer": { "type": "function", "file": "git2/filter.h", - "line": 181, - "lineto": 184, + "line": 229, + "lineto": 233, "args": [ { "name": "filters", @@ -8252,22 +8081,24 @@ "comment": "the list of filters to apply" }, { - "name": "data", - "type": "git_buf *", + "name": "buffer", + "type": "const char *", "comment": "the buffer to filter" }, + { + "name": "len", + "type": "size_t", + "comment": "the size of the buffer" + }, { "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 - }, + "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" @@ -8275,8 +8106,8 @@ "git_filter_list_stream_file": { "type": "function", "file": "git2/filter.h", - "line": 195, - "lineto": 199, + "line": 245, + "lineto": 249, "args": [ { "name": "filters", @@ -8301,10 +8132,7 @@ ], "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 - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Apply a filter list to a file as a stream
\n", "comments": "", "group": "filter" @@ -8312,8 +8140,8 @@ "git_filter_list_stream_blob": { "type": "function", "file": "git2/filter.h", - "line": 208, - "lineto": 211, + "line": 259, + "lineto": 262, "args": [ { "name": "filters", @@ -8333,10 +8161,7 @@ ], "argline": "git_filter_list *filters, git_blob *blob, git_writestream *target", "sig": "git_filter_list *::git_blob *::git_writestream *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Apply a filter list to a blob as a stream
\n", "comments": "", "group": "filter" @@ -8344,8 +8169,8 @@ "git_filter_list_free": { "type": "function", "file": "git2/filter.h", - "line": 218, - "lineto": 218, + "line": 269, + "lineto": 269, "args": [ { "name": "filters", @@ -8355,10 +8180,7 @@ ], "argline": "git_filter_list *filters", "sig": "git_filter_list *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a git_filter_list
\n", "comments": "", "group": "filter" @@ -8379,9 +8201,7 @@ "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/HEAD/general.html#git_libgit2_init-34" - ] + "general.c": ["ex/v1.8.4/general.html#git_libgit2_init-34"] } }, "git_libgit2_shutdown": { @@ -8403,8 +8223,8 @@ "git_graph_ahead_behind": { "type": "function", "file": "git2/graph.h", - "line": 37, - "lineto": 37, + "line": 38, + "lineto": 38, "args": [ { "name": "ahead", @@ -8434,10 +8254,7 @@ ], "argline": "size_t *ahead, size_t *behind, git_repository *repo, const git_oid *local, const git_oid *upstream", "sig": "size_t *::size_t *::git_repository *::const git_oid *::const git_oid *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "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.
Note that a commit is not considered a descendant of itself, in contrast to git merge-base --is-ancestor
.
Determine if a commit is reachable from any of a list of commits by\n following parent edges.
\n", + "comments": "", + "group": "graph" + }, "git_ignore_add_rule": { "type": "function", "file": "git2/ignore.h", @@ -8488,15 +8342,12 @@ { "name": "rules", "type": "const char *", - "comment": "Text of rules, a la the contents of 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." + "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" - }, + "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" @@ -8515,10 +8366,7 @@ ], "argline": "git_repository *repo", "sig": "git_repository *", - "return": { - "type": "int", - "comment": " 0 on success" - }, + "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" @@ -8555,60 +8403,11 @@ "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_index_open": { - "type": "function", - "file": "git2/index.h", - "line": 187, - "lineto": 187, - "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, 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": 200, - "lineto": 200, - "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, 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": 207, - "lineto": 207, + "line": 216, + "lineto": 216, "args": [ { "name": "index", @@ -8618,39 +8417,25 @@ ], "argline": "git_index *index", "sig": "git_index *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free an existing index object.
\n", "comments": "", "group": "index", "examples": { - "add.c": [ - "ex/HEAD/add.html#git_index_free-1" - ], - "general.c": [ - "ex/HEAD/general.html#git_index_free-35" - ], - "init.c": [ - "ex/HEAD/init.html#git_index_free-2" - ], - "ls-files.c": [ - "ex/HEAD/ls-files.html#git_index_free-1" - ] + "add.c": ["ex/v1.8.4/add.html#git_index_free-1"], + "commit.c": ["ex/v1.8.4/commit.html#git_index_free-3"], + "general.c": ["ex/v1.8.4/general.html#git_index_free-35"], + "init.c": ["ex/v1.8.4/init.html#git_index_free-2"], + "ls-files.c": ["ex/v1.8.4/ls-files.html#git_index_free-1"] } }, "git_index_owner": { "type": "function", "file": "git2/index.h", - "line": 215, - "lineto": 215, + "line": 224, + "lineto": 224, "args": [ - { - "name": "index", - "type": "const git_index *", - "comment": "The index" - } + { "name": "index", "type": "const git_index *", "comment": "The index" } ], "argline": "const git_index *index", "sig": "const git_index *", @@ -8665,8 +8450,8 @@ "git_index_caps": { "type": "function", "file": "git2/index.h", - "line": 223, - "lineto": 223, + "line": 232, + "lineto": 232, "args": [ { "name": "index", @@ -8687,8 +8472,8 @@ "git_index_set_caps": { "type": "function", "file": "git2/index.h", - "line": 236, - "lineto": 236, + "line": 245, + "lineto": 245, "args": [ { "name": "index", @@ -8703,10 +8488,7 @@ ], "argline": "git_index *index, int caps", "sig": "git_index *::int", - "return": { - "type": "int", - "comment": " 0 on success, -1 on failure" - }, + "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" @@ -8736,8 +8515,8 @@ "git_index_set_version": { "type": "function", "file": "git2/index.h", - "line": 261, - "lineto": 261, + "line": 270, + "lineto": 270, "args": [ { "name": "index", @@ -8752,10 +8531,7 @@ ], "argline": "git_index *index, unsigned int version", "sig": "git_index *::unsigned int", - "return": { - "type": "int", - "comment": " 0 on success, -1 on failure" - }, + "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" @@ -8763,8 +8539,8 @@ "git_index_read": { "type": "function", "file": "git2/index.h", - "line": 280, - "lineto": 280, + "line": 289, + "lineto": 289, "args": [ { "name": "index", @@ -8779,10 +8555,7 @@ ], "argline": "git_index *index, int force", "sig": "git_index *::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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.
Write an existing index object from memory back to disk\n using an atomic file lock.
\n", "comments": "", "group": "index", "examples": { - "add.c": [ - "ex/HEAD/add.html#git_index_write-2" - ] + "add.c": ["ex/v1.8.4/add.html#git_index_write-2"], + "commit.c": ["ex/v1.8.4/commit.html#git_index_write-4"] } }, "git_index_path": { "type": "function", "file": "git2/index.h", - "line": 297, - "lineto": 297, + "line": 306, + "lineto": 306, "args": [ { "name": "index", @@ -8839,8 +8608,8 @@ "git_index_checksum": { "type": "function", "file": "git2/index.h", - "line": 309, - "lineto": 309, + "line": 320, + "lineto": 320, "args": [ { "name": "index", @@ -8861,8 +8630,8 @@ "git_index_read_tree": { "type": "function", "file": "git2/index.h", - "line": 320, - "lineto": 320, + "line": 332, + "lineto": 332, "args": [ { "name": "index", @@ -8877,10 +8646,7 @@ ], "argline": "git_index *index, const git_tree *tree", "sig": "git_index *::const git_tree *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -8888,19 +8654,15 @@ "git_index_write_tree": { "type": "function", "file": "git2/index.h", - "line": 341, - "lineto": 341, + "line": 353, + "lineto": 353, "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" - } + { "name": "index", "type": "git_index *", "comment": "Index to write" } ], "argline": "git_oid *out, git_index *index", "sig": "git_oid *::git_index *", @@ -8912,30 +8674,23 @@ "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": { - "init.c": [ - "ex/HEAD/init.html#git_index_write_tree-3" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_index_write_tree-10" - ] + "commit.c": ["ex/v1.8.4/commit.html#git_index_write_tree-5"], + "init.c": ["ex/v1.8.4/init.html#git_index_write_tree-3"], + "merge.c": ["ex/v1.8.4/merge.html#git_index_write_tree-10"] } }, "git_index_write_tree_to": { "type": "function", "file": "git2/index.h", - "line": 358, - "lineto": 358, + "line": 370, + "lineto": 370, "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" + "comment": "Pointer where to store OID of the written tree" }, + { "name": "index", "type": "git_index *", "comment": "Index to write" }, { "name": "repo", "type": "git_repository *", @@ -8955,8 +8710,8 @@ "git_index_entrycount": { "type": "function", "file": "git2/index.h", - "line": 377, - "lineto": 377, + "line": 389, + "lineto": 389, "args": [ { "name": "index", @@ -8974,19 +8729,15 @@ "comments": "", "group": "index", "examples": { - "general.c": [ - "ex/HEAD/general.html#git_index_entrycount-36" - ], - "ls-files.c": [ - "ex/HEAD/ls-files.html#git_index_entrycount-2" - ] + "general.c": ["ex/v1.8.4/general.html#git_index_entrycount-36"], + "ls-files.c": ["ex/v1.8.4/ls-files.html#git_index_entrycount-2"] } }, "git_index_clear": { "type": "function", "file": "git2/index.h", - "line": 388, - "lineto": 388, + "line": 400, + "lineto": 400, "args": [ { "name": "index", @@ -9007,8 +8758,8 @@ "git_index_get_byindex": { "type": "function", "file": "git2/index.h", - "line": 401, - "lineto": 402, + "line": 413, + "lineto": 414, "args": [ { "name": "index", @@ -9031,35 +8782,23 @@ "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.
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.
Remove an entry from the index
\n", "comments": "", "group": "index" @@ -9111,8 +8837,8 @@ "git_index_remove_directory": { "type": "function", "file": "git2/index.h", - "line": 437, - "lineto": 438, + "line": 449, + "lineto": 450, "args": [ { "name": "index", @@ -9124,18 +8850,11 @@ "type": "const char *", "comment": "container directory path" }, - { - "name": "stage", - "type": "int", - "comment": "stage to search" - } + { "name": "stage", "type": "int", "comment": "stage to search" } ], "argline": "git_index *index, const char *dir, int stage", "sig": "git_index *::const char *::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Remove all entries from the index under a given directory
\n", "comments": "", "group": "index" @@ -9143,8 +8862,8 @@ "git_index_add": { "type": "function", "file": "git2/index.h", - "line": 454, - "lineto": 454, + "line": 466, + "lineto": 466, "args": [ { "name": "index", @@ -9159,10 +8878,7 @@ ], "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" - }, + "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" @@ -9170,8 +8886,8 @@ "git_index_entry_stage": { "type": "function", "file": "git2/index.h", - "line": 466, - "lineto": 466, + "line": 478, + "lineto": 478, "args": [ { "name": "entry", @@ -9181,10 +8897,7 @@ ], "argline": "const git_index_entry *entry", "sig": "const git_index_entry *", - "return": { - "type": "int", - "comment": " the stage number" - }, + "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"
@@ -9192,8 +8905,8 @@
"git_index_entry_is_conflict": {
"type": "function",
"file": "git2/index.h",
- "line": 475,
- "lineto": 475,
+ "line": 487,
+ "lineto": 487,
"args": [
{
"name": "entry",
@@ -9214,8 +8927,8 @@
"git_index_iterator_new": {
"type": "function",
"file": "git2/index.h",
- "line": 495,
- "lineto": 497,
+ "line": 508,
+ "lineto": 510,
"args": [
{
"name": "iterator_out",
@@ -9230,10 +8943,7 @@
],
"argline": "git_index_iterator **iterator_out, git_index *index",
"sig": "git_index_iterator **::git_index *",
- "return": {
- "type": "int",
- "comment": null
- },
+ "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" @@ -9241,8 +8951,8 @@ "git_index_iterator_next": { "type": "function", "file": "git2/index.h", - "line": 506, - "lineto": 508, + "line": 519, + "lineto": 521, "args": [ { "name": "out", @@ -9268,8 +8978,8 @@ "git_index_iterator_free": { "type": "function", "file": "git2/index.h", - "line": 515, - "lineto": 515, + "line": 528, + "lineto": 528, "args": [ { "name": "iterator", @@ -9279,10 +8989,7 @@ ], "argline": "git_index_iterator *iterator", "sig": "git_index_iterator *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the index iterator
\n", "comments": "", "group": "index" @@ -9290,26 +8997,19 @@ "git_index_add_bypath": { "type": "function", "file": "git2/index.h", - "line": 546, - "lineto": 546, + "line": 559, + "lineto": 559, "args": [ { "name": "index", "type": "git_index *", "comment": "an existing index object" }, - { - "name": "path", - "type": "const char *", - "comment": "filename to add" - } + { "name": "path", "type": "const char *", "comment": "filename to add" } ], "argline": "git_index *index, const char *path", "sig": "git_index *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -9317,8 +9017,8 @@ "git_index_add_from_buffer": { "type": "function", "file": "git2/index.h", - "line": 575, - "lineto": 578, + "line": 587, + "lineto": 590, "args": [ { "name": "index", @@ -9335,27 +9035,20 @@ "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_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" - }, + "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. The id
and the file_size
of the 'entry' are updated with the real value of the blob.
This 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", + "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_index_remove_bypath": { "type": "function", "file": "git2/index.h", - "line": 594, - "lineto": 594, + "line": 606, + "lineto": 606, "args": [ { "name": "index", @@ -9370,10 +9063,7 @@ ], "argline": "git_index *index, const char *path", "sig": "git_index *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -9381,8 +9071,8 @@ "git_index_add_all": { "type": "function", "file": "git2/index.h", - "line": 642, - "lineto": 647, + "line": 654, + "lineto": 659, "args": [ { "name": "index", @@ -9419,17 +9109,13 @@ "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/HEAD/add.html#git_index_add_all-3" - ] - } + "examples": { "add.c": ["ex/v1.8.4/add.html#git_index_add_all-3"] } }, "git_index_remove_all": { "type": "function", "file": "git2/index.h", - "line": 664, - "lineto": 668, + "line": 676, + "lineto": 680, "args": [ { "name": "index", @@ -9465,8 +9151,8 @@ "git_index_update_all": { "type": "function", "file": "git2/index.h", - "line": 693, - "lineto": 697, + "line": 705, + "lineto": 709, "args": [ { "name": "index", @@ -9498,17 +9184,13 @@ "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/HEAD/add.html#git_index_update_all-4" - ] - } + "examples": { "add.c": ["ex/v1.8.4/add.html#git_index_update_all-4"] } }, "git_index_find": { "type": "function", "file": "git2/index.h", - "line": 708, - "lineto": 708, + "line": 720, + "lineto": 720, "args": [ { "name": "at_pos", @@ -9520,18 +9202,11 @@ "type": "git_index *", "comment": "an existing index object" }, - { - "name": "path", - "type": "const char *", - "comment": "path to search" - } + { "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": " a zero-based position in the index if found; GIT_ENOTFOUND otherwise" - }, + "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" @@ -9539,8 +9214,8 @@ "git_index_find_prefix": { "type": "function", "file": "git2/index.h", - "line": 719, - "lineto": 719, + "line": 731, + "lineto": 731, "args": [ { "name": "at_pos", @@ -9560,10 +9235,7 @@ ], "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" - }, + "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" @@ -9571,8 +9243,8 @@ "git_index_conflict_add": { "type": "function", "file": "git2/index.h", - "line": 744, - "lineto": 748, + "line": 756, + "lineto": 760, "args": [ { "name": "index", @@ -9597,10 +9269,7 @@ ], "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" - }, + "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 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" @@ -9608,8 +9277,8 @@ "git_index_conflict_get": { "type": "function", "file": "git2/index.h", - "line": 764, - "lineto": 769, + "line": 776, + "lineto": 781, "args": [ { "name": "ancestor_out", @@ -9631,18 +9300,11 @@ "type": "git_index *", "comment": "an existing index object" }, - { - "name": "path", - "type": "const char *", - "comment": "path to search" - } + { "name": "path", "type": "const char *", "comment": "path to search" } ], "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" - }, + "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 git_index_entry
struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.
Removes the index entries that represent a conflict of a single file.
\n", "comments": "", "group": "index" @@ -9677,8 +9336,8 @@ "git_index_conflict_cleanup": { "type": "function", "file": "git2/index.h", - "line": 786, - "lineto": 786, + "line": 798, + "lineto": 798, "args": [ { "name": "index", @@ -9688,10 +9347,7 @@ ], "argline": "git_index *index", "sig": "git_index *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -9699,13 +9355,13 @@ "git_index_has_conflicts": { "type": "function", "file": "git2/index.h", - "line": 793, - "lineto": 793, + "line": 806, + "lineto": 806, "args": [ { "name": "index", "type": "const git_index *", - "comment": null + "comment": "An existing index object." } ], "argline": "const git_index *index", @@ -9718,16 +9374,14 @@ "comments": "", "group": "index", "examples": { - "merge.c": [ - "ex/HEAD/merge.html#git_index_has_conflicts-11" - ] + "merge.c": ["ex/v1.8.4/merge.html#git_index_has_conflicts-11"] } }, "git_index_conflict_iterator_new": { "type": "function", "file": "git2/index.h", - "line": 804, - "lineto": 806, + "line": 817, + "lineto": 819, "args": [ { "name": "iterator_out", @@ -9742,24 +9396,19 @@ ], "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" - }, + "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/HEAD/merge.html#git_index_conflict_iterator_new-12" - ] + "merge.c": ["ex/v1.8.4/merge.html#git_index_conflict_iterator_new-12"] } }, "git_index_conflict_next": { "type": "function", "file": "git2/index.h", - "line": 818, - "lineto": 822, + "line": 832, + "lineto": 836, "args": [ { "name": "ancestor_out", @@ -9779,7 +9428,7 @@ { "name": "iterator", "type": "git_index_conflict_iterator *", - "comment": null + "comment": "The conflict iterator." } ], "argline": "const git_index_entry **ancestor_out, const git_index_entry **our_out, const git_index_entry **their_out, git_index_conflict_iterator *iterator", @@ -9792,16 +9441,14 @@ "comments": "", "group": "index", "examples": { - "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_next-13" - ] + "merge.c": ["ex/v1.8.4/merge.html#git_index_conflict_next-13"] } }, "git_index_conflict_iterator_free": { "type": "function", "file": "git2/index.h", - "line": 829, - "lineto": 830, + "line": 843, + "lineto": 844, "args": [ { "name": "iterator", @@ -9811,24 +9458,19 @@ ], "argline": "git_index_conflict_iterator *iterator", "sig": "git_index_conflict_iterator *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Frees a git_index_conflict_iterator
.
Create a new indexer instance
\n", "comments": "", "group": "indexer" @@ -9896,14 +9535,10 @@ "git_indexer_append": { "type": "function", "file": "git2/indexer.h", - "line": 116, - "lineto": 116, + "line": 148, + "lineto": 148, "args": [ - { - "name": "idx", - "type": "git_indexer *", - "comment": "the indexer" - }, + { "name": "idx", "type": "git_indexer *", "comment": "the indexer" }, { "name": "data", "type": "const void *", @@ -9922,10 +9557,7 @@ ], "argline": "git_indexer *idx, const void *data, size_t size, git_indexer_progress *stats", "sig": "git_indexer *::const void *::size_t::git_indexer_progress *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Add data to the indexer
\n", "comments": "", "group": "indexer" @@ -9933,26 +9565,19 @@ "git_indexer_commit": { "type": "function", "file": "git2/indexer.h", - "line": 125, - "lineto": 125, + "line": 159, + "lineto": 159, "args": [ - { - "name": "idx", - "type": "git_indexer *", - "comment": "the indexer" - }, + { "name": "idx", "type": "git_indexer *", "comment": "the indexer" }, { "name": "stats", "type": "git_indexer_progress *", - "comment": null + "comment": "Stat storage." } ], "argline": "git_indexer *idx, git_indexer_progress *stats", "sig": "git_indexer *::git_indexer_progress *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Finalize the pack and index
\n", "comments": "Resolve any pending deltas and write out the index file
\n", "group": "indexer" @@ -9960,8 +9585,8 @@ "git_indexer_hash": { "type": "function", "file": "git2/indexer.h", - "line": 135, - "lineto": 135, + "line": 172, + "lineto": 172, "args": [ { "name": "idx", @@ -9973,17 +9598,39 @@ "sig": "const git_indexer *", "return": { "type": "const git_oid *", - "comment": null + "comment": " the packfile's hash" }, "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_indexer_name": { + "type": "function", + "file": "git2/indexer.h", + "line": 184, + "lineto": 184, + "args": [ + { + "name": "idx", + "type": "const git_indexer *", + "comment": "the indexer instance" + } + ], + "argline": "const git_indexer *idx", + "sig": "const git_indexer *", + "return": { + "type": "const char *", + "comment": " a NUL terminated string for the packfile name" + }, + "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_indexer_free": { "type": "function", "file": "git2/indexer.h", - "line": 142, - "lineto": 142, + "line": 191, + "lineto": 191, "args": [ { "name": "idx", @@ -9993,10 +9640,7 @@ ], "argline": "git_indexer *idx", "sig": "git_indexer *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the indexer and its resources
\n", "comments": "", "group": "indexer" @@ -10015,10 +9659,7 @@ ], "argline": "git_mailmap **out", "sig": "git_mailmap **", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, + "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" @@ -10037,10 +9678,7 @@ ], "argline": "git_mailmap *mm", "sig": "git_mailmap *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the mailmap and its associated memory.
\n", "comments": "", "group": "mailmap" @@ -10079,10 +9717,7 @@ ], "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" - }, + "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": "mailmap" @@ -10111,10 +9746,7 @@ ], "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" - }, + "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": "mailmap" @@ -10138,10 +9770,7 @@ ], "argline": "git_mailmap **out, git_repository *repo", "sig": "git_mailmap **::git_repository *", - "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 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" @@ -10180,10 +9809,7 @@ ], "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" - }, + "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.
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/HEAD/merge.html#git_merge_analysis-15" - ] - } + "examples": { "merge.c": ["ex/v1.8.4/merge.html#git_merge_analysis-15"] } }, "git_merge_analysis_for_ref": { "type": "function", "file": "git2/merge.h", - "line": 398, - "lineto": 404, + "line": 418, + "lineto": 424, "args": [ { "name": "analysis_out", @@ -10362,7 +9978,7 @@ { "name": "preference_out", "type": "git_merge_preference_t *", - "comment": null + "comment": "One of the `git_merge_preference_t` flag." }, { "name": "repo", @@ -10387,10 +10003,7 @@ ], "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" - }, + "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": "merge" @@ -10398,8 +10011,8 @@ "git_merge_base": { "type": "function", "file": "git2/merge.h", - "line": 415, - "lineto": 419, + "line": 435, + "lineto": 439, "args": [ { "name": "out", @@ -10432,19 +10045,15 @@ "comments": "", "group": "merge", "examples": { - "log.c": [ - "ex/HEAD/log.html#git_merge_base-31" - ], - "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_merge_base-1" - ] + "log.c": ["ex/v1.8.4/log.html#git_merge_base-31"], + "rev-parse.c": ["ex/v1.8.4/rev-parse.html#git_merge_base-1"] } }, "git_merge_bases": { "type": "function", "file": "git2/merge.h", - "line": 430, - "lineto": 434, + "line": 450, + "lineto": 454, "args": [ { "name": "out", @@ -10480,8 +10089,8 @@ "git_merge_base_many": { "type": "function", "file": "git2/merge.h", - "line": 445, - "lineto": 449, + "line": 465, + "lineto": 469, "args": [ { "name": "out", @@ -10517,8 +10126,8 @@ "git_merge_bases_many": { "type": "function", "file": "git2/merge.h", - "line": 460, - "lineto": 464, + "line": 480, + "lineto": 484, "args": [ { "name": "out", @@ -10554,8 +10163,8 @@ "git_merge_base_octopus": { "type": "function", "file": "git2/merge.h", - "line": 475, - "lineto": 479, + "line": 495, + "lineto": 499, "args": [ { "name": "out", @@ -10591,8 +10200,8 @@ "git_merge_file": { "type": "function", "file": "git2/merge.h", - "line": 497, - "lineto": 502, + "line": 517, + "lineto": 522, "args": [ { "name": "out", @@ -10622,10 +10231,7 @@ ], "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" - }, + "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
.
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
.
Frees a git_merge_file_result
.
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
.
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
.
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 uses wishes to abort), you should clear this state by calling git_repository_state_cleanup()
.
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()
.
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" @@ -10902,21 +10486,18 @@ "git_message_trailer_array_free": { "type": "function", "file": "git2/message.h", - "line": 79, - "lineto": 79, + "line": 81, + "lineto": 81, "args": [ { "name": "arr", "type": "git_message_trailer_array *", - "comment": null + "comment": "The trailer to free." } ], "argline": "git_message_trailer_array *arr", "sig": "git_message_trailer_array *", - "return": { - "type": "void", - "comment": null - }, + "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": "message" @@ -10945,10 +10526,7 @@ ], "argline": "git_note_iterator **out, git_repository *repo, const char *notes_ref", "sig": "git_note_iterator **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Creates a new iterator for notes
\n", "comments": "The iterator must be freed manually by the user.
\n", "group": "note" @@ -10972,10 +10550,7 @@ ], "argline": "git_note_iterator **out, git_commit *notes_commit", "sig": "git_note_iterator **::git_commit *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Creates a new iterator for notes from a commit
\n", "comments": "The iterator must be freed manually by the user.
\n", "group": "note" @@ -10994,10 +10569,7 @@ ], "argline": "git_note_iterator *it", "sig": "git_note_iterator *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Frees an git_note_iterator
\n", "comments": "", "group": "note" @@ -11063,10 +10635,7 @@ ], "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" - }, + "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" @@ -11100,10 +10669,7 @@ ], "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" - }, + "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" @@ -11114,18 +10680,11 @@ "line": 136, "lineto": 136, "args": [ - { - "name": "note", - "type": "const git_note *", - "comment": "the note" - } + { "name": "note", "type": "const git_note *", "comment": "the note" } ], "argline": "const git_note *note", "sig": "const git_note *", - "return": { - "type": "const git_signature *", - "comment": " the author" - }, + "return": { "type": "const git_signature *", "comment": " the author" }, "description": "Get the note author
\n", "comments": "", "group": "note" @@ -11136,11 +10695,7 @@ "line": 144, "lineto": 144, "args": [ - { - "name": "note", - "type": "const git_note *", - "comment": "the note" - } + { "name": "note", "type": "const git_note *", "comment": "the note" } ], "argline": "const git_note *note", "sig": "const git_note *", @@ -11158,18 +10713,11 @@ "line": 153, "lineto": 153, "args": [ - { - "name": "note", - "type": "const git_note *", - "comment": "the note" - } + { "name": "note", "type": "const git_note *", "comment": "the note" } ], "argline": "const git_note *note", "sig": "const git_note *", - "return": { - "type": "const char *", - "comment": " the note message" - }, + "return": { "type": "const char *", "comment": " the note message" }, "description": "Get the note message
\n", "comments": "", "group": "note" @@ -11180,11 +10728,7 @@ "line": 162, "lineto": 162, "args": [ - { - "name": "note", - "type": "const git_note *", - "comment": "the note" - } + { "name": "note", "type": "const git_note *", "comment": "the note" } ], "argline": "const git_note *note", "sig": "const git_note *", @@ -11237,18 +10781,11 @@ "type": "const char *", "comment": "Content of the note to add for object oid" }, - { - "name": "force", - "type": "int", - "comment": "Overwrite existing note" - } + { "name": "force", "type": "int", "comment": "Overwrite existing note" } ], "argline": "git_oid *out, git_repository *repo, const char *notes_ref, const git_signature *author, const git_signature *committer, const git_oid *oid, const char *note, int force", "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const git_oid *::const char *::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Add a note for an object
\n", "comments": "", "group": "note" @@ -11307,10 +10844,7 @@ ], "argline": "git_oid *notes_commit_out, git_oid *notes_blob_out, git_repository *repo, git_commit *parent, const git_signature *author, const git_signature *committer, const git_oid *oid, const char *note, int allow_note_overwrite", "sig": "git_oid *::git_oid *::git_repository *::git_commit *::const git_signature *::const git_signature *::const git_oid *::const char *::int", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Add a note for an object from a commit
\n", "comments": "This function will create a notes commit for a given object, the commit is a dangling commit, no reference is created.
\n", "group": "note" @@ -11349,10 +10883,7 @@ ], "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 *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Remove the note for an object
\n", "comments": "", "group": "note" @@ -11396,10 +10927,7 @@ ], "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 *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Remove the note for an object
\n", "comments": "", "group": "note" @@ -11410,18 +10938,11 @@ "line": 270, "lineto": 270, "args": [ - { - "name": "note", - "type": "git_note *", - "comment": "git_note object" - } + { "name": "note", "type": "git_note *", "comment": "git_note object" } ], "argline": "git_note *note", "sig": "git_note *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a git_note object
\n", "comments": "", "group": "note" @@ -11445,10 +10966,7 @@ ], "argline": "git_buf *out, git_repository *repo", "sig": "git_buf *::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Get the default notes reference for a repository
\n", "comments": "", "group": "note" @@ -11519,20 +11037,13 @@ ], "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" - }, + "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/HEAD/log.html#git_object_lookup-32" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_object_lookup-17" - ] + "log.c": ["ex/v1.8.4/log.html#git_object_lookup-32"], + "merge.c": ["ex/v1.8.4/merge.html#git_object_lookup-17"] } }, "git_object_lookup_prefix": { @@ -11569,10 +11080,7 @@ ], "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" - }, + "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.
\n\nThe 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" @@ -11606,10 +11114,7 @@ ], "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" - }, + "return": { "type": "int", "comment": " 0 on success, or an error code" }, "description": "Lookup an object that represents a tree entry.
\n", "comments": "", "group": "object" @@ -11628,36 +11133,33 @@ ], "argline": "const git_object *obj", "sig": "const git_object *", - "return": { - "type": "const git_oid *", - "comment": " the SHA1 id" - }, + "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/HEAD/blame.html#git_object_id-8", - "ex/HEAD/blame.html#git_object_id-9", - "ex/HEAD/blame.html#git_object_id-10", - "ex/HEAD/blame.html#git_object_id-11" + "ex/v1.8.4/blame.html#git_object_id-8", + "ex/v1.8.4/blame.html#git_object_id-9", + "ex/v1.8.4/blame.html#git_object_id-10", + "ex/v1.8.4/blame.html#git_object_id-11" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_id-10", - "ex/HEAD/cat-file.html#git_object_id-11" + "ex/v1.8.4/cat-file.html#git_object_id-10", + "ex/v1.8.4/cat-file.html#git_object_id-11" ], "log.c": [ - "ex/HEAD/log.html#git_object_id-33", - "ex/HEAD/log.html#git_object_id-34", - "ex/HEAD/log.html#git_object_id-35", - "ex/HEAD/log.html#git_object_id-36" + "ex/v1.8.4/log.html#git_object_id-33", + "ex/v1.8.4/log.html#git_object_id-34", + "ex/v1.8.4/log.html#git_object_id-35", + "ex/v1.8.4/log.html#git_object_id-36" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_object_id-2", - "ex/HEAD/rev-parse.html#git_object_id-3", - "ex/HEAD/rev-parse.html#git_object_id-4", - "ex/HEAD/rev-parse.html#git_object_id-5", - "ex/HEAD/rev-parse.html#git_object_id-6" + "ex/v1.8.4/rev-parse.html#git_object_id-2", + "ex/v1.8.4/rev-parse.html#git_object_id-3", + "ex/v1.8.4/rev-parse.html#git_object_id-4", + "ex/v1.8.4/rev-parse.html#git_object_id-5", + "ex/v1.8.4/rev-parse.html#git_object_id-6" ] } }, @@ -11680,18 +11182,11 @@ ], "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" - }, + "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/HEAD/tag.html#git_object_short_id-3" - ] - } + "examples": { "tag.c": ["ex/v1.8.4/tag.html#git_object_short_id-3"] } }, "git_object_type": { "type": "function", @@ -11707,22 +11202,17 @@ ], "argline": "const git_object *obj", "sig": "const git_object *", - "return": { - "type": "git_object_t", - "comment": " the object's type" - }, + "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/HEAD/cat-file.html#git_object_type-12", - "ex/HEAD/cat-file.html#git_object_type-13", - "ex/HEAD/cat-file.html#git_object_type-14" + "ex/v1.8.4/cat-file.html#git_object_type-12", + "ex/v1.8.4/cat-file.html#git_object_type-13", + "ex/v1.8.4/cat-file.html#git_object_type-14" ], - "tag.c": [ - "ex/HEAD/tag.html#git_object_type-4" - ] + "tag.c": ["ex/v1.8.4/tag.html#git_object_type-4"] } }, "git_object_owner": { @@ -11731,11 +11221,7 @@ "line": 143, "lineto": 143, "args": [ - { - "name": "obj", - "type": "const git_object *", - "comment": "the object" - } + { "name": "obj", "type": "const git_object *", "comment": "the object" } ], "argline": "const git_object *obj", "sig": "const git_object *", @@ -11761,42 +11247,32 @@ ], "argline": "git_object *object", "sig": "git_object *", - "return": { - "type": "void", - "comment": null - }, + "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/HEAD/blame.html#git_object_free-12", - "ex/HEAD/blame.html#git_object_free-13", - "ex/HEAD/blame.html#git_object_free-14", - "ex/HEAD/blame.html#git_object_free-15" - ], - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_free-15" - ], - "general.c": [ - "ex/HEAD/general.html#git_object_free-38" - ], - "log.c": [ - "ex/HEAD/log.html#git_object_free-37" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_object_free-18" - ], + "ex/v1.8.4/blame.html#git_object_free-12", + "ex/v1.8.4/blame.html#git_object_free-13", + "ex/v1.8.4/blame.html#git_object_free-14", + "ex/v1.8.4/blame.html#git_object_free-15" + ], + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_object_free-15"], + "commit.c": ["ex/v1.8.4/commit.html#git_object_free-6"], + "general.c": ["ex/v1.8.4/general.html#git_object_free-38"], + "log.c": ["ex/v1.8.4/log.html#git_object_free-37"], + "merge.c": ["ex/v1.8.4/merge.html#git_object_free-18"], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_object_free-7", - "ex/HEAD/rev-parse.html#git_object_free-8", - "ex/HEAD/rev-parse.html#git_object_free-9" + "ex/v1.8.4/rev-parse.html#git_object_free-7", + "ex/v1.8.4/rev-parse.html#git_object_free-8", + "ex/v1.8.4/rev-parse.html#git_object_free-9" ], "tag.c": [ - "ex/HEAD/tag.html#git_object_free-5", - "ex/HEAD/tag.html#git_object_free-6", - "ex/HEAD/tag.html#git_object_free-7", - "ex/HEAD/tag.html#git_object_free-8" + "ex/v1.8.4/tag.html#git_object_free-5", + "ex/v1.8.4/tag.html#git_object_free-6", + "ex/v1.8.4/tag.html#git_object_free-7", + "ex/v1.8.4/tag.html#git_object_free-8" ] } }, @@ -11823,14 +11299,14 @@ "group": "object", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_type2string-16", - "ex/HEAD/cat-file.html#git_object_type2string-17", - "ex/HEAD/cat-file.html#git_object_type2string-18", - "ex/HEAD/cat-file.html#git_object_type2string-19" + "ex/v1.8.4/cat-file.html#git_object_type2string-16", + "ex/v1.8.4/cat-file.html#git_object_type2string-17", + "ex/v1.8.4/cat-file.html#git_object_type2string-18", + "ex/v1.8.4/cat-file.html#git_object_type2string-19" ], "general.c": [ - "ex/HEAD/general.html#git_object_type2string-39", - "ex/HEAD/general.html#git_object_type2string-40" + "ex/v1.8.4/general.html#git_object_type2string-39", + "ex/v1.8.4/general.html#git_object_type2string-40" ] } }, @@ -11913,8 +11389,8 @@ "git_object_dup": { "type": "function", "file": "git2/object.h", - "line": 225, - "lineto": 225, + "line": 226, + "lineto": 226, "args": [ { "name": "dest", @@ -11929,68 +11405,50 @@ ], "argline": "git_object **dest, git_object *source", "sig": "git_object **::git_object *", - "return": { - "type": "int", - "comment": null - }, + "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": "object" }, - "git_odb_new": { + "git_object_rawcontent_is_valid": { "type": "function", - "file": "git2/odb.h", - "line": 40, - "lineto": 40, - "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." - } - ], - "argline": "git_odb **out", - "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()
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"
+ "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": "object" }, "git_odb_add_disk_alternate": { "type": "function", "file": "git2/odb.h", - "line": 75, - "lineto": 75, + "line": 118, + "lineto": 118, "args": [ { "name": "odb", @@ -12007,7 +11465,7 @@ "sig": "git_odb *::const char *", "return": { "type": "int", - "comment": " 0 on success; error code otherwise" + "comment": " 0 on success, error code otherwise" }, "description": "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", @@ -12016,8 +11474,8 @@ "git_odb_free": { "type": "function", "file": "git2/odb.h", - "line": 82, - "lineto": 82, + "line": 125, + "lineto": 125, "args": [ { "name": "db", @@ -12027,27 +11485,20 @@ ], "argline": "git_odb *db", "sig": "git_odb *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Close an open object database.
\n", "comments": "", "group": "odb", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_odb_free-20" - ], - "general.c": [ - "ex/HEAD/general.html#git_odb_free-41" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_odb_free-20"], + "general.c": ["ex/v1.8.4/general.html#git_odb_free-41"] } }, "git_odb_read": { "type": "function", "file": "git2/odb.h", - "line": 101, - "lineto": 101, + "line": 143, + "lineto": 143, "args": [ { "name": "out", @@ -12069,25 +11520,21 @@ "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." + "comment": " 0 if the object was read, GIT_ENOTFOUND if the object is\n not in the database." }, "description": "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/HEAD/cat-file.html#git_odb_read-21" - ], - "general.c": [ - "ex/HEAD/general.html#git_odb_read-42" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_odb_read-21"], + "general.c": ["ex/v1.8.4/general.html#git_odb_read-42"] } }, "git_odb_read_prefix": { "type": "function", "file": "git2/odb.h", - "line": 130, - "lineto": 130, + "line": 171, + "lineto": 171, "args": [ { "name": "out", @@ -12114,17 +11561,17 @@ "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)" + "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": "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_HEXSZ-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", + "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_odb_read_header": { "type": "function", "file": "git2/odb.h", - "line": 150, - "lineto": 150, + "line": 190, + "lineto": 190, "args": [ { "name": "len_out", @@ -12151,7 +11598,7 @@ "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." + "comment": " 0 if the object was read, GIT_ENOTFOUND if the object is not\n 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 of an object, so the whole object will be read and then the header will be returned.
\n", @@ -12160,8 +11607,8 @@ "git_odb_exists": { "type": "function", "file": "git2/odb.h", - "line": 161, - "lineto": 161, + "line": 199, + "lineto": 199, "args": [ { "name": "db", @@ -12178,17 +11625,49 @@ "sig": "git_odb *::const git_oid *", "return": { "type": "int", - "comment": " - 1, if the object was found\n - 0, otherwise" + "comment": " 1 if the object was found, 0 otherwise" }, "description": "Determine if the given object can be found in the object database.
\n", "comments": "", "group": "odb" }, + "git_odb_exists_ext": { + "type": "function", + "file": "git2/odb.h", + "line": 210, + "lineto": 210, + "args": [ + { + "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": "git_odb *db, const git_oid *id, unsigned int flags", + "sig": "git_odb *::const git_oid *::unsigned int", + "return": { + "type": "int", + "comment": " 1 if the object was found, 0 otherwise" + }, + "description": "Determine if the given object can be found in the object database, with\n extended options.
\n", + "comments": "", + "group": "odb" + }, "git_odb_exists_prefix": { "type": "function", "file": "git2/odb.h", - "line": 174, - "lineto": 175, + "line": 223, + "lineto": 224, "args": [ { "name": "out", @@ -12224,8 +11703,8 @@ "git_odb_expand_ids": { "type": "function", "file": "git2/odb.h", - "line": 216, - "lineto": 219, + "line": 266, + "lineto": 269, "args": [ { "name": "db", @@ -12249,15 +11728,15 @@ "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 underlying database will not be asked to be reloaded if an object is not found (which is unlike other object database operations.)
\n", + "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_odb_refresh": { "type": "function", "file": "git2/odb.h", - "line": 239, - "lineto": 239, + "line": 289, + "lineto": 289, "args": [ { "name": "db", @@ -12278,14 +11757,10 @@ "git_odb_foreach": { "type": "function", "file": "git2/odb.h", - "line": 254, - "lineto": 254, + "line": 304, + "lineto": 304, "args": [ - { - "name": "db", - "type": "git_odb *", - "comment": "database to use" - }, + { "name": "db", "type": "git_odb *", "comment": "database to use" }, { "name": "cb", "type": "git_odb_foreach_cb", @@ -12310,8 +11785,8 @@ "git_odb_write": { "type": "function", "file": "git2/odb.h", - "line": 274, - "lineto": 274, + "line": 324, + "lineto": 324, "args": [ { "name": "out", @@ -12328,11 +11803,7 @@ "type": "const void *", "comment": "buffer with the data to store" }, - { - "name": "len", - "type": "size_t", - "comment": "size of the buffer" - }, + { "name": "len", "type": "size_t", "comment": "size of the buffer" }, { "name": "type", "type": "git_object_t", @@ -12341,24 +11812,17 @@ ], "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" - }, + "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. 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/HEAD/general.html#git_odb_write-43" - ] - } + "examples": { "general.c": ["ex/v1.8.4/general.html#git_odb_write-43"] } }, "git_odb_open_wstream": { "type": "function", "file": "git2/odb.h", - "line": 297, - "lineto": 297, + "line": 347, + "lineto": 347, "args": [ { "name": "out", @@ -12394,8 +11858,8 @@ "git_odb_stream_write": { "type": "function", "file": "git2/odb.h", - "line": 310, - "lineto": 310, + "line": 360, + "lineto": 360, "args": [ { "name": "stream", @@ -12407,17 +11871,13 @@ "type": "const char *", "comment": "the data to write" }, - { - "name": "len", - "type": "size_t", - "comment": "the buffer's length" - } + { "name": "len", "type": "size_t", "comment": "the buffer's length" } ], "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" + "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 size declared with git_odb_open_wstream()
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", @@ -12485,8 +11941,8 @@ "git_odb_stream_free": { "type": "function", "file": "git2/odb.h", - "line": 339, - "lineto": 339, + "line": 394, + "lineto": 394, "args": [ { "name": "stream", @@ -12496,10 +11952,7 @@ ], "argline": "git_odb_stream *stream", "sig": "git_odb_stream *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free an odb stream
\n", "comments": "", "group": "odb" @@ -12507,8 +11960,8 @@ "git_odb_open_rstream": { "type": "function", "file": "git2/odb.h", - "line": 367, - "lineto": 372, + "line": 422, + "lineto": 427, "args": [ { "name": "out", @@ -12540,7 +11993,7 @@ "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" + "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 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", @@ -12549,8 +12002,8 @@ "git_odb_write_pack": { "type": "function", "file": "git2/odb.h", - "line": 392, - "lineto": 396, + "line": 448, + "lineto": 452, "args": [ { "name": "out", @@ -12575,88 +12028,35 @@ ], "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": null - }, + "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_odb_hash": { + "git_odb_write_multi_pack_index": { "type": "function", "file": "git2/odb.h", - "line": 410, - "lineto": 410, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "the resulting object-ID." - }, - { - "name": "data", - "type": "const void *", - "comment": "data to hash" - }, - { - "name": "len", - "type": "size_t", - "comment": "size of the data" - }, - { - "name": "type", - "type": "git_object_t", - "comment": "of the data to hash" - } - ], - "argline": "git_oid *out, const void *data, size_t len, git_object_t 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 hash) of a data buffer
\n", - "comments": "The resulting SHA-1 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_odb_hashfile": { - "type": "function", - "file": "git2/odb.h", - "line": 425, - "lineto": 425, + "line": 466, + "lineto": 467, "args": [ { - "name": "out", - "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": "type", - "type": "git_object_t", - "comment": "the type of the object that will be hashed" + "name": "db", + "type": "git_odb *", + "comment": "object database where the `multi-pack-index` file will be written." } ], - "argline": "git_oid *out, const char *path, git_object_t 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.
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).
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.
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.
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/HEAD/general.html#git_odb_object_data-45" - ] + "general.c": ["ex/v1.8.4/general.html#git_odb_object_data-45"] } }, "git_odb_object_size": { "type": "function", "file": "git2/odb.h", - "line": 483, - "lineto": 483, + "line": 573, + "lineto": 573, "args": [ { "name": "object", @@ -12772,27 +12157,20 @@ ], "argline": "git_odb_object *object", "sig": "git_odb_object *", - "return": { - "type": "size_t", - "comment": " the size" - }, + "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 actual size of the object.
Return the type of an ODB object
\n", "comments": "", "group": "odb", "examples": { - "general.c": [ - "ex/HEAD/general.html#git_odb_object_type-47" - ] + "general.c": ["ex/v1.8.4/general.html#git_odb_object_type-47"] } }, "git_odb_add_backend": { "type": "function", "file": "git2/odb.h", - "line": 506, - "lineto": 506, + "line": 596, + "lineto": 596, "args": [ { "name": "odb", @@ -12841,7 +12214,7 @@ "sig": "git_odb *::git_odb_backend *::int", "return": { "type": "int", - "comment": " 0 on success; error code otherwise" + "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 value of the priority
parameter.
Read
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
Lookup an ODB backend object by index
\n", "comments": "", "group": "odb" }, - "git_odb_backend_pack": { + "git_odb_set_commit_graph": { "type": "function", - "file": "git2/odb_backend.h", - "line": 35, - "lineto": 35, - "args": [ - { - "name": "out", - "type": "git_odb_backend **", - "comment": "location to store the odb backend pointer" - }, - { - "name": "objects_dir", - "type": "const char *", - "comment": "the Git repository's objects directory" - } - ], - "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" - }, - "git_odb_backend_loose": { - "type": "function", - "file": "git2/odb_backend.h", - "line": 49, - "lineto": 55, - "args": [ - { - "name": "out", - "type": "git_odb_backend **", - "comment": "location to store the odb backend pointer" - }, - { - "name": "objects_dir", - "type": "const char *", - "comment": "the Git repository's objects directory" - }, - { - "name": "compression_level", - "type": "int", - "comment": "zlib compression level to use" - }, - { - "name": "do_fsync", - "type": "int", - "comment": "whether to do an fsync() after writing" - }, - { - "name": "dir_mode", - "type": "unsigned int", - "comment": "permissions to use creating a directory or 0 for defaults" - }, - { - "name": "file_mode", - "type": "unsigned int", - "comment": "permissions to use creating a file or 0 for defaults" - } - ], - "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": "odb" - }, - "git_odb_backend_one_pack": { - "type": "function", - "file": "git2/odb_backend.h", - "line": 68, - "lineto": 68, + "file": "git2/odb.h", + "line": 650, + "lineto": 650, "args": [ + { "name": "odb", "type": "git_odb *", "comment": "object database" }, { - "name": "out", - "type": "git_odb_backend **", - "comment": "location to store the odb backend pointer" - }, - { - "name": "index_file", - "type": "const char *", - "comment": "path to the packfile's .idx file" + "name": "cgraph", + "type": "git_commit_graph *", + "comment": "the git commit-graph" } ], - "argline": "git_odb_backend **out, const char *index_file", - "sig": "git_odb_backend **::const char *", + "argline": "git_odb *odb, git_commit_graph *cgraph", + "sig": "git_odb *::git_commit_graph *", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": " 0 on success; error code otherwise" }, - "description": "Create a backend out of a single packfile
\n", - "comments": "This can be useful for inspecting the contents of a single packfile.
\n", + "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_oid_fromstr": { - "type": "function", - "file": "git2/oid.h", - "line": 47, - "lineto": 47, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "oid structure the result is written into." - }, - { - "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)." - } - ], - "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": "", - "group": "oid", - "examples": { - "general.c": [ - "ex/HEAD/general.html#git_oid_fromstr-48", - "ex/HEAD/general.html#git_oid_fromstr-49", - "ex/HEAD/general.html#git_oid_fromstr-50", - "ex/HEAD/general.html#git_oid_fromstr-51", - "ex/HEAD/general.html#git_oid_fromstr-52", - "ex/HEAD/general.html#git_oid_fromstr-53", - "ex/HEAD/general.html#git_oid_fromstr-54", - "ex/HEAD/general.html#git_oid_fromstr-55" - ] - } - }, - "git_oid_fromstrp": { - "type": "function", - "file": "git2/oid.h", - "line": 56, - "lineto": 56, - "args": [ - { - "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_oid *out, const char *str", - "sig": "git_oid *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "Parse a hex formatted null-terminated string into a git_oid.
\n", - "comments": "", - "group": "oid" - }, - "git_oid_fromstrn": { - "type": "function", - "file": "git2/oid.h", - "line": 69, - "lineto": 69, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "oid structure the result is written into." - }, - { - "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_oid *out, const char *str, size_t length", - "sig": "git_oid *::const char *::size_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "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_oid_fromraw": { - "type": "function", - "file": "git2/oid.h", - "line": 77, - "lineto": 77, - "args": [ - { - "name": "out", - "type": "git_oid *", - "comment": "oid structure the result is written into." - }, - { - "name": "raw", - "type": "const unsigned char *", - "comment": "the raw input bytes to be copied." - } - ], - "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", - "comments": "", - "group": "oid" - }, "git_oid_fmt": { "type": "function", "file": "git2/oid.h", - "line": 89, - "lineto": 89, + "line": 188, + "lineto": 188, "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." + "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", @@ -13178,41 +12340,35 @@ ], "argline": "char *out, const git_oid *id", "sig": "char *::const git_oid *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "int", "comment": " 0 on success or error code" }, "description": "Format a git_oid into a hex string.
\n", "comments": "", "group": "oid", "examples": { "fetch.c": [ - "ex/HEAD/fetch.html#git_oid_fmt-1", - "ex/HEAD/fetch.html#git_oid_fmt-2" + "ex/v1.8.4/fetch.html#git_oid_fmt-1", + "ex/v1.8.4/fetch.html#git_oid_fmt-2" ], "general.c": [ - "ex/HEAD/general.html#git_oid_fmt-56", - "ex/HEAD/general.html#git_oid_fmt-57", - "ex/HEAD/general.html#git_oid_fmt-58", - "ex/HEAD/general.html#git_oid_fmt-59", - "ex/HEAD/general.html#git_oid_fmt-60", - "ex/HEAD/general.html#git_oid_fmt-61" + "ex/v1.8.4/general.html#git_oid_fmt-48", + "ex/v1.8.4/general.html#git_oid_fmt-49", + "ex/v1.8.4/general.html#git_oid_fmt-50", + "ex/v1.8.4/general.html#git_oid_fmt-51", + "ex/v1.8.4/general.html#git_oid_fmt-52" ], - "ls-remote.c": [ - "ex/HEAD/ls-remote.html#git_oid_fmt-1" - ] + "ls-remote.c": ["ex/v1.8.4/ls-remote.html#git_oid_fmt-1"] } }, "git_oid_nfmt": { "type": "function", "file": "git2/oid.h", - "line": 100, - "lineto": 100, + "line": 200, + "lineto": 200, "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." + "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": "n", @@ -13227,10 +12383,7 @@ ], "argline": "char *out, size_t n, const git_oid *id", "sig": "char *::size_t::const git_oid *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "int", "comment": " 0 on success or error code" }, "description": "Format a git_oid into a partial hex string.
\n", "comments": "", "group": "oid" @@ -13238,13 +12391,13 @@ "git_oid_pathfmt": { "type": "function", "file": "git2/oid.h", - "line": 115, - "lineto": 115, + "line": 217, + "lineto": 217, "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." + "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", @@ -13255,8 +12408,8 @@ "argline": "char *out, const git_oid *id", "sig": "char *::const git_oid *", "return": { - "type": "void", - "comment": null + "type": "int", + "comment": " 0 on success, non-zero callback return value, or error code" }, "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", @@ -13265,8 +12418,8 @@ "git_oid_tostr_s": { "type": "function", "file": "git2/oid.h", - "line": 128, - "lineto": 128, + "line": 230, + "lineto": 230, "args": [ { "name": "oid", @@ -13278,23 +12431,23 @@ "sig": "const git_oid *", "return": { "type": "char *", - "comment": " the c-string" + "comment": " the c-string or NULL 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 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/HEAD/merge.html#git_oid_tostr_s-19", - "ex/HEAD/merge.html#git_oid_tostr_s-20" + "ex/v1.8.4/merge.html#git_oid_tostr_s-19", + "ex/v1.8.4/merge.html#git_oid_tostr_s-20" ] } }, "git_oid_tostr": { "type": "function", "file": "git2/oid.h", - "line": 147, - "lineto": 147, + "line": 251, + "lineto": 251, "args": [ { "name": "out", @@ -13319,37 +12472,37 @@ "comment": " the out buffer pointer, assuming no input parameter\n\t\t\terrors, otherwise a pointer to an empty string." }, "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 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", + "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/HEAD/blame.html#git_oid_tostr-16", - "ex/HEAD/blame.html#git_oid_tostr-17" + "ex/v1.8.4/blame.html#git_oid_tostr-16", + "ex/v1.8.4/blame.html#git_oid_tostr-17" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_oid_tostr-24", - "ex/HEAD/cat-file.html#git_oid_tostr-25", - "ex/HEAD/cat-file.html#git_oid_tostr-26", - "ex/HEAD/cat-file.html#git_oid_tostr-27", - "ex/HEAD/cat-file.html#git_oid_tostr-28" + "ex/v1.8.4/cat-file.html#git_oid_tostr-24", + "ex/v1.8.4/cat-file.html#git_oid_tostr-25", + "ex/v1.8.4/cat-file.html#git_oid_tostr-26", + "ex/v1.8.4/cat-file.html#git_oid_tostr-27", + "ex/v1.8.4/cat-file.html#git_oid_tostr-28" ], "log.c": [ - "ex/HEAD/log.html#git_oid_tostr-38", - "ex/HEAD/log.html#git_oid_tostr-39" + "ex/v1.8.4/log.html#git_oid_tostr-38", + "ex/v1.8.4/log.html#git_oid_tostr-39" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_oid_tostr-10", - "ex/HEAD/rev-parse.html#git_oid_tostr-11", - "ex/HEAD/rev-parse.html#git_oid_tostr-12", - "ex/HEAD/rev-parse.html#git_oid_tostr-13" + "ex/v1.8.4/rev-parse.html#git_oid_tostr-10", + "ex/v1.8.4/rev-parse.html#git_oid_tostr-11", + "ex/v1.8.4/rev-parse.html#git_oid_tostr-12", + "ex/v1.8.4/rev-parse.html#git_oid_tostr-13" ] } }, "git_oid_cpy": { "type": "function", "file": "git2/oid.h", - "line": 155, - "lineto": 155, + "line": 260, + "lineto": 260, "args": [ { "name": "out", @@ -13364,26 +12517,23 @@ ], "argline": "git_oid *out, const git_oid *src", "sig": "git_oid *::const git_oid *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "int", "comment": " 0 on success or error code" }, "description": "Copy an oid from one structure to another.
\n", "comments": "", "group": "oid", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_oid_cpy-18", - "ex/HEAD/blame.html#git_oid_cpy-19", - "ex/HEAD/blame.html#git_oid_cpy-20" + "ex/v1.8.4/blame.html#git_oid_cpy-18", + "ex/v1.8.4/blame.html#git_oid_cpy-19", + "ex/v1.8.4/blame.html#git_oid_cpy-20" ] } }, "git_oid_cmp": { "type": "function", "file": "git2/oid.h", - "line": 164, - "lineto": 164, + "line": 269, + "lineto": 269, "args": [ { "name": "a", @@ -13409,8 +12559,8 @@ "git_oid_equal": { "type": "function", "file": "git2/oid.h", - "line": 173, - "lineto": 173, + "line": 278, + "lineto": 278, "args": [ { "name": "a", @@ -13425,10 +12575,7 @@ ], "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" - }, + "return": { "type": "int", "comment": " true if equal, false otherwise" }, "description": "Compare two oid structures for equality
\n", "comments": "", "group": "oid" @@ -13436,8 +12583,8 @@ "git_oid_ncmp": { "type": "function", "file": "git2/oid.h", - "line": 184, - "lineto": 184, + "line": 289, + "lineto": 289, "args": [ { "name": "a", @@ -13457,10 +12604,7 @@ ], "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" - }, + "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": "oid" @@ -13468,8 +12612,8 @@ "git_oid_streq": { "type": "function", "file": "git2/oid.h", - "line": 193, - "lineto": 193, + "line": 298, + "lineto": 298, "args": [ { "name": "id", @@ -13495,8 +12639,8 @@ "git_oid_strcmp": { "type": "function", "file": "git2/oid.h", - "line": 203, - "lineto": 203, + "line": 308, + "lineto": 308, "args": [ { "name": "id", @@ -13522,38 +12666,25 @@ "git_oid_is_zero": { "type": "function", "file": "git2/oid.h", - "line": 210, - "lineto": 210, - "args": [ - { - "name": "id", - "type": "const git_oid *", - "comment": null - } - ], + "line": 315, + "lineto": 315, + "args": [{ "name": "id", "type": "const git_oid *", "comment": null }], "argline": "const git_oid *id", "sig": "const git_oid *", - "return": { - "type": "int", - "comment": " 1 if all zeros, 0 otherwise." - }, + "return": { "type": "int", "comment": " 1 if all zeros, 0 otherwise." }, "description": "Check is an oid is all zeros.
\n", "comments": "", "group": "oid", "examples": { - "blame.c": [ - "ex/HEAD/blame.html#git_oid_is_zero-21" - ], - "fetch.c": [ - "ex/HEAD/fetch.html#git_oid_is_zero-3" - ] + "blame.c": ["ex/v1.8.4/blame.html#git_oid_is_zero-21"], + "fetch.c": ["ex/v1.8.4/fetch.html#git_oid_is_zero-3"] } }, "git_oid_shorten_new": { "type": "function", "file": "git2/oid.h", - "line": 231, - "lineto": 231, + "line": 336, + "lineto": 336, "args": [ { "name": "min_length", @@ -13574,8 +12705,8 @@ "git_oid_shorten_add": { "type": "function", "file": "git2/oid.h", - "line": 257, - "lineto": 257, + "line": 362, + "lineto": 362, "args": [ { "name": "os", @@ -13601,8 +12732,8 @@ "git_oid_shorten_free": { "type": "function", "file": "git2/oid.h", - "line": 264, - "lineto": 264, + "line": 369, + "lineto": 369, "args": [ { "name": "os", @@ -13612,19 +12743,16 @@ ], "argline": "git_oid_shorten *os", "sig": "git_oid_shorten *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free an OID shortener instance
\n", "comments": "", "group": "oid" }, - "git_oidarray_free": { + "git_oidarray_dispose": { "type": "function", "file": "git2/oidarray.h", - "line": 34, - "lineto": 34, + "line": 31, + "lineto": 31, "args": [ { "name": "array", @@ -13634,12 +12762,9 @@ ], "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
objects where the array is allocated by the 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 (it is more commonly embedded inside another struct or created on the stack).
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" @@ -13720,10 +12842,7 @@ ], "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" - }, + "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" @@ -13747,10 +12866,7 @@ ], "argline": "git_packbuilder *pb, const git_oid *id", "sig": "git_packbuilder *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -13774,10 +12890,7 @@ ], "argline": "git_packbuilder *pb, const git_oid *id", "sig": "git_packbuilder *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -13801,10 +12914,7 @@ ], "argline": "git_packbuilder *pb, git_revwalk *walk", "sig": "git_packbuilder *::git_revwalk *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -13833,10 +12943,7 @@ ], "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" - }, + "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" @@ -13844,8 +12951,8 @@ "git_packbuilder_write_buf": { "type": "function", "file": "git2/pack.h", - "line": 152, - "lineto": 152, + "line": 153, + "lineto": 153, "args": [ { "name": "buf", @@ -13860,10 +12967,7 @@ ], "argline": "git_buf *buf, git_packbuilder *pb", "sig": "git_buf *::git_packbuilder *", - "return": { - "type": "int", - "comment": null - }, + "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" @@ -13871,8 +12975,8 @@ "git_packbuilder_write": { "type": "function", "file": "git2/pack.h", - "line": 165, - "lineto": 170, + "line": 166, + "lineto": 171, "args": [ { "name": "pb", @@ -13882,7 +12986,7 @@ { "name": "path", "type": "const char *", - "comment": "to the directory where the packfile and index should be stored" + "comment": "Path to the directory where the packfile and index should be stored, or NULL for default location" }, { "name": "mode", @@ -13902,10 +13006,7 @@ ], "argline": "git_packbuilder *pb, const char *path, unsigned int mode, git_indexer_progress_cb progress_cb, void *progress_cb_payload", "sig": "git_packbuilder *::const char *::unsigned int::git_indexer_progress_cb::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Write the new pack and corresponding index file to path.
\n", "comments": "", "group": "packbuilder" @@ -13913,8 +13014,8 @@ "git_packbuilder_hash": { "type": "function", "file": "git2/pack.h", - "line": 180, - "lineto": 180, + "line": 184, + "lineto": 184, "args": [ { "name": "pb", @@ -13924,19 +13025,38 @@ ], "argline": "git_packbuilder *pb", "sig": "git_packbuilder *", - "return": { - "type": "const git_oid *", - "comment": null - }, + "return": { "type": "const git_oid *", "comment": " 0 or an error code" }, "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 packfile has been written.
\n", "group": "packbuilder" }, + "git_packbuilder_name": { + "type": "function", + "file": "git2/pack.h", + "line": 196, + "lineto": 196, + "args": [ + { + "name": "pb", + "type": "git_packbuilder *", + "comment": "the packbuilder instance" + } + ], + "argline": "git_packbuilder *pb", + "sig": "git_packbuilder *", + "return": { + "type": "const char *", + "comment": " a NUL terminated string for the packfile name" + }, + "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_packbuilder_foreach": { "type": "function", "file": "git2/pack.h", - "line": 202, - "lineto": 202, + "line": 218, + "lineto": 218, "args": [ { "name": "pb", @@ -13956,10 +13076,7 @@ ], "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" - }, + "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" @@ -13967,8 +13084,8 @@ "git_packbuilder_object_count": { "type": "function", "file": "git2/pack.h", - "line": 210, - "lineto": 210, + "line": 226, + "lineto": 226, "args": [ { "name": "pb", @@ -13989,8 +13106,8 @@ "git_packbuilder_written": { "type": "function", "file": "git2/pack.h", - "line": 218, - "lineto": 218, + "line": 234, + "lineto": 234, "args": [ { "name": "pb", @@ -14011,8 +13128,8 @@ "git_packbuilder_set_callbacks": { "type": "function", "file": "git2/pack.h", - "line": 237, - "lineto": 240, + "line": 253, + "lineto": 256, "args": [ { "name": "pb", @@ -14032,10 +13149,7 @@ ], "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" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Set the callbacks for a packbuilder
\n", "comments": "", "group": "packbuilder" @@ -14043,8 +13157,8 @@ "git_packbuilder_free": { "type": "function", "file": "git2/pack.h", - "line": 247, - "lineto": 247, + "line": 263, + "lineto": 263, "args": [ { "name": "pb", @@ -14054,35 +13168,42 @@ ], "argline": "git_packbuilder *pb", "sig": "git_packbuilder *", - "return": { - "type": "void", - "comment": null - }, + "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": 51, - "lineto": 52, + "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" - } + { "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", @@ -14097,8 +13218,8 @@ "git_patch_from_blobs": { "type": "function", "file": "git2/patch.h", - "line": 70, - "lineto": 76, + "line": 78, + "lineto": 84, "args": [ { "name": "out", @@ -14144,8 +13265,8 @@ "git_patch_from_blob_and_buffer": { "type": "function", "file": "git2/patch.h", - "line": 95, - "lineto": 102, + "line": 103, + "lineto": 110, "args": [ { "name": "out", @@ -14196,8 +13317,8 @@ "git_patch_from_buffers": { "type": "function", "file": "git2/patch.h", - "line": 122, - "lineto": 130, + "line": 130, + "lineto": 138, "args": [ { "name": "out", @@ -14250,55 +13371,46 @@ "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.
Free a git_patch object.
\n", "comments": "", "group": "patch", - "examples": { - "diff.c": [ - "ex/HEAD/diff.html#git_patch_free-16" - ] - } + "examples": { "diff.c": ["ex/v1.8.4/diff.html#git_patch_free-17"] } }, "git_patch_get_delta": { "type": "function", "file": "git2/patch.h", - "line": 141, - "lineto": 141, + "line": 154, + "lineto": 154, "args": [ { "name": "patch", "type": "const git_patch *", - "comment": null + "comment": "The patch in which to get the delta." } ], "argline": "const git_patch *patch", "sig": "const git_patch *", "return": { "type": "const git_diff_delta *", - "comment": null + "comment": " The delta associated with the patch." }, "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": "", @@ -14307,20 +13419,20 @@ "git_patch_num_hunks": { "type": "function", "file": "git2/patch.h", - "line": 146, - "lineto": 146, + "line": 162, + "lineto": 162, "args": [ { "name": "patch", "type": "const git_patch *", - "comment": null + "comment": "The patch in which to get the number of hunks." } ], "argline": "const git_patch *patch", "sig": "const git_patch *", "return": { "type": "size_t", - "comment": null + "comment": " The number of hunks of the patch." }, "description": "Get the number of hunks in a patch
\n", "comments": "", @@ -14329,8 +13441,8 @@ "git_patch_line_stats": { "type": "function", "file": "git2/patch.h", - "line": 164, - "lineto": 168, + "line": 180, + "lineto": 184, "args": [ { "name": "total_context", @@ -14355,10 +13467,7 @@ ], "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 *", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on error" - }, + "return": { "type": "int", "comment": " 0 on success, \n<\n0 on 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, 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" @@ -14366,8 +13475,8 @@ "git_patch_get_hunk": { "type": "function", "file": "git2/patch.h", - "line": 183, - "lineto": 187, + "line": 199, + "lineto": 203, "args": [ { "name": "out", @@ -14403,19 +13512,15 @@ "git_patch_num_lines_in_hunk": { "type": "function", "file": "git2/patch.h", - "line": 196, - "lineto": 198, + "line": 212, + "lineto": 214, "args": [ { "name": "patch", "type": "const git_patch *", "comment": "The git_patch object" }, - { - "name": "hunk_idx", - "type": "size_t", - "comment": "Index of the hunk" - } + { "name": "hunk_idx", "type": "size_t", "comment": "Index of the hunk" } ], "argline": "const git_patch *patch, size_t hunk_idx", "sig": "const git_patch *::size_t", @@ -14430,8 +13535,8 @@ "git_patch_get_line_in_hunk": { "type": "function", "file": "git2/patch.h", - "line": 214, - "lineto": 218, + "line": 230, + "lineto": 234, "args": [ { "name": "out", @@ -14467,8 +13572,8 @@ "git_patch_size": { "type": "function", "file": "git2/patch.h", - "line": 236, - "lineto": 240, + "line": 252, + "lineto": 256, "args": [ { "name": "patch", @@ -14493,10 +13598,7 @@ ], "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" - }, + "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).
Get the content of a patch as a single diff text.
\n", "comments": "", "group": "patch", - "examples": { - "diff.c": [ - "ex/HEAD/diff.html#git_patch_to_buf-17" - ] - } + "examples": { "diff.c": ["ex/v1.8.4/diff.html#git_patch_to_buf-18"] } }, "git_pathspec_new": { "type": "function", @@ -14591,11 +13689,7 @@ "description": "Compile a pathspec
\n", "comments": "", "group": "pathspec", - "examples": { - "log.c": [ - "ex/HEAD/log.html#git_pathspec_new-40" - ] - } + "examples": { "log.c": ["ex/v1.8.4/log.html#git_pathspec_new-40"] } }, "git_pathspec_free": { "type": "function", @@ -14611,18 +13705,11 @@ ], "argline": "git_pathspec *ps", "sig": "git_pathspec *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a pathspec
\n", "comments": "", "group": "pathspec", - "examples": { - "log.c": [ - "ex/HEAD/log.html#git_pathspec_free-41" - ] - } + "examples": { "log.c": ["ex/v1.8.4/log.html#git_pathspec_free-41"] } }, "git_pathspec_matches_path": { "type": "function", @@ -14766,11 +13853,7 @@ "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.
Free memory associates with a git_pathspec_match_list
\n", "comments": "", "group": "pathspec" @@ -14986,8 +14066,8 @@ "git_rebase_options_init": { "type": "function", "file": "git2/rebase.h", - "line": 175, - "lineto": 177, + "line": 199, + "lineto": 201, "args": [ { "name": "opts", @@ -15013,8 +14093,8 @@ "git_rebase_init": { "type": "function", "file": "git2/rebase.h", - "line": 196, - "lineto": 202, + "line": 220, + "lineto": 226, "args": [ { "name": "out", @@ -15060,8 +14140,8 @@ "git_rebase_open": { "type": "function", "file": "git2/rebase.h", - "line": 213, - "lineto": 216, + "line": 237, + "lineto": 240, "args": [ { "name": "out", @@ -15092,13 +14172,13 @@ "git_rebase_orig_head_name": { "type": "function", "file": "git2/rebase.h", - "line": 223, - "lineto": 223, + "line": 248, + "lineto": 248, "args": [ { "name": "rebase", "type": "git_rebase *", - "comment": null + "comment": "The in-progress rebase." } ], "argline": "git_rebase *rebase", @@ -15114,13 +14194,13 @@ "git_rebase_orig_head_id": { "type": "function", "file": "git2/rebase.h", - "line": 230, - "lineto": 230, + "line": 256, + "lineto": 256, "args": [ { "name": "rebase", "type": "git_rebase *", - "comment": null + "comment": "The in-progress rebase." } ], "argline": "git_rebase *rebase", @@ -15136,21 +14216,18 @@ "git_rebase_onto_name": { "type": "function", "file": "git2/rebase.h", - "line": 237, - "lineto": 237, + "line": 264, + "lineto": 264, "args": [ { "name": "rebase", "type": "git_rebase *", - "comment": null + "comment": "The in-progress rebase." } ], "argline": "git_rebase *rebase", "sig": "git_rebase *", - "return": { - "type": "const char *", - "comment": " The `onto` ref name" - }, + "return": { "type": "const char *", "comment": " The `onto` ref name" }, "description": "Gets the onto
ref name for merge rebases.
Gets the onto
id for merge rebases.
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" @@ -15305,8 +14376,8 @@ "git_rebase_commit": { "type": "function", "file": "git2/rebase.h", - "line": 328, - "lineto": 334, + "line": 360, + "lineto": 366, "args": [ { "name": "id", @@ -15352,8 +14423,8 @@ "git_rebase_abort": { "type": "function", "file": "git2/rebase.h", - "line": 344, - "lineto": 344, + "line": 376, + "lineto": 376, "args": [ { "name": "rebase", @@ -15374,8 +14445,8 @@ "git_rebase_finish": { "type": "function", "file": "git2/rebase.h", - "line": 354, - "lineto": 356, + "line": 386, + "lineto": 388, "args": [ { "name": "rebase", @@ -15390,10 +14461,7 @@ ], "argline": "git_rebase *rebase, const git_signature *signature", "sig": "git_rebase *::const git_signature *", - "return": { - "type": "int", - "comment": " Zero on success; -1 on error" - }, + "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" @@ -15401,8 +14469,8 @@ "git_rebase_free": { "type": "function", "file": "git2/rebase.h", - "line": 363, - "lineto": 363, + "line": 395, + "lineto": 395, "args": [ { "name": "rebase", @@ -15412,10 +14480,7 @@ ], "argline": "git_rebase *rebase", "sig": "git_rebase *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Frees the git_rebase
object.
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()
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", "comments": "", "group": "refdb" @@ -15499,8 +14555,8 @@ "git_refdb_free": { "type": "function", "file": "git2/refdb.h", - "line": 63, - "lineto": 63, + "line": 66, + "lineto": 66, "args": [ { "name": "refdb", @@ -15510,10 +14566,7 @@ ], "argline": "git_refdb *refdb", "sig": "git_refdb *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Close an open reference database.
\n", "comments": "", "group": "refdb" @@ -15532,7 +14585,7 @@ { "name": "repo", "type": "git_repository *", - "comment": "the repostiory" + "comment": "the repository" }, { "name": "name", @@ -15542,10 +14595,7 @@ ], "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" - }, + "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" @@ -15564,10 +14614,7 @@ ], "argline": "git_reflog *reflog", "sig": "git_reflog *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -15601,10 +14648,7 @@ ], "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 *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Add a new entry to the in-memory reflog.
\n", "comments": "msg
is optional and can be NULL.
Delete the reflog for the given reference
\n", "comments": "", "group": "reflog" @@ -15682,10 +14723,7 @@ ], "argline": "git_reflog *reflog", "sig": "git_reflog *", - "return": { - "type": "size_t", - "comment": " the number of log entries" - }, + "return": { "type": "size_t", "comment": " the number of log entries" }, "description": "Get the number of log entries in a reflog
\n", "comments": "", "group": "reflog" @@ -15763,10 +14801,7 @@ ], "argline": "const git_reflog_entry *entry", "sig": "const git_reflog_entry *", - "return": { - "type": "const git_oid *", - "comment": " the old oid" - }, + "return": { "type": "const git_oid *", "comment": " the old oid" }, "description": "Get the old oid
\n", "comments": "", "group": "reflog" @@ -15829,10 +14864,7 @@ ], "argline": "const git_reflog_entry *entry", "sig": "const git_reflog_entry *", - "return": { - "type": "const char *", - "comment": " the log msg" - }, + "return": { "type": "const char *", "comment": " the log msg" }, "description": "Get the log message
\n", "comments": "", "group": "reflog" @@ -15851,10 +14883,7 @@ ], "argline": "git_reflog *reflog", "sig": "git_reflog *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the reflog
\n", "comments": "", "group": "reflog" @@ -15892,15 +14921,11 @@ "group": "reference", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_reference_lookup-15", - "ex/HEAD/checkout.html#git_reference_lookup-16" + "ex/v1.8.4/checkout.html#git_reference_lookup-15", + "ex/v1.8.4/checkout.html#git_reference_lookup-16" ], - "general.c": [ - "ex/HEAD/general.html#git_reference_lookup-62" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_reference_lookup-21" - ] + "general.c": ["ex/v1.8.4/general.html#git_reference_lookup-53"], + "merge.c": ["ex/v1.8.4/merge.html#git_reference_lookup-21"] } }, "git_reference_name_to_id": { @@ -15959,24 +14984,17 @@ ], "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" - }, + "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 which reference the user is referring to.
\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/HEAD/merge.html#git_reference_dwim-22" - ] - } + "examples": { "merge.c": ["ex/v1.8.4/merge.html#git_reference_dwim-22"] } }, "git_reference_symbolic_create_matching": { "type": "function", "file": "git2/refs.h", - "line": 109, - "lineto": 109, + "line": 112, + "lineto": 112, "args": [ { "name": "out", @@ -16021,14 +15039,14 @@ "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC, GIT_EMODIFIED or an error code" }, "description": "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).
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.
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 and it does not have a reflog.
\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/HEAD/merge.html#git_reference_create-23" - ] + "merge.c": ["ex/v1.8.4/merge.html#git_reference_create-23"] } }, "git_reference_create_matching": { "type": "function", "file": "git2/refs.h", - "line": 225, - "lineto": 225, + "line": 228, + "lineto": 228, "args": [ { "name": "out", @@ -16172,14 +15188,14 @@ "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 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 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).
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).
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).
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/HEAD/general.html#git_reference_type-65" - ] + "general.c": ["ex/v1.8.4/general.html#git_reference_type-56"] } }, "git_reference_name": { "type": "function", "file": "git2/refs.h", - "line": 281, - "lineto": 281, + "line": 284, + "lineto": 284, "args": [ { "name": "ref", @@ -16303,19 +15310,15 @@ "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" @@ -16341,8 +15341,8 @@ "git_reference_owner": { "type": "function", "file": "git2/refs.h", - "line": 307, - "lineto": 307, + "line": 310, + "lineto": 310, "args": [ { "name": "ref", @@ -16363,8 +15363,8 @@ "git_reference_symbolic_set_target": { "type": "function", "file": "git2/refs.h", - "line": 329, - "lineto": 333, + "line": 332, + "lineto": 336, "args": [ { "name": "out", @@ -16394,14 +15394,14 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" }, "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 and it does not have a reflog.
\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_reference_set_target": { "type": "function", "file": "git2/refs.h", - "line": 349, - "lineto": 353, + "line": 352, + "lineto": 356, "args": [ { "name": "out", @@ -16434,22 +15434,16 @@ "comments": "The new reference will be written to disk, overwriting the given reference.
\n", "group": "reference", "examples": { - "merge.c": [ - "ex/HEAD/merge.html#git_reference_set_target-26" - ] + "merge.c": ["ex/v1.8.4/merge.html#git_reference_set_target-26"] } }, "git_reference_rename": { "type": "function", "file": "git2/refs.h", - "line": 378, - "lineto": 383, + "line": 381, + "lineto": 386, "args": [ - { - "name": "new_ref", - "type": "git_reference **", - "comment": null - }, + { "name": "new_ref", "type": "git_reference **", "comment": null }, { "name": "ref", "type": "git_reference *", @@ -16484,8 +15478,8 @@ "git_reference_delete": { "type": "function", "file": "git2/refs.h", - "line": 398, - "lineto": 398, + "line": 401, + "lineto": 401, "args": [ { "name": "ref", @@ -16506,14 +15500,10 @@ "git_reference_remove": { "type": "function", "file": "git2/refs.h", - "line": 409, - "lineto": 409, + "line": 412, + "lineto": 412, "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": null - }, + { "name": "repo", "type": "git_repository *", "comment": null }, { "name": "name", "type": "const char *", @@ -16522,10 +15512,7 @@ ], "argline": "git_repository *repo, const char *name", "sig": "git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -16533,8 +15520,8 @@ "git_reference_list": { "type": "function", "file": "git2/refs.h", - "line": 423, - "lineto": 423, + "line": 426, + "lineto": 426, "args": [ { "name": "array", @@ -16549,24 +15536,19 @@ ], "argline": "git_strarray *array, 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": "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()
.
Create a copy of an existing reference.
\n", "comments": "Call git_reference_free
to free the data.
Free the given reference.
\n", "comments": "", "group": "reference", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_reference_free-18", - "ex/HEAD/checkout.html#git_reference_free-19", - "ex/HEAD/checkout.html#git_reference_free-20" - ], - "general.c": [ - "ex/HEAD/general.html#git_reference_free-67" + "ex/v1.8.4/checkout.html#git_reference_free-18", + "ex/v1.8.4/checkout.html#git_reference_free-19", + "ex/v1.8.4/checkout.html#git_reference_free-20" ], + "commit.c": ["ex/v1.8.4/commit.html#git_reference_free-7"], + "general.c": ["ex/v1.8.4/general.html#git_reference_free-58"], "merge.c": [ - "ex/HEAD/merge.html#git_reference_free-27", - "ex/HEAD/merge.html#git_reference_free-28", - "ex/HEAD/merge.html#git_reference_free-29" + "ex/v1.8.4/merge.html#git_reference_free-27", + "ex/v1.8.4/merge.html#git_reference_free-28", + "ex/v1.8.4/merge.html#git_reference_free-29" ], - "status.c": [ - "ex/HEAD/status.html#git_reference_free-1" - ] + "status.c": ["ex/v1.8.4/status.html#git_reference_free-1"] } }, "git_reference_cmp": { "type": "function", "file": "git2/refs.h", - "line": 511, - "lineto": 513, + "line": 514, + "lineto": 516, "args": [ { "name": "ref1", @@ -16723,8 +15692,8 @@ "git_reference_iterator_new": { "type": "function", "file": "git2/refs.h", - "line": 522, - "lineto": 524, + "line": 525, + "lineto": 527, "args": [ { "name": "out", @@ -16739,10 +15708,7 @@ ], "argline": "git_reference_iterator **out, git_repository *repo", "sig": "git_reference_iterator **::git_repository *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Create an iterator for the repo's references
\n", "comments": "", "group": "reference" @@ -16750,8 +15716,8 @@ "git_reference_iterator_glob_new": { "type": "function", "file": "git2/refs.h", - "line": 535, - "lineto": 538, + "line": 538, + "lineto": 541, "args": [ { "name": "out", @@ -16771,10 +15737,7 @@ ], "argline": "git_reference_iterator **out, git_repository *repo, const char *glob", "sig": "git_reference_iterator **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Create an iterator for the repo's references that match the\n specified glob
\n", "comments": "", "group": "reference" @@ -16782,8 +15745,8 @@ "git_reference_next": { "type": "function", "file": "git2/refs.h", - "line": 547, - "lineto": 547, + "line": 550, + "lineto": 550, "args": [ { "name": "out", @@ -16809,8 +15772,8 @@ "git_reference_next_name": { "type": "function", "file": "git2/refs.h", - "line": 560, - "lineto": 560, + "line": 563, + "lineto": 563, "args": [ { "name": "out", @@ -16836,8 +15799,8 @@ "git_reference_iterator_free": { "type": "function", "file": "git2/refs.h", - "line": 567, - "lineto": 567, + "line": 570, + "lineto": 570, "args": [ { "name": "iter", @@ -16847,10 +15810,7 @@ ], "argline": "git_reference_iterator *iter", "sig": "git_reference_iterator *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free the iterator and its associated resources
\n", "comments": "", "group": "reference" @@ -16858,8 +15818,8 @@ "git_reference_foreach_glob": { "type": "function", "file": "git2/refs.h", - "line": 587, - "lineto": 591, + "line": 590, + "lineto": 594, "args": [ { "name": "repo", @@ -16895,8 +15855,8 @@ "git_reference_has_log": { "type": "function", "file": "git2/refs.h", - "line": 601, - "lineto": 601, + "line": 604, + "lineto": 604, "args": [ { "name": "repo", @@ -16922,8 +15882,8 @@ "git_reference_ensure_log": { "type": "function", "file": "git2/refs.h", - "line": 613, - "lineto": 613, + "line": 616, + "lineto": 616, "args": [ { "name": "repo", @@ -16938,10 +15898,7 @@ ], "argline": "git_repository *repo, const char *refname", "sig": "git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code." - }, + "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" @@ -16949,8 +15906,8 @@ "git_reference_is_branch": { "type": "function", "file": "git2/refs.h", - "line": 623, - "lineto": 623, + "line": 626, + "lineto": 626, "args": [ { "name": "ref", @@ -16971,8 +15928,8 @@ "git_reference_is_remote": { "type": "function", "file": "git2/refs.h", - "line": 633, - "lineto": 633, + "line": 636, + "lineto": 636, "args": [ { "name": "ref", @@ -16990,16 +15947,14 @@ "comments": "", "group": "reference", "examples": { - "checkout.c": [ - "ex/HEAD/checkout.html#git_reference_is_remote-21" - ] + "checkout.c": ["ex/v1.8.4/checkout.html#git_reference_is_remote-21"] } }, "git_reference_is_tag": { "type": "function", "file": "git2/refs.h", - "line": 643, - "lineto": 643, + "line": 646, + "lineto": 646, "args": [ { "name": "ref", @@ -17020,8 +15975,8 @@ "git_reference_is_note": { "type": "function", "file": "git2/refs.h", - "line": 653, - "lineto": 653, + "line": 656, + "lineto": 656, "args": [ { "name": "ref", @@ -17042,8 +15997,8 @@ "git_reference_normalize_name": { "type": "function", "file": "git2/refs.h", - "line": 709, - "lineto": 713, + "line": 712, + "lineto": 716, "args": [ { "name": "buffer_out", @@ -17079,8 +16034,8 @@ "git_reference_peel": { "type": "function", "file": "git2/refs.h", - "line": 730, - "lineto": 733, + "line": 733, + "lineto": 736, "args": [ { "name": "out", @@ -17107,30 +16062,28 @@ "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.
Ensure the reference name is well-formed.
\n", "comments": "Valid reference names must follow one of two patterns:
\n\nThis 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": { - "status.c": [ - "ex/HEAD/status.html#git_reference_shorthand-2" - ] + "status.c": ["ex/v1.8.4/status.html#git_reference_shorthand-2"] } }, "git_refspec_parse": { @@ -17208,10 +16159,7 @@ ], "argline": "git_refspec *refspec", "sig": "git_refspec *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a refspec object which has been created by git_refspec_parse
\n", "comments": "", "group": "refspec" @@ -17276,7 +16224,7 @@ "sig": "const git_refspec *", "return": { "type": "const char *", - "comment": null + "comment": " the refspec's original string" }, "description": "Get the refspec's string
\n", "comments": "", @@ -17310,11 +16258,7 @@ "line": 79, "lineto": 79, "args": [ - { - "name": "spec", - "type": "const git_refspec *", - "comment": "refspec" - } + { "name": "spec", "type": "const git_refspec *", "comment": "refspec" } ], "argline": "const git_refspec *spec", "sig": "const git_refspec *", @@ -17404,10 +16348,7 @@ ], "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" - }, + "return": { "type": "int", "comment": " 0, GIT_EBUFS or another error" }, "description": "Transform a reference to its target following the refspec's rules
\n", "comments": "", "group": "refspec" @@ -17436,10 +16377,7 @@ ], "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" - }, + "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": "refspec" @@ -17465,11 +16403,7 @@ "type": "const char *", "comment": "the remote's name" }, - { - "name": "url", - "type": "const char *", - "comment": "the remote's url" - } + { "name": "url", "type": "const char *", "comment": "the remote's url" } ], "argline": "git_remote **out, git_repository *repo, const char *name, const char *url", "sig": "git_remote **::git_repository *::const char *::const char *", @@ -17480,17 +16414,13 @@ "description": "Add a remote with the default fetch refspec to the repository's configuration.
\n", "comments": "", "group": "remote", - "examples": { - "remote.c": [ - "ex/HEAD/remote.html#git_remote_create-1" - ] - } + "examples": { "remote.c": ["ex/v1.8.4/remote.html#git_remote_create-1"] } }, "git_remote_create_options_init": { "type": "function", "file": "git2/remote.h", - "line": 97, - "lineto": 99, + "line": 132, + "lineto": 134, "args": [ { "name": "opts", @@ -17516,8 +16446,8 @@ "git_remote_create_with_opts": { "type": "function", "file": "git2/remote.h", - "line": 113, - "lineto": 116, + "line": 148, + "lineto": 151, "args": [ { "name": "out", @@ -17548,8 +16478,8 @@ "git_remote_create_with_fetchspec": { "type": "function", "file": "git2/remote.h", - "line": 129, - "lineto": 134, + "line": 164, + "lineto": 169, "args": [ { "name": "out", @@ -17590,8 +16520,8 @@ "git_remote_create_anonymous": { "type": "function", "file": "git2/remote.h", - "line": 147, - "lineto": 150, + "line": 182, + "lineto": 185, "args": [ { "name": "out", @@ -17611,27 +16541,22 @@ ], "argline": "git_remote **out, git_repository *repo, const char *url", "sig": "git_remote **::git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "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": { - "fetch.c": [ - "ex/HEAD/fetch.html#git_remote_create_anonymous-4" - ], + "fetch.c": ["ex/v1.8.4/fetch.html#git_remote_create_anonymous-4"], "ls-remote.c": [ - "ex/HEAD/ls-remote.html#git_remote_create_anonymous-2" + "ex/v1.8.4/ls-remote.html#git_remote_create_anonymous-2" ] } }, "git_remote_create_detached": { "type": "function", "file": "git2/remote.h", - "line": 166, - "lineto": 168, + "line": 201, + "lineto": 203, "args": [ { "name": "out", @@ -17646,10 +16571,7 @@ ], "argline": "git_remote **out, const char *url", "sig": "git_remote **::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -17657,8 +16579,8 @@ "git_remote_lookup": { "type": "function", "file": "git2/remote.h", - "line": 181, - "lineto": 181, + "line": 216, + "lineto": 216, "args": [ { "name": "out", @@ -17686,22 +16608,17 @@ "comments": "The name will be checked for validity. See git_tag_create()
for rules about valid names.
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.
Get the remote's url
\n", - "comments": "If url.*.insteadOf has been configured for this URL, it will return the modified URL.
\n", + "comments": "If url.*.insteadOf 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.
Get the remote's url for pushing
\n", - "comments": "If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL.
\n", + "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.
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/HEAD/remote.html#git_remote_set_url-5" - ] - } + "examples": { "remote.c": ["ex/v1.8.4/remote.html#git_remote_set_url-5"] } }, "git_remote_set_pushurl": { "type": "function", "file": "git2/remote.h", - "line": 257, - "lineto": 257, + "line": 295, + "lineto": 295, "args": [ { "name": "repo", @@ -17875,32 +16767,63 @@ "type": "const char *", "comment": "the remote's name" }, - { - "name": "url", - "type": "const char *", - "comment": "the url to set" - } + { "name": "url", "type": "const char *", "comment": "the url to set" } ], "argline": "git_repository *repo, const char *remote, const char *url", "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0, or an error code" }, "description": "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/HEAD/remote.html#git_remote_set_pushurl-6" - ] + "remote.c": ["ex/v1.8.4/remote.html#git_remote_set_pushurl-6"] } }, + "git_remote_set_instance_url": { + "type": "function", + "file": "git2/remote.h", + "line": 305, + "lineto": 305, + "args": [ + { + "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 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_set_instance_pushurl": { + "type": "function", + "file": "git2/remote.h", + "line": 315, + "lineto": 315, + "args": [ + { + "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": 270, - "lineto": 270, + "line": 328, + "lineto": 328, "args": [ { "name": "repo", @@ -17931,8 +16854,8 @@ "git_remote_get_fetch_refspecs": { "type": "function", "file": "git2/remote.h", - "line": 281, - "lineto": 281, + "line": 340, + "lineto": 340, "args": [ { "name": "array", @@ -17947,10 +16870,7 @@ ], "argline": "git_strarray *array, const git_remote *remote", "sig": "git_strarray *::const git_remote *", - "return": { - "type": "int", - "comment": null - }, + "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
.
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
.
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 (over TCP or SSH) which starts up a specific binary which can only do the one or the other.
\n", - "group": "remote", - "examples": { - "ls-remote.c": [ - "ex/HEAD/ls-remote.html#git_remote_connect-4" - ] - } - }, "git_remote_ls": { "type": "function", "file": "git2/remote.h", - "line": 361, - "lineto": 361, + "line": 404, + "lineto": 404, "args": [ { "name": "out", @@ -18126,32 +16992,23 @@ "type": "size_t *", "comment": "the number of remote heads" }, - { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" - } + { "name": "remote", "type": "git_remote *", "comment": "the remote" } ], "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" - }, + "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": { - "ls-remote.c": [ - "ex/HEAD/ls-remote.html#git_remote_ls-5" - ] + "ls-remote.c": ["ex/v1.8.4/ls-remote.html#git_remote_ls-4"] } }, "git_remote_connected": { "type": "function", "file": "git2/remote.h", - "line": 372, - "lineto": 372, + "line": 415, + "lineto": 415, "args": [ { "name": "remote", @@ -18172,21 +17029,14 @@ "git_remote_stop": { "type": "function", "file": "git2/remote.h", - "line": 382, - "lineto": 382, + "line": 426, + "lineto": 426, "args": [ - { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" - } + { "name": "remote", "type": "git_remote *", "comment": "the remote" } ], "argline": "git_remote *remote", "sig": "git_remote *", - "return": { - "type": "void", - "comment": null - }, + "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" @@ -18194,8 +17044,8 @@ "git_remote_disconnect": { "type": "function", "file": "git2/remote.h", - "line": 391, - "lineto": 391, + "line": 436, + "lineto": 436, "args": [ { "name": "remote", @@ -18205,10 +17055,7 @@ ], "argline": "git_remote *remote", "sig": "git_remote *", - "return": { - "type": "void", - "comment": null - }, + "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" @@ -18216,8 +17063,8 @@ "git_remote_free": { "type": "function", "file": "git2/remote.h", - "line": 401, - "lineto": 401, + "line": 446, + "lineto": 446, "args": [ { "name": "remote", @@ -18227,31 +17074,24 @@ ], "argline": "git_remote *remote", "sig": "git_remote *", - "return": { - "type": "void", - "comment": null - }, + "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": { "fetch.c": [ - "ex/HEAD/fetch.html#git_remote_free-6", - "ex/HEAD/fetch.html#git_remote_free-7" - ], - "ls-remote.c": [ - "ex/HEAD/ls-remote.html#git_remote_free-6" + "ex/v1.8.4/fetch.html#git_remote_free-6", + "ex/v1.8.4/fetch.html#git_remote_free-7" ], - "remote.c": [ - "ex/HEAD/remote.html#git_remote_free-7" - ] + "ls-remote.c": ["ex/v1.8.4/ls-remote.html#git_remote_free-5"], + "remote.c": ["ex/v1.8.4/remote.html#git_remote_free-7"] } }, "git_remote_list": { "type": "function", "file": "git2/remote.h", - "line": 412, - "lineto": 412, + "line": 457, + "lineto": 457, "args": [ { "name": "out", @@ -18266,27 +17106,20 @@ ], "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": "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/HEAD/checkout.html#git_remote_list-22" - ], - "remote.c": [ - "ex/HEAD/remote.html#git_remote_list-8" - ] + "checkout.c": ["ex/v1.8.4/checkout.html#git_remote_list-22"], + "remote.c": ["ex/v1.8.4/remote.html#git_remote_list-8"] } }, "git_remote_init_callbacks": { "type": "function", "file": "git2/remote.h", - "line": 599, - "lineto": 601, + "line": 671, + "lineto": 673, "args": [ { "name": "opts", @@ -18307,13 +17140,16 @@ }, "description": "Initializes a git_remote_callbacks
with default values. Equivalent to\n creating an instance with GIT_REMOTE_CALLBACKS_INIT.
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
.
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
.
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.8.4/ls-remote.html#git_remote_connect-6"] + } + }, + "git_remote_connect_ext": { + "type": "function", + "file": "git2/remote.h", + "line": 960, + "lineto": 963, + "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": "opts", + "type": "const git_remote_connect_options *", + "comment": "the remote connection options" + } + ], + "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.
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", + "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_remote_upload": { "type": "function", "file": "git2/remote.h", - "line": 789, - "lineto": 789, + "line": 1007, + "lineto": 1010, "args": [ - { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" - }, + { "name": "remote", "type": "git_remote *", "comment": "the remote" }, { "name": "refspecs", "type": "const git_strarray *", @@ -18419,19 +17343,16 @@ ], "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" - }, + "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", + "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": 805, - "lineto": 810, + "line": 1029, + "lineto": 1034, "args": [ { "name": "remote", @@ -18441,12 +17362,12 @@ { "name": "callbacks", "type": "const git_remote_callbacks *", - "comment": "pointer to the callback structure to use" + "comment": "pointer to the callback structure to use or NULL" }, { - "name": "update_fetchhead", - "type": "int", - "comment": "whether to write to FETCH_HEAD. Pass 1 to behave like git." + "name": "update_flags", + "type": "unsigned int", + "comment": "the git_remote_update_flags for these tips." }, { "name": "download_tags", @@ -18459,21 +17380,18 @@ "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": "", + "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).
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", + "return": { "type": "int", "comment": " 0 or an error code" }, + "description": "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/HEAD/fetch.html#git_remote_fetch-8" - ] - } + "examples": { "fetch.c": ["ex/v1.8.4/fetch.html#git_remote_fetch-8"] } }, "git_remote_prune": { "type": "function", "file": "git2/remote.h", - "line": 839, - "lineto": 839, + "line": 1070, + "lineto": 1072, "args": [ { "name": "remote", @@ -18530,19 +17441,16 @@ ], "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": "", + "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).
Perform a push
\n", - "comments": "Peform all the steps from a push.
\n", - "group": "remote" + "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.8.4/push.html#git_remote_push-4"] } }, "git_remote_stats": { "type": "function", "file": "git2/remote.h", - "line": 858, - "lineto": 858, - "args": [ - { - "name": "remote", - "type": "git_remote *", - "comment": null - } - ], + "line": 1095, + "lineto": 1095, + "args": [{ "name": "remote", "type": "git_remote *", "comment": null }], "argline": "git_remote *remote", "sig": "git_remote *", - "return": { - "type": "const git_indexer_progress *", - "comment": null - }, + "return": { "type": "const git_indexer_progress *", "comment": null }, "description": "Get the statistics structure that is filled in by the fetch operation.
\n", "comments": "", "group": "remote", - "examples": { - "fetch.c": [ - "ex/HEAD/fetch.html#git_remote_stats-9" - ] - } + "examples": { "fetch.c": ["ex/v1.8.4/fetch.html#git_remote_stats-9"] } }, "git_remote_autotag": { "type": "function", "file": "git2/remote.h", - "line": 866, - "lineto": 866, + "line": 1103, + "lineto": 1103, "args": [ { "name": "remote", @@ -18622,8 +17515,8 @@ "git_remote_set_autotag": { "type": "function", "file": "git2/remote.h", - "line": 878, - "lineto": 878, + "line": 1116, + "lineto": 1116, "args": [ { "name": "repo", @@ -18643,10 +17536,7 @@ ], "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": null - }, + "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" @@ -18654,8 +17544,8 @@ "git_remote_prune_refs": { "type": "function", "file": "git2/remote.h", - "line": 885, - "lineto": 885, + "line": 1124, + "lineto": 1124, "args": [ { "name": "remote", @@ -18665,10 +17555,7 @@ ], "argline": "const git_remote *remote", "sig": "const git_remote *", - "return": { - "type": "int", - "comment": " the ref-prune setting" - }, + "return": { "type": "int", "comment": " the ref-prune setting" }, "description": "Retrieve the ref-prune setting
\n", "comments": "", "group": "remote" @@ -18676,8 +17563,8 @@ "git_remote_rename": { "type": "function", "file": "git2/remote.h", - "line": 907, - "lineto": 911, + "line": 1146, + "lineto": 1150, "args": [ { "name": "problems", @@ -18709,30 +17596,28 @@ "description": "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/HEAD/remote.html#git_remote_rename-9" - ] - } + "examples": { "remote.c": ["ex/v1.8.4/remote.html#git_remote_rename-9"] } }, - "git_remote_is_valid_name": { + "git_remote_name_is_valid": { "type": "function", "file": "git2/remote.h", - "line": 919, - "lineto": 919, + "line": 1159, + "lineto": 1159, "args": [ + { + "name": "valid", + "type": "int *", + "comment": "output pointer to set with validity of given remote name" + }, { "name": "remote_name", "type": "const char *", "comment": "name to be checked." } ], - "argline": "const char *remote_name", - "sig": "const char *", - "return": { - "type": "int", - "comment": " 1 if the reference name is acceptable; 0 if it isn't" - }, + "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" @@ -18740,8 +17625,8 @@ "git_remote_delete": { "type": "function", "file": "git2/remote.h", - "line": 931, - "lineto": 931, + "line": 1171, + "lineto": 1171, "args": [ { "name": "repo", @@ -18763,28 +17648,20 @@ "description": "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/HEAD/remote.html#git_remote_delete-10" - ] - } + "examples": { "remote.c": ["ex/v1.8.4/remote.html#git_remote_delete-10"] } }, "git_remote_default_branch": { "type": "function", "file": "git2/remote.h", - "line": 949, - "lineto": 949, + "line": 1189, + "lineto": 1189, "args": [ { "name": "out", "type": "git_buf *", - "comment": "the buffern in which to store the reference name" + "comment": "the buffer in which to store the reference name" }, - { - "name": "remote", - "type": "git_remote *", - "comment": "the remote" - } + { "name": "remote", "type": "git_remote *", "comment": "the remote" } ], "argline": "git_buf *out, git_remote *remote", "sig": "git_buf *::git_remote *", @@ -18799,8 +17676,8 @@ "git_repository_open": { "type": "function", "file": "git2/repository.h", - "line": 37, - "lineto": 37, + "line": 38, + "lineto": 38, "args": [ { "name": "out", @@ -18815,24 +17692,19 @@ ], "argline": "git_repository **out, const char *path", "sig": "git_repository **::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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", "group": "repository", "examples": { - "general.c": [ - "ex/HEAD/general.html#git_repository_open-68" - ] + "general.c": ["ex/v1.8.4/general.html#git_repository_open-59"] } }, "git_repository_open_from_worktree": { "type": "function", "file": "git2/repository.h", - "line": 48, - "lineto": 48, + "line": 49, + "lineto": 49, "args": [ { "name": "out", @@ -18847,46 +17719,16 @@ ], "argline": "git_repository **out, git_worktree *wt", "sig": "git_repository **::git_worktree *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "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_repository_wrap_odb": { - "type": "function", - "file": "git2/repository.h", - "line": 61, - "lineto": 61, - "args": [ - { - "name": "out", - "type": "git_repository **", - "comment": "pointer to the repo" - }, - { - "name": "odb", - "type": "git_odb *", - "comment": "the object database to wrap" - } - ], - "argline": "git_repository **out, git_odb *odb", - "sig": "git_repository **::git_odb *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "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_repository_discover": { "type": "function", "file": "git2/repository.h", - "line": 89, - "lineto": 93, + "line": 100, + "lineto": 104, "args": [ { "name": "out", @@ -18911,10 +17753,7 @@ ], "argline": "git_buf *out, const char *start_path, int across_fs, const char *ceiling_dirs", "sig": "git_buf *::const char *::int::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "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", "group": "repository" @@ -18922,8 +17761,8 @@ "git_repository_open_ext": { "type": "function", "file": "git2/repository.h", - "line": 165, - "lineto": 169, + "line": 176, + "lineto": 180, "args": [ { "name": "out", @@ -18955,17 +17794,13 @@ "description": "Find and open a repository with extended controls.
\n", "comments": "", "group": "repository", - "examples": { - "log.c": [ - "ex/HEAD/log.html#git_repository_open_ext-43" - ] - } + "examples": { "log.c": ["ex/v1.8.4/log.html#git_repository_open_ext-43"] } }, "git_repository_open_bare": { "type": "function", "file": "git2/repository.h", - "line": 182, - "lineto": 182, + "line": 193, + "lineto": 193, "args": [ { "name": "out", @@ -18980,10 +17815,7 @@ ], "argline": "git_repository **out, const char *bare_path", "sig": "git_repository **::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": "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", "group": "repository" @@ -18991,8 +17823,8 @@ "git_repository_free": { "type": "function", "file": "git2/repository.h", - "line": 195, - "lineto": 195, + "line": 206, + "lineto": 206, "args": [ { "name": "repo", @@ -19002,27 +17834,20 @@ ], "argline": "git_repository *repo", "sig": "git_repository *", - "return": { - "type": "void", - "comment": null - }, + "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 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
Creates a new Git repository in the given folder.
\n", "comments": "TODO: - Reinit the repository
\n", "group": "repository", - "examples": { - "init.c": [ - "ex/HEAD/init.html#git_repository_init-5" - ] - } + "examples": { "init.c": ["ex/v1.8.4/init.html#git_repository_init-5"] } }, "git_repository_init_options_init": { "type": "function", "file": "git2/repository.h", - "line": 326, - "lineto": 328, + "line": 389, + "lineto": 391, "args": [ { "name": "opts", @@ -19085,8 +17903,8 @@ "git_repository_init_ext": { "type": "function", "file": "git2/repository.h", - "line": 343, - "lineto": 346, + "line": 406, + "lineto": 409, "args": [ { "name": "out", @@ -19106,24 +17924,19 @@ ], "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." - }, + "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", "group": "repository", "examples": { - "init.c": [ - "ex/HEAD/init.html#git_repository_init_ext-6" - ] + "init.c": ["ex/v1.8.4/init.html#git_repository_init_ext-6"] } }, "git_repository_head": { "type": "function", "file": "git2/repository.h", - "line": 361, - "lineto": 361, + "line": 424, + "lineto": 424, "args": [ { "name": "out", @@ -19147,19 +17960,17 @@ "group": "repository", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_repository_head-31", - "ex/HEAD/merge.html#git_repository_head-32" + "ex/v1.8.4/merge.html#git_repository_head-31", + "ex/v1.8.4/merge.html#git_repository_head-32" ], - "status.c": [ - "ex/HEAD/status.html#git_repository_head-3" - ] + "status.c": ["ex/v1.8.4/status.html#git_repository_head-3"] } }, "git_repository_head_for_worktree": { "type": "function", "file": "git2/repository.h", - "line": 371, - "lineto": 372, + "line": 434, + "lineto": 435, "args": [ { "name": "out", @@ -19190,8 +18001,8 @@ "git_repository_head_detached": { "type": "function", "file": "git2/repository.h", - "line": 384, - "lineto": 384, + "line": 447, + "lineto": 447, "args": [ { "name": "repo", @@ -19212,8 +18023,8 @@ "git_repository_head_detached_for_worktree": { "type": "function", "file": "git2/repository.h", - "line": 397, - "lineto": 398, + "line": 460, + "lineto": 461, "args": [ { "name": "repo", @@ -19239,8 +18050,8 @@ "git_repository_head_unborn": { "type": "function", "file": "git2/repository.h", - "line": 410, - "lineto": 410, + "line": 473, + "lineto": 473, "args": [ { "name": "repo", @@ -19261,8 +18072,8 @@ "git_repository_is_empty": { "type": "function", "file": "git2/repository.h", - "line": 422, - "lineto": 422, + "line": 487, + "lineto": 487, "args": [ { "name": "repo", @@ -19277,14 +18088,14 @@ "comment": " 1 if the repository is empty, 0 if it isn't, error code\n if the repository is corrupted" }, "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.
\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.
This is the path of the .git
folder for normal repositories, or of the repository itself for bare repositories.
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/HEAD/init.html#git_repository_workdir-8" - ] - } + "examples": { "init.c": ["ex/v1.8.4/init.html#git_repository_workdir-8"] } }, "git_repository_commondir": { "type": "function", "file": "git2/repository.h", - "line": 492, - "lineto": 492, + "line": 559, + "lineto": 559, "args": [ { "name": "repo", @@ -19387,15 +18190,15 @@ "type": "const char *", "comment": " the path to the common dir" }, - "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 path is returned.
\n", + "description": "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_repository_set_workdir": { "type": "function", "file": "git2/repository.h", - "line": 511, - "lineto": 512, + "line": 578, + "lineto": 579, "args": [ { "name": "repo", @@ -19415,10 +18218,7 @@ ], "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" - }, + "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" @@ -19426,8 +18226,8 @@ "git_repository_is_bare": { "type": "function", "file": "git2/repository.h", - "line": 520, - "lineto": 520, + "line": 587, + "lineto": 587, "args": [ { "name": "repo", @@ -19445,16 +18245,14 @@ "comments": "", "group": "repository", "examples": { - "status.c": [ - "ex/HEAD/status.html#git_repository_is_bare-5" - ] + "status.c": ["ex/v1.8.4/status.html#git_repository_is_bare-5"] } }, "git_repository_is_worktree": { "type": "function", "file": "git2/repository.h", - "line": 528, - "lineto": 528, + "line": 595, + "lineto": 595, "args": [ { "name": "repo", @@ -19475,8 +18273,8 @@ "git_repository_config": { "type": "function", "file": "git2/repository.h", - "line": 544, - "lineto": 544, + "line": 611, + "lineto": 611, "args": [ { "name": "out", @@ -19491,19 +18289,19 @@ ], "argline": "git_config **out, git_repository *repo", "sig": "git_config **::git_repository *", - "return": { - "type": "int", - "comment": " 0, or an error code" - }, + "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" + "group": "repository", + "examples": { + "config.c": ["ex/v1.8.4/config.html#git_repository_config-9"] + } }, "git_repository_config_snapshot": { "type": "function", "file": "git2/repository.h", - "line": 560, - "lineto": 560, + "line": 627, + "lineto": 627, "args": [ { "name": "out", @@ -19518,25 +18316,22 @@ ], "argline": "git_config **out, git_repository *repo", "sig": "git_config **::git_repository *", - "return": { - "type": "int", - "comment": " 0, or an error code" - }, + "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": { "general.c": [ - "ex/HEAD/general.html#git_repository_config_snapshot-70", - "ex/HEAD/general.html#git_repository_config_snapshot-71" + "ex/v1.8.4/general.html#git_repository_config_snapshot-61", + "ex/v1.8.4/general.html#git_repository_config_snapshot-62" ] } }, "git_repository_odb": { "type": "function", "file": "git2/repository.h", - "line": 576, - "lineto": 576, + "line": 643, + "lineto": 643, "args": [ { "name": "out", @@ -19551,27 +18346,20 @@ ], "argline": "git_odb **out, git_repository *repo", "sig": "git_odb **::git_repository *", - "return": { - "type": "int", - "comment": " 0, or an error code" - }, + "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/HEAD/cat-file.html#git_repository_odb-29" - ], - "general.c": [ - "ex/HEAD/general.html#git_repository_odb-72" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_repository_odb-29"], + "general.c": ["ex/v1.8.4/general.html#git_repository_odb-63"] } }, "git_repository_refdb": { "type": "function", "file": "git2/repository.h", - "line": 592, - "lineto": 592, + "line": 659, + "lineto": 659, "args": [ { "name": "out", @@ -19586,10 +18374,7 @@ ], "argline": "git_refdb **out, git_repository *repo", "sig": "git_refdb **::git_repository *", - "return": { - "type": "int", - "comment": " 0, or an error code" - }, + "return": { "type": "int", "comment": " 0, or an error code" }, "description": "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" @@ -19597,8 +18382,8 @@ "git_repository_index": { "type": "function", "file": "git2/repository.h", - "line": 608, - "lineto": 608, + "line": 675, + "lineto": 675, "args": [ { "name": "out", @@ -19613,36 +18398,24 @@ ], "argline": "git_index **out, git_repository *repo", "sig": "git_index **::git_repository *", - "return": { - "type": "int", - "comment": " 0, or an error code" - }, + "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/HEAD/add.html#git_repository_index-5" - ], - "general.c": [ - "ex/HEAD/general.html#git_repository_index-73" - ], - "init.c": [ - "ex/HEAD/init.html#git_repository_index-9" - ], - "ls-files.c": [ - "ex/HEAD/ls-files.html#git_repository_index-5" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_repository_index-33" - ] + "add.c": ["ex/v1.8.4/add.html#git_repository_index-5"], + "commit.c": ["ex/v1.8.4/commit.html#git_repository_index-8"], + "general.c": ["ex/v1.8.4/general.html#git_repository_index-64"], + "init.c": ["ex/v1.8.4/init.html#git_repository_index-9"], + "ls-files.c": ["ex/v1.8.4/ls-files.html#git_repository_index-5"], + "merge.c": ["ex/v1.8.4/merge.html#git_repository_index-33"] } }, "git_repository_message": { "type": "function", "file": "git2/repository.h", - "line": 626, - "lineto": 626, + "line": 693, + "lineto": 693, "args": [ { "name": "out", @@ -19668,21 +18441,18 @@ "git_repository_message_remove": { "type": "function", "file": "git2/repository.h", - "line": 633, - "lineto": 633, + "line": 703, + "lineto": 703, "args": [ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "Repository to remove prepared message from." } ], "argline": "git_repository *repo", "sig": "git_repository *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Remove git's prepared message.
\n", "comments": "Remove the message that git_repository_message
retrieves.
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": "repository", "examples": { - "merge.c": [ - "ex/HEAD/merge.html#git_repository_state_cleanup-34" - ] + "merge.c": ["ex/v1.8.4/merge.html#git_repository_state_cleanup-34"] } }, "git_repository_fetchhead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 673, - "lineto": 676, + "line": 743, + "lineto": 746, "args": [ { "name": "repo", @@ -19749,8 +18514,8 @@ "git_repository_mergehead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 702, - "lineto": 705, + "line": 772, + "lineto": 775, "args": [ { "name": "repo", @@ -19781,8 +18546,8 @@ "git_repository_hashfile": { "type": "function", "file": "git2/repository.h", - "line": 730, - "lineto": 735, + "line": 802, + "lineto": 807, "args": [ { "name": "out", @@ -19797,7 +18562,7 @@ { "name": "path", "type": "const char *", - "comment": "Path to file on disk whose contents should be hashed. If the\n repository is not NULL, this can be a relative path." + "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", @@ -19807,15 +18572,12 @@ { "name": "as_path", "type": "const char *", - "comment": "The path to use to look up filtering rules. If this is\n NULL, then the `path` parameter will be used instead. If\n this is passed as the empty string, then no filters will be\n applied when calculating the hash." + "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_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" - }, + "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.
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/HEAD/checkout.html#git_repository_set_head-23" - ] + "checkout.c": ["ex/v1.8.4/checkout.html#git_repository_set_head-23"] } }, "git_repository_set_head_detached": { "type": "function", "file": "git2/repository.h", - "line": 775, - "lineto": 777, + "line": 847, + "lineto": 849, "args": [ { "name": "repo", @@ -19864,58 +18621,48 @@ "comment": "Repository pointer" }, { - "name": "commitish", + "name": "committish", "type": "const git_oid *", "comment": "Object id of the Commit the HEAD should point to" } ], - "argline": "git_repository *repo, const git_oid *commitish", + "argline": "git_repository *repo, const git_oid *committish", "sig": "git_repository *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, + "return": { "type": "int", "comment": " 0 on success, 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 is unaltered and GIT_ENOTFOUND is returned.
\n\nIf the provided commitish 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", + "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_repository_set_head_detached_from_annotated": { "type": "function", "file": "git2/repository.h", - "line": 791, - "lineto": 793, + "line": 863, + "lineto": 865, "args": [ + { "name": "repo", "type": "git_repository *", "comment": null }, { - "name": "repo", - "type": "git_repository *", - "comment": null - }, - { - "name": "commitish", + "name": "committish", "type": "const git_annotated_commit *", "comment": null } ], - "argline": "git_repository *repo, const git_annotated_commit *commitish", + "argline": "git_repository *repo, const git_annotated_commit *committish", "sig": "git_repository *::const git_annotated_commit *", - "return": { - "type": "int", - "comment": null - }, + "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 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()
.
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 commitish, the HEAD is unaltered, and -1 is returned.
\n\nOtherwise, the HEAD will be detached and point to the peeled Commit.
\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_repository_state": { "type": "function", "file": "git2/repository.h", - "line": 843, - "lineto": 843, + "line": 915, + "lineto": 915, "args": [ { "name": "repo", @@ -19947,33 +18694,22 @@ ], "argline": "git_repository *repo", "sig": "git_repository *", - "return": { - "type": "int", - "comment": " The state of the 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/HEAD/checkout.html#git_repository_state-25" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_repository_state-35" - ] + "checkout.c": ["ex/v1.8.4/checkout.html#git_repository_state-25"], + "merge.c": ["ex/v1.8.4/merge.html#git_repository_state-35"] } }, "git_repository_set_namespace": { "type": "function", "file": "git2/repository.h", - "line": 857, - "lineto": 857, + "line": 929, + "lineto": 929, "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "The repo" - }, + { "name": "repo", "type": "git_repository *", "comment": "The repo" }, { "name": "nmspace", "type": "const char *", @@ -19982,10 +18718,7 @@ ], "argline": "git_repository *repo, const char *nmspace", "sig": "git_repository *::const char *", - "return": { - "type": "int", - "comment": " 0 on success, -1 on error" - }, + "return": { "type": "int", "comment": " 0 on success, -1 on error" }, "description": "Sets the active namespace for this Git Repository
\n", "comments": "This namespace affects all reference operations for the repo. See man gitnamespaces
Determine if the repository was a shallow clone
\n", "comments": "", "group": "repository" @@ -20037,8 +18763,8 @@ "git_repository_ident": { "type": "function", "file": "git2/repository.h", - "line": 886, - "lineto": 886, + "line": 959, + "lineto": 959, "args": [ { "name": "name", @@ -20058,10 +18784,7 @@ ], "argline": "const char **name, const char **email, const git_repository *repo", "sig": "const char **::const char **::const git_repository *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "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 user.
\n", "group": "repository" @@ -20069,8 +18792,8 @@ "git_repository_set_ident": { "type": "function", "file": "git2/repository.h", - "line": 899, - "lineto": 899, + "line": 973, + "lineto": 973, "args": [ { "name": "repo", @@ -20090,14 +18813,54 @@ ], "argline": "git_repository *repo, const char *name, const char *email", "sig": "git_repository *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, + "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_repository_oid_type": { + "type": "function", + "file": "git2/repository.h", + "line": 981, + "lineto": 981, + "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository" + } + ], + "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_repository_commit_parents": { + "type": "function", + "file": "git2/repository.h", + "line": 992, + "lineto": 992, + "args": [ + { + "name": "commits", + "type": "git_commitarray *", + "comment": "a `git_commitarray` that will contain the commit parents" + }, + { + "name": "repo", + "type": "git_repository *", + "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", @@ -20112,7 +18875,7 @@ { "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 dereferencable\n to a git_commit which oid will be used as the target of the branch." + "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": "reset_type", @@ -20127,10 +18890,7 @@ ], "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" - }, + "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" @@ -20141,21 +18901,13 @@ "line": 80, "lineto": 84, "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": null - }, + { "name": "repo", "type": "git_repository *", "comment": null }, { "name": "commit", "type": "const git_annotated_commit *", "comment": null }, - { - "name": "reset_type", - "type": "git_reset_t", - "comment": null - }, + { "name": "reset_type", "type": "git_reset_t", "comment": null }, { "name": "checkout_opts", "type": "const git_checkout_options *", @@ -20164,10 +18916,7 @@ ], "argline": "git_repository *repo, const git_annotated_commit *commit, 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": null - }, + "return": { "type": "int", "comment": null }, "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()
.
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.
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.
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/HEAD/general.html#git_revwalk_new-74" - ], + "general.c": ["ex/v1.8.4/general.html#git_revwalk_new-65"], "log.c": [ - "ex/HEAD/log.html#git_revwalk_new-46", - "ex/HEAD/log.html#git_revwalk_new-47" + "ex/v1.8.4/log.html#git_revwalk_new-46", + "ex/v1.8.4/log.html#git_revwalk_new-47" ] } }, "git_revwalk_reset": { "type": "function", "file": "git2/revwalk.h", - "line": 88, - "lineto": 88, + "line": 89, + "lineto": 89, "args": [ { "name": "walker", @@ -20493,10 +19226,7 @@ ], "argline": "git_revwalk *walker", "sig": "git_revwalk *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "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" @@ -20504,8 +19234,8 @@ "git_revwalk_push": { "type": "function", "file": "git2/revwalk.h", - "line": 107, - "lineto": 107, + "line": 108, + "lineto": 108, "args": [ { "name": "walk", @@ -20520,27 +19250,20 @@ ], "argline": "git_revwalk *walk, const git_oid *id", "sig": "git_revwalk *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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 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/HEAD/general.html#git_revwalk_push-75" - ], - "log.c": [ - "ex/HEAD/log.html#git_revwalk_push-48" - ] + "general.c": ["ex/v1.8.4/general.html#git_revwalk_push-66"], + "log.c": ["ex/v1.8.4/log.html#git_revwalk_push-48"] } }, "git_revwalk_push_glob": { "type": "function", "file": "git2/revwalk.h", - "line": 125, - "lineto": 125, + "line": 126, + "lineto": 126, "args": [ { "name": "walk", @@ -20555,10 +19278,7 @@ ], "argline": "git_revwalk *walk, const char *glob", "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -20566,8 +19286,8 @@ "git_revwalk_push_head": { "type": "function", "file": "git2/revwalk.h", - "line": 133, - "lineto": 133, + "line": 134, + "lineto": 134, "args": [ { "name": "walk", @@ -20577,24 +19297,17 @@ ], "argline": "git_revwalk *walk", "sig": "git_revwalk *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Push the repository's HEAD
\n", "comments": "", "group": "revwalk", - "examples": { - "log.c": [ - "ex/HEAD/log.html#git_revwalk_push_head-49" - ] - } + "examples": { "log.c": ["ex/v1.8.4/log.html#git_revwalk_push_head-49"] } }, "git_revwalk_hide": { "type": "function", "file": "git2/revwalk.h", - "line": 148, - "lineto": 148, + "line": 149, + "lineto": 149, "args": [ { "name": "walk", @@ -20609,24 +19322,17 @@ ], "argline": "git_revwalk *walk, const git_oid *commit_id", "sig": "git_revwalk *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "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/HEAD/log.html#git_revwalk_hide-50" - ] - } + "examples": { "log.c": ["ex/v1.8.4/log.html#git_revwalk_hide-50"] } }, "git_revwalk_hide_glob": { "type": "function", "file": "git2/revwalk.h", - "line": 167, - "lineto": 167, + "line": 168, + "lineto": 168, "args": [ { "name": "walk", @@ -20641,10 +19347,7 @@ ], "argline": "git_revwalk *walk, const char *glob", "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -20652,8 +19355,8 @@ "git_revwalk_hide_head": { "type": "function", "file": "git2/revwalk.h", - "line": 175, - "lineto": 175, + "line": 176, + "lineto": 176, "args": [ { "name": "walk", @@ -20663,10 +19366,7 @@ ], "argline": "git_revwalk *walk", "sig": "git_revwalk *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Hide the repository's HEAD
\n", "comments": "", "group": "revwalk" @@ -20674,8 +19374,8 @@ "git_revwalk_push_ref": { "type": "function", "file": "git2/revwalk.h", - "line": 186, - "lineto": 186, + "line": 187, + "lineto": 187, "args": [ { "name": "walk", @@ -20690,10 +19390,7 @@ ], "argline": "git_revwalk *walk, const char *refname", "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -20701,8 +19398,8 @@ "git_revwalk_hide_ref": { "type": "function", "file": "git2/revwalk.h", - "line": 197, - "lineto": 197, + "line": 198, + "lineto": 198, "args": [ { "name": "walk", @@ -20717,10 +19414,7 @@ ], "argline": "git_revwalk *walk, const char *refname", "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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" @@ -20728,8 +19422,8 @@ "git_revwalk_next": { "type": "function", "file": "git2/revwalk.h", - "line": 217, - "lineto": 217, + "line": 218, + "lineto": 218, "args": [ { "name": "out", @@ -20752,19 +19446,15 @@ "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/HEAD/general.html#git_revwalk_next-76" - ], - "log.c": [ - "ex/HEAD/log.html#git_revwalk_next-51" - ] + "general.c": ["ex/v1.8.4/general.html#git_revwalk_next-67"], + "log.c": ["ex/v1.8.4/log.html#git_revwalk_next-51"] } }, "git_revwalk_sorting": { "type": "function", "file": "git2/revwalk.h", - "line": 228, - "lineto": 228, + "line": 230, + "lineto": 230, "args": [ { "name": "walk", @@ -20779,46 +19469,34 @@ ], "argline": "git_revwalk *walk, unsigned int sort_mode", "sig": "git_revwalk *::unsigned int", - "return": { - "type": "void", - "comment": null - }, + "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/HEAD/general.html#git_revwalk_sorting-77" - ], + "general.c": ["ex/v1.8.4/general.html#git_revwalk_sorting-68"], "log.c": [ - "ex/HEAD/log.html#git_revwalk_sorting-52", - "ex/HEAD/log.html#git_revwalk_sorting-53" + "ex/v1.8.4/log.html#git_revwalk_sorting-52", + "ex/v1.8.4/log.html#git_revwalk_sorting-53" ] } }, "git_revwalk_push_range": { "type": "function", "file": "git2/revwalk.h", - "line": 243, - "lineto": 243, + "line": 245, + "lineto": 245, "args": [ { "name": "walk", "type": "git_revwalk *", "comment": "the walker being used for the traversal" }, - { - "name": "range", - "type": "const char *", - "comment": "the range" - } + { "name": "range", "type": "const char *", "comment": "the range" } ], "argline": "git_revwalk *walk, const char *range", "sig": "git_revwalk *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "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
Simplify the history by first-parent
\n", "comments": "No parents other than the first for each commit will be enqueued.
\n", "group": "revwalk" @@ -20848,8 +19523,8 @@ "git_revwalk_free": { "type": "function", "file": "git2/revwalk.h", - "line": 258, - "lineto": 258, + "line": 263, + "lineto": 263, "args": [ { "name": "walk", @@ -20859,27 +19534,20 @@ ], "argline": "git_revwalk *walk", "sig": "git_revwalk *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Free a revision walker previously allocated.
\n", "comments": "", "group": "revwalk", "examples": { - "general.c": [ - "ex/HEAD/general.html#git_revwalk_free-78" - ], - "log.c": [ - "ex/HEAD/log.html#git_revwalk_free-54" - ] + "general.c": ["ex/v1.8.4/general.html#git_revwalk_free-69"], + "log.c": ["ex/v1.8.4/log.html#git_revwalk_free-54"] } }, "git_revwalk_repository": { "type": "function", "file": "git2/revwalk.h", - "line": 267, - "lineto": 267, + "line": 272, + "lineto": 272, "args": [ { "name": "walk", @@ -20900,8 +19568,8 @@ "git_revwalk_add_hide_cb": { "type": "function", "file": "git2/revwalk.h", - "line": 288, - "lineto": 291, + "line": 295, + "lineto": 298, "args": [ { "name": "walk", @@ -20921,10 +19589,7 @@ ], "argline": "git_revwalk *walk, git_revwalk_hide_cb hide_cb, void *payload", "sig": "git_revwalk *::git_revwalk_hide_cb::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "Adds, changes or removes a callback function to hide a commit and its parents
\n", "comments": "", "group": "revwalk" @@ -20963,17 +19628,14 @@ ], "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" - }, + "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.
Create a new action signature with a timestamp of 'now'.
\n", "comments": "Call git_signature_free()
to free the data.
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", "group": "signature", "examples": { - "init.c": [ - "ex/HEAD/init.html#git_signature_default-10" - ], - "tag.c": [ - "ex/HEAD/tag.html#git_signature_default-13" - ] + "commit.c": ["ex/v1.8.4/commit.html#git_signature_default-10"], + "init.c": ["ex/v1.8.4/init.html#git_signature_default-10"], + "tag.c": ["ex/v1.8.4/tag.html#git_signature_default-13"] } }, "git_signature_from_buffer": { @@ -21060,17 +19712,13 @@ "type": "git_signature **", "comment": "new signature" }, - { - "name": "buf", - "type": "const char *", - "comment": "signature string" - } + { "name": "buf", "type": "const char *", "comment": "signature string" } ], "argline": "git_signature **out, const char *buf", "sig": "git_signature **::const char *", "return": { "type": "int", - "comment": " 0 on success, or an error code" + "comment": " 0 on success, GIT_EINVALID if the signature is not parseable, 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": "", @@ -21095,10 +19743,7 @@ ], "argline": "git_signature **dest, const git_signature *sig", "sig": "git_signature **::const git_signature *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "timestamp tzoffset",\n where
\ntimestamp
is the number of seconds since the Unix epoch and\ntzoffset
is the timezone offset inhhmm
format (note the lack\n of a colon separator).
Create a copy of an existing signature. All internal strings are also\n duplicated.
\n", "comments": "Call git_signature_free()
to free the data.
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.8.4/commit.html#git_signature_free-11"], "general.c": [ - "ex/HEAD/general.html#git_signature_free-81", - "ex/HEAD/general.html#git_signature_free-82" + "ex/v1.8.4/general.html#git_signature_free-72", + "ex/v1.8.4/general.html#git_signature_free-73" ], - "init.c": [ - "ex/HEAD/init.html#git_signature_free-11" - ], - "tag.c": [ - "ex/HEAD/tag.html#git_signature_free-14" - ] + "init.c": ["ex/v1.8.4/init.html#git_signature_free-11"], + "tag.c": ["ex/v1.8.4/tag.html#git_signature_free-14"] } }, "git_stash_save": { @@ -21179,11 +19818,70 @@ "comments": "", "group": "stash" }, + "git_stash_save_options_init": { + "type": "function", + "file": "git2/stash.h", + "line": 110, + "lineto": 111, + "args": [ + { + "name": "opts", + "type": "git_stash_save_options *", + "comment": "The `git_stash_save_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_STASH_SAVE_OPTIONS_VERSION`." + } + ], + "argline": "git_stash_save_options *opts, unsigned int version", + "sig": "git_stash_save_options *::unsigned int", + "return": { + "type": "int", + "comment": " Zero on success; -1 on failure." + }, + "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
.
Save the local modifications to a new stash, with options.
\n", + "comments": "", + "group": "stash" + }, "git_stash_apply_options_init": { "type": "function", "file": "git2/stash.h", - "line": 156, - "lineto": 157, + "line": 210, + "lineto": 211, "args": [ { "name": "opts", @@ -21209,8 +19907,8 @@ "git_stash_apply": { "type": "function", "file": "git2/stash.h", - "line": 185, - "lineto": 188, + "line": 239, + "lineto": 242, "args": [ { "name": "repo", @@ -21241,8 +19939,8 @@ "git_stash_foreach": { "type": "function", "file": "git2/stash.h", - "line": 221, - "lineto": 224, + "line": 275, + "lineto": 278, "args": [ { "name": "repo", @@ -21273,8 +19971,8 @@ "git_stash_drop": { "type": "function", "file": "git2/stash.h", - "line": 237, - "lineto": 239, + "line": 291, + "lineto": 293, "args": [ { "name": "repo", @@ -21300,8 +19998,8 @@ "git_stash_pop": { "type": "function", "file": "git2/stash.h", - "line": 253, - "lineto": 256, + "line": 307, + "lineto": 310, "args": [ { "name": "repo", @@ -21332,8 +20030,8 @@ "git_status_options_init": { "type": "function", "file": "git2/status.h", - "line": 212, - "lineto": 214, + "line": 277, + "lineto": 279, "args": [ { "name": "opts", @@ -21359,8 +20057,8 @@ "git_status_foreach": { "type": "function", "file": "git2/status.h", - "line": 252, - "lineto": 255, + "line": 317, + "lineto": 320, "args": [ { "name": "repo", @@ -21387,17 +20085,13 @@ "description": "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/HEAD/status.html#git_status_foreach-6" - ] - } + "examples": { "status.c": ["ex/v1.8.4/status.html#git_status_foreach-6"] } }, "git_status_foreach_ext": { "type": "function", "file": "git2/status.h", - "line": 276, - "lineto": 280, + "line": 341, + "lineto": 345, "args": [ { "name": "repo", @@ -21430,16 +20124,14 @@ "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.
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.
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.
Free an existing status list
\n", "comments": "", "group": "status", "examples": { - "status.c": [ - "ex/HEAD/status.html#git_status_list_free-18" - ] + "status.c": ["ex/v1.8.4/status.html#git_status_list_free-18"] } }, "git_status_should_ignore": { "type": "function", "file": "git2/status.h", - "line": 380, - "lineto": 383, + "line": 445, + "lineto": 448, "args": [ { "name": "ignored", @@ -21634,70 +20310,34 @@ "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_strarray_free": { + "git_strarray_dispose": { "type": "function", "file": "git2/strarray.h", - "line": 41, - "lineto": 41, + "line": 37, + "lineto": 37, "args": [ { "name": "array", "type": "git_strarray *", - "comment": "git_strarray from which to free string data" + "comment": "The git_strarray that contains strings to free" } ], "argline": "git_strarray *array", "sig": "git_strarray *", - "return": { - "type": "void", - "comment": null - }, - "description": "Close a string array object
\n", - "comments": "This method should be called on git_strarray
objects where the strings array is allocated and contains allocated strings, such as what you would get from git_strarray_copy()
. 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 (it is more commonly embedded inside another struct or created on the stack).
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.
Copy a string array object from source to target.
\n", - "comments": "Note: target is overwritten and hence should be empty, otherwise its contents are leaked. Call git_strarray_free() if necessary.
\n", - "group": "strarray" - }, "git_submodule_update_options_init": { "type": "function", "file": "git2/submodule.h", @@ -21739,7 +20379,7 @@ { "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." + "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": "options", @@ -21789,11 +20429,35 @@ "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.
Create an in-memory copy of a submodule. The copy must be explicitly\n free'd or it will leak.
\n", + "comments": "", + "group": "submodule" + }, "git_submodule_free": { "type": "function", "file": "git2/submodule.h", - "line": 231, - "lineto": 231, + "line": 241, + "lineto": 241, "args": [ { "name": "submodule", @@ -21803,10 +20467,7 @@ ], "argline": "git_submodule *submodule", "sig": "git_submodule *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "Release a submodule
\n", "comments": "", "group": "submodule" @@ -21814,8 +20475,8 @@ "git_submodule_foreach": { "type": "function", "file": "git2/submodule.h", - "line": 251, - "lineto": 254, + "line": 261, + "lineto": 264, "args": [ { "name": "repo", @@ -21843,16 +20504,14 @@ "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/HEAD/status.html#git_submodule_foreach-19" - ] + "status.c": ["ex/v1.8.4/status.html#git_submodule_foreach-19"] } }, "git_submodule_add_setup": { "type": "function", "file": "git2/submodule.h", - "line": 282, - "lineto": 287, + "line": 292, + "lineto": 297, "args": [ { "name": "out", @@ -21893,8 +20552,8 @@ "git_submodule_clone": { "type": "function", "file": "git2/submodule.h", - "line": 300, - "lineto": 303, + "line": 310, + "lineto": 313, "args": [ { "name": "out", @@ -21925,8 +20584,8 @@ "git_submodule_add_finalize": { "type": "function", "file": "git2/submodule.h", - "line": 315, - "lineto": 315, + "line": 326, + "lineto": 326, "args": [ { "name": "submodule", @@ -21936,10 +20595,7 @@ ], "argline": "git_submodule *submodule", "sig": "git_submodule *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": " 0 or an error code." }, "description": "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" @@ -21947,8 +20603,8 @@ "git_submodule_add_to_index": { "type": "function", "file": "git2/submodule.h", - "line": 327, - "lineto": 329, + "line": 338, + "lineto": 340, "args": [ { "name": "submodule", @@ -21974,8 +20630,8 @@ "git_submodule_owner": { "type": "function", "file": "git2/submodule.h", - "line": 342, - "lineto": 342, + "line": 353, + "lineto": 353, "args": [ { "name": "submodule", @@ -21996,8 +20652,8 @@ "git_submodule_name": { "type": "function", "file": "git2/submodule.h", - "line": 350, - "lineto": 350, + "line": 361, + "lineto": 361, "args": [ { "name": "submodule", @@ -22015,16 +20671,14 @@ "comments": "", "group": "submodule", "examples": { - "status.c": [ - "ex/HEAD/status.html#git_submodule_name-20" - ] + "status.c": ["ex/v1.8.4/status.html#git_submodule_name-20"] } }, "git_submodule_path": { "type": "function", "file": "git2/submodule.h", - "line": 361, - "lineto": 361, + "line": 372, + "lineto": 372, "args": [ { "name": "submodule", @@ -22042,16 +20696,14 @@ "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/HEAD/status.html#git_submodule_path-21" - ] + "status.c": ["ex/v1.8.4/status.html#git_submodule_path-21"] } }, "git_submodule_url": { "type": "function", "file": "git2/submodule.h", - "line": 369, - "lineto": 369, + "line": 380, + "lineto": 380, "args": [ { "name": "submodule", @@ -22072,8 +20724,8 @@ "git_submodule_resolve_url": { "type": "function", "file": "git2/submodule.h", - "line": 379, - "lineto": 379, + "line": 390, + "lineto": 390, "args": [ { "name": "out", @@ -22085,18 +20737,11 @@ "type": "git_repository *", "comment": "Pointer to repository object" }, - { - "name": "url", - "type": "const char *", - "comment": "Relative url" - } + { "name": "url", "type": "const char *", "comment": "Relative url" } ], "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" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Resolve a submodule url relative to the given repository.
\n", "comments": "", "group": "submodule" @@ -22104,8 +20749,8 @@ "git_submodule_branch": { "type": "function", "file": "git2/submodule.h", - "line": 387, - "lineto": 387, + "line": 398, + "lineto": 398, "args": [ { "name": "submodule", @@ -22126,8 +20771,8 @@ "git_submodule_set_branch": { "type": "function", "file": "git2/submodule.h", - "line": 400, - "lineto": 400, + "line": 411, + "lineto": 411, "args": [ { "name": "repo", @@ -22158,8 +20803,8 @@ "git_submodule_set_url": { "type": "function", "file": "git2/submodule.h", - "line": 414, - "lineto": 414, + "line": 425, + "lineto": 425, "args": [ { "name": "repo", @@ -22190,8 +20835,8 @@ "git_submodule_index_id": { "type": "function", "file": "git2/submodule.h", - "line": 422, - "lineto": 422, + "line": 433, + "lineto": 433, "args": [ { "name": "submodule", @@ -22212,8 +20857,8 @@ "git_submodule_head_id": { "type": "function", "file": "git2/submodule.h", - "line": 430, - "lineto": 430, + "line": 441, + "lineto": 441, "args": [ { "name": "submodule", @@ -22234,8 +20879,8 @@ "git_submodule_wd_id": { "type": "function", "file": "git2/submodule.h", - "line": 443, - "lineto": 443, + "line": 454, + "lineto": 454, "args": [ { "name": "submodule", @@ -22256,8 +20901,8 @@ "git_submodule_ignore": { "type": "function", "file": "git2/submodule.h", - "line": 468, - "lineto": 469, + "line": 479, + "lineto": 480, "args": [ { "name": "submodule", @@ -22278,8 +20923,8 @@ "git_submodule_set_ignore": { "type": "function", "file": "git2/submodule.h", - "line": 481, - "lineto": 484, + "line": 492, + "lineto": 495, "args": [ { "name": "repo", @@ -22299,10 +20944,7 @@ ], "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" - }, + "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" @@ -22310,8 +20952,8 @@ "git_submodule_update_strategy": { "type": "function", "file": "git2/submodule.h", - "line": 496, - "lineto": 497, + "line": 507, + "lineto": 508, "args": [ { "name": "submodule", @@ -22332,8 +20974,8 @@ "git_submodule_set_update": { "type": "function", "file": "git2/submodule.h", - "line": 509, - "lineto": 512, + "line": 520, + "lineto": 523, "args": [ { "name": "repo", @@ -22353,10 +20995,7 @@ ], "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" - }, + "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" @@ -22364,14 +21003,10 @@ "git_submodule_fetch_recurse_submodules": { "type": "function", "file": "git2/submodule.h", - "line": 525, - "lineto": 526, + "line": 536, + "lineto": 537, "args": [ - { - "name": "submodule", - "type": "git_submodule *", - "comment": null - } + { "name": "submodule", "type": "git_submodule *", "comment": null } ], "argline": "git_submodule *submodule", "sig": "git_submodule *", @@ -22386,8 +21021,8 @@ "git_submodule_set_fetch_recurse_submodules": { "type": "function", "file": "git2/submodule.h", - "line": 538, - "lineto": 541, + "line": 549, + "lineto": 552, "args": [ { "name": "repo", @@ -22418,8 +21053,8 @@ "git_submodule_init": { "type": "function", "file": "git2/submodule.h", - "line": 556, - "lineto": 556, + "line": 567, + "lineto": 567, "args": [ { "name": "submodule", @@ -22445,8 +21080,8 @@ "git_submodule_repo_init": { "type": "function", "file": "git2/submodule.h", - "line": 571, - "lineto": 574, + "line": 582, + "lineto": 585, "args": [ { "name": "out", @@ -22477,21 +21112,18 @@ "git_submodule_sync": { "type": "function", "file": "git2/submodule.h", - "line": 584, - "lineto": 584, + "line": 598, + "lineto": 598, "args": [ { "name": "submodule", "type": "git_submodule *", - "comment": null + "comment": "The submodule to copy." } ], "argline": "git_submodule *submodule", "sig": "git_submodule *", - "return": { - "type": "int", - "comment": null - }, + "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" @@ -22499,8 +21131,8 @@ "git_submodule_open": { "type": "function", "file": "git2/submodule.h", - "line": 598, - "lineto": 600, + "line": 612, + "lineto": 614, "args": [ { "name": "repo", @@ -22526,8 +21158,8 @@ "git_submodule_reload": { "type": "function", "file": "git2/submodule.h", - "line": 612, - "lineto": 612, + "line": 626, + "lineto": 626, "args": [ { "name": "submodule", @@ -22542,10 +21174,7 @@ ], "argline": "git_submodule *submodule, int force", "sig": "git_submodule *::int", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on error" - }, + "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" @@ -22553,8 +21182,8 @@ "git_submodule_status": { "type": "function", "file": "git2/submodule.h", - "line": 628, - "lineto": 632, + "line": 642, + "lineto": 646, "args": [ { "name": "status", @@ -22579,24 +21208,19 @@ ], "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" - }, + "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.
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/HEAD/general.html#git_tag_lookup-84" - ] - } + "examples": { "general.c": ["ex/v1.8.4/general.html#git_tag_lookup-75"] } }, "git_tag_lookup_prefix": { "type": "function", @@ -22685,10 +21299,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" @@ -22699,26 +21310,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 release memory. Failure to do so will cause a memory leak.
\n", "group": "tag", - "examples": { - "general.c": [ - "ex/HEAD/general.html#git_tag_free-85" - ] - } + "examples": { "general.c": ["ex/v1.8.4/general.html#git_tag_free-76"] } }, "git_tag_id": { "type": "function", @@ -22783,18 +21383,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 given object and returns it
\n", "group": "tag", - "examples": { - "general.c": [ - "ex/HEAD/general.html#git_tag_target-86" - ] - } + "examples": { "general.c": ["ex/v1.8.4/general.html#git_tag_target-77"] } }, "git_tag_target_id": { "type": "function", @@ -22810,17 +21403,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/HEAD/cat-file.html#git_tag_target_id-31" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tag_target_id-31"] } }, "git_tag_target_type": { @@ -22845,12 +21433,8 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_target_type-32" - ], - "general.c": [ - "ex/HEAD/general.html#git_tag_target_type-87" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tag_target_type-32"], + "general.c": ["ex/v1.8.4/general.html#git_tag_target_type-78"] } }, "git_tag_name": { @@ -22867,23 +21451,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/HEAD/cat-file.html#git_tag_name-33" - ], - "general.c": [ - "ex/HEAD/general.html#git_tag_name-88" - ], - "tag.c": [ - "ex/HEAD/tag.html#git_tag_name-16" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tag_name-33"], + "general.c": ["ex/v1.8.4/general.html#git_tag_name-79"], + "tag.c": ["ex/v1.8.4/tag.html#git_tag_name-16"] } }, "git_tag_tagger": { @@ -22908,9 +21483,7 @@ "comments": "", "group": "tag", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_tagger-34" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tag_tagger-34"] } }, "git_tag_message": { @@ -22936,15 +21509,11 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_message-35", - "ex/HEAD/cat-file.html#git_tag_message-36" - ], - "general.c": [ - "ex/HEAD/general.html#git_tag_message-89" + "ex/v1.8.4/cat-file.html#git_tag_message-35", + "ex/v1.8.4/cat-file.html#git_tag_message-36" ], - "tag.c": [ - "ex/HEAD/tag.html#git_tag_message-17" - ] + "general.c": ["ex/v1.8.4/general.html#git_tag_message-80"], + "tag.c": ["ex/v1.8.4/tag.html#git_tag_message-17"] } }, "git_tag_create": { @@ -22998,11 +21567,7 @@ "description": "Create a new tag in the repository from an object
\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/HEAD/tag.html#git_tag_create-18" - ] - } + "examples": { "tag.c": ["ex/v1.8.4/tag.html#git_tag_create-18"] } }, "git_tag_annotation_create": { "type": "function", @@ -23043,10 +21608,7 @@ ], "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 through git_message_prettify()
.
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. 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 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 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" @@ -23282,10 +21813,7 @@ ], "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 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": 379, + "lineto": 379, + "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" @@ -23363,10 +21909,7 @@ ], "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 know from which repository to lock.
\n", "group": "transaction" @@ -23390,10 +21933,7 @@ ], "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 reference.
\n", "group": "transaction" @@ -23555,10 +22095,7 @@ ], "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 one by one, and the first failure will stop the processing.
\n", "group": "transaction" @@ -23577,10 +22114,7 @@ ], "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 changes made to them.
\n", "group": "transaction" @@ -23609,24 +22143,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.8.4/commit.html#git_tree_lookup-12"], "general.c": [ - "ex/HEAD/general.html#git_tree_lookup-90", - "ex/HEAD/general.html#git_tree_lookup-91" + "ex/v1.8.4/general.html#git_tree_lookup-81", + "ex/v1.8.4/general.html#git_tree_lookup-82" ], - "init.c": [ - "ex/HEAD/init.html#git_tree_lookup-12" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_tree_lookup-37" - ] + "init.c": ["ex/v1.8.4/init.html#git_tree_lookup-12"], + "merge.c": ["ex/v1.8.4/merge.html#git_tree_lookup-37"] } }, "git_tree_lookup_prefix": { @@ -23658,10 +22186,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" @@ -23672,39 +22197,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 release memory. Failure to do so will cause a memory leak.
\n", "group": "tree", "examples": { + "commit.c": ["ex/v1.8.4/commit.html#git_tree_free-13"], "diff.c": [ - "ex/HEAD/diff.html#git_tree_free-18", - "ex/HEAD/diff.html#git_tree_free-19" + "ex/v1.8.4/diff.html#git_tree_free-19", + "ex/v1.8.4/diff.html#git_tree_free-20" ], "general.c": [ - "ex/HEAD/general.html#git_tree_free-92", - "ex/HEAD/general.html#git_tree_free-93" - ], - "init.c": [ - "ex/HEAD/init.html#git_tree_free-13" + "ex/v1.8.4/general.html#git_tree_free-83", + "ex/v1.8.4/general.html#git_tree_free-84" ], + "init.c": ["ex/v1.8.4/init.html#git_tree_free-13"], "log.c": [ - "ex/HEAD/log.html#git_tree_free-55", - "ex/HEAD/log.html#git_tree_free-56", - "ex/HEAD/log.html#git_tree_free-57", - "ex/HEAD/log.html#git_tree_free-58", - "ex/HEAD/log.html#git_tree_free-59" + "ex/v1.8.4/log.html#git_tree_free-55", + "ex/v1.8.4/log.html#git_tree_free-56", + "ex/v1.8.4/log.html#git_tree_free-57", + "ex/v1.8.4/log.html#git_tree_free-58", + "ex/v1.8.4/log.html#git_tree_free-59" ] } }, @@ -23774,12 +22291,8 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entrycount-37" - ], - "general.c": [ - "ex/HEAD/general.html#git_tree_entrycount-94" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tree_entrycount-37"], + "general.c": ["ex/v1.8.4/general.html#git_tree_entrycount-85"] } }, "git_tree_entry_byname": { @@ -23809,9 +22322,7 @@ "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/HEAD/general.html#git_tree_entry_byname-95" - ] + "general.c": ["ex/v1.8.4/general.html#git_tree_entry_byname-86"] } }, "git_tree_entry_byindex": { @@ -23841,12 +22352,8 @@ "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/HEAD/cat-file.html#git_tree_entry_byindex-38" - ], - "general.c": [ - "ex/HEAD/general.html#git_tree_entry_byindex-96" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tree_entry_byindex-38"], + "general.c": ["ex/v1.8.4/general.html#git_tree_entry_byindex-87"] } }, "git_tree_entry_byid": { @@ -23927,10 +22434,7 @@ ], "argline": "git_tree_entry **dest, const git_tree_entry *source", "sig": "git_tree_entry **::const git_tree_entry *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Duplicate a tree entry
\n", "comments": "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 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/HEAD/cat-file.html#git_tree_entry_name-39" - ], + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tree_entry_name-39"], "general.c": [ - "ex/HEAD/general.html#git_tree_entry_name-97", - "ex/HEAD/general.html#git_tree_entry_name-98" + "ex/v1.8.4/general.html#git_tree_entry_name-88", + "ex/v1.8.4/general.html#git_tree_entry_name-89" ] } }, @@ -24010,9 +22506,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_id-40" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tree_entry_id-40"] } }, "git_tree_entry_type": { @@ -24037,9 +22531,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_type-41" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tree_entry_type-41"] } }, "git_tree_entry_filemode": { @@ -24064,9 +22556,7 @@ "comments": "", "group": "tree", "examples": { - "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_filemode-42" - ] + "cat-file.c": ["ex/v1.8.4/cat-file.html#git_tree_entry_filemode-42"] } }, "git_tree_entry_filemode_raw": { @@ -24142,17 +22632,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.
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", @@ -24234,8 +22719,8 @@ "git_treebuilder_free": { "type": "function", "file": "git2/tree.h", - "line": 281, - "lineto": 281, + "line": 282, + "lineto": 282, "args": [ { "name": "bld", @@ -24245,10 +22730,7 @@ ], "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. Failing to free the builder after you're done using it will result in a memory leak
\n", "group": "treebuilder" @@ -24256,8 +22738,8 @@ "git_treebuilder_get": { "type": "function", "file": "git2/tree.h", - "line": 293, - "lineto": 294, + "line": 294, + "lineto": 295, "args": [ { "name": "bld", @@ -24283,8 +22765,8 @@ "git_treebuilder_insert": { "type": "function", "file": "git2/tree.h", - "line": 324, - "lineto": 329, + "line": 325, + "lineto": 330, "args": [ { "name": "out", @@ -24314,10 +22796,7 @@ ], "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 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" @@ -24352,8 +22828,8 @@ "git_treebuilder_filter": { "type": "function", "file": "git2/tree.h", - "line": 361, - "lineto": 364, + "line": 364, + "lineto": 367, "args": [ { "name": "bld", @@ -24374,8 +22850,8 @@ "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 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 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": "", - "group": "treebuilder" - }, "git_tree_walk": { "type": "function", "file": "git2/tree.h", - "line": 420, - "lineto": 424, + "line": 409, + "lineto": 413, "args": [ { "name": "tree", @@ -24469,10 +22910,7 @@ ], "argline": "const git_tree *tree, git_treewalk_mode mode, git_treewalk_cb callback, void *payload", "sig": "const git_tree *::git_treewalk_mode::git_treewalk_cb::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "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 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" @@ -24480,8 +22918,8 @@ "git_tree_dup": { "type": "function", "file": "git2/tree.h", - "line": 433, - "lineto": 433, + "line": 423, + "lineto": 423, "args": [ { "name": "out", @@ -24496,10 +22934,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" @@ -24507,14 +22942,10 @@ "git_tree_create_updated": { "type": "function", "file": "git2/tree.h", - "line": 479, - "lineto": 479, + "line": 470, + "lineto": 470, "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 *", @@ -24538,10 +22969,7 @@ ], "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 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" @@ -24549,8 +22977,8 @@ "git_worktree_list": { "type": "function", "file": "git2/worktree.h", - "line": 34, - "lineto": 34, + "line": 35, + "lineto": 35, "args": [ { "name": "out", @@ -24565,10 +22993,7 @@ ], "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
when no longer needed.
Lookup a working tree by its name for a given repository
\n", "comments": "", "group": "worktree" @@ -24608,8 +23030,8 @@ "git_worktree_open_from_repository": { "type": "function", "file": "git2/worktree.h", - "line": 56, - "lineto": 56, + "line": 58, + "lineto": 58, "args": [ { "name": "out", @@ -24624,10 +23046,7 @@ ], "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 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" @@ -24657,8 +23073,8 @@ "git_worktree_validate": { "type": "function", "file": "git2/worktree.h", - "line": 75, - "lineto": 75, + "line": 77, + "lineto": 77, "args": [ { "name": "wt", @@ -24679,8 +23095,8 @@ "git_worktree_add_options_init": { "type": "function", "file": "git2/worktree.h", - "line": 104, - "lineto": 105, + "line": 113, + "lineto": 114, "args": [ { "name": "opts", @@ -24706,8 +23122,8 @@ "git_worktree_add": { "type": "function", "file": "git2/worktree.h", - "line": 121, - "lineto": 123, + "line": 130, + "lineto": 132, "args": [ { "name": "out", @@ -24737,10 +23153,7 @@ ], "argline": "git_worktree **out, git_repository *repo, const char *name, const char *path, const git_worktree_add_options *opts", "sig": "git_worktree **::git_repository *::const char *::const char *::const git_worktree_add_options *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, + "return": { "type": "int", "comment": " 0 or an error code" }, "description": "Add a new working tree
\n", "comments": "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
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. - 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.
\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 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: - 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" @@ -24977,8 +23387,8 @@ "git_apply_hunk_cb": { "type": "callback", "file": "git2/apply.h", - "line": 52, - "lineto": 54, + "line": 56, + "lineto": 58, "args": [ { "name": "hunk", @@ -24995,7 +23405,7 @@ "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: - 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" @@ -25003,8 +23413,8 @@ "git_attr_foreach_cb": { "type": "callback", "file": "git2/attr.h", - "line": 212, - "lineto": 212, + "line": 289, + "lineto": 289, "args": [ { "name": "name", @@ -25034,12 +23444,12 @@ "git_transport_certificate_check_cb": { "type": "callback", "file": "git2/cert.h", - "line": 71, - "lineto": 71, + "line": 72, + "lineto": 72, "args": [ { "name": "cert", - "type": "struct git_cert *", + "type": "git_cert *", "comment": "The host certificate" }, { @@ -25058,8 +23468,8 @@ "comment": "Payload provided by the caller" } ], - "argline": "struct git_cert *cert, int valid, const char *host, void *payload", - "sig": "struct git_cert *::int::const char *::void *", + "argline": "git_cert *cert, int valid, const char *host, void *payload", + "sig": "git_cert *::int::const char *::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" @@ -25070,108 +23480,59 @@ "git_checkout_notify_cb": { "type": "callback", "file": "git2/checkout.h", - "line": 236, - "lineto": 242, + "line": 255, + "lineto": 261, "args": [ - { - "name": "why", - "type": "git_checkout_notify_t", - "comment": null - }, - { - "name": "path", - "type": "const char *", - "comment": null - }, + { "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 - } + { "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 - }, + "return": { "type": "int", "comment": null }, "description": "Checkout notification callback function
\n", "comments": "" }, "git_checkout_progress_cb": { "type": "callback", "file": "git2/checkout.h", - "line": 245, - "lineto": 249, + "line": 264, + "lineto": 268, "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 - } + { "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 - }, + "return": { "type": "void", "comment": null }, "description": "Checkout progress notification function
\n", "comments": "" }, "git_checkout_perfdata_cb": { "type": "callback", "file": "git2/checkout.h", - "line": 252, - "lineto": 254, + "line": 271, + "lineto": 273, "args": [ { "name": "perfdata", "type": "const git_checkout_perfdata *", "comment": null }, - { - "name": "payload", - "type": "void *", - "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 - }, + "return": { "type": "void", "comment": null }, "description": "Checkout perfdata notification function
\n", "comments": "" }, @@ -25201,11 +23562,7 @@ "type": "const char *", "comment": "the remote's url" }, - { - "name": "payload", - "type": "void *", - "comment": "an opaque payload" - } + { "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 *", @@ -25249,50 +23606,75 @@ "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", + "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_commit_signing_cb": { + "git_commit_create_cb": { "type": "callback", "file": "git2/commit.h", - "line": 523, - "lineto": 524, + "line": 576, + "lineto": 585, "args": [ { - "name": "signature", - "type": "git_buf *", - "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": "signature_field", - "type": "git_buf *", - "comment": null + "name": "author", + "type": "const git_signature *", + "comment": "the author name and time of the commit" }, { - "name": "commit_content", + "name": "committer", + "type": "const git_signature *", + "comment": "the committer name and time of the commit" + }, + { + "name": "message_encoding", "type": "const char *", - "comment": null + "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_buf *signature, git_buf *signature_field, const char *commit_content, void *payload", - "sig": "git_buf *::git_buf *::const char *::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": "Commit signing callback.
\n", - "comments": "The callback will be called with the commit content, giving a user an opportunity to sign the commit content. The signature_field buf may be left empty to specify the default field "gpgsig".
\n\nSignatures can take the form of any string, and can be created on an arbitrary header field. Signatures are most commonly used for verifying authorship of a commit using GPG or a similar cryptographically secure signing algorithm. See https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work for more details.
\n\nWhen the callback: - returns GIT_PASSTHROUGH, no signature will be added to the commit. - returns < 0, commit creation will be aborted. - returns GIT_OK, the signature parameter is expected to be filled.
\n" + "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_cred_acquire_cb": { + "git_credential_acquire_cb": { "type": "callback", - "file": "git2/cred.h", - "line": 130, - "lineto": 135, + "file": "git2/credential.h", + "line": 131, + "lineto": 136, "args": [ { - "name": "cred", - "type": "git_cred **", + "name": "out", + "type": "git_credential **", "comment": "The newly created credential object." }, { @@ -25338,7 +23720,7 @@ { "name": "allowed_types", "type": "unsigned int", - "comment": "A bitmask stating which cred types are OK to return." + "comment": "A bitmask stating which credential types are OK to return." }, { "name": "payload", @@ -25346,82 +23728,73 @@ "comment": "The payload provided when specifying this callback." } ], - "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": "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": " 0 for success, \n<\n 0 to indicate an error, > 0 to indicate\n no credential was acquired" }, "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_cred object back, depending on allowed_types (a git_credtype_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" + "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_commit_signing_cb": { + "type": "callback", + "file": "git2/deprecated.h", + "line": 276, + "lineto": 280, + "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": 331, - "lineto": 335, + "line": 346, + "lineto": 350, "args": [ - { - "name": "diff_so_far", - "type": "const git_diff *", - "comment": null - }, + { "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 - } + { "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 - }, + "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
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_diff_progress_cb": { "type": "callback", "file": "git2/diff.h", - "line": 347, - "lineto": 351, + "line": 362, + "lineto": 366, "args": [ { "name": "diff_so_far", @@ -25438,26 +23811,19 @@ "type": "const char *", "comment": "The path to the new file or NULL." }, - { - "name": "payload", - "type": "void *", - "comment": 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." - }, + "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, + "line": 496, + "lineto": 499, "args": [ { "name": "delta", @@ -25477,108 +23843,60 @@ ], "argline": "const git_diff_delta *delta, float progress, void *payload", "sig": "const git_diff_delta *::float::void *", - "return": { - "type": "int", - "comment": null - }, + "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, + "line": 562, + "lineto": 565, "args": [ - { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null - }, + { "name": "delta", "type": "const git_diff_delta *", "comment": null }, { "name": "binary", "type": "const git_diff_binary *", "comment": null }, - { - "name": "payload", - "type": "void *", - "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 - }, + "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, + "line": 588, + "lineto": 591, "args": [ - { - "name": "delta", - "type": "const git_diff_delta *", - "comment": null - }, - { - "name": "hunk", - "type": "const git_diff_hunk *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "delta", "type": "const git_diff_delta *", "comment": null }, + { "name": "hunk", "type": "const git_diff_hunk *", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } ], "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": null - }, + "return": { "type": "int", "comment": null }, "description": "When iterating over a diff, callback that will be made per hunk.
\n", "comments": "" }, "git_diff_line_cb": { "type": "callback", "file": "git2/diff.h", - "line": 618, - "lineto": 622, + "line": 649, + "lineto": 653, "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": "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 } ], "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 - }, + "return": { "type": "int", "comment": null }, "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 of text. This uses some extra GIT_DIFF_LINE_... constants for output of lines of file and hunk headers.
\n" }, @@ -25588,28 +23906,13 @@ "line": 135, "lineto": 136, "args": [ - { - "name": "path", - "type": "const char *", - "comment": null - }, - { - "name": "matched_pathspec", - "type": "const char *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "path", "type": "const char *", "comment": null }, + { "name": "matched_pathspec", "type": "const char *", "comment": null }, + { "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 - }, + "return": { "type": "int", "comment": null }, "description": "Callback for APIs that add/remove/update files matching pathspec
\n", "comments": "" }, @@ -25622,7 +23925,7 @@ { "name": "stats", "type": "const git_indexer_progress *", - "comment": "Structure containing information about the state of the tran sfer" + "comment": "Structure containing information about the state of the transfer" }, { "name": "payload", @@ -25632,10 +23935,7 @@ ], "argline": "const git_indexer_progress *stats, void *payload", "sig": "const git_indexer_progress *::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "description": "Type for progress callbacks during indexing. Return a value less\n than zero to cancel the indexing or download.
\n", "comments": "" }, @@ -25645,62 +23945,40 @@ "line": 29, "lineto": 30, "args": [ - { - "name": "blob_id", - "type": "const git_oid *", - "comment": null - }, + { "name": "blob_id", "type": "const git_oid *", "comment": null }, { "name": "annotated_object_id", "type": "const git_oid *", "comment": null }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "payload", "type": "void *", "comment": null } ], "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 - }, + "return": { "type": "int", "comment": null }, "description": "Callback for git_note_foreach.
\n", "comments": "Receives: - blob_id: Oid of the blob containing the message - annotated_object_id: Oid of the git object being annotated - payload: Payload data passed to git_note_foreach
Function type for callbacks from git_odb_foreach.
\n", "comments": "" }, "git_packbuilder_foreach_cb": { "type": "callback", "file": "git2/pack.h", - "line": 192, - "lineto": 192, + "line": 208, + "lineto": 208, "args": [ { "name": "buf", @@ -25730,44 +24008,25 @@ "git_packbuilder_progress": { "type": "callback", "file": "git2/pack.h", - "line": 221, - "lineto": 225, + "line": 237, + "lineto": 241, "args": [ - { - "name": "stage", - "type": "int", - "comment": null - }, - { - "name": "current", - "type": "uint32_t", - "comment": null - }, - { - "name": "total", - "type": "uint32_t", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "stage", "type": "int", "comment": null }, + { "name": "current", "type": "uint32_t", "comment": null }, + { "name": "total", "type": "uint32_t", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } ], "argline": "int stage, uint32_t current, uint32_t total, void *payload", "sig": "int::uint32_t::uint32_t::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "description": "Packbuilder progress notification function
\n", "comments": "" }, "git_reference_foreach_cb": { "type": "callback", "file": "git2/refs.h", - "line": 434, - "lineto": 434, + "line": 437, + "lineto": 437, "args": [ { "name": "reference", @@ -25792,8 +24051,8 @@ "git_reference_foreach_name_cb": { "type": "callback", "file": "git2/refs.h", - "line": 445, - "lineto": 445, + "line": 448, + "lineto": 448, "args": [ { "name": "name", @@ -25818,44 +24077,25 @@ "git_push_transfer_progress_cb": { "type": "callback", "file": "git2/remote.h", - "line": 425, - "lineto": 429, + "line": 470, + "lineto": 474, "args": [ - { - "name": "current", - "type": "unsigned int", - "comment": null - }, - { - "name": "total", - "type": "unsigned int", - "comment": null - }, - { - "name": "bytes", - "type": "size_t", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "current", "type": "unsigned int", "comment": null }, + { "name": "total", "type": "unsigned int", "comment": null }, + { "name": "bytes", "type": "size_t", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } ], "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 - }, + "return": { "type": "int", "comment": null }, "description": "Push network progress notification function
\n", "comments": "" }, "git_push_negotiation": { "type": "callback", "file": "git2/remote.h", - "line": 461, - "lineto": 461, + "line": 506, + "lineto": 506, "args": [ { "name": "updates", @@ -25875,18 +24115,15 @@ ], "argline": "const git_push_update **updates, size_t len, void *payload", "sig": "const git_push_update **::size_t::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "description": "Callback used to inform of upcoming updates.
\n", "comments": "" }, "git_push_update_reference_cb": { "type": "callback", "file": "git2/remote.h", - "line": 475, - "lineto": 475, + "line": 520, + "lineto": 520, "args": [ { "name": "refname", @@ -25916,8 +24153,8 @@ "git_url_resolve_cb": { "type": "callback", "file": "git2/remote.h", - "line": 489, - "lineto": 489, + "line": 536, + "lineto": 536, "args": [ { "name": "url_resolved", @@ -25944,16 +24181,44 @@ "sig": "git_buf *::const char *::int::void *", "return": { "type": "int", - "comment": " 0 on success, GIT_PASSTHROUGH or an error" + "comment": " 0 on success, GIT_PASSTHROUGH or an error\n " }, "description": "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_remote_ready_cb": { + "type": "callback", + "file": "git2/remote.h", + "line": 549, + "lineto": 549, + "args": [ + { + "name": "remote", + "type": "git_remote *", + "comment": "The remote to be connected" + }, + { + "name": "direction", + "type": "int", + "comment": "GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH" + }, + { + "name": "payload", + "type": "void *", + "comment": "Payload provided by the caller" + } + ], + "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.
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": "" @@ -26045,34 +24310,27 @@ "git_stash_apply_progress_cb": { "type": "callback", "file": "git2/stash.h", - "line": 115, - "lineto": 117, + "line": 169, + "lineto": 171, "args": [ { "name": "progress", "type": "git_stash_apply_progress_t", "comment": null }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "payload", "type": "void *", "comment": null } ], "argline": "git_stash_apply_progress_t progress, void *payload", "sig": "git_stash_apply_progress_t::void *", - "return": { - "type": "int", - "comment": null - }, + "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", "comments": "" }, "git_stash_cb": { "type": "callback", "file": "git2/stash.h", - "line": 201, - "lineto": 205, + "line": 255, + "lineto": 259, "args": [ { "name": "index", @@ -26110,28 +24368,13 @@ "line": 63, "lineto": 64, "args": [ - { - "name": "path", - "type": "const char *", - "comment": null - }, - { - "name": "status_flags", - "type": "unsigned int", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "path", "type": "const char *", "comment": null }, + { "name": "status_flags", "type": "unsigned int", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } ], "argline": "const char *path, unsigned int status_flags, void *payload", "sig": "const char *::unsigned int::void *", - "return": { - "type": "int", - "comment": null - }, + "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.
Function pointer to receive each submodule
\n", "comments": "" }, @@ -26172,16 +24412,8 @@ "line": 330, "lineto": 330, "args": [ - { - "name": "name", - "type": "const char *", - "comment": "The tag name" - }, - { - "name": "oid", - "type": "git_oid *", - "comment": "The tag's OID" - }, + { "name": "name", "type": "const char *", "comment": "The tag name" }, + { "name": "oid", "type": "git_oid *", "comment": "The tag's OID" }, { "name": "payload", "type": "void *", @@ -26203,23 +24435,12 @@ "line": 52, "lineto": 52, "args": [ - { - "name": "level", - "type": "git_trace_level_t", - "comment": null - }, - { - "name": "msg", - "type": "const char *", - "comment": null - } + { "name": "level", "type": "git_trace_level_t", "comment": null }, + { "name": "msg", "type": "const char *", "comment": null } ], "argline": "git_trace_level_t level, const char *msg", "sig": "git_trace_level_t::const char *", - "return": { - "type": "void", - "comment": null - }, + "return": { "type": "void", "comment": null }, "description": "An instance for a tracing function
\n", "comments": "" }, @@ -26247,11 +24468,8 @@ ], "argline": "const char *str, int len, void *payload", "sig": "const char *::int::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "Callback for messages recieved by the transport.
\n", + "return": { "type": "int", "comment": null }, + "description": "Callback for messages received by the transport.
\n", "comments": "Return a negative value to cancel the network operation.
\n" }, "git_transport_cb": { @@ -26260,85 +24478,44 @@ "line": 37, "lineto": 37, "args": [ - { - "name": "out", - "type": "git_transport **", - "comment": null - }, - { - "name": "owner", - "type": "git_remote *", - "comment": null - }, - { - "name": "param", - "type": "void *", - "comment": null - } + { "name": "out", "type": "git_transport **", "comment": null }, + { "name": "owner", "type": "git_remote *", "comment": null }, + { "name": "param", "type": "void *", "comment": null } ], "argline": "git_transport **out, git_remote *owner, void *param", "sig": "git_transport **::git_remote *::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "description": "Signature of a function which creates a transport
\n", "comments": "" }, "git_treebuilder_filter_cb": { "type": "callback", "file": "git2/tree.h", - "line": 347, - "lineto": 348, + "line": 349, + "lineto": 350, "args": [ - { - "name": "entry", - "type": "const git_tree_entry *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "entry", "type": "const git_tree_entry *", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } ], "argline": "const git_tree_entry *entry, void *payload", "sig": "const git_tree_entry *::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "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, + "line": 383, + "lineto": 384, "args": [ - { - "name": "root", - "type": "const char *", - "comment": null - }, - { - "name": "entry", - "type": "const git_tree_entry *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } + { "name": "root", "type": "const char *", "comment": null }, + { "name": "entry", "type": "const git_tree_entry *", "comment": null }, + { "name": "payload", "type": "void *", "comment": null } ], "argline": "const char *root, const git_tree_entry *entry, void *payload", "sig": "const char *::const git_tree_entry *::void *", - "return": { - "type": "int", - "comment": null - }, + "return": { "type": "int", "comment": null }, "description": "Callback for the tree traversal method
\n", "comments": "" } @@ -26352,8 +24529,8 @@ "type": "struct", "value": "git_annotated_commit", "file": "git2/types.h", - "line": 189, - "lineto": 189, + "line": 198, + "lineto": 198, "tdef": "typedef", "description": " Annotated commits, the input to merge and rebase. ", "comments": "", @@ -26381,13 +24558,11 @@ [ "git_apply_flags_t", { - "decl": [ - "GIT_APPLY_CHECK" - ], + "decl": ["GIT_APPLY_CHECK"], "type": "enum", "file": "git2/apply.h", - "line": 57, - "lineto": 63, + "line": 61, + "lineto": 67, "block": "GIT_APPLY_CHECK", "tdef": "typedef", "description": " Flags controlling the behavior of git_apply ", @@ -26400,10 +24575,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -26416,8 +24588,8 @@ ], "type": "enum", "file": "git2/apply.h", - "line": 112, - "lineto": 130, + "line": 127, + "lineto": 145, "block": "GIT_APPLY_LOCATION_WORKDIR\nGIT_APPLY_LOCATION_INDEX\nGIT_APPLY_LOCATION_BOTH", "tdef": "typedef", "description": " Possible application locations for git_apply ", @@ -26442,12 +24614,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [ - "git_apply" - ] - } + "used": { "returns": [], "needs": ["git_apply"] } } ], [ @@ -26463,8 +24630,8 @@ "type": "struct", "value": "git_apply_options", "file": "git2/apply.h", - "line": 73, - "lineto": 87, + "line": 77, + "lineto": 91, "block": "unsigned int version\ngit_apply_delta_cb delta_cb\ngit_apply_hunk_cb hunk_cb\nvoid * payload\nunsigned int flags", "tdef": "typedef", "description": " Apply options structure", @@ -26496,11 +24663,50 @@ "comments": " Bitmask of git_apply_flags_t " } ], + "used": { + "returns": [], + "needs": ["git_apply", "git_apply_options_init", "git_apply_to_tree"] + } + } + ], + [ + "git_attr_options", + { + "decl": [ + "unsigned int version", + "unsigned int flags", + "git_oid * commit_id", + "git_oid attr_commit_id" + ], + "type": "struct", + "value": "git_attr_options", + "file": "git2/attr.h", + "line": 142, + "lineto": 159, + "block": "unsigned int version\nunsigned int flags\ngit_oid * commit_id\ngit_oid attr_commit_id", + "tdef": "typedef", + "description": " An options structure for querying attributes.", + "comments": "", + "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, + { + "type": "unsigned int", + "name": "flags", + "comments": " A combination of GIT_ATTR_CHECK flags " + }, + { "type": "git_oid *", "name": "commit_id", "comments": "" }, + { + "type": "git_oid", + "name": "attr_commit_id", + "comments": " The commit to load attributes from, when\n `GIT_ATTR_CHECK_INCLUDE_COMMIT` is specified." + } + ], "used": { "returns": [], "needs": [ - "git_apply", - "git_apply_to_tree" + "git_attr_foreach_ext", + "git_attr_get_ext", + "git_attr_get_many_ext" ] } } @@ -26548,12 +24754,7 @@ "value": 3 } ], - "used": { - "returns": [ - "git_attr_value" - ], - "needs": [] - } + "used": { "returns": ["git_attr_value"], "needs": [] } } ], [ @@ -26563,8 +24764,8 @@ "type": "struct", "value": "git_blame", "file": "git2/blame.h", - "line": 149, - "lineto": 149, + "line": 202, + "lineto": 202, "tdef": "typedef", "description": " Opaque structure to hold blame results ", "comments": "", @@ -26596,13 +24797,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", + "lineto": 77, + "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": "", @@ -26616,44 +24818,47 @@ { "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": [] } } ], [ @@ -26673,57 +24878,57 @@ "type": "struct", "value": "git_blame_hunk", "file": "git2/blame.h", - "line": 132, - "lineto": 145, + "line": 145, + "lineto": 198, "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", "tdef": "typedef", "description": " Structure that represents a blame hunk.", - "comments": "lines_in_hunk
is the number of lines in this hunk - final_commit_id
is the OID of the commit where this line was last changed. - final_start_line_number
is the 1-based line number where this hunk begins, in the final version of the file - final_signature
is the author of final_commit_id
. If GIT_BLAME_USE_MAILMAP
has been specified, it will contain the canonical real name and email address. - orig_commit_id
is the OID of the commit where this hunk was found. This will usually be the same as final_commit_id
, except when GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
has been specified. - orig_path
is the path to the file where this hunk originated, as of the commit specified by orig_commit_id
. - orig_start_line_number
is the 1-based line number where this hunk begins in the file named by orig_path
in the commit specified by orig_commit_id
. - orig_signature
is the author of orig_commit_id
. If GIT_BLAME_USE_MAILMAP
has been specified, it will contain the canonical real name and email address. - boundary
is 1 iff the hunk has been tracked to a boundary commit (the root, 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 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
.
Sometimes libgit2 wants to return an allocated data buffer to the caller and have the caller take responsibility for freeing that memory. This can be awkward if the caller does not have easy access to the same allocation functions that libgit2 is using. In those cases, libgit2 will fill in a git_buf
and the caller can use git_buf_dispose()
to release it when they are done.
A git_buf
may also be used for the caller to pass in a reference to a block of memory they hold. In this case, libgit2 will not resize or free the memory, but will read from it as needed.
Some APIs may occasionally do something slightly unusual with a buffer, such as setting ptr
to a value that was passed in by the user. In 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-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": [] } } ], [ @@ -27206,8 +25428,8 @@ ], "type": "enum", "file": "git2/cert.h", - "line": 24, - "lineto": 47, + "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", @@ -27238,32 +25460,25 @@ "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_cert_x509", { - "decl": [ - "struct 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/cert.h", - "line": 119, - "lineto": 131, - "block": "struct git_cert parent\nvoid * data\nsize_t len", + "line": 156, + "lineto": 168, + "block": "git_cert parent\nvoid * data\nsize_t len", "tdef": "typedef", "description": " X.509 certificate information", "comments": "", "fields": [ { - "type": "struct git_cert", + "type": "git_cert", "name": "parent", "comments": " The parent cert " }, @@ -27278,10 +25493,7 @@ "comments": " Length of the memory block pointed to by `data`." } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -27298,12 +25510,12 @@ ], "type": "enum", "file": "git2/checkout.h", - "line": 217, - "lineto": 226, + "line": 214, + "lineto": 245, "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 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 do not need an update but no longer match the baseline. Core git displays 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. 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", + "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", @@ -27314,46 +25526,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"] } } ], [ @@ -27384,8 +25591,8 @@ "type": "struct", "value": "git_checkout_options", "file": "git2/checkout.h", - "line": 263, - "lineto": 326, + "line": 282, + "lineto": 345, "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", @@ -27517,35 +25724,18 @@ "type": "struct", "value": "git_checkout_perfdata", "file": "git2/checkout.h", - "line": 229, - "lineto": 233, + "line": 248, + "lineto": 252, "block": "size_t mkdir_calls\nsize_t stat_calls\nsize_t chmod_calls", "tdef": "typedef", "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"] } } ], [ @@ -27572,14 +25762,16 @@ "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_UPDATE_SUBMODULES", "GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED" ], "type": "enum", "file": "git2/checkout.h", "line": 106, - "lineto": 189, - "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", + "lineto": 198, + "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_DRY_RUN\nGIT_CHECKOUT_CONFLICT_STYLE_ZDIFF3\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 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 three strategies for update:
\n\nGIT_CHECKOUT_NONE
is a dry-run strategy that checks for conflicts, etc., but doesn't make any actual changes.
GIT_CHECKOUT_FORCE
is at the opposite extreme, taking any action to make the working directory match the target (including potentially discarding modified files).
GIT_CHECKOUT_SAFE
is between these two options, it will only make modifications that will not lose changes.
| 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 | | | ---------------------|-----------------------|----------------------|\n
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_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.
Normally checkout writes the index upon completion; this prevents that.
\n", "value": 8388608 }, + { + "type": "int", + "name": "GIT_CHECKOUT_DRY_RUN", + "comments": "Show what would be done by a checkout. Stop after sending\n notifications; don't update the working directory or 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_UPDATE_SUBMODULES", @@ -27717,10 +25921,7 @@ "value": 131072 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -27742,11 +25943,7 @@ "description": " Cherry-pick options", "comments": "", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "unsigned int", "name": "mainline", @@ -27765,10 +25962,7 @@ ], "used": { "returns": [], - "needs": [ - "git_cherrypick", - "git_cherrypick_options_init" - ] + "needs": ["git_cherrypick", "git_cherrypick_options_init"] } } ], @@ -27815,10 +26009,7 @@ "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -27846,11 +26037,7 @@ "description": " Clone options structure", "comments": "Initialize with GIT_CLONE_OPTIONS_INIT
. Alternatively, you can use git_clone_options_init
.
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": 112, + "lineto": 112, + "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": 588, + "lineto": 591, + "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", { @@ -27971,8 +26237,8 @@ "type": "struct", "value": "git_config", "file": "git2/types.h", - "line": 148, - "lineto": 148, + "line": 157, + "lineto": 157, "tdef": "typedef", "description": " Memory representation of a set of config files ", "comments": "", @@ -28028,17 +26294,45 @@ "type": "struct", "value": "git_config_backend", "file": "git2/types.h", - "line": 151, - "lineto": 151, + "line": 160, + "lineto": 160, "tdef": "typedef", "description": " Interface to access a configuration file ", "comments": "", - "used": { - "returns": [], - "needs": [ - "git_config_backend_foreach_match" - ] - } + "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": 129, + "lineto": 143, + "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": "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": "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": [] } } ], [ @@ -28047,17 +26341,18 @@ "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" + "void (*)(struct git_config_entry *) free" ], "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": 79, + "lineto": 106, + "block": "const char * name\nconst char * value\nconst char * backend_type\nconst char * origin_path\nunsigned int include_depth\ngit_config_level_t level\nvoid (*)(struct git_config_entry *) free", "tdef": "typedef", "description": " An entry in a configuration file", "comments": "", @@ -28065,12 +26360,22 @@ { "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": "const char *", + "name": "backend_type", + "comments": " The type of backend that this entry exists in (eg, \"file\") " + }, + { + "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": "unsigned int", @@ -28080,17 +26385,12 @@ { "type": "git_config_level_t", "name": "level", - "comments": " Which config file this was found in " + "comments": " Configuration level for the file this was found in " }, { "type": "void (*)(struct git_config_entry *)", "name": "free", "comments": "" - }, - { - "type": "void *", - "name": "payload", - "comments": " Opaque value for the free function. Do not read or write " } ], "used": { @@ -28111,8 +26411,8 @@ "type": "struct", "value": "git_config_iterator", "file": "git2/config.h", - "line": 89, - "lineto": 89, + "line": 127, + "lineto": 127, "tdef": "typedef", "description": " An opaque structure for a configuration iterator", "comments": "", @@ -28137,17 +26437,18 @@ "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": 42, + "lineto": 74, + "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 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", @@ -28179,11 +26480,17 @@ "comments": "Repository specific configuration file; $WORK_DIR/.git/config on\n non-bare repos
\n", "value": 5 }, + { + "type": "int", + "name": "GIT_CONFIG_LEVEL_WORKTREE", + "comments": "Worktree specific configuration file; $GIT_DIR/config.worktree
\n", + "value": 6 + }, { "type": "int", "name": "GIT_CONFIG_LEVEL_APP", "comments": "Application specific configuration file; freely defined by applications
\n", - "value": 6 + "value": 7 }, { "type": "int", @@ -28194,10 +26501,7 @@ ], "used": { "returns": [], - "needs": [ - "git_config_add_file_ondisk", - "git_config_open_level" - ] + "needs": ["git_config_add_file_ondisk", "git_config_open_level"] } } ], @@ -28212,35 +26516,20 @@ "type": "struct", "value": "git_configmap", "file": "git2/config.h", - "line": 104, - "lineto": 108, + "line": 142, + "lineto": 146, "block": "git_configmap_t type\nconst char * str_match\nint map_value", "tdef": "typedef", "description": " Mapping from config variables to values.", "comments": "", "fields": [ - { - "type": "git_configmap_t", - "name": "type", - "comments": "" - }, - { - "type": "const char *", - "name": "str_match", - "comments": "" - }, - { - "type": "int", - "name": "map_value", - "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_config_get_mapped", - "git_config_lookup_map_value" - ] + "needs": ["git_config_get_mapped", "git_config_lookup_map_value"] } } ], @@ -28255,8 +26544,8 @@ ], "type": "enum", "file": "git2/config.h", - "line": 94, - "lineto": 99, + "line": 132, + "lineto": 137, "block": "GIT_CONFIGMAP_FALSE\nGIT_CONFIGMAP_TRUE\nGIT_CONFIGMAP_INT32\nGIT_CONFIGMAP_STRING", "tdef": "typedef", "description": " Config var type", @@ -28287,19 +26576,16 @@ "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cred", + "git_credential", { - "decl": "git_cred", + "decl": "git_credential", "type": "struct", - "value": "git_cred", - "file": "git2/cred.h", + "value": "git_credential", + "file": "git2/credential.h", "line": 84, "lineto": 84, "tdef": "typedef", @@ -28308,66 +26594,60 @@ "used": { "returns": [], "needs": [ - "git_cred_acquire_cb", - "git_cred_default_new", - "git_cred_free", - "git_cred_get_username", - "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_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_default", + "git_credential_default", { - "decl": "git_cred_default", + "decl": "git_credential_default", "type": "struct", - "value": "git_cred_default", - "file": "git2/cred.h", + "value": "git_credential_default", + "file": "git2/credential.h", "line": 92, "lineto": 92, "tdef": "typedef", "description": " A key for NTLM/Kerberos \"default\" credentials ", "comments": "", - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cred_ssh_custom", + "git_credential_ssh_custom", { - "decl": "git_cred_ssh_custom", + "decl": "git_credential_ssh_custom", "type": "struct", - "value": "git_cred_ssh_custom", - "file": "git2/cred.h", + "value": "git_credential_ssh_custom", + "file": "git2/credential.h", "line": 107, "lineto": 107, "tdef": "typedef", "description": " A key with a custom signature function", "comments": "", - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ - "git_cred_ssh_interactive", + "git_credential_ssh_interactive", { - "decl": "git_cred_ssh_interactive", + "decl": "git_credential_ssh_interactive", "type": "struct", - "value": "git_cred_ssh_interactive", - "file": "git2/cred.h", + "value": "git_credential_ssh_interactive", + "file": "git2/credential.h", "line": 102, "lineto": 102, "tdef": "typedef", @@ -28375,150 +26655,125 @@ "comments": "", "used": { "returns": [], - "needs": [ - "git_cred_ssh_interactive_new" - ] + "needs": ["git_credential_ssh_interactive_new"] } } ], [ - "git_cred_ssh_key", + "git_credential_ssh_key", { - "decl": "git_cred_ssh_key", + "decl": "git_credential_ssh_key", "type": "struct", - "value": "git_cred_ssh_key", - "file": "git2/cred.h", + "value": "git_credential_ssh_key", + "file": "git2/credential.h", "line": 97, "lineto": 97, "tdef": "typedef", "description": " A ssh key from disk", "comments": "", - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_cred_username", - { - "decl": "git_cred_username", - "type": "struct", - "value": "git_cred_username", - "file": "git2/cred.h", - "line": 89, - "lineto": 89, - "tdef": "typedef", - "description": " Username-only credential information ", - "comments": "", - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_cred_userpass_payload", - { - "decl": [ - "const char * username", - "const char * password" - ], - "type": "struct", - "value": "git_cred_userpass_payload", - "file": "git2/cred_helpers.h", - "line": 24, - "lineto": 27, - "block": "const char * username\nconst char * password", - "tdef": "typedef", - "description": " Payload for git_cred_stock_userpass_plaintext.", - "comments": "", - "fields": [ - { - "type": "const char *", - "name": "username", - "comments": "" - }, - { - "type": "const 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/cred.h", + "file": "git2/credential.h", "line": 27, "lineto": 79, - "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", + "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 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_credential_username", + { + "decl": "git_credential_username", + "type": "struct", + "value": "git_credential_username", + "file": "git2/credential.h", + "line": 89, + "lineto": 89, + "tdef": "typedef", + "description": " Username-only credential information ", + "comments": "", + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_credential_userpass_payload", + { + "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": " Payload for git_credential_userpass_plaintext.", + "comments": "", + "fields": [ + { "type": "const char *", "name": "username", "comments": "" }, + { "type": "const char *", "name": "password", "comments": "" } + ], + "used": { "returns": [], "needs": [] } } ], [ @@ -28539,8 +26794,8 @@ ], "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?", @@ -28615,10 +26870,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_num_deltas_of_type", - "git_diff_status_char" - ] + "needs": ["git_diff_num_deltas_of_type", "git_diff_status_char"] } } ], @@ -28641,11 +26893,7 @@ "description": " Describe format options structure", "comments": "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 use git_describe_options_init
.
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 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\nThe id
is the git_oid
of the item. If the entry represents an absent side of a diff (e.g. the old_file
of a GIT_DELTA_ADDED
delta), then the oid will be zeroes.
path
is the NUL-terminated path to the entry relative to the working directory of the repository.
size
is the size of the entry in bytes.
flags
is a combination of the git_diff_flag_t
types
mode
is, roughly, the stat() st_mode
value for the item. This will be restricted to one of the git_filemode_t
values.
The id_abbrev
represents the known length of the id
field, when converted to a hex string. It is generally GIT_OID_HEXSZ
, unless this delta was created from reading a patch file, in which case it may be abbreviated to something reasonable, like 7 characters.
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_object_size_t", "name": "size", - "comments": "" + "comments": " The size of the entry in bytes." }, { "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " A combination of the `git_diff_flag_t` types" }, { "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": "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": { @@ -29156,18 +27373,14 @@ "type": "struct", "value": "git_diff_find_options", "file": "git2/diff.h", - "line": 718, - "lineto": 772, + "line": 749, + "lineto": 803, "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": " 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": "uint32_t", "name": "flags", @@ -29191,12 +27404,12 @@ { "type": "uint16_t", "name": "break_rewrite_threshold", - "comments": " Treshold 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." + "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 *", @@ -29206,10 +27419,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_find_options_init", - "git_diff_find_similar" - ] + "needs": ["git_diff_find_options_init", "git_diff_find_similar"] } } ], @@ -29236,8 +27446,8 @@ ], "type": "enum", "file": "git2/diff.h", - "line": 627, - "lineto": 696, + "line": 658, + "lineto": 727, "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.", @@ -29340,10 +27550,7 @@ "value": 65536 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -29353,13 +27560,14 @@ "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
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": [] } } ], [ @@ -29403,9 +27614,9 @@ "GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER" ], "type": "enum", - "file": "git2/diff.h", - "line": 1367, - "lineto": 1374, + "file": "git2/deprecated.h", + "line": 311, + "lineto": 318, "block": "GIT_DIFF_FORMAT_EMAIL_NONE\nGIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER", "tdef": "typedef", "description": " Formatting options for diff e-mail generation", @@ -29424,10 +27635,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -29445,19 +27653,15 @@ ], "type": "struct", "value": "git_diff_format_email_options", - "file": "git2/diff.h", - "line": 1379, - "lineto": 1402, + "file": "git2/deprecated.h", + "line": 323, + "lineto": 346, "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": "uint32_t", "name": "flags", @@ -29516,8 +27720,8 @@ ], "type": "enum", "file": "git2/diff.h", - "line": 1090, - "lineto": 1097, + "line": 1128, + "lineto": 1135, "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", @@ -29562,10 +27766,7 @@ ], "used": { "returns": [], - "needs": [ - "git_diff_print", - "git_diff_to_buf" - ] + "needs": ["git_diff_print", "git_diff_to_buf"] } } ], @@ -29583,8 +27784,8 @@ "type": "struct", "value": "git_diff_hunk", "file": "git2/diff.h", - "line": 545, - "lineto": 552, + "line": 576, + "lineto": 583, "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.", @@ -29651,8 +27852,8 @@ "type": "struct", "value": "git_diff_line", "file": "git2/diff.h", - "line": 600, - "lineto": 608, + "line": 631, + "lineto": 639, "block": "char origin\nint old_lineno\nint new_lineno\nint num_lines\nsize_t content_len\ngit_off_t content_offset\nconst char * content", "tdef": "typedef", "description": " Structure describing a line (or data span) of a diff.", @@ -29725,8 +27926,8 @@ ], "type": "enum", "file": "git2/diff.h", - "line": 571, - "lineto": 587, + "line": 602, + "lineto": 618, "block": "GIT_DIFF_LINE_CONTEXT\nGIT_DIFF_LINE_ADDITION\nGIT_DIFF_LINE_DELETION\nGIT_DIFF_LINE_CONTEXT_EOFNL\nGIT_DIFF_LINE_ADD_EOFNL\nGIT_DIFF_LINE_DEL_EOFNL\nGIT_DIFF_LINE_FILE_HDR\nGIT_DIFF_LINE_HUNK_HDR\nGIT_DIFF_LINE_BINARY", "tdef": "typedef", "description": " Line origin constants.", @@ -29787,10 +27988,7 @@ "value": 66 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -29817,6 +28015,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", @@ -29831,8 +28030,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": "", @@ -29957,6 +28156,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", @@ -30018,10 +28223,7 @@ "value": 1073741824 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -30037,6 +28239,7 @@ "void * payload", "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", @@ -30045,9 +28248,9 @@ "type": "struct", "value": "git_diff_options", "file": "git2/diff.h", - "line": 361, - "lineto": 433, - "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\nuint16_t id_abbrev\ngit_off_t max_size\nconst char * old_prefix\nconst char * new_prefix", + "line": 376, + "lineto": 464, + "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": " 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", @@ -30097,6 +28300,11 @@ "name": "interhunk_lines", "comments": " The maximum number of unchanged lines between hunk boundaries before\n the hunks will be merged into one. Defaults to 0." }, + { + "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", @@ -30140,33 +28348,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_parse_options", + "file": "git2/diff.h", + "line": 1294, + "lineto": 1297, + "block": "unsigned int version\ngit_oid_t oid_type", + "tdef": "typedef", + "description": " Options for parsing a diff / patch file.", + "comments": "", + "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, + { "type": "git_oid_t", "name": "oid_type", "comments": "" } ], + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_diff_patchid_options", + { + "decl": ["unsigned int version"], "type": "struct", "value": "git_diff_patchid_options", "file": "git2/diff.h", - "line": 1464, - "lineto": 1466, + "line": 1431, + "lineto": 1433, "block": "unsigned int version", "tdef": "typedef", "description": " Patch ID options structure", "comments": "Initialize with GIT_PATCHID_OPTIONS_INIT
. Alternatively, you can use git_diff_patchid_options_init
.
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": [ - "char * message", - "int klass" + "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_error", - "file": "git2/errors.h", - "line": 69, + "value": "git_email_create_options", + "file": "git2/email.h", + "line": 44, "lineto": 72, - "block": "char * message\nint klass", + "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": " 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 library was build, otherwise one is kept globally for the library
\n", + "description": " Options for controlling the formatting of the generated e-mail.", + "comments": "", "fields": [ + { "type": "unsigned int", "name": "version", "comments": "" }, { - "type": "char *", - "name": "message", - "comments": "" + "type": "uint32_t", + "name": "flags", + "comments": " see `git_email_create_flags_t` above " }, { - "type": "int", - "name": "klass", - "comments": "" + "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": [ - "git_error_last", - "giterr_last" - ], - "needs": [] + "returns": [], + "needs": [ + "git_email_create_from_commit", + "git_email_create_from_diff" + ] } } ], + [ + "git_error", + { + "decl": ["char * message", "int klass"], + "type": "struct", + "value": "git_error", + "file": "git2/errors.h", + "line": 74, + "lineto": 77, + "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 library was build, otherwise one is kept globally for the library
\n", + "fields": [ + { "type": "char *", "name": "message", "comments": "" }, + { "type": "int", "name": "klass", "comments": "" } + ], + "used": { "returns": ["git_error_last", "giterr_last"], "needs": [] } + } + ], [ "git_error_code", { @@ -30414,13 +28706,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": 66, + "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": "", @@ -30604,12 +28901,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": [] } } ], [ @@ -30649,13 +28973,16 @@ "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": 80, + "lineto": 118, + "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 ", "comments": "", @@ -30672,12 +28999,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", @@ -30860,15 +29182,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": [] } } ], [ @@ -30882,8 +29219,8 @@ ], "type": "enum", "file": "git2/common.h", - "line": 127, - "lineto": 150, + "line": 134, + "lineto": 157, "block": "GIT_FEATURE_THREADS\nGIT_FEATURE_HTTPS\nGIT_FEATURE_SSH\nGIT_FEATURE_NSEC", "tdef": "typedef", "description": " Combinations of these values describe the features with which libgit2\n was compiled", @@ -30914,10 +29251,36 @@ "value": 8 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } + } + ], + [ + "git_fetch_depth_t", + { + "decl": ["GIT_FETCH_DEPTH_FULL", "GIT_FETCH_DEPTH_UNSHALLOW"], + "type": "enum", + "file": "git2/remote.h", + "line": 717, + "lineto": 723, + "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": [] } } ], [ @@ -30927,26 +29290,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": 652, - "lineto": 689, - "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": 733, + "lineto": 785, + "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 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",
@@ -30958,9 +29319,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",
@@ -30972,6 +29333,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",
@@ -30998,8 +29369,8 @@
],
"type": "enum",
"file": "git2/remote.h",
- "line": 604,
- "lineto": 617,
+ "line": 676,
+ "lineto": 689,
"block": "GIT_FETCH_PRUNE_UNSPECIFIED\nGIT_FETCH_PRUNE\nGIT_FETCH_NO_PRUNE",
"tdef": "typedef",
"description": " Acceptable prune settings when fetching ",
@@ -31024,10 +29395,7 @@
"value": 2
}
],
- "used": {
- "returns": [],
- "needs": []
- }
+ "used": { "returns": [], "needs": [] }
}
],
[
@@ -31043,8 +29411,8 @@
],
"type": "enum",
"file": "git2/types.h",
- "line": 213,
- "lineto": 220,
+ "line": 222,
+ "lineto": 229,
"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. ",
@@ -31088,13 +29456,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"]
}
}
],
@@ -31105,8 +29468,8 @@
"type": "struct",
"value": "git_filter",
"file": "git2/filter.h",
- "line": 69,
- "lineto": 69,
+ "line": 100,
+ "lineto": 100,
"tdef": "typedef",
"description": " A filter that can transform file data",
"comments": "This 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\nLoad 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 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", @@ -31191,12 +29561,15 @@ "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_load", + "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" ] @@ -31248,12 +29621,45 @@ ], "used": { "returns": [], - "needs": [ - "git_filter_list_load" - ] + "needs": ["git_filter_list_load", "git_filter_list_load_ext"] } } ], + [ + "git_filter_options", + { + "decl": [ + "unsigned int version", + "uint32_t flags", + "git_oid * commit_id", + "git_oid attr_commit_id" + ], + "type": "struct", + "value": "git_filter_options", + "file": "git2/filter.h", + "line": 63, + "lineto": 80, + "block": "unsigned int version\nuint32_t flags\ngit_oid * commit_id\ngit_oid attr_commit_id", + "tdef": "typedef", + "description": " Filtering options", + "comments": "", + "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_filter_source", { @@ -31266,10 +29672,7 @@ "tdef": "typedef", "description": " A filter source represents a file/blob to be processed", "comments": "", - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31315,10 +29718,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31328,8 +29728,8 @@ "type": "struct", "value": "git_index", "file": "git2/types.h", - "line": 139, - "lineto": 139, + "line": 148, + "lineto": 148, "tdef": "typedef", "description": " Memory representation of an index file. ", "comments": "", @@ -31372,8 +29772,6 @@ "git_index_iterator_free", "git_index_iterator_new", "git_index_iterator_next", - "git_index_new", - "git_index_open", "git_index_owner", "git_index_path", "git_index_read", @@ -31393,6 +29791,7 @@ "git_indexer_commit", "git_indexer_free", "git_indexer_hash", + "git_indexer_name", "git_indexer_new", "git_indexer_options_init", "git_indexer_progress_cb", @@ -31452,10 +29851,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31501,10 +29897,7 @@ "value": -1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31514,8 +29907,8 @@ "type": "struct", "value": "git_index_conflict_iterator", "file": "git2/types.h", - "line": 145, - "lineto": 145, + "line": 154, + "lineto": 154, "tdef": "typedef", "description": " An iterator for conflicts in the index. ", "comments": "", @@ -31556,72 +29949,21 @@ "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": "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": "" - } + { "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" - ], + "returns": ["git_index_get_byindex", "git_index_get_bypath"], "needs": [ "git_index_add", "git_index_add_from_buffer", @@ -31679,19 +30021,13 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_index_entry_flag_t", { - "decl": [ - "GIT_INDEX_ENTRY_EXTENDED", - "GIT_INDEX_ENTRY_VALID" - ], + "decl": ["GIT_INDEX_ENTRY_EXTENDED", "GIT_INDEX_ENTRY_VALID"], "type": "enum", "file": "git2/index.h", "line": 87, @@ -31714,10 +30050,7 @@ "value": 32768 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31727,8 +30060,8 @@ "type": "struct", "value": "git_index_iterator", "file": "git2/types.h", - "line": 142, - "lineto": 142, + "line": 151, + "lineto": 151, "tdef": "typedef", "description": " An iterator for entries in the index. ", "comments": "", @@ -31792,19 +30125,13 @@ "value": 3 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_index_time", { - "decl": [ - "int32_t seconds", - "uint32_t nanoseconds" - ], + "decl": ["int32_t seconds", "uint32_t nanoseconds"], "type": "struct", "value": "git_index_time", "file": "git2/index.h", @@ -31815,21 +30142,10 @@ "description": " Time structure used in a git index entry ", "comments": "", "fields": [ - { - "type": "int32_t", - "name": "seconds", - "comments": "" - }, - { - "type": "uint32_t", - "name": "nanoseconds", - "comments": "" - } + { "type": "int32_t", "name": "seconds", "comments": "" }, + { "type": "uint32_t", "name": "nanoseconds", "comments": "" } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -31845,14 +30161,13 @@ "description": " A git indexer object ", "comments": "", "used": { - "returns": [ - "git_remote_stats" - ], + "returns": ["git_remote_stats"], "needs": [ "git_indexer_append", "git_indexer_commit", "git_indexer_free", "git_indexer_hash", + "git_indexer_name", "git_indexer_new", "git_indexer_options_init", "git_indexer_progress_cb", @@ -31875,17 +30190,13 @@ "value": "git_indexer_options", "file": "git2/indexer.h", "line": 62, - "lineto": 72, + "lineto": 86, "block": "unsigned int version\ngit_indexer_progress_cb progress_cb\nvoid * progress_cb_payload\nunsigned char verify", "tdef": "typedef", "description": " Options for indexer configuration", "comments": "", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "git_indexer_progress_cb", "name": "progress_cb", @@ -31904,10 +30215,7 @@ ], "used": { "returns": [], - "needs": [ - "git_indexer_new", - "git_indexer_options_init" - ] + "needs": ["git_indexer_new", "git_indexer_options_init"] } } ], @@ -31970,9 +30278,7 @@ } ], "used": { - "returns": [ - "git_remote_stats" - ], + "returns": ["git_remote_stats"], "needs": [ "git_indexer_append", "git_indexer_commit", @@ -32014,13 +30320,30 @@ "GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY", "GIT_OPT_GET_PACK_MAX_OBJECTS", "GIT_OPT_SET_PACK_MAX_OBJECTS", - "GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS" + "GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS", + "GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE", + "GIT_OPT_GET_MWINDOW_FILE_LIMIT", + "GIT_OPT_SET_MWINDOW_FILE_LIMIT", + "GIT_OPT_SET_ODB_PACKED_PRIORITY", + "GIT_OPT_SET_ODB_LOOSE_PRIORITY", + "GIT_OPT_GET_EXTENSIONS", + "GIT_OPT_SET_EXTENSIONS", + "GIT_OPT_GET_OWNER_VALIDATION", + "GIT_OPT_SET_OWNER_VALIDATION", + "GIT_OPT_GET_HOMEDIR", + "GIT_OPT_SET_HOMEDIR", + "GIT_OPT_SET_SERVER_CONNECT_TIMEOUT", + "GIT_OPT_GET_SERVER_CONNECT_TIMEOUT", + "GIT_OPT_SET_SERVER_TIMEOUT", + "GIT_OPT_GET_SERVER_TIMEOUT", + "GIT_OPT_SET_USER_AGENT_PRODUCT", + "GIT_OPT_GET_USER_AGENT_PRODUCT" ], "type": "enum", "file": "git2/common.h", - "line": 178, - "lineto": 207, - "block": "GIT_OPT_GET_MWINDOW_SIZE\nGIT_OPT_SET_MWINDOW_SIZE\nGIT_OPT_GET_MWINDOW_MAPPED_LIMIT\nGIT_OPT_SET_MWINDOW_MAPPED_LIMIT\nGIT_OPT_GET_SEARCH_PATH\nGIT_OPT_SET_SEARCH_PATH\nGIT_OPT_SET_CACHE_OBJECT_LIMIT\nGIT_OPT_SET_CACHE_MAX_SIZE\nGIT_OPT_ENABLE_CACHING\nGIT_OPT_GET_CACHED_MEMORY\nGIT_OPT_GET_TEMPLATE_PATH\nGIT_OPT_SET_TEMPLATE_PATH\nGIT_OPT_SET_SSL_CERT_LOCATIONS\nGIT_OPT_SET_USER_AGENT\nGIT_OPT_ENABLE_STRICT_OBJECT_CREATION\nGIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION\nGIT_OPT_SET_SSL_CIPHERS\nGIT_OPT_GET_USER_AGENT\nGIT_OPT_ENABLE_OFS_DELTA\nGIT_OPT_ENABLE_FSYNC_GITDIR\nGIT_OPT_GET_WINDOWS_SHAREMODE\nGIT_OPT_SET_WINDOWS_SHAREMODE\nGIT_OPT_ENABLE_STRICT_HASH_VERIFICATION\nGIT_OPT_SET_ALLOCATOR\nGIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY\nGIT_OPT_GET_PACK_MAX_OBJECTS\nGIT_OPT_SET_PACK_MAX_OBJECTS\nGIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS", + "line": 188, + "lineto": 234, + "block": "GIT_OPT_GET_MWINDOW_SIZE\nGIT_OPT_SET_MWINDOW_SIZE\nGIT_OPT_GET_MWINDOW_MAPPED_LIMIT\nGIT_OPT_SET_MWINDOW_MAPPED_LIMIT\nGIT_OPT_GET_SEARCH_PATH\nGIT_OPT_SET_SEARCH_PATH\nGIT_OPT_SET_CACHE_OBJECT_LIMIT\nGIT_OPT_SET_CACHE_MAX_SIZE\nGIT_OPT_ENABLE_CACHING\nGIT_OPT_GET_CACHED_MEMORY\nGIT_OPT_GET_TEMPLATE_PATH\nGIT_OPT_SET_TEMPLATE_PATH\nGIT_OPT_SET_SSL_CERT_LOCATIONS\nGIT_OPT_SET_USER_AGENT\nGIT_OPT_ENABLE_STRICT_OBJECT_CREATION\nGIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION\nGIT_OPT_SET_SSL_CIPHERS\nGIT_OPT_GET_USER_AGENT\nGIT_OPT_ENABLE_OFS_DELTA\nGIT_OPT_ENABLE_FSYNC_GITDIR\nGIT_OPT_GET_WINDOWS_SHAREMODE\nGIT_OPT_SET_WINDOWS_SHAREMODE\nGIT_OPT_ENABLE_STRICT_HASH_VERIFICATION\nGIT_OPT_SET_ALLOCATOR\nGIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY\nGIT_OPT_GET_PACK_MAX_OBJECTS\nGIT_OPT_SET_PACK_MAX_OBJECTS\nGIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS\nGIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE\nGIT_OPT_GET_MWINDOW_FILE_LIMIT\nGIT_OPT_SET_MWINDOW_FILE_LIMIT\nGIT_OPT_SET_ODB_PACKED_PRIORITY\nGIT_OPT_SET_ODB_LOOSE_PRIORITY\nGIT_OPT_GET_EXTENSIONS\nGIT_OPT_SET_EXTENSIONS\nGIT_OPT_GET_OWNER_VALIDATION\nGIT_OPT_SET_OWNER_VALIDATION\nGIT_OPT_GET_HOMEDIR\nGIT_OPT_SET_HOMEDIR\nGIT_OPT_SET_SERVER_CONNECT_TIMEOUT\nGIT_OPT_GET_SERVER_CONNECT_TIMEOUT\nGIT_OPT_SET_SERVER_TIMEOUT\nGIT_OPT_GET_SERVER_TIMEOUT\nGIT_OPT_SET_USER_AGENT_PRODUCT\nGIT_OPT_GET_USER_AGENT_PRODUCT", "tdef": "typedef", "description": " Global library options", "comments": "These are used to select which global option to set or get and are used in git_libgit2_opts()
.
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": [] } } ], [ @@ -32458,11 +30882,7 @@ "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", @@ -32486,10 +30906,7 @@ ], "used": { "returns": [], - "needs": [ - "git_merge_file", - "git_merge_file_input_init" - ] + "needs": ["git_merge_file", "git_merge_file_input_init"] } } ], @@ -32508,18 +30925,14 @@ "type": "struct", "value": "git_merge_file_options", "file": "git2/merge.h", - "line": 170, - "lineto": 200, + "line": 188, + "lineto": 218, "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", @@ -32574,8 +30987,8 @@ "type": "struct", "value": "git_merge_file_result", "file": "git2/merge.h", - "line": 220, - "lineto": 241, + "line": 238, + "lineto": 259, "block": "unsigned int automergeable\nconst char * path\nunsigned int mode\nconst char * ptr\nsize_t len", "tdef": "typedef", "description": " Information about file-level merging", @@ -32624,13 +31037,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", + "lineto": 103, + "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": "", @@ -32658,12 +31072,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": [] } } ], [ @@ -32683,18 +31100,14 @@ "type": "struct", "value": "git_merge_options", "file": "git2/merge.h", - "line": 246, - "lineto": 295, + "line": 264, + "lineto": 313, "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": "uint32_t", "name": "flags", @@ -32759,8 +31172,8 @@ ], "type": "enum", "file": "git2/merge.h", - "line": 350, - "lineto": 368, + "line": 368, + "lineto": 386, "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.", @@ -32787,20 +31200,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", @@ -32811,23 +31218,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"] } } ], @@ -32854,26 +31250,30 @@ "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": 100, + "lineto": 100, + "tdef": "typedef", + "description": " a writer for multi-pack-index files. ", + "comments": "", + "used": { "returns": [], "needs": [] } + } + ], [ "git_note", { @@ -32881,8 +31281,8 @@ "type": "struct", "value": "git_note", "file": "git2/types.h", - "line": 160, - "lineto": 160, + "line": 169, + "lineto": 169, "tdef": "typedef", "description": " Representation of a git note ", "comments": "", @@ -32935,8 +31335,8 @@ "type": "struct", "value": "git_object", "file": "git2/types.h", - "line": 115, - "lineto": 115, + "line": 124, + "lineto": 124, "tdef": "typedef", "description": " Representation of a generic object in a repository ", "comments": "", @@ -32961,12 +31361,11 @@ "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", "git_object_typeisloose", - "git_odb_hash", - "git_odb_hashfile", "git_odb_open_rstream", "git_odb_open_wstream", "git_odb_read_header", @@ -33072,10 +31471,9 @@ "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", - "git_odb_hashfile", "git_odb_open_rstream", "git_odb_open_wstream", "git_odb_read_header", @@ -33105,16 +31503,13 @@ "git_odb_add_alternate", "git_odb_add_backend", "git_odb_add_disk_alternate", - "git_odb_backend_loose", - "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_new", "git_odb_num_backends", "git_odb_object_data", "git_odb_object_dup", @@ -33122,21 +31517,21 @@ "git_odb_object_id", "git_odb_object_size", "git_odb_object_type", - "git_odb_open", "git_odb_open_rstream", "git_odb_open_wstream", "git_odb_read", "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_wrap_odb" + "git_repository_odb" ] } } @@ -33158,27 +31553,103 @@ "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_expand_id", + "git_odb_backend_loose_options", { "decl": [ - "git_oid id", - "unsigned short length", - "git_object_t type" + "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": 93, + "lineto": 119, + "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": " version for the struct " + }, + { + "type": "uint32_t", + "name": "flags", + "comments": " A combination of the `git_odb_backend_loose_flag_t` types. " + }, + { + "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": "unsigned int", + "name": "dir_mode", + "comments": " Permissions to use creating a directory or 0 for defaults " + }, + { + "type": "unsigned int", + "name": "file_mode", + "comments": " Permissions to use creating a file or 0 for defaults " + }, + { + "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": 28, + "lineto": 36, + "block": "unsigned int version\ngit_oid_t oid_type", + "tdef": "typedef", + "description": " Options for configuring a packfile object backend. ", + "comments": "", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": " version for the struct " + }, + { + "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_expand_id", + { + "decl": ["git_oid id", "unsigned short length", "git_object_t type"], "type": "struct", "value": "git_odb_expand_id", "file": "git2/odb.h", - "line": 181, - "lineto": 196, + "line": 230, + "lineto": 245, "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.", @@ -33200,12 +31671,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", @@ -33590,22 +32087,15 @@ "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" ] } @@ -33618,8 +32108,8 @@ "type": "struct", "value": "git_packbuilder", "file": "git2/types.h", - "line": 163, - "lineto": 163, + "line": 172, + "lineto": 172, "tdef": "typedef", "description": " Representation of a git packbuilder ", "comments": "", @@ -33634,6 +32124,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", @@ -33674,10 +32165,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -33706,6 +32194,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" @@ -33716,11 +32205,7 @@ [ "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, @@ -33749,10 +32234,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -33851,10 +32333,7 @@ "value": 32 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -33893,7 +32372,7 @@ "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" ], @@ -33902,16 +32381,12 @@ "file": "git2/proxy.h", "line": 44, "lineto": 79, - "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", + "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 and compilation options.
\n", "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, + { "type": "unsigned int", "name": "version", "comments": "" }, { "type": "git_proxy_t", "name": "type", @@ -33923,7 +32398,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." }, @@ -33940,21 +32415,14 @@ ], "used": { "returns": [], - "needs": [ - "git_proxy_options_init", - "git_remote_connect" - ] + "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": 20, @@ -33983,10 +32451,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -33996,8 +32461,8 @@ "type": "struct", "value": "git_push", "file": "git2/types.h", - "line": 244, - "lineto": 244, + "line": 253, + "lineto": 253, "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": "", @@ -34020,23 +32485,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": 713, - "lineto": 740, - "block": "unsigned int version\nunsigned int pb_parallelism\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", + "line": 814, + "lineto": 853, + "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", @@ -34052,10 +32515,20 @@ "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": { @@ -34080,8 +32553,8 @@ "type": "struct", "value": "git_push_update", "file": "git2/remote.h", - "line": 434, - "lineto": 451, + "line": 479, + "lineto": 496, "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", @@ -34108,12 +32581,7 @@ "comments": " The new target for the reference" } ], - "used": { - "returns": [], - "needs": [ - "git_push_negotiation" - ] - } + "used": { "returns": [], "needs": ["git_push_negotiation"] } } ], [ @@ -34123,15 +32591,13 @@ "type": "struct", "value": "git_rebase", "file": "git2/types.h", - "line": 195, - "lineto": 195, + "line": 204, + "lineto": 204, "tdef": "typedef", "description": " Representation of a rebase ", "comments": "", "used": { - "returns": [ - "git_rebase_operation_byindex" - ], + "returns": ["git_rebase_operation_byindex"], "needs": [ "git_rebase_abort", "git_rebase_commit", @@ -34164,8 +32630,8 @@ "type": "struct", "value": "git_rebase_operation", "file": "git2/rebase.h", - "line": 148, - "lineto": 163, + "line": 172, + "lineto": 187, "block": "git_rebase_operation_t type\nconst git_oid id\nconst char * exec", "tdef": "typedef", "description": " A rebase operation", @@ -34188,12 +32654,8 @@ } ], "used": { - "returns": [ - "git_rebase_operation_byindex" - ], - "needs": [ - "git_rebase_next" - ] + "returns": ["git_rebase_operation_byindex"], + "needs": ["git_rebase_next"] } } ], @@ -34210,8 +32672,8 @@ ], "type": "enum", "file": "git2/rebase.h", - "line": 96, - "lineto": 132, + "line": 120, + "lineto": 156, "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`.", @@ -34254,10 +32716,7 @@ "value": 5 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34270,24 +32729,21 @@ "const char * rewrite_notes_ref", "git_merge_options merge_options", "git_checkout_options checkout_options", - "git_commit_signing_cb signing_cb", + "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": 32, - "lineto": 91, - "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_signing_cb signing_cb\nvoid * payload", + "lineto": 115, + "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", @@ -34314,9 +32770,14 @@ "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." }, { - "type": "git_commit_signing_cb", + "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 This field is only used when performing git_rebase_commit." + "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 *", @@ -34341,8 +32802,8 @@ "type": "struct", "value": "git_refdb", "file": "git2/types.h", - "line": 100, - "lineto": 100, + "line": 103, + "lineto": 103, "tdef": "typedef", "description": " An open refs database handle. ", "comments": "", @@ -34365,15 +32826,12 @@ "type": "struct", "value": "git_refdb_backend", "file": "git2/types.h", - "line": 103, - "lineto": 103, + "line": 106, + "lineto": 106, "tdef": "typedef", "description": " A custom backend for refs ", "comments": "", - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34383,15 +32841,13 @@ "type": "struct", "value": "git_reference", "file": "git2/types.h", - "line": 180, - "lineto": 180, + "line": 189, + "lineto": 189, "tdef": "typedef", "description": " In-memory representation of a reference. ", "comments": "", "used": { - "returns": [ - "git_reference_type" - ], + "returns": ["git_reference_type"], "needs": [ "git_annotated_commit_from_ref", "git_branch_create", @@ -34459,8 +32915,8 @@ ], "type": "enum", "file": "git2/refs.h", - "line": 658, - "lineto": 687, + "line": 661, + "lineto": 690, "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", @@ -34491,10 +32947,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -34504,8 +32957,8 @@ "type": "struct", "value": "git_reference_iterator", "file": "git2/types.h", - "line": 183, - "lineto": 183, + "line": 192, + "lineto": 192, "tdef": "typedef", "description": " Iterator for references ", "comments": "", @@ -34532,8 +32985,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 198, - "lineto": 203, + "line": 207, + "lineto": 212, "block": "GIT_REFERENCE_INVALID\nGIT_REFERENCE_DIRECT\nGIT_REFERENCE_SYMBOLIC\nGIT_REFERENCE_ALL", "tdef": "typedef", "description": " Basic type of any Git reference. ", @@ -34564,12 +33017,7 @@ "value": 3 } ], - "used": { - "returns": [ - "git_reference_type" - ], - "needs": [] - } + "used": { "returns": ["git_reference_type"], "needs": [] } } ], [ @@ -34579,15 +33027,13 @@ "type": "struct", "value": "git_reflog", "file": "git2/types.h", - "line": 157, - "lineto": 157, + "line": 166, + "lineto": 166, "tdef": "typedef", "description": " Representation of a reference log ", "comments": "", "used": { - "returns": [ - "git_reflog_entry_byindex" - ], + "returns": ["git_reflog_entry_byindex"], "needs": [ "git_reflog_append", "git_reflog_drop", @@ -34612,15 +33058,13 @@ "type": "struct", "value": "git_reflog_entry", "file": "git2/types.h", - "line": 154, - "lineto": 154, + "line": 163, + "lineto": 163, "tdef": "typedef", "description": " Representation of a reference log entry ", "comments": "", "used": { - "returns": [ - "git_reflog_entry_byindex" - ], + "returns": ["git_reflog_entry_byindex"], "needs": [ "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -34637,15 +33081,13 @@ "type": "struct", "value": "git_refspec", "file": "git2/types.h", - "line": 226, - "lineto": 226, + "line": 235, + "lineto": 235, "tdef": "typedef", "description": " A refspec specifies the mapping between remote and local reference\n names when fetch or pushing.", "comments": "", "used": { - "returns": [ - "git_remote_get_refspec" - ], + "returns": ["git_remote_get_refspec"], "needs": [ "git_refspec_direction", "git_refspec_dst", @@ -34669,19 +33111,19 @@ "type": "struct", "value": "git_remote", "file": "git2/types.h", - "line": 232, - "lineto": 232, + "line": 241, + "lineto": 241, "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": "", "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", @@ -34708,8 +33150,11 @@ "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", @@ -34731,8 +33176,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 624, - "lineto": 642, + "line": 696, + "lineto": 714, "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", @@ -34764,13 +33209,8 @@ } ], "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"] } } ], @@ -34781,7 +33221,7 @@ "unsigned int version", "git_transport_message_cb sideband_progress", "int (*)(git_remote_completion_t, void *) completion", - "git_cred_acquire_cb credentials", + "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", @@ -34790,15 +33230,16 @@ "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" ], "type": "struct", "value": "git_remote_callbacks", "file": "git2/remote.h", - "line": 497, - "lineto": 586, - "block": "unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_t, void *) completion\ngit_cred_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\nvoid * payload\ngit_url_resolve_cb resolve_url", + "line": 557, + "lineto": 658, + "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", "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", @@ -34819,7 +33260,7 @@ "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." }, @@ -34863,6 +33304,11 @@ "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", @@ -34871,7 +33317,7 @@ { "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." + "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." } ], "used": { @@ -34895,8 +33341,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 418, - "lineto": 422, + "line": 463, + "lineto": 467, "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.", @@ -34921,9 +33367,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": 879, + "lineto": 897, + "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 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": [] } } ], [ @@ -35079,8 +33612,8 @@ "type": "struct", "value": "git_repository", "file": "git2/types.h", - "line": 109, - "lineto": 109, + "line": 118, + "lineto": 118, "tdef": "typedef", "description": " Representation of an existing git repository,\n including all its object contents", "comments": "", @@ -35090,6 +33623,7 @@ "git_commit_owner", "git_index_owner", "git_object_owner", + "git_patch_owner", "git_reference_owner", "git_remote_owner", "git_revwalk_repository", @@ -35107,14 +33641,16 @@ "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_attr_get_many_ext", "git_blame_file", "git_blob_create_from_buffer", "git_blob_create_from_disk", "git_blob_create_from_stream", "git_blob_create_from_workdir", - "git_blob_create_fromworkdir", "git_blob_lookup", "git_blob_lookup_prefix", "git_branch_create", @@ -35122,6 +33658,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", @@ -35132,6 +33669,7 @@ "git_clone", "git_commit_create", "git_commit_create_buffer", + "git_commit_create_from_stage", "git_commit_create_v", "git_commit_create_with_signature", "git_commit_extract_signature", @@ -35148,9 +33686,11 @@ "git_diff_tree_to_workdir_with_index", "git_filter_list_apply_to_file", "git_filter_list_load", + "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", @@ -35216,6 +33756,7 @@ "git_remote_set_autotag", "git_remote_set_pushurl", "git_remote_set_url", + "git_repository_commit_parents", "git_repository_commondir", "git_repository_config", "git_repository_config_snapshot", @@ -35244,6 +33785,7 @@ "git_repository_message", "git_repository_message_remove", "git_repository_odb", + "git_repository_oid_type", "git_repository_open", "git_repository_open_bare", "git_repository_open_ext", @@ -35259,7 +33801,6 @@ "git_repository_state", "git_repository_state_cleanup", "git_repository_workdir", - "git_repository_wrap_odb", "git_reset", "git_reset_default", "git_reset_from_annotated", @@ -35275,6 +33816,7 @@ "git_stash_foreach", "git_stash_pop", "git_stash_save", + "git_stash_save_with_opts", "git_status_file", "git_status_foreach", "git_status_foreach_ext", @@ -35331,60 +33873,57 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 245, - "lineto": 253, + "line": 236, + "lineto": 282, "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
. 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. Details of individual values are:
init.templatedir
global config if not, or falling back on "/usr/share/git-core/templates" if it exists. * GIT_REPOSITORY_INIT_RELATIVE_GITLINK - If an alternate workdir is specified, use relative paths for the gitdir and core.worktree.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": [] } } ], [ @@ -35397,36 +33936,33 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 268, - "lineto": 272, + "line": 291, + "lineto": 307, "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 either to the custom mode that you would like, or to one of the 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": [] } } ], [ @@ -35445,52 +33981,48 @@ "type": "struct", "value": "git_repository_init_options", "file": "git2/repository.h", - "line": 302, - "lineto": 311, + "line": 315, + "lineto": 374, "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": " Extended options structure for `git_repository_init_ext`.", - "comments": "This contains extra options for git_repository_init_ext
that enable additional initialization features. The fields are:
This contains extra options for git_repository_init_ext
that enable additional initialization features.
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": [] } } ], [ @@ -35976,8 +34478,8 @@ "type": "struct", "value": "git_revwalk", "file": "git2/types.h", - "line": 118, - "lineto": 118, + "line": 127, + "lineto": 127, "tdef": "typedef", "description": " Representation of an in-progress walk through the commits in a repo ", "comments": "", @@ -36009,16 +34511,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": 173, - "lineto": 177, + "line": 182, + "lineto": 186, "block": "char * name\nchar * email\ngit_time when", "tdef": "typedef", "description": " An action signature (e.g. for committers, taggers, etc) ", @@ -36055,7 +34553,9 @@ "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", + "git_commit_create_cb", "git_commit_create_v", + "git_email_create_from_diff", "git_mailmap_resolve_signature", "git_note_commit_create", "git_note_commit_remove", @@ -36090,8 +34590,8 @@ ], "type": "enum", "file": "git2/sys/transport.h", - "line": 287, - "lineto": 292, + "line": 313, + "lineto": 318, "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 ", @@ -36122,10 +34622,7 @@ "value": 4 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -36171,23 +34668,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": 129, + "lineto": 136, "block": "GIT_STASH_APPLY_DEFAULT\nGIT_STASH_APPLY_REINSTATE_INDEX", "tdef": "typedef", "description": " Stash application flags. ", @@ -36206,10 +34697,7 @@ "value": 1 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -36225,18 +34713,14 @@ "type": "struct", "value": "git_stash_apply_options", "file": "git2/stash.h", - "line": 126, - "lineto": 138, + "line": 180, + "lineto": 192, "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 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": 81, + "lineto": 95, + "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 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. - GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX indicates that rename detection should be processed between the head and the index and enables the GIT_STATUS_INDEX_RENAMED as a possible status flag. - GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR indicates that rename detection should be run between the index and the working directory and enabled GIT_STATUS_WT_RENAMED as a possible status flag. - GIT_STATUS_OPT_SORT_CASE_SENSITIVELY overrides the native case sensitivity for the file system and forces the output to be in case-sensitive order - GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY overrides the native case sensitivity for the file system and forces the output to be in case-insensitive order - GIT_STATUS_OPT_RENAMES_FROM_REWRITES indicates that rename detection should include rewritten files - GIT_STATUS_OPT_NO_REFRESH bypasses the default status behavior of doing a "soft" index reload (i.e. reloading the index data if the file on disk has been modified outside libgit2). - GIT_STATUS_OPT_UPDATE_INDEX tells libgit2 to refresh the stat cache in the index for files that are unchanged but have out of date stat information in the index. It will result in less work being done on subsequent calls to get status. This is mutually exclusive with the NO_REFRESH option.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.
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": [] } } ], [ @@ -36602,14 +35117,15 @@ "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": 170, - "lineto": 197, - "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": "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 callbacks. With git_status_list_new
, these will control which changes are included in the list.
git status --porcelain
regarding which files are included and in what order. - GIT_STATUS_SHOW_INDEX_ONLY only gives status based on HEAD to index comparison, not looking at working directory changes. - GIT_STATUS_SHOW_WORKDIR_ONLY only gives status based on index to working directory comparison, not comparing the index to the HEAD.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": [] } } ], [ @@ -36805,19 +35323,13 @@ "value": 32768 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ "git_strarray", { - "decl": [ - "char ** strings", - "size_t count" - ], + "decl": ["char ** strings", "size_t count"], "type": "struct", "value": "git_strarray", "file": "git2/strarray.h", @@ -36828,16 +35340,8 @@ "description": " Array of strings ", "comments": "", "fields": [ - { - "type": "char **", - "name": "strings", - "comments": "" - }, - { - "type": "size_t", - "name": "count", - "comments": "" - } + { "type": "char **", "name": "strings", "comments": "" }, + { "type": "size_t", "name": "count", "comments": "" } ], "used": { "returns": [], @@ -36858,6 +35362,7 @@ "git_remote_upload", "git_reset_default", "git_strarray_copy", + "git_strarray_dispose", "git_strarray_free", "git_tag_list", "git_tag_list_match", @@ -36869,14 +35374,11 @@ [ "git_stream_t", { - "decl": [ - "GIT_STREAM_STANDARD", - "GIT_STREAM_TLS" - ], + "decl": ["GIT_STREAM_STANDARD", "GIT_STREAM_TLS"], "type": "enum", "file": "git2/sys/stream.h", - "line": 77, - "lineto": 83, + "line": 91, + "lineto": 97, "block": "GIT_STREAM_STANDARD\nGIT_STREAM_TLS", "tdef": "typedef", "description": " The type of stream to register.", @@ -36895,10 +35397,7 @@ "value": 2 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -36908,8 +35407,8 @@ "type": "struct", "value": "git_submodule", "file": "git2/types.h", - "line": 258, - "lineto": 258, + "line": 267, + "lineto": 267, "tdef": "typedef", "description": " Opaque structure representing a submodule.", "comments": "", @@ -36926,6 +35425,7 @@ "git_submodule_branch", "git_submodule_cb", "git_submodule_clone", + "git_submodule_dup", "git_submodule_fetch_recurse_submodules", "git_submodule_foreach", "git_submodule_free", @@ -36967,8 +35467,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 322, - "lineto": 329, + "line": 331, + "lineto": 338, "block": "GIT_SUBMODULE_IGNORE_UNSPECIFIED\nGIT_SUBMODULE_IGNORE_NONE\nGIT_SUBMODULE_IGNORE_UNTRACKED\nGIT_SUBMODULE_IGNORE_DIRTY\nGIT_SUBMODULE_IGNORE_ALL", "tdef": "typedef", "description": " Submodule ignore values", @@ -37006,13 +35506,8 @@ } ], "used": { - "returns": [ - "git_submodule_ignore" - ], - "needs": [ - "git_submodule_set_ignore", - "git_submodule_status" - ] + "returns": ["git_submodule_ignore"], + "needs": ["git_submodule_set_ignore", "git_submodule_status"] } } ], @@ -37026,8 +35521,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 341, - "lineto": 345, + "line": 350, + "lineto": 354, "block": "GIT_SUBMODULE_RECURSE_NO\nGIT_SUBMODULE_RECURSE_YES\nGIT_SUBMODULE_RECURSE_ONDEMAND", "tdef": "typedef", "description": " Options for submodule recurse.", @@ -37053,12 +35548,8 @@ } ], "used": { - "returns": [ - "git_submodule_fetch_recurse_submodules" - ], - "needs": [ - "git_submodule_set_fetch_recurse_submodules" - ] + "returns": ["git_submodule_fetch_recurse_submodules"], + "needs": ["git_submodule_set_fetch_recurse_submodules"] } } ], @@ -37175,10 +35666,7 @@ "value": 8192 } ], - "used": { - "returns": [], - "needs": [] - } + "used": { "returns": [], "needs": [] } } ], [ @@ -37200,11 +35688,7 @@ "description": " Submodule update options structure", "comments": "Initialize with GIT_SUBMODULE_UPDATE_OPTIONS_INIT
. Alternatively, you can use git_submodule_update_options_init
.
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
.