From 76b3eab6d1aeb02ea96a40e1e9d5cd07c3b8e6f0 Mon Sep 17 00:00:00 2001 From: Rafael Gieschke Date: Wed, 22 Mar 2017 16:00:54 +0100 Subject: [PATCH 001/145] Make TreeUpdate constructible --- generate/input/descriptor.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index f1e26f1df..b9829aa19 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -2593,6 +2593,10 @@ } } }, + "tree_update": { + "hasConstructor": true, + "ignoreInit": true + }, "writestream": { "cType": "git_writestream", "needsForwardDeclaration": false From bb4c0bd9720db7d30132a5fc0512b5e86080b429 Mon Sep 17 00:00:00 2001 From: Rafael Gieschke Date: Wed, 22 Mar 2017 18:38:23 +0100 Subject: [PATCH 002/145] Make Tree#createUpdated accept Array --- generate/input/descriptor.json | 10 ++++++++++ generate/templates/partials/convert_from_v8.cc | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index b9829aa19..7e035d283 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -2527,6 +2527,16 @@ "tree": { "selfFreeing": true, "functions": { + "git_tree_create_updated": { + "args": { + "updates": { + "cType": "git_tree_update *", + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitTreeUpdate" + } + } + }, "git_tree_entry_byid": { "return": { "ownedByThis": true diff --git a/generate/templates/partials/convert_from_v8.cc b/generate/templates/partials/convert_from_v8.cc index f7c4da469..6e707e1fe 100644 --- a/generate/templates/partials/convert_from_v8.cc +++ b/generate/templates/partials/convert_from_v8.cc @@ -48,12 +48,12 @@ {%elsif cppClassName == 'Array'%} Array *tmp_{{ name }} = Array::Cast(*info[{{ jsArg }}]); - from_{{ name }} = ({{ cType }})malloc(tmp_{{ name }}->Length() * sizeof({{ cType|replace '**' '*' }})); + from_{{ name }} = ({{ cType }})malloc(tmp_{{ name }}->Length() * sizeof({{ cType|unPointer }})); for (unsigned int i = 0; i < tmp_{{ name }}->Length(); i++) { {%-- // FIXME: should recursively call convertFromv8. --%} - from_{{ name }}[i] = Nan::ObjectWrap::Unwrap<{{ arrayElementCppClassName }}>(tmp_{{ name }}->Get(Nan::New(static_cast(i)))->ToObject())->GetValue(); + from_{{ name }}[i] = {%if not cType|isDoublePointer %}*{%endif%}Nan::ObjectWrap::Unwrap<{{ arrayElementCppClassName }}>(tmp_{{ name }}->Get(Nan::New(static_cast(i)))->ToObject())->GetValue(); } {%elsif cppClassName == 'Function'%} {%elsif cppClassName == 'Buffer'%} From 8dae43af3b6941d99018693c44caa5146355e302 Mon Sep 17 00:00:00 2001 From: Rafael Gieschke Date: Wed, 10 May 2017 02:29:19 +0200 Subject: [PATCH 003/145] Add test for Tree#createUpdated --- test/tests/tree.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/tests/tree.js b/test/tests/tree.js index aa98d4f3d..259ca2f86 100644 --- a/test/tests/tree.js +++ b/test/tests/tree.js @@ -39,6 +39,24 @@ describe("Tree", function() { }).done(done); }); + it("updates a tree", function () { + var repo = this.existingRepo; + var update = new NodeGit.TreeUpdate(); + update.action = NodeGit.Tree.UPDATE.REMOVE; + update.path = "README.md"; + return this.commit.getTree().then(function(tree) { + return tree.createUpdated(repo, 1, [update]); + }) + .then(function(treeOid) { + return repo.getTree(treeOid); + }) + .then(function(updatedTree) { + assert.throws(function () { + updatedTree.entryByName("README.md"); + }); + }); + }); + it("walks its entries and returns the same entries on both progress and end", function() { var repo = this.repository; From 0f53a5199adc7ec0a326d56b7d625e6f5f12c884 Mon Sep 17 00:00:00 2001 From: Remy Suen Date: Thu, 21 Dec 2017 07:20:43 +0900 Subject: [PATCH 004/145] `ceiling_dirs` parameter in `Repository.discover` is optional libgit2's git_repository_discover function's ceiling_dirs parameter can be null. Flag the parameter as such in the JSON file so that the NodeGit wrapper API behaves the same way. Signed-off-by: Remy Suen --- generate/input/descriptor.json | 3 +++ test/tests/repository.js | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 54d611ac0..6457b6cab 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -2245,6 +2245,9 @@ "isErrorCode": true }, "args": { + "ceiling_dirs": { + "isOptional": true + }, "out": { "isReturn": true, "isSelf": false, diff --git a/test/tests/repository.js b/test/tests/repository.js index be165b303..114c890be 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -200,13 +200,23 @@ describe("Repository", function() { }); }); - it("can discover if a path is part of a repository", function() { + function discover(ceiling) { var testPath = path.join(reposPath, "lib", "util", "normalize_oid.js"); var expectedPath = path.join(reposPath, ".git"); - return NodeGit.Repository.discover(testPath, 0, "") + return NodeGit.Repository.discover(testPath, 0, ceiling) .then(function(foundPath) { assert.equal(expectedPath, foundPath); }); + } + + it("can discover if a path is part of a repository, null ceiling", + function() { + return discover(null); + }); + + it("can discover if a path is part of a repository, empty ceiling", + function() { + return discover(""); }); it("can create a repo using initExt", function() { From caee388f4984ff461748b14fbc5ddb6a72108a7c Mon Sep 17 00:00:00 2001 From: dabutvin Date: Sat, 14 Apr 2018 11:43:10 -0700 Subject: [PATCH 005/145] adds support for gpg commit signing (fixes #1018) --- lib/repository.js | 68 +++++++++++++++++++ test/tests/commit.js | 156 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 224 insertions(+) diff --git a/lib/repository.js b/lib/repository.js index d5e941134..e7d3c296d 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -622,6 +622,74 @@ Repository.prototype.createCommitBuffer = function( }); }; +/** + * Create a commit that is digitally signed + * + * @async + * @param {Signature} author + * @param {Signature} committer + * @param {String} message + * @param {Tree|Oid|String} Tree + * @param {Array} parents + * @param {String} signature_field typically "gpgsig" + * @param {Function} onSignature Callback to be called with string to be signed + * @return {Oid} The oid of the commit + */ +Repository.prototype.createCommitWithSignature = function( + author, + committer, + message, + tree, + parents, + signature_field, + onSignature, + callback) { + + var repo = this; + var promises = []; + var commit_content; + + parents = parents || []; + + promises.push(repo.getTree(tree)); + + parents.forEach(function(parent) { + promises.push(repo.getCommit(parent)); + }); + + return Promise.all(promises).then(function(results) { + tree = results[0]; + + // Get the normalized values for our input into the function + var parentsLength = parents.length; + parents = []; + + for (var i = 0; i < parentsLength; i++) { + parents.push(results[i + 1]); + } + + return Commit.createBuffer( + repo, + author, + committer, + null /* use default message encoding */, + message, + tree, + parents.length, + parents + ); + }).then(function(commit_contentResult) { + commit_content = commit_contentResult; + return onSignature(commit_content); + }).then(function(signature) { + return Commit.createWithSignature( + repo, + commit_content, + signature, + signature_field); + }, callback); +}; + /** * Creates a new commit on HEAD from the list of passed in files * diff --git a/test/tests/commit.js b/test/tests/commit.js index d6e6a5ce7..79d62a118 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -791,6 +791,162 @@ describe("Commit", function() { }); describe("Commit's Signature", function() { + + it("Can create a signed commit in a repo", function() { + + var signature = "-----BEGIN PGP SIGNATURE-----\n" + + "Version: GnuPG v1.4.12 (Darwin)\n" + + "\n" + + "iQIcBAABAgAGBQJQ+FMIAAoJEH+LfPdZDSs1e3EQAJMjhqjWF+WkGLHju7pTw2al\n" + + "o6IoMAhv0Z/LHlWhzBd9e7JeCnanRt12bAU7yvYp9+Z+z+dbwqLwDoFp8LVuigl8\n" + + "JGLcnwiUW3rSvhjdCp9irdb4+bhKUnKUzSdsR2CK4/hC0N2i/HOvMYX+BRsvqweq\n" + + "AsAkA6dAWh+gAfedrBUkCTGhlNYoetjdakWqlGL1TiKAefEZrtA1TpPkGn92vbLq\n" + + "SphFRUY9hVn1ZBWrT3hEpvAIcZag3rTOiRVT1X1flj8B2vGCEr3RrcwOIZikpdaW\n" + + "who/X3xh/DGbI2RbuxmmJpxxP/8dsVchRJJzBwG+yhwU/iN3MlV2c5D69tls/Dok\n" + + "6VbyU4lm/ae0y3yR83D9dUlkycOnmmlBAHKIZ9qUts9X7mWJf0+yy2QxJVpjaTGG\n" + + "cmnQKKPeNIhGJk2ENnnnzjEve7L7YJQF6itbx5VCOcsGh3Ocb3YR7DMdWjt7f8pu\n" + + "c6j+q1rP7EpE2afUN/geSlp5i3x8aXZPDj67jImbVCE/Q1X9voCtyzGJH7MXR0N9\n" + + "ZpRF8yzveRfMH8bwAJjSOGAFF5XkcR/RNY95o+J+QcgBLdX48h+ZdNmUf6jqlu3J\n" + + "7KmTXXQcOVpN6dD3CmRFsbjq+x6RHwa8u1iGn+oIkX908r97ckfB/kHKH7ZdXIJc\n" + + "cpxtDQQMGYFpXK/71stq\n" + + "=ozeK\n" + + "-----END PGP SIGNATURE-----"; + + function onSignature(dataToSign) { + return new Promise(function (resolve) { + return resolve(signature); + }); + } + + var test = this; + var expectedCommitId = "53bb69297148decb1d75e015f66a7e5f4e0476c9"; + var fileName = "newfile.txt"; + var fileContent = "hello world"; + + var repo; + var index; + var treeOid; + var parent; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function() { + return repo.refreshIndex(); + }) + .then(function(indexResult) { + index = indexResult; + }) + .then(function() { + return index.addByPath(fileName); + }) + .then(function() { + return index.write(); + }) + .then(function() { + return index.writeTree(); + }) + .then(function(oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function(head) { + return repo.getCommit(head); + }) + .then(function(parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) + ]); + }) + .then(function(signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommitWithSignature( + author, + committer, + "message", + treeOid, + [parent], + "gpgsig", + onSignature); + }) + .then(function(commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function(commit) { + return commit.getSignature("gpgsig"); + }) + .then(function(signatureInfo) { + assert.equal(signature, signatureInfo.signature); + + return undoCommit() + .then(function(){ + return reinitialize(test); + }); + }, function(reason) { + return reinitialize(test) + .then(function() { + return Promise.reject(reason); + }); + }); + }); + + it("Can create a signed commit raw", function() { + var expectedCommitId = "cc1401eaac4e9e77190e98a9353b305f0c6313d8"; + + var signature = "-----BEGIN PGP SIGNATURE-----\n\n" + + "iQEcBAABCAAGBQJarBhIAAoJEE8pfTd/81lKQA4IAL8Mu5kc4B/MX9s4XB26Ahap\n" + + "n06kCx3RQ1KHMZIRomAjCnb48WieNVuy1y+Ut0RgfCxxrJ1ZnzFG3kF2bIKwIxNI\n" + + "tYIC76iWny+mrVnb2mjKYjn/3F4c4VJGENq9ITiV1WeE4yJ8dHw2ox2D+hACzTvQ\n" + + "KVroedk8BDFJxS6DFb20To35xbAVhwBnAGRcII4Wi5PPMFpqAhGLfq3Czv95ddSz\n" + + "BHlyp27+YWSpV0Og0dqOEhsdDYaPrOBGRcoRiqjue+l5tgK/QerLFZ4aovZzpuEP\n" + + "Xx1yZfqXIiy4Bo40qScSrdnmnp/kMq/NQGR3jYU+SleFHVKNFsya9UwurMaezY0=\n" + + "=eZzi\n-----END PGP SIGNATURE-----"; + + var commit_content = "tree f4661419a6fbbe865f78644fec722c023ce4b65f\n" + + "parent 32789a79e71fbc9e04d3eff7425e1771eb595150\n" + + "author Tyler Ang-Wanek 1521227848 -0700\n" + + "committer Tyler Ang-Wanek 1521227848 -0700\n\n" + + "GPG Signed commit\n"; + + var repo; + var commit; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return Commit.createWithSignature( + repo, + commit_content, + signature, + "gpgsig"); + }) + .then(function(commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function(commitResult) { + commit = commitResult; + return commit.getSignature(); + }) + .then(function(signatureInfoDefault) { + assert.equal(signature, signatureInfoDefault.signature); + assert.equal(commit_content, signatureInfoDefault.signedData); + + return commit.getSignature("gpgsig"); + }) + .then(function(signatureInfo) { + assert.equal(signature, signatureInfo.signature); + assert.equal(commit_content, signatureInfo.signedData); + }); + }); + it("Can retrieve the gpg signature from a commit", function() { var expectedSignedData = "tree f4661419a6fbbe865f78644fec722c023ce4b65f\n" + From 6f6ff3b36fb6a4490a0de7278af4c8d9e1bccf52 Mon Sep 17 00:00:00 2001 From: Dan Butvinik Date: Thu, 13 Dec 2018 08:11:46 -0800 Subject: [PATCH 006/145] remove callback from createCommitWithSignature --- lib/repository.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index e7d3c296d..8a193c606 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -642,8 +642,7 @@ Repository.prototype.createCommitWithSignature = function( tree, parents, signature_field, - onSignature, - callback) { + onSignature) { var repo = this; var promises = []; @@ -687,7 +686,7 @@ Repository.prototype.createCommitWithSignature = function( commit_content, signature, signature_field); - }, callback); + }); }; /** From 90e9d892bee058aa99e7e972ebb9a9b18dcbc5b5 Mon Sep 17 00:00:00 2001 From: dabutvin Date: Sat, 15 Dec 2018 22:42:21 -0800 Subject: [PATCH 007/145] add final newline to commit buffer - the commit that gets created and the signed content have to match --- lib/repository.js | 2 +- test/tests/commit.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 8a193c606..312811df8 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -678,7 +678,7 @@ Repository.prototype.createCommitWithSignature = function( parents ); }).then(function(commit_contentResult) { - commit_content = commit_contentResult; + commit_content = commit_contentResult + "\n"; return onSignature(commit_content); }).then(function(signature) { return Commit.createWithSignature( diff --git a/test/tests/commit.js b/test/tests/commit.js index 79d62a118..debefebc5 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -819,7 +819,7 @@ describe("Commit", function() { } var test = this; - var expectedCommitId = "53bb69297148decb1d75e015f66a7e5f4e0476c9"; + var expectedCommitId = "ccb99bb20716ef7c37e92c7b8db029a7af7f747b"; var fileName = "newfile.txt"; var fileContent = "hello world"; From f70ddd103492ee188cf8e246df6a1aa2246bfc68 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 17 Jan 2019 14:00:41 -0700 Subject: [PATCH 008/145] Add `updateRef` functionality to Repository#createCommitWithSignature --- lib/repository.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/repository.js b/lib/repository.js index 312811df8..4d719cbd8 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -174,6 +174,22 @@ function getPathHunks(repo, index, filePath, isStaged, additionalDiffOptions) { }); } +function getReflogMessageForCommit(commit) { + var parentCount = commit.parentcount(); + var summary = commit.summary(); + var commitType; + + if (parentCount >= 2) { + commitType = " (merge)"; + } else if (parentCount == 0) { + commitType = " (initial)"; + } else { + commitType = ""; + } + + return `commit${commitType}: ${summary}`; +} + /** * Goes through a rebase's rebase operations and commits them if there are * no merge conflicts @@ -626,6 +642,7 @@ Repository.prototype.createCommitBuffer = function( * Create a commit that is digitally signed * * @async + * @param {String} updateRef * @param {Signature} author * @param {Signature} committer * @param {String} message @@ -636,6 +653,7 @@ Repository.prototype.createCommitBuffer = function( * @return {Oid} The oid of the commit */ Repository.prototype.createCommitWithSignature = function( + updateRef, author, committer, message, @@ -647,6 +665,8 @@ Repository.prototype.createCommitWithSignature = function( var repo = this; var promises = []; var commit_content; + var commit_oid; + var commit; parents = parents || []; @@ -686,6 +706,16 @@ Repository.prototype.createCommitWithSignature = function( commit_content, signature, signature_field); + }).then(function(commit_oidResult) { + commit_oid = commit_oidResult; + return repo.getCommit(commit_oid); + }).then(function(commitResult) { + commit = commitResult; + return repo.getReference(updateRef); + }).then(function(ref) { + return ref.setTarget(commit_oid, getReflogMessageForCommit(commit)); + }).then(function() { + return commit_oid; }); }; From e693f3239f1c7f44c9299e9cfdb6aa676b41ba0c Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Fri, 18 Jan 2019 09:18:10 -0700 Subject: [PATCH 009/145] Skip updating refs if `updateRefs` not given --- lib/repository.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 4d719cbd8..cc726eae6 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -676,7 +676,7 @@ Repository.prototype.createCommitWithSignature = function( promises.push(repo.getCommit(parent)); }); - return Promise.all(promises).then(function(results) { + const createCommitPromise = Promise.all(promises).then(function(results) { tree = results[0]; // Get the normalized values for our input into the function @@ -706,7 +706,13 @@ Repository.prototype.createCommitWithSignature = function( commit_content, signature, signature_field); - }).then(function(commit_oidResult) { + }); + + if (!updateRef) { + return createCommitPromise; + } + + return createCommitPromise.then(function(commit_oidResult) { commit_oid = commit_oidResult; return repo.getCommit(commit_oid); }).then(function(commitResult) { From b7f542c00fee2c847cf37c3f37b5bfbc28d0e2da Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Tue, 22 Jan 2019 09:38:21 -0700 Subject: [PATCH 010/145] Adjust Repository#createCommitWithSignature to account for `updateRef` --- test/tests/commit.js | 106 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/test/tests/commit.js b/test/tests/commit.js index debefebc5..395b0eebe 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -867,6 +867,7 @@ describe("Commit", function() { var committer = signatures[1]; return repo.createCommitWithSignature( + null, author, committer, "message", @@ -884,7 +885,112 @@ describe("Commit", function() { }) .then(function(signatureInfo) { assert.equal(signature, signatureInfo.signature); + return reinitialize(test); + }, function(reason) { + return reinitialize(test) + .then(function() { + return Promise.reject(reason); + }); + }); + }); + + it("Can create a signed commit in a repo and update refs", function() { + + var signature = "-----BEGIN PGP SIGNATURE-----\n" + + "Version: GnuPG v1.4.12 (Darwin)\n" + + "\n" + + "iQIcBAABAgAGBQJQ+FMIAAoJEH+LfPdZDSs1e3EQAJMjhqjWF+WkGLHju7pTw2al\n" + + "o6IoMAhv0Z/LHlWhzBd9e7JeCnanRt12bAU7yvYp9+Z+z+dbwqLwDoFp8LVuigl8\n" + + "JGLcnwiUW3rSvhjdCp9irdb4+bhKUnKUzSdsR2CK4/hC0N2i/HOvMYX+BRsvqweq\n" + + "AsAkA6dAWh+gAfedrBUkCTGhlNYoetjdakWqlGL1TiKAefEZrtA1TpPkGn92vbLq\n" + + "SphFRUY9hVn1ZBWrT3hEpvAIcZag3rTOiRVT1X1flj8B2vGCEr3RrcwOIZikpdaW\n" + + "who/X3xh/DGbI2RbuxmmJpxxP/8dsVchRJJzBwG+yhwU/iN3MlV2c5D69tls/Dok\n" + + "6VbyU4lm/ae0y3yR83D9dUlkycOnmmlBAHKIZ9qUts9X7mWJf0+yy2QxJVpjaTGG\n" + + "cmnQKKPeNIhGJk2ENnnnzjEve7L7YJQF6itbx5VCOcsGh3Ocb3YR7DMdWjt7f8pu\n" + + "c6j+q1rP7EpE2afUN/geSlp5i3x8aXZPDj67jImbVCE/Q1X9voCtyzGJH7MXR0N9\n" + + "ZpRF8yzveRfMH8bwAJjSOGAFF5XkcR/RNY95o+J+QcgBLdX48h+ZdNmUf6jqlu3J\n" + + "7KmTXXQcOVpN6dD3CmRFsbjq+x6RHwa8u1iGn+oIkX908r97ckfB/kHKH7ZdXIJc\n" + + "cpxtDQQMGYFpXK/71stq\n" + + "=ozeK\n" + + "-----END PGP SIGNATURE-----"; + + function onSignature(dataToSign) { + return new Promise(function (resolve) { + return resolve(signature); + }); + } + + var test = this; + var expectedCommitId = "ccb99bb20716ef7c37e92c7b8db029a7af7f747b"; + var fileName = "newfile.txt"; + var fileContent = "hello world"; + + var repo; + var index; + var treeOid; + var parent; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function() { + return repo.refreshIndex(); + }) + .then(function(indexResult) { + index = indexResult; + }) + .then(function() { + return index.addByPath(fileName); + }) + .then(function() { + return index.write(); + }) + .then(function() { + return index.writeTree(); + }) + .then(function(oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function(head) { + return repo.getCommit(head); + }) + .then(function(parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) + ]); + }) + .then(function(signatures) { + var author = signatures[0]; + var committer = signatures[1]; + return repo.createCommitWithSignature( + "HEAD", + author, + committer, + "message", + treeOid, + [parent], + "gpgsig", + onSignature); + }) + .then(function(commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function(commit) { + return commit.getSignature("gpgsig"); + }) + .then(function(signatureInfo) { + assert.equal(signature, signatureInfo.signature); + return repo.getHeadCommit(); + }) + .then(function(headCommit) { + assert.equal(expectedCommitId, headCommit.id()); return undoCommit() .then(function(){ return reinitialize(test); From 83c6cd78ede652d30865698ee84f87eea9176218 Mon Sep 17 00:00:00 2001 From: Jakub Kukul Date: Wed, 23 Jan 2019 13:57:52 +0800 Subject: [PATCH 011/145] Fix documentation reference. --- lib/repository.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repository.js b/lib/repository.js index cc726eae6..9d621d67f 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -808,7 +808,7 @@ Repository.prototype.createLightweightTag = function(oid, name, callback) { * See also `Commit.prototype.history()` * * @param {String|Oid} String sha or Oid - * @return {RevWalk} + * @return {Revwalk} */ Repository.prototype.createRevWalk = function() { return Revwalk.create(this); From 63b41757e9372c6e031bb162261a6b0116cfab1e Mon Sep 17 00:00:00 2001 From: Jakub Kukul Date: Wed, 23 Jan 2019 13:58:08 +0800 Subject: [PATCH 012/145] Remove obsolete argument from documentation. --- lib/repository.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/repository.js b/lib/repository.js index 9d621d67f..1962d894d 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -807,7 +807,6 @@ Repository.prototype.createLightweightTag = function(oid, name, callback) { * Instantiate a new revision walker for browsing the Repository"s history. * See also `Commit.prototype.history()` * - * @param {String|Oid} String sha or Oid * @return {Revwalk} */ Repository.prototype.createRevWalk = function() { From 911ab17f799c0fcce2130aadf3e8a007268a6485 Mon Sep 17 00:00:00 2001 From: Andres Kalle Date: Sat, 26 Jan 2019 20:58:26 +0200 Subject: [PATCH 013/145] Marked Repository.createBlobFromBuffer as async It returns `Blob.createFromBuffer(...)` which calls [an async function](https://www.nodegit.org/api/blob/#createFromBuffer) --- lib/repository.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/repository.js b/lib/repository.js index 1962d894d..aa85eab9d 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -537,6 +537,7 @@ Repository.prototype.createBranch = function(name, commit, force) { /** * Create a blob from a buffer * + * @async * @param {Buffer} buffer * @return {Oid} */ From 2d439f44288150c7249a388c19f949e477d2c7f6 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 28 Jan 2019 07:21:14 -0700 Subject: [PATCH 014/145] WIP bump libgit2 vendor to pre v0.28.0 --- generate/input/libgit2-docs.json | 9307 +++++++++++++++++++++--------- vendor/libgit2 | 2 +- 2 files changed, 6570 insertions(+), 2739 deletions(-) diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index 75f9a46af..82bfd8a1a 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -1,33 +1,35 @@ { "files": [ { - "file": "annotated_commit.h", + "file": "git2/annotated_commit.h", "functions": [ "git_annotated_commit_from_ref", "git_annotated_commit_from_fetchhead", "git_annotated_commit_lookup", "git_annotated_commit_from_revspec", "git_annotated_commit_id", + "git_annotated_commit_ref", "git_annotated_commit_free" ], "meta": {}, - "lines": 112 + "lines": 121 }, { - "file": "attr.h", + "file": "git2/attr.h", "functions": [ "git_attr_value", "git_attr_get", "git_attr_get_many", + "git_attr_foreach_cb", "git_attr_foreach", "git_attr_cache_flush", "git_attr_add_macro" ], "meta": {}, - "lines": 240 + "lines": 251 }, { - "file": "blame.h", + "file": "git2/blame.h", "functions": [ "git_blame_init_options", "git_blame_get_hunk_count", @@ -38,10 +40,10 @@ "git_blame_free" ], "meta": {}, - "lines": 207 + "lines": 224 }, { - "file": "blob.h", + "file": "git2/blob.h", "functions": [ "git_blob_lookup", "git_blob_lookup_prefix", @@ -63,7 +65,7 @@ "lines": 228 }, { - "file": "branch.h", + "file": "git2/branch.h", "functions": [ "git_branch_create", "git_branch_create_from_annotated", @@ -76,15 +78,19 @@ "git_branch_name", "git_branch_upstream", "git_branch_set_upstream", + "git_branch_upstream_name", "git_branch_is_head", - "git_branch_is_checked_out" + "git_branch_is_checked_out", + "git_branch_remote_name", + "git_branch_upstream_remote" ], "meta": {}, - "lines": 258 + "lines": 288 }, { - "file": "buffer.h", + "file": "git2/buffer.h", "functions": [ + "git_buf_dispose", "git_buf_free", "git_buf_grow", "git_buf_set", @@ -92,10 +98,10 @@ "git_buf_contains_nul" ], "meta": {}, - "lines": 122 + "lines": 134 }, { - "file": "checkout.h", + "file": "git2/checkout.h", "functions": [ "git_checkout_notify_cb", "git_checkout_progress_cb", @@ -106,20 +112,20 @@ "git_checkout_tree" ], "meta": {}, - "lines": 361 + "lines": 362 }, { - "file": "cherrypick.h", + "file": "git2/cherrypick.h", "functions": [ "git_cherrypick_init_options", "git_cherrypick_commit", "git_cherrypick" ], "meta": {}, - "lines": 84 + "lines": 86 }, { - "file": "clone.h", + "file": "git2/clone.h", "functions": [ "git_remote_create_cb", "git_repository_create_cb", @@ -127,10 +133,10 @@ "git_clone" ], "meta": {}, - "lines": 203 + "lines": 205 }, { - "file": "commit.h", + "file": "git2/commit.h", "functions": [ "git_commit_lookup", "git_commit_lookup_prefix", @@ -146,6 +152,8 @@ "git_commit_time_offset", "git_commit_committer", "git_commit_author", + "git_commit_committer_with_mailmap", + "git_commit_author_with_mailmap", "git_commit_raw_header", "git_commit_tree", "git_commit_tree_id", @@ -163,22 +171,23 @@ "git_commit_dup" ], "meta": {}, - "lines": 474 + "lines": 502 }, { - "file": "common.h", + "file": "git2/common.h", "functions": [ "git_libgit2_version", "git_libgit2_features", "git_libgit2_opts" ], "meta": {}, - "lines": 352 + "lines": 393 }, { - "file": "config.h", + "file": "git2/config.h", "functions": [ "git_config_entry_free", + "git_config_foreach_cb", "git_config_find_global", "git_config_find_xdg", "git_config_find_system", @@ -223,10 +232,10 @@ "git_config_lock" ], "meta": {}, - "lines": 751 + "lines": 762 }, { - "file": "cred_helpers.h", + "file": "git2/cred_helpers.h", "functions": [ "git_cred_userpass" ], @@ -234,18 +243,20 @@ "lines": 48 }, { - "file": "describe.h", + "file": "git2/describe.h", "functions": [ + "git_describe_init_options", + "git_describe_init_format_options", "git_describe_commit", "git_describe_workdir", "git_describe_format", "git_describe_result_free" ], "meta": {}, - "lines": 161 + "lines": 184 }, { - "file": "diff.h", + "file": "git2/diff.h", "functions": [ "git_diff_notify_cb", "git_diff_progress_cb", @@ -289,10 +300,10 @@ "git_diff_patchid" ], "meta": {}, - "lines": 1452 + "lines": 1502 }, { - "file": "errors.h", + "file": "git2/errors.h", "functions": [ "giterr_last", "giterr_clear", @@ -300,10 +311,10 @@ "giterr_set_oom" ], "meta": {}, - "lines": 149 + "lines": 156 }, { - "file": "filter.h", + "file": "git2/filter.h", "functions": [ "git_filter_list_load", "git_filter_list_contains", @@ -319,7 +330,7 @@ "lines": 210 }, { - "file": "global.h", + "file": "git2/global.h", "functions": [ "git_libgit2_init", "git_libgit2_shutdown" @@ -328,7 +339,7 @@ "lines": 39 }, { - "file": "graph.h", + "file": "git2/graph.h", "functions": [ "git_graph_ahead_behind", "git_graph_descendant_of" @@ -337,7 +348,7 @@ "lines": 54 }, { - "file": "ignore.h", + "file": "git2/ignore.h", "functions": [ "git_ignore_add_rule", "git_ignore_clear_internal_rules", @@ -347,7 +358,7 @@ "lines": 74 }, { - "file": "index.h", + "file": "git2/index.h", "functions": [ "git_index_matched_path_cb", "git_index_open", @@ -395,8 +406,9 @@ "lines": 806 }, { - "file": "indexer.h", + "file": "git2/indexer.h", "functions": [ + "git_indexer_init_options", "git_indexer_new", "git_indexer_append", "git_indexer_commit", @@ -404,10 +416,32 @@ "git_indexer_free" ], "meta": {}, - "lines": 72 + "lines": 98 }, { - "file": "merge.h", + "file": "git2/inttypes.h", + "functions": [ + "imaxdiv" + ], + "meta": {}, + "lines": 298 + }, + { + "file": "git2/mailmap.h", + "functions": [ + "git_mailmap_new", + "git_mailmap_free", + "git_mailmap_add_entry", + "git_mailmap_from_buffer", + "git_mailmap_from_repository", + "git_mailmap_resolve", + "git_mailmap_resolve_signature" + ], + "meta": {}, + "lines": 111 + }, + { + "file": "git2/merge.h", "functions": [ "git_merge_file_init_input", "git_merge_file_init_options", @@ -426,10 +460,10 @@ "git_merge" ], "meta": {}, - "lines": 585 + "lines": 587 }, { - "file": "message.h", + "file": "git2/message.h", "functions": [ "git_message_prettify", "git_message_trailers", @@ -439,7 +473,7 @@ "lines": 79 }, { - "file": "net.h", + "file": "git2/net.h", "functions": [ "git_headlist_cb" ], @@ -447,7 +481,7 @@ "lines": 55 }, { - "file": "notes.h", + "file": "git2/notes.h", "functions": [ "git_note_foreach_cb", "git_note_iterator_new", @@ -465,13 +499,14 @@ "git_note_remove", "git_note_commit_remove", "git_note_free", + "git_note_default_ref", "git_note_foreach" ], "meta": {}, "lines": 302 }, { - "file": "object.h", + "file": "git2/object.h", "functions": [ "git_object_lookup", "git_object_lookup_prefix", @@ -492,7 +527,7 @@ "lines": 237 }, { - "file": "odb.h", + "file": "git2/odb.h", "functions": [ "git_odb_foreach_cb", "git_odb_new", @@ -532,7 +567,7 @@ "lines": 544 }, { - "file": "odb_backend.h", + "file": "git2/odb_backend.h", "functions": [ "git_odb_backend_pack", "git_odb_backend_loose", @@ -542,7 +577,7 @@ "lines": 130 }, { - "file": "oid.h", + "file": "git2/oid.h", "functions": [ "git_oid_fromstr", "git_oid_fromstrp", @@ -568,7 +603,7 @@ "lines": 264 }, { - "file": "oidarray.h", + "file": "git2/oidarray.h", "functions": [ "git_oidarray_free" ], @@ -576,7 +611,7 @@ "lines": 34 }, { - "file": "pack.h", + "file": "git2/pack.h", "functions": [ "git_packbuilder_new", "git_packbuilder_set_threads", @@ -585,8 +620,10 @@ "git_packbuilder_insert_commit", "git_packbuilder_insert_walk", "git_packbuilder_insert_recur", + "git_packbuilder_write_buf", "git_packbuilder_write", "git_packbuilder_hash", + "git_packbuilder_foreach_cb", "git_packbuilder_foreach", "git_packbuilder_object_count", "git_packbuilder_written", @@ -598,7 +635,7 @@ "lines": 236 }, { - "file": "patch.h", + "file": "git2/patch.h", "functions": [ "git_patch_from_diff", "git_patch_from_blobs", @@ -619,7 +656,7 @@ "lines": 268 }, { - "file": "pathspec.h", + "file": "git2/pathspec.h", "functions": [ "git_pathspec_new", "git_pathspec_free", @@ -639,15 +676,15 @@ "lines": 277 }, { - "file": "proxy.h", + "file": "git2/proxy.h", "functions": [ "git_proxy_init_options" ], "meta": {}, - "lines": 88 + "lines": 92 }, { - "file": "rebase.h", + "file": "git2/rebase.h", "functions": [ "git_rebase_init_options", "git_rebase_init", @@ -663,10 +700,10 @@ "git_rebase_free" ], "meta": {}, - "lines": 316 + "lines": 319 }, { - "file": "refdb.h", + "file": "git2/refdb.h", "functions": [ "git_refdb_new", "git_refdb_open", @@ -677,7 +714,7 @@ "lines": 63 }, { - "file": "reflog.h", + "file": "git2/reflog.h", "functions": [ "git_reflog_read", "git_reflog_write", @@ -697,7 +734,7 @@ "lines": 166 }, { - "file": "refs.h", + "file": "git2/refs.h", "functions": [ "git_reference_lookup", "git_reference_name_to_id", @@ -719,6 +756,8 @@ "git_reference_delete", "git_reference_remove", "git_reference_list", + "git_reference_foreach_cb", + "git_reference_foreach_name_cb", "git_reference_foreach", "git_reference_foreach_name", "git_reference_dup", @@ -745,8 +784,10 @@ "lines": 744 }, { - "file": "refspec.h", + "file": "git2/refspec.h", "functions": [ + "git_refspec_parse", + "git_refspec_free", "git_refspec_src", "git_refspec_dst", "git_refspec_string", @@ -758,10 +799,10 @@ "git_refspec_rtransform" ], "meta": {}, - "lines": 100 + "lines": 117 }, { - "file": "remote.h", + "file": "git2/remote.h", "functions": [ "git_remote_create", "git_remote_create_with_fetchspec", @@ -810,10 +851,10 @@ "git_remote_default_branch" ], "meta": {}, - "lines": 850 + "lines": 852 }, { - "file": "repository.h", + "file": "git2/repository.h", "functions": [ "git_repository_open", "git_repository_open_from_worktree", @@ -828,6 +869,7 @@ "git_repository_head", "git_repository_head_for_worktree", "git_repository_head_detached", + "git_repository_head_detached_for_worktree", "git_repository_head_unborn", "git_repository_is_empty", "git_repository_item_path", @@ -845,7 +887,9 @@ "git_repository_message", "git_repository_message_remove", "git_repository_state_cleanup", + "git_repository_fetchhead_foreach_cb", "git_repository_fetchhead_foreach", + "git_repository_mergehead_foreach_cb", "git_repository_mergehead_foreach", "git_repository_hashfile", "git_repository_set_head", @@ -860,10 +904,10 @@ "git_repository_set_ident" ], "meta": {}, - "lines": 862 + "lines": 864 }, { - "file": "reset.h", + "file": "git2/reset.h", "functions": [ "git_reset", "git_reset_from_annotated", @@ -873,17 +917,17 @@ "lines": 107 }, { - "file": "revert.h", + "file": "git2/revert.h", "functions": [ "git_revert_init_options", "git_revert_commit", "git_revert" ], "meta": {}, - "lines": 84 + "lines": 86 }, { - "file": "revparse.h", + "file": "git2/revparse.h", "functions": [ "git_revparse_single", "git_revparse_ext", @@ -893,7 +937,7 @@ "lines": 108 }, { - "file": "revwalk.h", + "file": "git2/revwalk.h", "functions": [ "git_revwalk_new", "git_revwalk_reset", @@ -918,7 +962,7 @@ "lines": 291 }, { - "file": "signature.h", + "file": "git2/signature.h", "functions": [ "git_signature_new", "git_signature_now", @@ -931,8 +975,9 @@ "lines": 99 }, { - "file": "stash.h", + "file": "git2/stash.h", "functions": [ + "git_stash_save", "git_stash_apply_progress_cb", "git_stash_apply_init_options", "git_stash_apply", @@ -942,10 +987,10 @@ "git_stash_pop" ], "meta": {}, - "lines": 253 + "lines": 256 }, { - "file": "status.h", + "file": "git2/status.h", "functions": [ "git_status_cb", "git_status_init_options", @@ -959,10 +1004,16 @@ "git_status_should_ignore" ], "meta": {}, - "lines": 370 + "lines": 374 + }, + { + "file": "git2/stdint.h", + "functions": [], + "meta": {}, + "lines": 124 }, { - "file": "strarray.h", + "file": "git2/strarray.h", "functions": [ "git_strarray_free", "git_strarray_copy" @@ -971,7 +1022,7 @@ "lines": 53 }, { - "file": "submodule.h", + "file": "git2/submodule.h", "functions": [ "git_submodule_cb", "git_submodule_update_init_options", @@ -1008,10 +1059,19 @@ "git_submodule_location" ], "meta": {}, - "lines": 632 + "lines": 633 }, { - "file": "sys/commit.h", + "file": "git2/sys/alloc.h", + "functions": [ + "git_stdalloc_init_allocator", + "git_win32_crtdbg_init_allocator" + ], + "meta": {}, + "lines": 97 + }, + { + "file": "git2/sys/commit.h", "functions": [ "git_commit_create_from_ids", "git_commit_create_from_callback" @@ -1020,7 +1080,7 @@ "lines": 76 }, { - "file": "sys/config.h", + "file": "git2/sys/config.h", "functions": [ "git_config_init_backend", "git_config_add_backend" @@ -1029,7 +1089,7 @@ "lines": 126 }, { - "file": "sys/diff.h", + "file": "git2/sys/diff.h", "functions": [ "git_diff_print_callback__to_buf", "git_diff_print_callback__to_file_handle", @@ -1040,7 +1100,7 @@ "lines": 90 }, { - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "functions": [ "git_filter_lookup", "git_filter_list_new", @@ -1056,6 +1116,7 @@ "git_filter_shutdown_fn", "git_filter_check_fn", "git_filter_apply_fn", + "git_filter_stream_fn", "git_filter_cleanup_fn", "git_filter_init", "git_filter_register", @@ -1065,7 +1126,7 @@ "lines": 328 }, { - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "functions": [ "git_hashsig_create", "git_hashsig_create_fromfile", @@ -1076,7 +1137,25 @@ "lines": 102 }, { - "file": "sys/mempack.h", + "file": "git2/sys/index.h", + "functions": [ + "git_index_name_entrycount", + "git_index_name_get_byindex", + "git_index_name_add", + "git_index_name_clear", + "git_index_reuc_entrycount", + "git_index_reuc_find", + "git_index_reuc_get_bypath", + "git_index_reuc_get_byindex", + "git_index_reuc_add", + "git_index_reuc_remove", + "git_index_reuc_clear" + ], + "meta": {}, + "lines": 174 + }, + { + "file": "git2/sys/mempack.h", "functions": [ "git_mempack_new", "git_mempack_dump", @@ -1086,25 +1165,34 @@ "lines": 82 }, { - "file": "sys/merge.h", + "file": "git2/sys/merge.h", "functions": [ + "git_merge_driver_lookup", + "git_merge_driver_source_repo", + "git_merge_driver_source_ancestor", + "git_merge_driver_source_ours", + "git_merge_driver_source_theirs", + "git_merge_driver_source_file_options", "git_merge_driver_init_fn", "git_merge_driver_shutdown_fn", - "git_merge_driver_apply_fn" + "git_merge_driver_apply_fn", + "git_merge_driver_register", + "git_merge_driver_unregister" ], "meta": {}, - "lines": 135 + "lines": 178 }, { - "file": "sys/odb_backend.h", + "file": "git2/sys/odb_backend.h", "functions": [ - "git_odb_init_backend" + "git_odb_init_backend", + "git_odb_backend_malloc" ], "meta": {}, - "lines": 118 + "lines": 120 }, { - "file": "sys/openssl.h", + "file": "git2/sys/openssl.h", "functions": [ "git_openssl_set_locking" ], @@ -1112,7 +1200,15 @@ "lines": 34 }, { - "file": "sys/refdb_backend.h", + "file": "git2/sys/path.h", + "functions": [ + "git_path_is_gitfile" + ], + "meta": {}, + "lines": 60 + }, + { + "file": "git2/sys/refdb_backend.h", "functions": [ "git_refdb_init_backend", "git_refdb_backend_fs", @@ -1122,7 +1218,16 @@ "lines": 214 }, { - "file": "sys/refs.h", + "file": "git2/sys/reflog.h", + "functions": [ + "git_reflog_entry__alloc", + "git_reflog_entry__free" + ], + "meta": {}, + "lines": 17 + }, + { + "file": "git2/sys/refs.h", "functions": [ "git_reference__alloc", "git_reference__alloc_symbolic" @@ -1131,7 +1236,7 @@ "lines": 45 }, { - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "functions": [ "git_repository_new", "git_repository__cleanup", @@ -1148,15 +1253,16 @@ "lines": 165 }, { - "file": "sys/stream.h", + "file": "git2/sys/stream.h", "functions": [ + "git_stream_cb", "git_stream_register_tls" ], "meta": {}, "lines": 54 }, { - "file": "sys/time.h", + "file": "git2/sys/time.h", "functions": [ "git_time_monotonic" ], @@ -1164,7 +1270,7 @@ "lines": 27 }, { - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "functions": [ "git_transport_init", "git_transport_new", @@ -1177,6 +1283,7 @@ "git_transport_smart_certificate_check", "git_transport_smart_credentials", "git_transport_smart_proxy_options", + "git_smart_subtransport_cb", "git_smart_subtransport_http", "git_smart_subtransport_git", "git_smart_subtransport_ssh" @@ -1185,7 +1292,7 @@ "lines": 389 }, { - "file": "tag.h", + "file": "git2/tag.h", "functions": [ "git_tag_lookup", "git_tag_lookup_prefix", @@ -1205,6 +1312,7 @@ "git_tag_delete", "git_tag_list", "git_tag_list_match", + "git_tag_foreach_cb", "git_tag_foreach", "git_tag_peel", "git_tag_dup" @@ -1213,7 +1321,7 @@ "lines": 357 }, { - "file": "trace.h", + "file": "git2/trace.h", "functions": [ "git_trace_callback", "git_trace_set" @@ -1222,9 +1330,26 @@ "lines": 63 }, { - "file": "transport.h", + "file": "git2/transaction.h", + "functions": [ + "git_transaction_new", + "git_transaction_lock_ref", + "git_transaction_set_target", + "git_transaction_set_symbolic_target", + "git_transaction_set_reflog", + "git_transaction_remove", + "git_transaction_commit", + "git_transaction_free" + ], + "meta": {}, + "lines": 117 + }, + { + "file": "git2/transport.h", "functions": [ "git_transport_cb", + "git_cred_sign_callback", + "git_cred_ssh_interactive_callback", "git_cred_has_username", "git_cred_userpass_plaintext_new", "git_cred_ssh_key_new", @@ -1238,10 +1363,10 @@ "git_cred_acquire_cb" ], "meta": {}, - "lines": 338 + "lines": 367 }, { - "file": "tree.h", + "file": "git2/tree.h", "functions": [ "git_tree_lookup", "git_tree_lookup_prefix", @@ -1282,17 +1407,17 @@ "lines": 479 }, { - "file": "types.h", + "file": "git2/types.h", "functions": [ "git_transfer_progress_cb", "git_transport_message_cb", "git_transport_certificate_check_cb" ], "meta": {}, - "lines": 429 + "lines": 438 }, { - "file": "worktree.h", + "file": "git2/worktree.h", "functions": [ "git_worktree_list", "git_worktree_lookup", @@ -1304,18 +1429,20 @@ "git_worktree_lock", "git_worktree_unlock", "git_worktree_is_locked", + "git_worktree_name", + "git_worktree_path", "git_worktree_prune_init_options", "git_worktree_is_prunable", "git_worktree_prune" ], "meta": {}, - "lines": 216 + "lines": 251 } ], "functions": { "git_annotated_commit_from_ref": { "type": "function", - "file": "annotated_commit.h", + "file": "git2/annotated_commit.h", "line": 33, "lineto": 36, "args": [ @@ -1343,16 +1470,11 @@ }, "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.

\n", "comments": "", - "group": "annotated", - "examples": { - "merge.c": [ - "ex/HEAD/merge.html#git_annotated_commit_from_ref-1" - ] - } + "group": "annotated" }, "git_annotated_commit_from_fetchhead": { "type": "function", - "file": "annotated_commit.h", + "file": "git2/annotated_commit.h", "line": 50, "lineto": 55, "args": [ @@ -1394,7 +1516,7 @@ }, "git_annotated_commit_lookup": { "type": "function", - "file": "annotated_commit.h", + "file": "git2/annotated_commit.h", "line": 75, "lineto": 78, "args": [ @@ -1421,17 +1543,12 @@ "comment": " 0 on success or error code" }, "description": "

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.

\n", - "comments": "

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.

\n", - "group": "annotated", - "examples": { - "merge.c": [ - "ex/HEAD/merge.html#git_annotated_commit_lookup-2" - ] - } + "comments": "

An annotated commit contains information about how it was\n looked up, which may be useful for functions like merge or\n rebase to provide context to the operation. For example,\n conflict files will include the name of the source or target\n branches being merged. It is therefore preferable to use the\n most specific function (eg git_annotated_commit_from_ref)\n instead of this one when that data is known.

\n", + "group": "annotated" }, "git_annotated_commit_from_revspec": { "type": "function", - "file": "annotated_commit.h", + "file": "git2/annotated_commit.h", "line": 92, "lineto": 95, "args": [ @@ -1458,12 +1575,12 @@ "comment": " 0 on success or error code" }, "description": "

Creates a git_annotated_comit from 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.

\n", + "comments": "

See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n", "group": "annotated" }, "git_annotated_commit_id": { "type": "function", - "file": "annotated_commit.h", + "file": "git2/annotated_commit.h", "line": 103, "lineto": 104, "args": [ @@ -1483,18 +1600,49 @@ "comments": "", "group": "annotated", "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_annotated_commit_id-1" + ], "merge.c": [ - "ex/HEAD/merge.html#git_annotated_commit_id-3", - "ex/HEAD/merge.html#git_annotated_commit_id-4", - "ex/HEAD/merge.html#git_annotated_commit_id-5" + "ex/HEAD/merge.html#git_annotated_commit_id-1", + "ex/HEAD/merge.html#git_annotated_commit_id-2", + "ex/HEAD/merge.html#git_annotated_commit_id-3" + ] + } + }, + "git_annotated_commit_ref": { + "type": "function", + "file": "git2/annotated_commit.h", + "line": 112, + "lineto": 113, + "args": [ + { + "name": "commit", + "type": "const git_annotated_commit *", + "comment": "the given annotated commit" + } + ], + "argline": "const git_annotated_commit *commit", + "sig": "const git_annotated_commit *", + "return": { + "type": "const char *", + "comment": " ref name." + }, + "description": "

Get the refname that the given git_annotated_commit refers to.

\n", + "comments": "", + "group": "annotated", + "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_annotated_commit_ref-2", + "ex/HEAD/checkout.html#git_annotated_commit_ref-3" ] } }, "git_annotated_commit_free": { "type": "function", - "file": "annotated_commit.h", - "line": 111, - "lineto": 112, + "file": "git2/annotated_commit.h", + "line": 120, + "lineto": 121, "args": [ { "name": "commit", @@ -1510,11 +1658,16 @@ }, "description": "

Frees a git_annotated_commit.

\n", "comments": "", - "group": "annotated" + "group": "annotated", + "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_annotated_commit_free-4" + ] + } }, "git_attr_value": { "type": "function", - "file": "attr.h", + "file": "git2/attr.h", "line": 102, "lineto": 102, "args": [ @@ -1531,12 +1684,12 @@ "comment": " the value type for the attribute" }, "description": "

Return the value type for a given attribute.

\n", - "comments": "

This can be either TRUE, FALSE, UNSPECIFIED (if the attribute was not set at all), or VALUE, if the attribute was set to an actual string.

\n\n

If the attribute has a VALUE string, it can be accessed normally as a NULL-terminated C string.

\n", + "comments": "

This can be either TRUE, FALSE, UNSPECIFIED (if the attribute\n was not set at all), or VALUE, if the attribute was set to an\n actual string.

\n\n

If the attribute has a VALUE string, it can be accessed normally\n as a NULL-terminated C string.

\n", "group": "attr" }, "git_attr_get": { "type": "function", - "file": "attr.h", + "file": "git2/attr.h", "line": 145, "lineto": 150, "args": [ @@ -1578,7 +1731,7 @@ }, "git_attr_get_many": { "type": "function", - "file": "attr.h", + "file": "git2/attr.h", "line": 181, "lineto": 187, "args": [ @@ -1620,14 +1773,14 @@ "comment": null }, "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.

\n\n

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\n

Then you could loop through the 3 values to get the settings for the three attributes you asked about.

\n", + "comments": "

Use this if you have a known list of attributes that you want to\n look up in a single call. This is somewhat more efficient than\n calling git_attr_get() multiple times.

\n\n

For example, you might write:

\n\n
 const char *attrs[] = { "crlf", "diff", "foo" };\n const char **values[3];\n git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);\n
\n\n

Then you could loop through the 3 values to get the settings for\n the three attributes you asked about.

\n", "group": "attr" }, "git_attr_foreach": { "type": "function", - "file": "attr.h", - "line": 209, - "lineto": 214, + "file": "git2/attr.h", + "line": 220, + "lineto": 225, "args": [ { "name": "repo", @@ -1647,7 +1800,7 @@ { "name": "callback", "type": "git_attr_foreach_cb", - "comment": "Function to invoke on each attribute name and value. The\n value may be NULL is the attribute is explicitly set to\n UNSPECIFIED using the '!' sign. Callback will be invoked\n only once per attribute name, even if there are multiple\n rules for a given file. The highest priority rule will be\n used. Return a non-zero value from this to stop looping.\n The value will be returned from `git_attr_foreach`." + "comment": "Function to invoke on each attribute name and value.\n See git_attr_foreach_cb." }, { "name": "payload", @@ -1667,9 +1820,9 @@ }, "git_attr_cache_flush": { "type": "function", - "file": "attr.h", - "line": 224, - "lineto": 225, + "file": "git2/attr.h", + "line": 235, + "lineto": 236, "args": [ { "name": "repo", @@ -1684,14 +1837,14 @@ "comment": null }, "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", + "comments": "

Call this if you have reason to believe that the attributes files on\n disk no longer match the cached contents of memory. This will cause\n the attributes files to be reloaded the next time that an attribute\n access function is called.

\n", "group": "attr" }, "git_attr_add_macro": { "type": "function", - "file": "attr.h", - "line": 237, - "lineto": 240, + "file": "git2/attr.h", + "line": 248, + "lineto": 251, "args": [ { "name": "repo", @@ -1716,24 +1869,24 @@ "comment": null }, "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:

\n\n
 git_attr_add_macro(repo, "binary", "-diff -crlf");\n
\n", + "comments": "

Macros will automatically be loaded from the top level .gitattributes\n file of the repository (plus the build-in "binary" macro). This\n function allows you to add others. For example, to add the default\n macro, you would call:

\n\n
 git_attr_add_macro(repo, "binary", "-diff -crlf");\n
\n", "group": "attr" }, "git_blame_init_options": { "type": "function", - "file": "blame.h", - "line": 92, - "lineto": 94, + "file": "git2/blame.h", + "line": 103, + "lineto": 105, "args": [ { "name": "opts", "type": "git_blame_options *", - "comment": "The `git_blame_options` struct to initialize" + "comment": "The `git_blame_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_BLAME_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_BLAME_OPTIONS_VERSION`." } ], "argline": "git_blame_options *opts, unsigned int version", @@ -1742,15 +1895,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_blame_options with default values. Equivalent to\n creating an instance with GIT_BLAME_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_blame_options structure

\n", + "comments": "

Initializes a git_blame_options with default values. Equivalent to creating\n an instance with GIT_BLAME_OPTIONS_INIT.

\n", "group": "blame" }, "git_blame_get_hunk_count": { "type": "function", - "file": "blame.h", - "line": 137, - "lineto": 137, + "file": "git2/blame.h", + "line": 154, + "lineto": 154, "args": [ { "name": "blame", @@ -1770,9 +1923,9 @@ }, "git_blame_get_hunk_byindex": { "type": "function", - "file": "blame.h", - "line": 146, - "lineto": 148, + "file": "git2/blame.h", + "line": 163, + "lineto": 165, "args": [ { "name": "blame", @@ -1797,9 +1950,9 @@ }, "git_blame_get_hunk_byline": { "type": "function", - "file": "blame.h", - "line": 157, - "lineto": 159, + "file": "git2/blame.h", + "line": 174, + "lineto": 176, "args": [ { "name": "blame", @@ -1829,9 +1982,9 @@ }, "git_blame_file": { "type": "function", - "file": "blame.h", - "line": 172, - "lineto": 176, + "file": "git2/blame.h", + "line": 189, + "lineto": 193, "args": [ { "name": "out", @@ -1871,9 +2024,9 @@ }, "git_blame_buffer": { "type": "function", - "file": "blame.h", - "line": 196, - "lineto": 200, + "file": "git2/blame.h", + "line": 213, + "lineto": 217, "args": [ { "name": "out", @@ -1903,14 +2056,14 @@ "comment": " 0 on success, or an error code. (use giterr_last for information\n about the error)" }, "description": "

Get blame data for a file that has been modified in memory. The reference\n parameter is a pre-calculated blame for the in-odb history of the file. This\n means that once a file blame is completed (which can be expensive), updating\n the buffer blame is very fast.

\n", - "comments": "

Lines that differ between the buffer and the committed version are marked as having a zero OID for their final_commit_id.

\n", + "comments": "

Lines that differ between the buffer and the committed version are marked as\n having a zero OID for their final_commit_id.

\n", "group": "blame" }, "git_blame_free": { "type": "function", - "file": "blame.h", - "line": 207, - "lineto": 207, + "file": "git2/blame.h", + "line": 224, + "lineto": 224, "args": [ { "name": "blame", @@ -1935,7 +2088,7 @@ }, "git_blob_lookup": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 33, "lineto": 33, "args": [ @@ -1975,7 +2128,7 @@ }, "git_blob_lookup_prefix": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 47, "lineto": 47, "args": [ @@ -2012,7 +2165,7 @@ }, "git_blob_free": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 60, "lineto": 60, "args": [ @@ -2029,7 +2182,7 @@ "comment": null }, "description": "

Close an open blob

\n", - "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT: It is necessary to call this method when you stop using a blob. Failure to do so will cause a memory leak.

\n", + "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT:\n It is necessary to call this method when you stop\n using a blob. Failure to do so will cause a memory leak.

\n", "group": "blob", "examples": { "blame.c": [ @@ -2042,7 +2195,7 @@ }, "git_blob_id": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 68, "lineto": 68, "args": [ @@ -2064,7 +2217,7 @@ }, "git_blob_owner": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 76, "lineto": 76, "args": [ @@ -2086,7 +2239,7 @@ }, "git_blob_rawcontent": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 89, "lineto": 89, "args": [ @@ -2103,7 +2256,7 @@ "comment": " the pointer" }, "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", + "comments": "

A pointer to the raw content of a blob is returned;\n this pointer is owned internally by the object and shall\n not be free'd. The pointer may be invalidated at a later\n time.

\n", "group": "blob", "examples": { "blame.c": [ @@ -2119,7 +2272,7 @@ }, "git_blob_rawsize": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 97, "lineto": 97, "args": [ @@ -2153,7 +2306,7 @@ }, "git_blob_filtered_content": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 122, "lineto": 126, "args": [ @@ -2185,12 +2338,12 @@ "comment": " 0 on success or an error code" }, "description": "

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\n

The output is written into a git_buf which the caller must free when done (via git_buf_free).

\n\n

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.

\n", + "comments": "

This applies filters as if the blob was being checked out to the\n working directory under the specified filename. This may apply\n CRLF filtering or other types of changes depending on the file\n attributes set for the blob and the content detected in it.

\n\n

The output is written into a git_buf which the caller must free\n when done (via git_buf_dispose).

\n\n

If no filters need to be applied, then the out buffer will just\n be populated with a pointer to the raw content of the blob. In\n that case, be careful to not free the blob until done with the\n buffer or copy it into memory you own.

\n", "group": "blob" }, "git_blob_create_fromworkdir": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 139, "lineto": 139, "args": [ @@ -2222,7 +2375,7 @@ }, "git_blob_create_fromdisk": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 151, "lineto": 151, "args": [ @@ -2254,7 +2407,7 @@ }, "git_blob_create_fromstream": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 178, "lineto": 181, "args": [ @@ -2281,12 +2434,12 @@ "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_frombuffer(). If you do not, but know the size of the contents (and don't want/need to perform filtering), use git_odb_open_wstream().

\n\n

Don't close this stream yourself but pass it to git_blob_create_fromstream_commit() to commit the write to the object db and get the object id.

\n\n

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.

\n", + "comments": "

This function may need to buffer the data on disk and will in\n general not be the right choice if you know the size of the data\n to write. If you have data in memory, use\n git_blob_create_frombuffer(). If you do not, but know the size of\n the contents (and don't want/need to perform filtering), use\n git_odb_open_wstream().

\n\n

Don't close this stream yourself but pass it to\n git_blob_create_fromstream_commit() to commit the write to the\n object db and get the object id.

\n\n

If the hintpath parameter is filled, it will be used to determine\n what git filters should be applied to the object before it is written\n to the object database.

\n", "group": "blob" }, "git_blob_create_fromstream_commit": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 192, "lineto": 194, "args": [ @@ -2313,7 +2466,7 @@ }, "git_blob_create_frombuffer": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 205, "lineto": 206, "args": [ @@ -2350,7 +2503,7 @@ }, "git_blob_is_binary": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 219, "lineto": 219, "args": [ @@ -2367,12 +2520,12 @@ "comment": " 1 if the content of the blob is detected\n as binary; 0 otherwise." }, "description": "

Determine if the blob content is most certainly binary or not.

\n", - "comments": "

The heuristic used to guess if a file is binary is taken from core git: Searching for NUL bytes and looking for a reasonable ratio of printable to non-printable characters among the first 8000 bytes.

\n", + "comments": "

The heuristic used to guess if a file is binary is taken from core git:\n Searching for NUL bytes and looking for a reasonable ratio of printable\n to non-printable characters among the first 8000 bytes.

\n", "group": "blob" }, "git_blob_dup": { "type": "function", - "file": "blob.h", + "file": "git2/blob.h", "line": 228, "lineto": 228, "args": [ @@ -2399,7 +2552,7 @@ }, "git_branch_create": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 50, "lineto": 55, "args": [ @@ -2436,12 +2589,12 @@ "comment": " 0, GIT_EINVALIDSPEC or an error code.\n A proper reference is written in the refs/heads namespace\n pointing to the provided target commit." }, "description": "

Create a new branch pointing at a target commit

\n", - "comments": "

A new direct reference will be created pointing to this target commit. If force is true and a reference already exists with the given name, it'll be replaced.

\n\n

The returned reference must be freed by the user.

\n\n

The branch name will be checked for validity. See git_tag_create() for rules about valid names.

\n", + "comments": "

A new direct reference will be created pointing to\n this target commit. If force is true and a reference\n already exists with the given name, it'll be replaced.

\n\n

The returned reference must be freed by the user.

\n\n

The branch name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", "group": "branch" }, "git_branch_create_from_annotated": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 68, "lineto": 73, "args": [ @@ -2478,12 +2631,12 @@ "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.

\n\n

See the documentation for git_branch_create().

\n", + "comments": "

This behaves like git_branch_create() but takes an annotated\n commit, which lets you specify which extended sha syntax string was\n specified by a user, allowing for more exact reflog messages.

\n\n

See the documentation for git_branch_create().

\n", "group": "branch" }, "git_branch_delete": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 85, "lineto": 85, "args": [ @@ -2500,12 +2653,12 @@ "comment": " 0 on success, or an error code." }, "description": "

Delete an existing branch reference.

\n", - "comments": "

If the branch is successfully deleted, the passed reference object will be invalidated. The reference must be freed manually by the user.

\n", + "comments": "

If the branch is successfully deleted, the passed reference\n object will be invalidated. The reference must be freed manually\n by the user.

\n", "group": "branch" }, "git_branch_iterator_new": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 101, "lineto": 104, "args": [ @@ -2537,7 +2690,7 @@ }, "git_branch_next": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 114, "lineto": 114, "args": [ @@ -2569,7 +2722,7 @@ }, "git_branch_iterator_free": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 121, "lineto": 121, "args": [ @@ -2591,7 +2744,7 @@ }, "git_branch_move": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 138, "lineto": 142, "args": [ @@ -2623,12 +2776,12 @@ "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.

\n", + "comments": "

The new branch name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", "group": "branch" }, "git_branch_lookup": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 165, "lineto": 169, "args": [ @@ -2660,12 +2813,12 @@ "comment": " 0 on success; GIT_ENOTFOUND when no matching branch\n exists, GIT_EINVALIDSPEC, otherwise an error code." }, "description": "

Lookup a branch by its name in a repository.

\n", - "comments": "

The generated reference must be freed by the user.

\n\n

The branch name will be checked for validity. See git_tag_create() for rules about valid names.

\n", + "comments": "

The generated reference must be freed by the user.

\n\n

The branch name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", "group": "branch" }, "git_branch_name": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 186, "lineto": 188, "args": [ @@ -2687,17 +2840,17 @@ "comment": " 0 on success; otherwise an error code (e.g., if the\n ref is no local or remote branch)." }, "description": "

Return the name of the given local or remote branch.

\n", - "comments": "

The name of the branch matches the definition of the name for git_branch_lookup. That is, if the returned name is given to git_branch_lookup() then the reference is returned that was given to this function.

\n", + "comments": "

The name of the branch matches the definition of the name\n for git_branch_lookup. That is, if the returned name is given\n to git_branch_lookup() then the reference is returned that\n was given to this function.

\n", "group": "branch", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_branch_name-6" + "ex/HEAD/merge.html#git_branch_name-4" ] } }, "git_branch_upstream": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 202, "lineto": 204, "args": [ @@ -2724,7 +2877,7 @@ }, "git_branch_set_upstream": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 216, "lineto": 216, "args": [ @@ -2749,9 +2902,41 @@ "comments": "", "group": "branch" }, + "git_branch_upstream_name": { + "type": "function", + "file": "git2/branch.h", + "line": 232, + "lineto": 235, + "args": [ + { + "name": "out", + "type": "git_buf *", + "comment": "Pointer to the user-allocated git_buf which will be\n filled with the name of the reference." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository where the branches live" + }, + { + "name": "refname", + "type": "const char *", + "comment": "reference name of the local branch." + } + ], + "argline": "git_buf *out, git_repository *repo, const char *refname", + "sig": "git_buf *::git_repository *::const char *", + "return": { + "type": "int", + "comment": " 0, GIT_ENOTFOUND when no remote tracking reference exists,\n otherwise an error code." + }, + "description": "

Return the name of the reference supporting the remote tracking branch,\n given the name of a local branch reference.

\n", + "comments": "", + "group": "branch" + }, "git_branch_is_head": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 245, "lineto": 246, "args": [ @@ -2773,7 +2958,7 @@ }, "git_branch_is_checked_out": { "type": "function", - "file": "branch.h", + "file": "git2/branch.h", "line": 257, "lineto": 258, "args": [ @@ -2793,9 +2978,73 @@ "comments": "", "group": "branch" }, - "git_buf_free": { + "git_branch_remote_name": { "type": "function", - "file": "buffer.h", + "file": "git2/branch.h", + "line": 274, + "lineto": 277, + "args": [ + { + "name": "out", + "type": "git_buf *", + "comment": "Pointer to the user-allocated git_buf which will be filled with the name of the remote." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "The repository where the branch lives." + }, + { + "name": "canonical_branch_name", + "type": "const char *", + "comment": "name of the remote tracking branch." + } + ], + "argline": "git_buf *out, git_repository *repo, const char *canonical_branch_name", + "sig": "git_buf *::git_repository *::const char *", + "return": { + "type": "int", + "comment": " 0, GIT_ENOTFOUND\n when no remote matching remote was found,\n GIT_EAMBIGUOUS when the branch maps to several remotes,\n otherwise an error code." + }, + "description": "

Return the name of remote that the remote tracking branch belongs to.

\n", + "comments": "", + "group": "branch" + }, + "git_branch_upstream_remote": { + "type": "function", + "file": "git2/branch.h", + "line": 288, + "lineto": 288, + "args": [ + { + "name": "buf", + "type": "git_buf *", + "comment": "the buffer into which to write the name" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to look" + }, + { + "name": "refname", + "type": "const char *", + "comment": "the full name of the branch" + } + ], + "argline": "git_buf *buf, git_repository *repo, const char *refname", + "sig": "git_buf *::git_repository *::const char *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Retrieve the name of the upstream remote of a local branch

\n", + "comments": "", + "group": "branch" + }, + "git_buf_dispose": { + "type": "function", + "file": "git2/buffer.h", "line": 72, "lineto": 72, "args": [ @@ -2812,25 +3061,47 @@ "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.

\n", + "comments": "

Note that this does not free the git_buf itself, just the memory\n pointed to by buffer->ptr. This will not free the memory if it looks\n like it was not allocated internally, but it will clear the buffer back\n to the empty state.

\n", "group": "buf", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_buf_free-1" + "ex/HEAD/diff.html#git_buf_dispose-1" ], "remote.c": [ - "ex/HEAD/remote.html#git_buf_free-1" + "ex/HEAD/remote.html#git_buf_dispose-1" ], "tag.c": [ - "ex/HEAD/tag.html#git_buf_free-1" + "ex/HEAD/tag.html#git_buf_dispose-1" ] } }, + "git_buf_free": { + "type": "function", + "file": "git2/buffer.h", + "line": 84, + "lineto": 84, + "args": [ + { + "name": "buffer", + "type": "git_buf *", + "comment": null + } + ], + "argline": "git_buf *buffer", + "sig": "git_buf *", + "return": { + "type": "void", + "comment": null + }, + "description": "", + "comments": "", + "group": "buf" + }, "git_buf_grow": { "type": "function", - "file": "buffer.h", - "line": 95, - "lineto": 95, + "file": "git2/buffer.h", + "line": 107, + "lineto": 107, "args": [ { "name": "buffer", @@ -2850,14 +3121,14 @@ "comment": " 0 on success, -1 on allocation failure" }, "description": "

Resize the buffer allocation to make more space.

\n", - "comments": "

This will attempt to grow the buffer to accommodate the target size.

\n\n

If 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.

\n\n

Currently, this will never shrink a buffer, only expand it.

\n\n

If the allocation fails, this will return an error and the buffer will be marked as invalid for future operations, invaliding the contents.

\n", + "comments": "

This will attempt to grow the buffer to accommodate the target size.

\n\n

If the buffer refers to memory that was not allocated by libgit2 (i.e.\n the asize field is zero), then ptr will be replaced with a newly\n allocated block of data. Be careful so that memory allocated by the\n caller is not lost. As a special variant, if you pass target_size as\n 0 and the memory is not allocated by libgit2, this will allocate a new\n buffer of size size and copy the external data into it.

\n\n

Currently, this will never shrink a buffer, only expand it.

\n\n

If the allocation fails, this will return an error and the buffer will be\n marked as invalid for future operations, invaliding the contents.

\n", "group": "buf" }, "git_buf_set": { "type": "function", - "file": "buffer.h", - "line": 105, - "lineto": 106, + "file": "git2/buffer.h", + "line": 117, + "lineto": 118, "args": [ { "name": "buffer", @@ -2887,9 +3158,9 @@ }, "git_buf_is_binary": { "type": "function", - "file": "buffer.h", - "line": 114, - "lineto": 114, + "file": "git2/buffer.h", + "line": 126, + "lineto": 126, "args": [ { "name": "buf", @@ -2909,9 +3180,9 @@ }, "git_buf_contains_nul": { "type": "function", - "file": "buffer.h", - "line": 122, - "lineto": 122, + "file": "git2/buffer.h", + "line": 134, + "lineto": 134, "args": [ { "name": "buf", @@ -2931,19 +3202,19 @@ }, "git_checkout_init_options": { "type": "function", - "file": "checkout.h", - "line": 308, - "lineto": 310, + "file": "git2/checkout.h", + "line": 309, + "lineto": 311, "args": [ { "name": "opts", "type": "git_checkout_options *", - "comment": "the `git_checkout_options` struct to initialize." + "comment": "The `git_checkout_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_CHECKOUT_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_CHECKOUT_OPTIONS_VERSION`." } ], "argline": "git_checkout_options *opts, unsigned int version", @@ -2952,15 +3223,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_checkout_options with default values. Equivalent to\n creating an instance with GIT_CHECKOUT_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_checkout_options structure

\n", + "comments": "

Initializes a git_checkout_options with default values. Equivalent to creating\n an instance with GIT_CHECKOUT_OPTIONS_INIT.

\n", "group": "checkout" }, "git_checkout_head": { "type": "function", - "file": "checkout.h", - "line": 329, - "lineto": 331, + "file": "git2/checkout.h", + "line": 330, + "lineto": 332, "args": [ { "name": "repo", @@ -2980,14 +3251,14 @@ "comment": " 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non\n existing branch, non-zero value returned by `notify_cb`, or\n other error code \n<\n 0 (use giterr_last for error details)" }, "description": "

Updates files in the index and the working tree to match the content of\n the commit pointed at by HEAD.

\n", - "comments": "

Note that this is not the correct mechanism used to switch branches; do not change your HEAD and then call this method, that would leave you with checkout conflicts since your working directory would then appear to be dirty. Instead, checkout the target of the branch and then update HEAD using git_repository_set_head to point to the branch you checked out.

\n", + "comments": "

Note that this is not the correct mechanism used to switch branches;\n do not change your HEAD and then call this method, that would leave\n you with checkout conflicts since your working directory would then\n appear to be dirty. Instead, checkout the target of the branch and\n then update HEAD using git_repository_set_head to point to the\n branch you checked out.

\n", "group": "checkout" }, "git_checkout_index": { "type": "function", - "file": "checkout.h", - "line": 342, - "lineto": 345, + "file": "git2/checkout.h", + "line": 343, + "lineto": 346, "args": [ { "name": "repo", @@ -3017,9 +3288,9 @@ }, "git_checkout_tree": { "type": "function", - "file": "checkout.h", - "line": 358, - "lineto": 361, + "file": "git2/checkout.h", + "line": 359, + "lineto": 362, "args": [ { "name": "repo", @@ -3047,26 +3318,29 @@ "comments": "", "group": "checkout", "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_checkout_tree-5" + ], "merge.c": [ - "ex/HEAD/merge.html#git_checkout_tree-7" + "ex/HEAD/merge.html#git_checkout_tree-5" ] } }, "git_cherrypick_init_options": { "type": "function", - "file": "cherrypick.h", - "line": 47, - "lineto": 49, + "file": "git2/cherrypick.h", + "line": 49, + "lineto": 51, "args": [ { "name": "opts", "type": "git_cherrypick_options *", - "comment": "the `git_cherrypick_options` struct to initialize" + "comment": "The `git_cherrypick_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_CHERRYPICK_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_CHERRYPICK_OPTIONS_VERSION`." } ], "argline": "git_cherrypick_options *opts, unsigned int version", @@ -3075,15 +3349,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_cherrypick_options with default values. Equivalent to\n creating an instance with GIT_CHERRYPICK_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_cherrypick_options structure

\n", + "comments": "

Initializes a git_cherrypick_options with default values. Equivalent to creating\n an instance with GIT_CHERRYPICK_OPTIONS_INIT.

\n", "group": "cherrypick" }, "git_cherrypick_commit": { "type": "function", - "file": "cherrypick.h", - "line": 65, - "lineto": 71, + "file": "git2/cherrypick.h", + "line": 67, + "lineto": 73, "args": [ { "name": "out", @@ -3128,9 +3402,9 @@ }, "git_cherrypick": { "type": "function", - "file": "cherrypick.h", - "line": 81, - "lineto": 84, + "file": "git2/cherrypick.h", + "line": 83, + "lineto": 86, "args": [ { "name": "repo", @@ -3160,19 +3434,19 @@ }, "git_clone_init_options": { "type": "function", - "file": "clone.h", - "line": 179, - "lineto": 181, + "file": "git2/clone.h", + "line": 181, + "lineto": 183, "args": [ { "name": "opts", "type": "git_clone_options *", - "comment": "The `git_clone_options` struct to initialize" + "comment": "The `git_clone_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_CLONE_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_CLONE_OPTIONS_VERSION`." } ], "argline": "git_clone_options *opts, unsigned int version", @@ -3181,15 +3455,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_clone_options with default values. Equivalent to\n creating an instance with GIT_CLONE_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_clone_options structure

\n", + "comments": "

Initializes a git_clone_options with default values. Equivalent to creating\n an instance with GIT_CLONE_OPTIONS_INIT.

\n", "group": "clone" }, "git_clone": { "type": "function", - "file": "clone.h", - "line": 199, - "lineto": 203, + "file": "git2/clone.h", + "line": 201, + "lineto": 205, "args": [ { "name": "out", @@ -3219,17 +3493,12 @@ "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `giterr_last` for a detailed error message)" }, "description": "

Clone a remote repository.

\n", - "comments": "

By default this creates its repository and initial remote to match git's defaults. You can use the options in the callback to customize how these are created.

\n", - "group": "clone", - "examples": { - "network/clone.c": [ - "ex/HEAD/network/clone.html#git_clone-1" - ] - } + "comments": "

By default this creates its repository and initial remote to match\n git's defaults. You can use the options in the callback to\n customize how these are created.

\n", + "group": "clone" }, "git_commit_lookup": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 36, "lineto": 37, "args": [ @@ -3256,9 +3525,12 @@ "comment": " 0 or an error code" }, "description": "

Lookup a commit object from a repository.

\n", - "comments": "

The returned object should be released with git_commit_free when no longer needed.

\n", + "comments": "

The returned object should be released with git_commit_free when no\n longer needed.

\n", "group": "commit", "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_commit_lookup-6" + ], "general.c": [ "ex/HEAD/general.html#git_commit_lookup-6", "ex/HEAD/general.html#git_commit_lookup-7", @@ -3268,13 +3540,13 @@ "ex/HEAD/log.html#git_commit_lookup-1" ], "merge.c": [ - "ex/HEAD/merge.html#git_commit_lookup-8" + "ex/HEAD/merge.html#git_commit_lookup-6" ] } }, "git_commit_lookup_prefix": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 55, "lineto": 56, "args": [ @@ -3306,12 +3578,12 @@ "comment": " 0 or an error code" }, "description": "

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.

\n", + "comments": "

The returned object should be released with git_commit_free when no\n longer needed.

\n", "group": "commit" }, "git_commit_free": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 70, "lineto": 70, "args": [ @@ -3328,9 +3600,12 @@ "comment": null }, "description": "

Close an open commit

\n", - "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT: It is necessary to call this method when you stop using a commit. Failure to do so will cause a memory leak.

\n", + "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT:\n It is necessary to call this method when you stop\n using a commit. Failure to do so will cause a memory leak.

\n", "group": "commit", "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_commit_free-7" + ], "general.c": [ "ex/HEAD/general.html#git_commit_free-9", "ex/HEAD/general.html#git_commit_free-10", @@ -3348,7 +3623,7 @@ }, "git_commit_id": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 78, "lineto": 78, "args": [ @@ -3378,7 +3653,7 @@ }, "git_commit_owner": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 86, "lineto": 86, "args": [ @@ -3406,7 +3681,7 @@ }, "git_commit_message_encoding": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 98, "lineto": 98, "args": [ @@ -3423,12 +3698,12 @@ "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.

\n", + "comments": "

The encoding may be NULL if the encoding header\n in the commit is missing; in that case UTF-8 is assumed.

\n", "group": "commit" }, "git_commit_message": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 109, "lineto": 109, "args": [ @@ -3445,7 +3720,7 @@ "comment": " the message of a commit" }, "description": "

Get the full message of a commit.

\n", - "comments": "

The returned message will be slightly prettified by removing any potential leading newlines.

\n", + "comments": "

The returned message will be slightly prettified by removing any\n potential leading newlines.

\n", "group": "commit", "examples": { "cat-file.c": [ @@ -3469,7 +3744,7 @@ }, "git_commit_message_raw": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 117, "lineto": 117, "args": [ @@ -3491,7 +3766,7 @@ }, "git_commit_summary": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 128, "lineto": 128, "args": [ @@ -3508,12 +3783,12 @@ "comment": " the summary of a commit or NULL on error" }, "description": "

Get the short "summary" of the git commit message.

\n", - "comments": "

The returned message is the summary of the commit, comprising the first paragraph of the message with whitespace trimmed and squashed.

\n", + "comments": "

The returned message is the summary of the commit, comprising the\n first paragraph of the message with whitespace trimmed and squashed.

\n", "group": "commit" }, "git_commit_body": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 141, "lineto": 141, "args": [ @@ -3530,12 +3805,12 @@ "comment": " the body of a commit or NULL when no the message only\n consists of a summary" }, "description": "

Get the long "body" of the git commit message.

\n", - "comments": "

The returned message is the body of the commit, comprising everything but the first paragraph of the message. Leading and trailing whitespaces are trimmed.

\n", + "comments": "

The returned message is the body of the commit, comprising\n everything but the first paragraph of the message. Leading and\n trailing whitespaces are trimmed.

\n", "group": "commit" }, "git_commit_time": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 149, "lineto": 149, "args": [ @@ -3563,7 +3838,7 @@ }, "git_commit_time_offset": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 157, "lineto": 157, "args": [ @@ -3585,7 +3860,7 @@ }, "git_commit_committer": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 165, "lineto": 165, "args": [ @@ -3618,7 +3893,7 @@ }, "git_commit_author": { "type": "function", - "file": "commit.h", + "file": "git2/commit.h", "line": 173, "lineto": 173, "args": [ @@ -3651,11 +3926,75 @@ ] } }, + "git_commit_committer_with_mailmap": { + "type": "function", + "file": "git2/commit.h", + "line": 186, + "lineto": 187, + "args": [ + { + "name": "out", + "type": "git_signature **", + "comment": "a pointer to store the resolved signature." + }, + { + "name": "commit", + "type": "const git_commit *", + "comment": "a previously loaded commit." + }, + { + "name": "mailmap", + "type": "const git_mailmap *", + "comment": "the mailmap to resolve with. (may be NULL)" + } + ], + "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" + }, + "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.

\n", + "group": "commit" + }, + "git_commit_author_with_mailmap": { + "type": "function", + "file": "git2/commit.h", + "line": 200, + "lineto": 201, + "args": [ + { + "name": "out", + "type": "git_signature **", + "comment": "a pointer to store the resolved signature." + }, + { + "name": "commit", + "type": "const git_commit *", + "comment": "a previously loaded commit." + }, + { + "name": "mailmap", + "type": "const git_mailmap *", + "comment": "the mailmap to resolve with. (may be NULL)" + } + ], + "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" + }, + "description": "

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.

\n", + "group": "commit" + }, "git_commit_raw_header": { "type": "function", - "file": "commit.h", - "line": 181, - "lineto": 181, + "file": "git2/commit.h", + "line": 209, + "lineto": 209, "args": [ { "name": "commit", @@ -3675,9 +4014,9 @@ }, "git_commit_tree": { "type": "function", - "file": "commit.h", - "line": 190, - "lineto": 190, + "file": "git2/commit.h", + "line": 218, + "lineto": 218, "args": [ { "name": "tree_out", @@ -3711,9 +4050,9 @@ }, "git_commit_tree_id": { "type": "function", - "file": "commit.h", - "line": 200, - "lineto": 200, + "file": "git2/commit.h", + "line": 228, + "lineto": 228, "args": [ { "name": "commit", @@ -3738,9 +4077,9 @@ }, "git_commit_parentcount": { "type": "function", - "file": "commit.h", - "line": 208, - "lineto": 208, + "file": "git2/commit.h", + "line": 236, + "lineto": 236, "args": [ { "name": "commit", @@ -3772,9 +4111,9 @@ }, "git_commit_parent": { "type": "function", - "file": "commit.h", - "line": 218, - "lineto": 221, + "file": "git2/commit.h", + "line": 246, + "lineto": 249, "args": [ { "name": "out", @@ -3813,9 +4152,9 @@ }, "git_commit_parent_id": { "type": "function", - "file": "commit.h", - "line": 232, - "lineto": 234, + "file": "git2/commit.h", + "line": 260, + "lineto": 262, "args": [ { "name": "commit", @@ -3848,9 +4187,9 @@ }, "git_commit_nth_gen_ancestor": { "type": "function", - "file": "commit.h", - "line": 250, - "lineto": 253, + "file": "git2/commit.h", + "line": 278, + "lineto": 281, "args": [ { "name": "ancestor", @@ -3875,14 +4214,14 @@ "comment": " 0 on success; GIT_ENOTFOUND if no matching ancestor exists\n or an error code" }, "description": "

Get the commit object that is the \n<n

\n\n
\n

th generation ancestor\n of the named commit object, following only the first parents.\n The returned commit has to be freed by the caller.

\n
\n", - "comments": "

Passing 0 as the generation number returns another instance of the base commit itself.

\n", + "comments": "

Passing 0 as the generation number returns another instance of the\n base commit itself.

\n", "group": "commit" }, "git_commit_header_field": { "type": "function", - "file": "commit.h", - "line": 265, - "lineto": 265, + "file": "git2/commit.h", + "line": 293, + "lineto": 293, "args": [ { "name": "out", @@ -3912,9 +4251,9 @@ }, "git_commit_extract_signature": { "type": "function", - "file": "commit.h", - "line": 285, - "lineto": 285, + "file": "git2/commit.h", + "line": 313, + "lineto": 313, "args": [ { "name": "signature", @@ -3949,14 +4288,14 @@ "comment": " 0 on success, GIT_ENOTFOUND if the id is not for a commit\n or the commit does not have a signature." }, "description": "

Extract the signature from a commit

\n", - "comments": "

If the id is not for a commit, the error class will be GITERR_INVALID. If the commit does not have a signature, the error class will be GITERR_OBJECT.

\n", + "comments": "

If the id is not for a commit, the error class will be\n GITERR_INVALID. If the commit does not have a signature, the\n error class will be GITERR_OBJECT.

\n", "group": "commit" }, "git_commit_create": { "type": "function", - "file": "commit.h", - "line": 331, - "lineto": 341, + "file": "git2/commit.h", + "line": 359, + "lineto": 369, "args": [ { "name": "id", @@ -4016,19 +4355,19 @@ "comment": " 0 or an error code\n\tThe created commit will be written to the Object Database and\n\tthe given reference will be updated to point to it" }, "description": "

Create new commit in the repository from a list of git_object pointers

\n", - "comments": "

The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.

\n", + "comments": "

The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.

\n", "group": "commit", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_commit_create-9" + "ex/HEAD/merge.html#git_commit_create-7" ] } }, "git_commit_create_v": { "type": "function", - "file": "commit.h", - "line": 357, - "lineto": 367, + "file": "git2/commit.h", + "line": 385, + "lineto": 395, "args": [ { "name": "id", @@ -4083,7 +4422,7 @@ "comment": null }, "description": "

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.

\n\n

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

\n\n

All other parameters remain the same as git_commit_create().

\n", + "comments": "

The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.

\n\n

The parents for the commit are specified as a variable list of pointers\n to const git_commit *. Note that this is a convenience method which may\n not be safe to export for certain languages or compilers

\n\n

All other parameters remain the same as git_commit_create().

\n", "group": "commit", "examples": { "general.c": [ @@ -4096,9 +4435,9 @@ }, "git_commit_amend": { "type": "function", - "file": "commit.h", - "line": 390, - "lineto": 398, + "file": "git2/commit.h", + "line": 418, + "lineto": 426, "args": [ { "name": "id", @@ -4148,14 +4487,14 @@ "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\n

The 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.

\n\n

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.

\n\n

All parameters have the same meanings as in git_commit_create().

\n", + "comments": "

This creates a new commit that is exactly the same as the old commit,\n except that any non-NULL values will be updated. The new commit has\n the same parents as the old commit.

\n\n

The update_ref value works as in the regular git_commit_create(),\n updating the ref to point to the newly rewritten commit. If you want\n to amend a commit that is not currently the tip of the branch and then\n rewrite the following commits to reach a ref, pass this as NULL and\n update the rest of the commit chain and ref separately.

\n\n

Unlike git_commit_create(), the author, committer, message,\n message_encoding, and tree parameters can be NULL in which case this\n will use the values from the original commit_to_amend.

\n\n

All parameters have the same meanings as in git_commit_create().

\n", "group": "commit" }, "git_commit_create_buffer": { "type": "function", - "file": "commit.h", - "line": 435, - "lineto": 444, + "file": "git2/commit.h", + "line": 463, + "lineto": 472, "args": [ { "name": "out", @@ -4210,14 +4549,14 @@ "comment": " 0 or an error code" }, "description": "

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.

\n", + "comments": "

Create a commit as with git_commit_create() but instead of\n writing it to the objectdb, write the contents of the object into a\n buffer.

\n", "group": "commit" }, "git_commit_create_with_signature": { "type": "function", - "file": "commit.h", - "line": 460, - "lineto": 465, + "file": "git2/commit.h", + "line": 488, + "lineto": 493, "args": [ { "name": "out", @@ -4252,14 +4591,14 @@ "comment": " 0 or an error code" }, "description": "

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", + "comments": "

Given the unsigned commit object's contents, its signature and the\n header field in which to store the signature, attach the signature\n to the commit and write it into the given repository.

\n", "group": "commit" }, "git_commit_dup": { "type": "function", - "file": "commit.h", - "line": 474, - "lineto": 474, + "file": "git2/commit.h", + "line": 502, + "lineto": 502, "args": [ { "name": "out", @@ -4284,9 +4623,9 @@ }, "git_libgit2_version": { "type": "function", - "file": "common.h", - "line": 105, - "lineto": 105, + "file": "git2/common.h", + "line": 116, + "lineto": 116, "args": [ { "name": "major", @@ -4316,9 +4655,9 @@ }, "git_libgit2_features": { "type": "function", - "file": "common.h", - "line": 154, - "lineto": 154, + "file": "git2/common.h", + "line": 165, + "lineto": 165, "args": [], "argline": "", "sig": "", @@ -4327,14 +4666,14 @@ "comment": " A combination of GIT_FEATURE_* values." }, "description": "

Query compile time options for libgit2.

\n", - "comments": "
    \n
  • 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.

  • \n
  • GIT_FEATURE_HTTPS Libgit2 supports the https:// protocol. This requires the openssl library to be found when compiling libgit2.

  • \n
  • GIT_FEATURE_SSH Libgit2 supports the SSH protocol for network operations. This requires the libssh2 library to be found when compiling libgit2

  • \n
\n", + "comments": "
    \n
  • GIT_FEATURE_THREADS\nLibgit2 was compiled with thread support. Note that thread support is\nstill to be seen as a 'work in progress' - basic object lookups are\nbelieved to be threadsafe, but other operations may not be.

  • \n
  • GIT_FEATURE_HTTPS\nLibgit2 supports the https:// protocol. This requires the openssl\nlibrary to be found when compiling libgit2.

  • \n
  • GIT_FEATURE_SSH\nLibgit2 supports the SSH protocol for network operations. This requires\nthe libssh2 library to be found when compiling libgit2

  • \n
\n", "group": "libgit2" }, "git_libgit2_opts": { "type": "function", - "file": "common.h", - "line": 352, - "lineto": 352, + "file": "git2/common.h", + "line": 393, + "lineto": 393, "args": [ { "name": "option", @@ -4349,14 +4688,14 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

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_otype 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_OBJ_BLOB (i.e. won't cache blobs) and 4k        > for GIT_OBJ_COMMIT, GIT_OBJ_TREE, and GIT_OBJ_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", + "comments": "

Available options:

\n\n
* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n    > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n    > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n    > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n    >Set the maximum amount of memory that can be mapped at any time\n    by the library\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n    > Get the search path for a given level of config data.  "level" must\n    > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`,\n    > `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n    > The search path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n    > Set the search path for a level of config data.  The search path\n    > applied to shared attributes and ignore files, too.\n    >\n    > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR.\n    >   Pass NULL to reset to the default (generally based on environment\n    >   variables).  Use magic path `$PATH` to include the old value\n    >   of the path (if you want to prepend or append, for instance).\n    >\n    > - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`,\n    >   `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or\n    >   `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_otype type, size_t size)\n\n    > Set the maximum data size for the given type of object to be\n    > considered eligible for caching in memory.  Setting to value to\n    > zero means that that type of object will not be cached.\n    > Defaults to 0 for GIT_OBJ_BLOB (i.e. won't cache blobs) and 4k\n    > for GIT_OBJ_COMMIT, GIT_OBJ_TREE, and GIT_OBJ_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n    > Set the maximum total data size that will be cached in memory\n    > across all repositories before libgit2 starts evicting objects\n    > from the cache.  This is a soft limit, in that the library might\n    > briefly exceed it, but will start aggressively evicting objects\n    > from cache when that happens.  The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n    > Enable or disable caching completely.\n    >\n    > Because caches are repository-specific, disabling the cache\n    > cannot immediately clear all cached objects, but each cache will\n    > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n    > Get the current bytes in cache and the maximum that would be\n    > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n    > Get the default template path.\n    > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n    > Set the default template path.\n    >\n    > - `path` directory of template.\n\n* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)\n\n    > Set the SSL certificate-authority locations.\n    >\n    > - `file` is the location of a file containing several\n    >   certificates concatenated together.\n    > - `path` is the location of a directory holding several\n    >   certificates, one per file.\n    >\n    > Either parameter may be `NULL`, but not both.\n\n* opts(GIT_OPT_SET_USER_AGENT, const char *user_agent)\n\n    > Set the value of the User-Agent header.  This value will be\n    > appended to "git/1.0", for compatibility with other git clients.\n    >\n    > - `user_agent` is the value that will be delivered as the\n    >   User-Agent header on HTTP requests.\n\n* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)\n\n    > Set the share mode used when opening files on Windows.\n    > For more information, see the documentation for CreateFile.\n    > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE.  This is\n    > ignored and unused on non-Windows platforms.\n\n* opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)\n\n    > Get the share mode used when opening files on Windows.\n\n* opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)\n\n    > Enable strict input validation when creating new objects\n    > to ensure that all inputs to the new objects are valid.  For\n    > example, when this is enabled, the parent(s) and tree inputs\n    > will be validated when creating a new commit.  This defaults\n    > to enabled.\n\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n    > Validate the target of a symbolic ref when creating it.  For\n    > example, `foobar` is not a valid ref, therefore `foobar` is\n    > not a valid target for a symbolic ref by default, whereas\n    > `refs/heads/foobar` is.  Disabling this bypasses validation\n    > so that an arbitrary strings such as `foobar` can be used\n    > for a symbolic ref target.  This defaults to enabled.\n\n* opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)\n\n    > Set the SSL ciphers use for HTTPS connections.\n    >\n    > - `ciphers` is the list of ciphers that are eanbled.\n\n* opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)\n\n    > Enable or disable the use of "offset deltas" when creating packfiles,\n    > and the negotiation of them when talking to a remote server.\n    > Offset deltas store a delta base location as an offset into the\n    > packfile from the current location, which provides a shorter encoding\n    > and thus smaller resultant packfiles.\n    > Packfiles containing offset deltas can still be read.\n    > This defaults to enabled.\n\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n    > Enable synchronized writes of files in the gitdir using `fsync`\n    > (or the platform equivalent) to ensure that new object data\n    > is written to permanent storage, not simply cached.  This\n    > defaults to disabled.\n\n opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)\n\n    > Enable strict verification of object hashsums when reading\n    > objects from disk. This may impact performance due to an\n    > additional checksum calculation on each object. This defaults\n    > to enabled.\n\n opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)\n\n    > Set the memory allocator to a different memory allocator. This\n    > allocator will then be used to make all memory allocations for\n    > libgit2 operations.\n\n opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)\n\n    > Ensure that there are no unsaved changes in the index before\n    > beginning any operation that reloads the index from disk (eg,\n    > checkout).  If there are unsaved changes, the instruction will\n    > fail.  (Using the FORCE flag to checkout will still overwrite\n    > these changes.)\n\n opts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)\n\n    > Get the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote. This can be\n    > used to limit maximum memory usage when fetching from an untrusted\n    > remote.\n\n opts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)\n\n    > Set the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote.\n
\n", "group": "libgit2" }, "git_config_entry_free": { "type": "function", - "file": "config.h", - "line": 75, - "lineto": 75, + "file": "git2/config.h", + "line": 76, + "lineto": 76, "args": [ { "name": "", @@ -4376,9 +4715,9 @@ }, "git_config_find_global": { "type": "function", - "file": "config.h", - "line": 116, - "lineto": 116, + "file": "git2/config.h", + "line": 127, + "lineto": 127, "args": [ { "name": "out", @@ -4393,14 +4732,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.

\n\n

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.

\n\n

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\n located in $HOME/.gitconfig.

\n\n

This method will try to guess the full path to that\n file, if the file exists. The returned path\n may be used on any git_config call to load the\n global configuration file.

\n\n

This method will not guess the path to the xdg compatible\n config file (.config/git/config).

\n", "group": "config" }, "git_config_find_xdg": { "type": "function", - "file": "config.h", - "line": 133, - "lineto": 133, + "file": "git2/config.h", + "line": 144, + "lineto": 144, "args": [ { "name": "out", @@ -4415,14 +4754,14 @@ "comment": " 0 if a xdg compatible configuration file has been\n\tfound. Its path will be stored in `out`." }, "description": "

Locate the path to the global xdg compatible configuration file

\n", - "comments": "

The xdg compatible configuration file is usually located in $HOME/.config/git/config.

\n\n

This method will try to guess the full path to that file, if the file exists. The returned path may be used on any git_config call to load the xdg compatible configuration file.

\n", + "comments": "

The xdg compatible configuration file is usually\n located in $HOME/.config/git/config.

\n\n

This method will try to guess the full path to that\n file, if the file exists. The returned path\n may be used on any git_config call to load the\n xdg compatible configuration file.

\n", "group": "config" }, "git_config_find_system": { "type": "function", - "file": "config.h", - "line": 145, - "lineto": 145, + "file": "git2/config.h", + "line": 156, + "lineto": 156, "args": [ { "name": "out", @@ -4437,14 +4776,14 @@ "comment": " 0 if a system configuration file has been\n\tfound. Its path will be stored in `out`." }, "description": "

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\n %PROGRAMFILES%

\n\n

.

\n", "group": "config" }, "git_config_find_programdata": { "type": "function", - "file": "config.h", - "line": 156, - "lineto": 156, + "file": "git2/config.h", + "line": 167, + "lineto": 167, "args": [ { "name": "out", @@ -4459,14 +4798,14 @@ "comment": " 0 if a ProgramData configuration file has been\n\tfound. Its path will be stored in `out`." }, "description": "

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%

\n\n

used by portable git.

\n", "group": "config" }, "git_config_open_default": { "type": "function", - "file": "config.h", - "line": 168, - "lineto": 168, + "file": "git2/config.h", + "line": 179, + "lineto": 179, "args": [ { "name": "out", @@ -4481,14 +4820,14 @@ "comment": " 0 or an error code" }, "description": "

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", + "comments": "

Utility wrapper that finds the global, XDG and system configuration files\n and opens them into a single prioritized config object that can be\n used when accessing default config data outside a repository.

\n", "group": "config" }, "git_config_new": { "type": "function", - "file": "config.h", - "line": 179, - "lineto": 179, + "file": "git2/config.h", + "line": 190, + "lineto": 190, "args": [ { "name": "out", @@ -4503,14 +4842,14 @@ "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", + "comments": "

This object is empty, so you have to add a file to it before you\n can do anything with it.

\n", "group": "config" }, "git_config_add_file_ondisk": { "type": "function", - "file": "config.h", - "line": 208, - "lineto": 213, + "file": "git2/config.h", + "line": 219, + "lineto": 224, "args": [ { "name": "cfg", @@ -4545,14 +4884,14 @@ "comment": " 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0),\n GIT_ENOTFOUND when the file doesn't exist or error code" }, "description": "

Add an on-disk config file instance to an existing config

\n", - "comments": "

The on-disk file pointed at by path will be opened and parsed; it's expected to be a native Git config file following the default Git config syntax (see man git-config).

\n\n

If the file does not exist, the file will still be added and it will be created the first time we write to it.

\n\n

Note that the configuration object will free the file automatically.

\n\n

Further queries on this config object will access each of the config file instances in order (instances with a higher priority level will be accessed first).

\n", + "comments": "

The on-disk file pointed at by path will be opened and\n parsed; it's expected to be a native Git config file following\n the default Git config syntax (see man git-config).

\n\n

If the file does not exist, the file will still be added and it\n will be created the first time we write to it.

\n\n

Note that the configuration object will free the file\n automatically.

\n\n

Further queries on this config object will access each\n of the config file instances in order (instances with\n a higher priority level will be accessed first).

\n", "group": "config" }, "git_config_open_ondisk": { "type": "function", - "file": "config.h", - "line": 227, - "lineto": 227, + "file": "git2/config.h", + "line": 238, + "lineto": 238, "args": [ { "name": "out", @@ -4572,7 +4911,7 @@ "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", + "comments": "

This method is a simple utility wrapper for the following sequence\n of calls:\n - git_config_new\n - git_config_add_file_ondisk

\n", "group": "config", "examples": { "general.c": [ @@ -4582,9 +4921,9 @@ }, "git_config_open_level": { "type": "function", - "file": "config.h", - "line": 245, - "lineto": 248, + "file": "git2/config.h", + "line": 256, + "lineto": 259, "args": [ { "name": "out", @@ -4609,14 +4948,14 @@ "comment": " 0, GIT_ENOTFOUND if the passed level cannot be found in the\n multi-level parent config, or an error code" }, "description": "

Build a single-level focused config object from a multi-level one.

\n", - "comments": "

The returned config object can be used to perform get/set/delete operations on a single specific level.

\n\n

Getting several times the same level from the same parent multi-level config will return different config instances, but containing the same config_file instance.

\n", + "comments": "

The returned config object can be used to perform get/set/delete operations\n on a single specific level.

\n\n

Getting several times the same level from the same parent multi-level config\n will return different config instances, but containing the same config_file\n instance.

\n", "group": "config" }, "git_config_open_global": { "type": "function", - "file": "config.h", - "line": 262, - "lineto": 262, + "file": "git2/config.h", + "line": 273, + "lineto": 273, "args": [ { "name": "out", @@ -4636,14 +4975,14 @@ "comment": null }, "description": "

Open the global/XDG configuration file according to git's rules

\n", - "comments": "

Git allows you to store your global configuration at $HOME/.config 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.

\n", + "comments": "

Git allows you to store your global configuration at\n $HOME/.gitconfig or $XDG_CONFIG_HOME/git/config. For backwards\n compatability, the XDG file shouldn't be used unless the use has\n created it explicitly. With this function you'll open the correct\n one to write to.

\n", "group": "config" }, "git_config_snapshot": { "type": "function", - "file": "config.h", - "line": 278, - "lineto": 278, + "file": "git2/config.h", + "line": 289, + "lineto": 289, "args": [ { "name": "out", @@ -4663,14 +5002,14 @@ "comment": " 0 or an error code" }, "description": "

Create a snapshot of the configuration

\n", - "comments": "

Create a snapshot of the current state of a configuration, which allows you to look into a consistent view of the configuration for looking up complex values (e.g. a remote, submodule).

\n\n

The string returned when querying such a config object is valid until it is freed.

\n", + "comments": "

Create a snapshot of the current state of a configuration, which\n allows you to look into a consistent view of the configuration for\n looking up complex values (e.g. a remote, submodule).

\n\n

The string returned when querying such a config object is valid\n until it is freed.

\n", "group": "config" }, "git_config_free": { "type": "function", - "file": "config.h", - "line": 285, - "lineto": 285, + "file": "git2/config.h", + "line": 296, + "lineto": 296, "args": [ { "name": "cfg", @@ -4696,9 +5035,9 @@ }, "git_config_get_entry": { "type": "function", - "file": "config.h", - "line": 297, - "lineto": 300, + "file": "git2/config.h", + "line": 308, + "lineto": 311, "args": [ { "name": "out", @@ -4728,9 +5067,9 @@ }, "git_config_get_int32": { "type": "function", - "file": "config.h", - "line": 314, - "lineto": 314, + "file": "git2/config.h", + "line": 325, + "lineto": 325, "args": [ { "name": "out", @@ -4755,7 +5094,7 @@ "comment": " 0 or an error code" }, "description": "

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", + "comments": "

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", "group": "config", "examples": { "general.c": [ @@ -4766,9 +5105,9 @@ }, "git_config_get_int64": { "type": "function", - "file": "config.h", - "line": 328, - "lineto": 328, + "file": "git2/config.h", + "line": 339, + "lineto": 339, "args": [ { "name": "out", @@ -4793,14 +5132,14 @@ "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", + "comments": "

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_bool": { "type": "function", - "file": "config.h", - "line": 345, - "lineto": 345, + "file": "git2/config.h", + "line": 356, + "lineto": 356, "args": [ { "name": "out", @@ -4825,14 +5164,14 @@ "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\n

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", + "comments": "

This function uses the usual C convention of 0 being false and\n anything else true.

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_path": { "type": "function", - "file": "config.h", - "line": 363, - "lineto": 363, + "file": "git2/config.h", + "line": 374, + "lineto": 374, "args": [ { "name": "out", @@ -4857,14 +5196,14 @@ "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().

\n\n

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", + "comments": "

A leading '~' will be expanded to the global search path (which\n defaults to the user's home directory but can be overridden via\n git_libgit2_opts().

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_string": { "type": "function", - "file": "config.h", - "line": 381, - "lineto": 381, + "file": "git2/config.h", + "line": 392, + "lineto": 392, "args": [ { "name": "out", @@ -4889,7 +5228,7 @@ "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\n

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", + "comments": "

This function can only be used on snapshot config objects. The\n string is owned by the config and should not be freed by the\n user. The pointer will be valid until the config is freed.

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", "group": "config", "examples": { "general.c": [ @@ -4900,9 +5239,9 @@ }, "git_config_get_string_buf": { "type": "function", - "file": "config.h", - "line": 397, - "lineto": 397, + "file": "git2/config.h", + "line": 408, + "lineto": 408, "args": [ { "name": "out", @@ -4927,14 +5266,14 @@ "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\n

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", + "comments": "

The value of the config will be copied into the buffer.

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_multivar_foreach": { "type": "function", - "file": "config.h", - "line": 415, - "lineto": 415, + "file": "git2/config.h", + "line": 426, + "lineto": 426, "args": [ { "name": "cfg", @@ -4969,14 +5308,14 @@ "comment": null }, "description": "

Get each value of a multivar in a foreach callback

\n", - "comments": "

The callback will be called on each variable found

\n\n

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", + "comments": "

The callback will be called on each variable found

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", "group": "config" }, "git_config_multivar_iterator_new": { "type": "function", - "file": "config.h", - "line": 430, - "lineto": 430, + "file": "git2/config.h", + "line": 441, + "lineto": 441, "args": [ { "name": "out", @@ -5006,14 +5345,14 @@ "comment": null }, "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", + "comments": "

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", "group": "config" }, "git_config_next": { "type": "function", - "file": "config.h", - "line": 442, - "lineto": 442, + "file": "git2/config.h", + "line": 453, + "lineto": 453, "args": [ { "name": "entry", @@ -5033,14 +5372,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 iterator\n is freed.

\n", "group": "config" }, "git_config_iterator_free": { "type": "function", - "file": "config.h", - "line": 449, - "lineto": 449, + "file": "git2/config.h", + "line": 460, + "lineto": 460, "args": [ { "name": "iter", @@ -5060,9 +5399,9 @@ }, "git_config_set_int32": { "type": "function", - "file": "config.h", - "line": 460, - "lineto": 460, + "file": "git2/config.h", + "line": 471, + "lineto": 471, "args": [ { "name": "cfg", @@ -5092,9 +5431,9 @@ }, "git_config_set_int64": { "type": "function", - "file": "config.h", - "line": 471, - "lineto": 471, + "file": "git2/config.h", + "line": 482, + "lineto": 482, "args": [ { "name": "cfg", @@ -5124,9 +5463,9 @@ }, "git_config_set_bool": { "type": "function", - "file": "config.h", - "line": 482, - "lineto": 482, + "file": "git2/config.h", + "line": 493, + "lineto": 493, "args": [ { "name": "cfg", @@ -5156,9 +5495,9 @@ }, "git_config_set_string": { "type": "function", - "file": "config.h", - "line": 496, - "lineto": 496, + "file": "git2/config.h", + "line": 507, + "lineto": 507, "args": [ { "name": "cfg", @@ -5183,14 +5522,14 @@ "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", + "comments": "

A copy of the string is made and the user is free to use it\n afterwards.

\n", "group": "config" }, "git_config_set_multivar": { "type": "function", - "file": "config.h", - "line": 508, - "lineto": 508, + "file": "git2/config.h", + "line": 519, + "lineto": 519, "args": [ { "name": "cfg", @@ -5225,9 +5564,9 @@ }, "git_config_delete_entry": { "type": "function", - "file": "config.h", - "line": 517, - "lineto": 517, + "file": "git2/config.h", + "line": 528, + "lineto": 528, "args": [ { "name": "cfg", @@ -5252,9 +5591,9 @@ }, "git_config_delete_multivar": { "type": "function", - "file": "config.h", - "line": 530, - "lineto": 530, + "file": "git2/config.h", + "line": 541, + "lineto": 541, "args": [ { "name": "cfg", @@ -5284,9 +5623,9 @@ }, "git_config_foreach": { "type": "function", - "file": "config.h", - "line": 548, - "lineto": 551, + "file": "git2/config.h", + "line": 559, + "lineto": 562, "args": [ { "name": "cfg", @@ -5311,14 +5650,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Perform an operation on each config variable.

\n", - "comments": "

The callback receives the normalized name and value of each variable in the config backend, and the data pointer passed to this function. If the callback returns a non-zero value, the function stops iterating and returns that value to the caller.

\n\n

The pointers passed to the callback are only valid as long as the iteration is ongoing.

\n", + "comments": "

The callback receives the normalized name and value of each variable\n in the config backend, and the data pointer passed to this function.\n If the callback returns a non-zero value, the function stops iterating\n and returns that value to the caller.

\n\n

The pointers passed to the callback are only valid as long as the\n iteration is ongoing.

\n", "group": "config" }, "git_config_iterator_new": { "type": "function", - "file": "config.h", - "line": 562, - "lineto": 562, + "file": "git2/config.h", + "line": 573, + "lineto": 573, "args": [ { "name": "out", @@ -5338,14 +5677,14 @@ "comment": null }, "description": "

Iterate over all the config variables

\n", - "comments": "

Use git_config_next to advance the iteration and git_config_iterator_free when done.

\n", + "comments": "

Use git_config_next to advance the iteration and\n git_config_iterator_free when done.

\n", "group": "config" }, "git_config_iterator_glob_new": { "type": "function", - "file": "config.h", - "line": 578, - "lineto": 578, + "file": "git2/config.h", + "line": 589, + "lineto": 589, "args": [ { "name": "out", @@ -5370,14 +5709,14 @@ "comment": null }, "description": "

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.

\n\n

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", + "comments": "

Use git_config_next to advance the iteration and\n git_config_iterator_free when done.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", "group": "config" }, "git_config_foreach_match": { "type": "function", - "file": "config.h", - "line": 600, - "lineto": 604, + "file": "git2/config.h", + "line": 611, + "lineto": 615, "args": [ { "name": "cfg", @@ -5407,14 +5746,14 @@ "comment": " 0 or the return value of the callback which didn't return 0" }, "description": "

Perform an operation on each config variable matching a regular expression.

\n", - "comments": "

This behaviors like git_config_foreach with an additional filter of a regular expression that filters which config keys are passed to the callback.

\n\n

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\n

The regular expression is applied case-sensitively on the normalized form of the variable name: the case-insensitive parts are lower-case.

\n", + "comments": "

This behaves like git_config_foreach with an additional filter of a\n regular expression that filters which config keys are passed to the\n callback.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the case-insensitive parts are lower-case.

\n", "group": "config" }, "git_config_get_mapped": { "type": "function", - "file": "config.h", - "line": 640, - "lineto": 645, + "file": "git2/config.h", + "line": 651, + "lineto": 656, "args": [ { "name": "out", @@ -5449,14 +5788,14 @@ "comment": " 0 on success, error code otherwise" }, "description": "

Query the value of a config variable and return it mapped to\n an integer constant.

\n", - "comments": "

This is a helper method to easily map different possible values to a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n
git_cvar_map autocrlf_mapping[] = {     {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},        {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},      {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},        {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n
\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing the GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison), the given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be returned.

\n", + "comments": "

This is a helper method to easily map different possible values\n to a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n
git_cvar_map autocrlf_mapping[] = {\n    {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},\n    {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},\n    {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},\n    {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n
\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the\n mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing\n the GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison),\n the given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be\n returned.

\n", "group": "config" }, "git_config_lookup_map_value": { "type": "function", - "file": "config.h", - "line": 655, - "lineto": 659, + "file": "git2/config.h", + "line": 666, + "lineto": 670, "args": [ { "name": "out", @@ -5491,9 +5830,9 @@ }, "git_config_parse_bool": { "type": "function", - "file": "config.h", - "line": 671, - "lineto": 671, + "file": "git2/config.h", + "line": 682, + "lineto": 682, "args": [ { "name": "out", @@ -5513,14 +5852,14 @@ "comment": null }, "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", + "comments": "

Valid values for true are: 'true', 'yes', 'on', 1 or any\n number different from 0\n Valid values for false are: 'false', 'no', 'off', 0

\n", "group": "config" }, "git_config_parse_int32": { "type": "function", - "file": "config.h", - "line": 683, - "lineto": 683, + "file": "git2/config.h", + "line": 694, + "lineto": 694, "args": [ { "name": "out", @@ -5540,14 +5879,14 @@ "comment": null }, "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", + "comments": "

An optional value suffix of 'k', 'm', or 'g' will\n cause the value to be multiplied by 1024, 1048576,\n or 1073741824 prior to output.

\n", "group": "config" }, "git_config_parse_int64": { "type": "function", - "file": "config.h", - "line": 695, - "lineto": 695, + "file": "git2/config.h", + "line": 706, + "lineto": 706, "args": [ { "name": "out", @@ -5567,14 +5906,14 @@ "comment": null }, "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", + "comments": "

An optional value suffix of 'k', 'm', or 'g' will\n cause the value to be multiplied by 1024, 1048576,\n or 1073741824 prior to output.

\n", "group": "config" }, "git_config_parse_path": { "type": "function", - "file": "config.h", - "line": 710, - "lineto": 710, + "file": "git2/config.h", + "line": 721, + "lineto": 721, "args": [ { "name": "out", @@ -5594,14 +5933,14 @@ "comment": null }, "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().

\n\n

If the value does not begin with a tilde, the input will be returned.

\n", + "comments": "

A leading '~' will be expanded to the global search path (which\n defaults to the user's home directory but can be overridden via\n git_libgit2_opts().

\n\n

If the value does not begin with a tilde, the input will be\n returned.

\n", "group": "config" }, "git_config_backend_foreach_match": { "type": "function", - "file": "config.h", - "line": 728, - "lineto": 732, + "file": "git2/config.h", + "line": 739, + "lineto": 743, "args": [ { "name": "backend", @@ -5630,15 +5969,15 @@ "type": "int", "comment": null }, - "description": "

Perform an operation on each config variable in given config backend\n matching a regular expression.

\n", - "comments": "

This behaviors like git_config_foreach_match except instead of all config entries it just enumerates through the given backend entry.

\n\n

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", + "description": "

Perform an operation on each config variable in a given config backend,\n matching a regular expression.

\n", + "comments": "

This behaves like git_config_foreach_match except that only config\n entries from the given backend entry are enumerated.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", "group": "config" }, "git_config_lock": { "type": "function", - "file": "config.h", - "line": 751, - "lineto": 751, + "file": "git2/config.h", + "line": 762, + "lineto": 762, "args": [ { "name": "tx", @@ -5658,12 +5997,12 @@ "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\n

You can apply the changes by calling git_transaction_commit() before freeing the transaction. Either of these actions will unlock the config.

\n", + "comments": "

Locking disallows anybody else from writing to that backend. Any\n updates made after locking will not be visible to a reader until\n the file is unlocked.

\n\n

You can apply the changes by calling git_transaction_commit()\n before freeing the transaction. Either of these actions will unlock\n the config.

\n", "group": "config" }, "git_cred_userpass": { "type": "function", - "file": "cred_helpers.h", + "file": "git2/cred_helpers.h", "line": 43, "lineto": 48, "args": [ @@ -5703,11 +6042,75 @@ "comments": "", "group": "cred" }, + "git_describe_init_options": { + "type": "function", + "file": "git2/describe.h", + "line": 82, + "lineto": 82, + "args": [ + { + "name": "opts", + "type": "git_describe_options *", + "comment": "The `git_describe_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`." + } + ], + "argline": "git_describe_options *opts, unsigned int version", + "sig": "git_describe_options *::unsigned int", + "return": { + "type": "int", + "comment": " Zero on success; -1 on failure." + }, + "description": "

Initialize git_describe_options structure

\n", + "comments": "

Initializes a git_describe_options with default values. Equivalent to creating\n an instance with GIT_DESCRIBE_OPTIONS_INIT.

\n", + "group": "describe", + "examples": { + "describe.c": [ + "ex/HEAD/describe.html#git_describe_init_options-1" + ] + } + }, + "git_describe_init_format_options": { + "type": "function", + "file": "git2/describe.h", + "line": 129, + "lineto": 129, + "args": [ + { + "name": "opts", + "type": "git_describe_format_options *", + "comment": "The `git_describe_format_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`." + } + ], + "argline": "git_describe_format_options *opts, unsigned int version", + "sig": "git_describe_format_options *::unsigned int", + "return": { + "type": "int", + "comment": " Zero on success; -1 on failure." + }, + "description": "

Initialize git_describe_format_options structure

\n", + "comments": "

Initializes a git_describe_format_options with default values. Equivalent to creating\n an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.

\n", + "group": "describe", + "examples": { + "describe.c": [ + "ex/HEAD/describe.html#git_describe_init_format_options-2" + ] + } + }, "git_describe_commit": { "type": "function", - "file": "describe.h", - "line": 123, - "lineto": 126, + "file": "git2/describe.h", + "line": 146, + "lineto": 149, "args": [ { "name": "result", @@ -5722,7 +6125,7 @@ { "name": "opts", "type": "git_describe_options *", - "comment": "the lookup options" + "comment": "the lookup options (or NULL for defaults)" } ], "argline": "git_describe_result **result, git_object *committish, git_describe_options *opts", @@ -5736,15 +6139,15 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_commit-1" + "ex/HEAD/describe.html#git_describe_commit-3" ] } }, "git_describe_workdir": { "type": "function", - "file": "describe.h", - "line": 140, - "lineto": 143, + "file": "git2/describe.h", + "line": 163, + "lineto": 166, "args": [ { "name": "out", @@ -5759,7 +6162,7 @@ { "name": "opts", "type": "git_describe_options *", - "comment": "the lookup options" + "comment": "the lookup options (or NULL for defaults)" } ], "argline": "git_describe_result **out, git_repository *repo, git_describe_options *opts", @@ -5769,19 +6172,19 @@ "comment": null }, "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\n worktree. After peforming describe on HEAD, a status is run and the\n description is considered to be dirty if there are.

\n", "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_workdir-2" + "ex/HEAD/describe.html#git_describe_workdir-4" ] } }, "git_describe_format": { "type": "function", - "file": "describe.h", - "line": 153, - "lineto": 156, + "file": "git2/describe.h", + "line": 176, + "lineto": 179, "args": [ { "name": "out", @@ -5796,7 +6199,7 @@ { "name": "opts", "type": "const git_describe_format_options *", - "comment": "the formatting options" + "comment": "the formatting options (or NULL for defaults)" } ], "argline": "git_buf *out, const git_describe_result *result, const git_describe_format_options *opts", @@ -5810,15 +6213,15 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_format-3" + "ex/HEAD/describe.html#git_describe_format-5" ] } }, "git_describe_result_free": { "type": "function", - "file": "describe.h", - "line": 161, - "lineto": 161, + "file": "git2/describe.h", + "line": 184, + "lineto": 184, "args": [ { "name": "result", @@ -5838,19 +6241,19 @@ }, "git_diff_init_options": { "type": "function", - "file": "diff.h", - "line": 447, - "lineto": 449, + "file": "git2/diff.h", + "line": 454, + "lineto": 456, "args": [ { "name": "opts", "type": "git_diff_options *", - "comment": "The `git_diff_options` struct to initialize" + "comment": "The `git_diff_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_DIFF_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_DIFF_OPTIONS_VERSION`." } ], "argline": "git_diff_options *opts, unsigned int version", @@ -5859,25 +6262,25 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_diff_options with default values. Equivalent to\n creating an instance with GIT_DIFF_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_diff_options structure

\n", + "comments": "

Initializes a git_diff_options with default values. Equivalent to creating\n an instance with GIT_DIFF_OPTIONS_INIT.

\n", "group": "diff" }, "git_diff_find_init_options": { "type": "function", - "file": "diff.h", - "line": 742, - "lineto": 744, + "file": "git2/diff.h", + "line": 787, + "lineto": 789, "args": [ { "name": "opts", "type": "git_diff_find_options *", - "comment": "The `git_diff_find_options` struct to initialize" + "comment": "The `git_diff_find_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_DIFF_FIND_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`." } ], "argline": "git_diff_find_options *opts, unsigned int version", @@ -5886,15 +6289,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_diff_find_options with default values. Equivalent to\n creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_diff_find_options structure

\n", + "comments": "

Initializes a git_diff_find_options with default values. Equivalent to creating\n an instance with GIT_DIFF_FIND_OPTIONS_INIT.

\n", "group": "diff" }, "git_diff_free": { "type": "function", - "file": "diff.h", - "line": 758, - "lineto": 758, + "file": "git2/diff.h", + "line": 803, + "lineto": 803, "args": [ { "name": "diff", @@ -5923,9 +6326,9 @@ }, "git_diff_tree_to_tree": { "type": "function", - "file": "diff.h", - "line": 776, - "lineto": 781, + "file": "git2/diff.h", + "line": 821, + "lineto": 826, "args": [ { "name": "diff", @@ -5960,7 +6363,7 @@ "comment": null }, "description": "

Create a diff with the difference between two tree objects.

\n", - "comments": "

This is equivalent to git diff <old-tree> <new-tree>

\n\n

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.

\n", + "comments": "

This is equivalent to git diff \n<old\n-tree> \n<new\n-tree>

\n\n

The first tree will be used for the "old_file" side of the delta and the\n second tree will be used for the "new_file" side of the delta. You can\n pass NULL to indicate an empty tree, although it is an error to pass\n NULL for both the old_tree and new_tree.

\n", "group": "diff", "examples": { "diff.c": [ @@ -5974,9 +6377,9 @@ }, "git_diff_tree_to_index": { "type": "function", - "file": "diff.h", - "line": 802, - "lineto": 807, + "file": "git2/diff.h", + "line": 847, + "lineto": 852, "args": [ { "name": "diff", @@ -6011,7 +6414,7 @@ "comment": null }, "description": "

Create a diff between a tree and repository index.

\n", - "comments": "

This is equivalent to git diff --cached <treeish> or if you pass the HEAD tree, then like git diff --cached.

\n\n

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\n

If 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.

\n", + "comments": "

This is equivalent to `git diff --cached \n<treeish

\n\n
\n

or if you pass\n the HEAD tree, then likegit diff --cached`.

\n
\n\n

The tree you pass will be used for the "old_file" side of the delta, and\n the index will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo\n will be used. In this case, the index will be refreshed from disk\n (if it has changed) before the diff is generated.

\n", "group": "diff", "examples": { "diff.c": [ @@ -6021,9 +6424,9 @@ }, "git_diff_index_to_workdir": { "type": "function", - "file": "diff.h", - "line": 829, - "lineto": 833, + "file": "git2/diff.h", + "line": 874, + "lineto": 878, "args": [ { "name": "diff", @@ -6053,7 +6456,7 @@ "comment": null }, "description": "

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.

\n\n

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\n

If 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.

\n", + "comments": "

This matches the git diff command. See the note below on\n git_diff_tree_to_workdir for a discussion of the difference between\n git diff and git diff HEAD and how to emulate a `git diff \n<treeish

\n\n
\n

`\n using libgit2.

\n
\n\n

The index will be used for the "old_file" side of the delta, and the\n working directory will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo\n will be used. In this case, the index will be refreshed from disk\n (if it has changed) before the diff is generated.

\n", "group": "diff", "examples": { "diff.c": [ @@ -6063,9 +6466,9 @@ }, "git_diff_tree_to_workdir": { "type": "function", - "file": "diff.h", - "line": 858, - "lineto": 862, + "file": "git2/diff.h", + "line": 903, + "lineto": 907, "args": [ { "name": "diff", @@ -6095,7 +6498,7 @@ "comment": null }, "description": "

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\n

This 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.

\n\n

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.

\n", + "comments": "

The tree you provide will be used for the "old_file" side of the delta,\n and the working directory will be used for the "new_file" side.

\n\n

This is not the same as `git diff \n<treeish

\n\n
\n

orgit diff-index

\n
\n\n

<treeish

\n\n
\n

. Those commands use information from the index, whereas this\n function strictly returns the differences between the tree and the files\n in the working directory, regardless of the state of the index. Use\ngit_diff_tree_to_workdir_with_index` to emulate those commands.

\n
\n\n

To see difference between this and git_diff_tree_to_workdir_with_index,\n consider the example of a staged file deletion where the file has then\n been put back into the working dir and further modified. The\n tree-to-workdir diff for that file is 'modified', but git diff would\n show status 'deleted' since there is a staged delete.

\n", "group": "diff", "examples": { "diff.c": [ @@ -6105,9 +6508,9 @@ }, "git_diff_tree_to_workdir_with_index": { "type": "function", - "file": "diff.h", - "line": 877, - "lineto": 881, + "file": "git2/diff.h", + "line": 922, + "lineto": 926, "args": [ { "name": "diff", @@ -6137,7 +6540,7 @@ "comment": null }, "description": "

Create a diff between a tree and the working directory using index data\n to account for staged deletes, tracked files, etc.

\n", - "comments": "

This emulates git diff <tree> by diffing the tree to the index and the index to the working directory and blending the results into a single diff that includes staged deleted, etc.

\n", + "comments": "

This emulates `git diff \n<tree

\n\n
\n

` by diffing the tree to the index and\n the index to the working directory and blending the results into a\n single diff that includes staged deleted, etc.

\n
\n", "group": "diff", "examples": { "diff.c": [ @@ -6147,9 +6550,9 @@ }, "git_diff_index_to_index": { "type": "function", - "file": "diff.h", - "line": 895, - "lineto": 900, + "file": "git2/diff.h", + "line": 940, + "lineto": 945, "args": [ { "name": "diff", @@ -6184,14 +6587,14 @@ "comment": null }, "description": "

Create a diff with the difference between two index objects.

\n", - "comments": "

The first index will be used for the "old_file" side of the delta and the second index will be used for the "new_file" side of the delta.

\n", + "comments": "

The first index will be used for the "old_file" side of the delta and the\n second index will be used for the "new_file" side of the delta.

\n", "group": "diff" }, "git_diff_merge": { "type": "function", - "file": "diff.h", - "line": 915, - "lineto": 917, + "file": "git2/diff.h", + "line": 960, + "lineto": 962, "args": [ { "name": "onto", @@ -6211,14 +6614,14 @@ "comment": null }, "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", + "comments": "

This merges items from the "from" list into the "onto" list. The\n resulting diff will have all items that appear in either list.\n If an item appears in both lists, then it will be "merged" to appear\n as if the old version was from the "onto" list and the new version\n is from the "from" list (with the exception that if the item has a\n pending DELETE in the middle, then it will show as deleted).

\n", "group": "diff" }, "git_diff_find_similar": { "type": "function", - "file": "diff.h", - "line": 931, - "lineto": 933, + "file": "git2/diff.h", + "line": 976, + "lineto": 978, "args": [ { "name": "diff", @@ -6238,7 +6641,7 @@ "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", + "comments": "

This modifies a diff in place, replacing old entries that look\n like renames or copies with new entries reflecting those changes.\n This also will, if requested, break modified files into add/remove\n pairs if the amount of change is above a threshold.

\n", "group": "diff", "examples": { "diff.c": [ @@ -6248,9 +6651,9 @@ }, "git_diff_num_deltas": { "type": "function", - "file": "diff.h", - "line": 951, - "lineto": 951, + "file": "git2/diff.h", + "line": 996, + "lineto": 996, "args": [ { "name": "diff", @@ -6275,9 +6678,9 @@ }, "git_diff_num_deltas_of_type": { "type": "function", - "file": "diff.h", - "line": 964, - "lineto": 965, + "file": "git2/diff.h", + "line": 1009, + "lineto": 1010, "args": [ { "name": "diff", @@ -6297,14 +6700,14 @@ "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.

\n", + "comments": "

This works just like git_diff_entrycount() with an extra parameter\n that is a git_delta_t and returns just the count of how many deltas\n match that particular type.

\n", "group": "diff" }, "git_diff_get_delta": { "type": "function", - "file": "diff.h", - "line": 984, - "lineto": 985, + "file": "git2/diff.h", + "line": 1029, + "lineto": 1030, "args": [ { "name": "diff", @@ -6324,14 +6727,14 @@ "comment": " Pointer to git_diff_delta (or NULL if `idx` out of range)" }, "description": "

Return the diff delta for an entry in the diff list.

\n", - "comments": "

The git_diff_delta pointer points to internal data and you do not have to release it when you are done with it. It will go away when the * git_diff (or any associated git_patch) goes away.

\n\n

Note that the flags on the delta related to whether it has binary content or not may not be set if there are no attributes set for the file and there has been no reason to load the file data at this point. For now, if you need those flags to be up to date, your only option is to either use git_diff_foreach or create a git_patch.

\n", + "comments": "

The git_diff_delta pointer points to internal data and you do not\n have to release it when you are done with it. It will go away when\n the * git_diff (or any associated git_patch) goes away.

\n\n

Note that the flags on the delta related to whether it has binary\n content or not may not be set if there are no attributes set for the\n file and there has been no reason to load the file data at this point.\n For now, if you need those flags to be up to date, your only option is\n to either use git_diff_foreach or create a git_patch.

\n", "group": "diff" }, "git_diff_is_sorted_icase": { "type": "function", - "file": "diff.h", - "line": 993, - "lineto": 993, + "file": "git2/diff.h", + "line": 1038, + "lineto": 1038, "args": [ { "name": "diff", @@ -6351,9 +6754,9 @@ }, "git_diff_foreach": { "type": "function", - "file": "diff.h", - "line": 1021, - "lineto": 1027, + "file": "git2/diff.h", + "line": 1066, + "lineto": 1072, "args": [ { "name": "diff", @@ -6393,14 +6796,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Loop over all deltas in a diff issuing callbacks.

\n", - "comments": "

This will iterate through all of the files described in a diff. You should provide a file callback to learn about each file.

\n\n

The "hunk" and "line" callbacks are optional, and the text diff of the files will only be calculated if they are not NULL. Of course, these callbacks will not be invoked for binary files on the diff or for files whose only changed is a file mode change.

\n\n

Returning a non-zero value from any of the callbacks will terminate the iteration and return the value to the user.

\n", + "comments": "

This will iterate through all of the files described in a diff. You\n should provide a file callback to learn about each file.

\n\n

The "hunk" and "line" callbacks are optional, and the text diff of the\n files will only be calculated if they are not NULL. Of course, these\n callbacks will not be invoked for binary files on the diff or for\n files whose only changed is a file mode change.

\n\n

Returning a non-zero value from any of the callbacks will terminate\n the iteration and return the value to the user.

\n", "group": "diff" }, "git_diff_status_char": { "type": "function", - "file": "diff.h", - "line": 1040, - "lineto": 1040, + "file": "git2/diff.h", + "line": 1085, + "lineto": 1085, "args": [ { "name": "status", @@ -6415,14 +6818,14 @@ "comment": " The single character label for that code" }, "description": "

Look up the single character abbreviation for a delta status code.

\n", - "comments": "

When you run git diff --name-status it uses single letter codes in the output such as 'A' for added, 'D' for deleted, 'M' for modified, etc. This function converts a git_delta_t value into these letters for your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').

\n", + "comments": "

When you run git diff --name-status it uses single letter codes in\n the output such as 'A' for added, 'D' for deleted, 'M' for modified,\n etc. This function converts a git_delta_t value into these letters for\n your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').

\n", "group": "diff" }, "git_diff_print": { "type": "function", - "file": "diff.h", - "line": 1065, - "lineto": 1069, + "file": "git2/diff.h", + "line": 1110, + "lineto": 1114, "args": [ { "name": "diff", @@ -6452,7 +6855,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Iterate over a diff generating formatted text output.

\n", - "comments": "

Returning a non-zero value from the callbacks will terminate the iteration and return the non-zero value to the caller.

\n", + "comments": "

Returning a non-zero value from the callbacks will terminate the\n iteration and return the non-zero value to the caller.

\n", "group": "diff", "examples": { "diff.c": [ @@ -6465,9 +6868,9 @@ }, "git_diff_to_buf": { "type": "function", - "file": "diff.h", - "line": 1081, - "lineto": 1084, + "file": "git2/diff.h", + "line": 1126, + "lineto": 1129, "args": [ { "name": "out", @@ -6497,9 +6900,9 @@ }, "git_diff_blobs": { "type": "function", - "file": "diff.h", - "line": 1121, - "lineto": 1131, + "file": "git2/diff.h", + "line": 1166, + "lineto": 1176, "args": [ { "name": "old_blob", @@ -6559,14 +6962,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Directly run a diff on two blobs.

\n", - "comments": "

Compared to a file, a blob lacks some contextual information. As such, the git_diff_file given to the callback will have some fake data; i.e. mode will be 0 and path will be NULL.

\n\n

NULL is allowed for either old_blob or new_blob and will be treated as an empty blob, with the oid set to NULL in the git_diff_file data. Passing NULL for both blobs is a noop; no callbacks will be made at all.

\n\n

We do run a binary content check on the blob content and if either blob looks like binary data, the git_diff_delta binary attribute will be set to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass GIT_DIFF_FORCE_TEXT of course).

\n", + "comments": "

Compared to a file, a blob lacks some contextual information. As such,\n the git_diff_file given to the callback will have some fake data; i.e.\n mode will be 0 and path will be NULL.

\n\n

NULL is allowed for either old_blob or new_blob and will be treated\n as an empty blob, with the oid set to NULL in the git_diff_file data.\n Passing NULL for both blobs is a noop; no callbacks will be made at all.

\n\n

We do run a binary content check on the blob content and if either blob\n looks like binary data, the git_diff_delta binary attribute will be set\n to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass\n GIT_DIFF_FORCE_TEXT of course).

\n", "group": "diff" }, "git_diff_blob_to_buffer": { "type": "function", - "file": "diff.h", - "line": 1158, - "lineto": 1169, + "file": "git2/diff.h", + "line": 1203, + "lineto": 1214, "args": [ { "name": "old_blob", @@ -6631,14 +7034,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Directly run a diff between a blob and a buffer.

\n", - "comments": "

As with git_diff_blobs, comparing a blob and buffer lacks some context, so the git_diff_file parameters to the callbacks will be faked a la the rules for git_diff_blobs().

\n\n

Passing NULL for old_blob will be treated as an empty blob (i.e. the file_cb will be invoked with GIT_DELTA_ADDED and the diff will be the entire content of the buffer added). Passing NULL to the buffer will do the reverse, with GIT_DELTA_REMOVED and blob content removed.

\n", + "comments": "

As with git_diff_blobs, comparing a blob and buffer lacks some context,\n so the git_diff_file parameters to the callbacks will be faked a la the\n rules for git_diff_blobs().

\n\n

Passing NULL for old_blob will be treated as an empty blob (i.e. the\n file_cb will be invoked with GIT_DELTA_ADDED and the diff will be the\n entire content of the buffer added). Passing NULL to the buffer will do\n the reverse, with GIT_DELTA_REMOVED and blob content removed.

\n", "group": "diff" }, "git_diff_buffers": { "type": "function", - "file": "diff.h", - "line": 1192, - "lineto": 1204, + "file": "git2/diff.h", + "line": 1237, + "lineto": 1249, "args": [ { "name": "old_buffer", @@ -6708,14 +7111,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Directly run a diff between two buffers.

\n", - "comments": "

Even more than with git_diff_blobs, comparing two buffer lacks context, so the git_diff_file parameters to the callbacks will be faked a la the rules for git_diff_blobs().

\n", + "comments": "

Even more than with git_diff_blobs, comparing two buffer lacks\n context, so the git_diff_file parameters to the callbacks will be\n faked a la the rules for git_diff_blobs().

\n", "group": "diff" }, "git_diff_from_buffer": { "type": "function", - "file": "diff.h", - "line": 1225, - "lineto": 1228, + "file": "git2/diff.h", + "line": 1270, + "lineto": 1273, "args": [ { "name": "out", @@ -6740,14 +7143,14 @@ "comment": " 0 or an error code" }, "description": "

Read the contents of a git patch file into a git_diff object.

\n", - "comments": "

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.

\n\n

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.

\n", + "comments": "

The diff object produced is similar to the one that would be\n produced if you actually produced it computationally by comparing\n two trees, however there may be subtle differences. For example,\n a patch file likely contains abbreviated object IDs, so the\n object IDs in a git_diff_delta produced by this function will\n also be abbreviated.

\n\n

This function will only read patch files created by a git\n implementation, it will not read unified diffs produced by\n the diff program, nor any other types of patch files.

\n", "group": "diff" }, "git_diff_get_stats": { "type": "function", - "file": "diff.h", - "line": 1264, - "lineto": 1266, + "file": "git2/diff.h", + "line": 1309, + "lineto": 1311, "args": [ { "name": "out", @@ -6777,9 +7180,9 @@ }, "git_diff_stats_files_changed": { "type": "function", - "file": "diff.h", - "line": 1274, - "lineto": 1275, + "file": "git2/diff.h", + "line": 1319, + "lineto": 1320, "args": [ { "name": "stats", @@ -6799,9 +7202,9 @@ }, "git_diff_stats_insertions": { "type": "function", - "file": "diff.h", - "line": 1283, - "lineto": 1284, + "file": "git2/diff.h", + "line": 1328, + "lineto": 1329, "args": [ { "name": "stats", @@ -6821,9 +7224,9 @@ }, "git_diff_stats_deletions": { "type": "function", - "file": "diff.h", - "line": 1292, - "lineto": 1293, + "file": "git2/diff.h", + "line": 1337, + "lineto": 1338, "args": [ { "name": "stats", @@ -6843,9 +7246,9 @@ }, "git_diff_stats_to_buf": { "type": "function", - "file": "diff.h", - "line": 1304, - "lineto": 1308, + "file": "git2/diff.h", + "line": 1349, + "lineto": 1353, "args": [ { "name": "out", @@ -6885,9 +7288,9 @@ }, "git_diff_stats_free": { "type": "function", - "file": "diff.h", - "line": 1316, - "lineto": 1316, + "file": "git2/diff.h", + "line": 1361, + "lineto": 1361, "args": [ { "name": "stats", @@ -6912,9 +7315,9 @@ }, "git_diff_format_email": { "type": "function", - "file": "diff.h", - "line": 1368, - "lineto": 1371, + "file": "git2/diff.h", + "line": 1413, + "lineto": 1416, "args": [ { "name": "out", @@ -6944,9 +7347,9 @@ }, "git_diff_commit_as_email": { "type": "function", - "file": "diff.h", - "line": 1387, - "lineto": 1394, + "file": "git2/diff.h", + "line": 1432, + "lineto": 1439, "args": [ { "name": "out", @@ -6996,19 +7399,19 @@ }, "git_diff_format_email_init_options": { "type": "function", - "file": "diff.h", - "line": 1405, - "lineto": 1407, + "file": "git2/diff.h", + "line": 1451, + "lineto": 1453, "args": [ { "name": "opts", "type": "git_diff_format_email_options *", - "comment": "The `git_diff_format_email_options` struct to initialize" + "comment": "The `git_blame_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`." } ], "argline": "git_diff_format_email_options *opts, unsigned int version", @@ -7017,47 +7420,47 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_diff_format_email_options with default values.

\n", - "comments": "

Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.

\n", + "description": "

Initialize git_diff_format_email_options structure

\n", + "comments": "

Initializes a git_diff_format_email_options with default values. Equivalent\n to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.

\n", "group": "diff" }, "git_diff_patchid_init_options": { "type": "function", - "file": "diff.h", - "line": 1428, - "lineto": 1430, + "file": "git2/diff.h", + "line": 1479, + "lineto": 1481, "args": [ { "name": "opts", "type": "git_diff_patchid_options *", - "comment": null + "comment": "The `git_diff_patchid_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": null + "comment": "The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`." } ], "argline": "git_diff_patchid_options *opts, unsigned int version", "sig": "git_diff_patchid_options *::unsigned int", "return": { "type": "int", - "comment": null + "comment": " Zero on success; -1 on failure." }, - "description": "

Initialize git_diff_patchid_options structure.

\n", - "comments": "

Initializes the structure with default values. Equivalent to creating an instance with GIT_DIFF_PATCHID_OPTIONS_INIT.

\n", + "description": "

Initialize git_diff_patchid_options structure

\n", + "comments": "

Initializes a git_diff_patchid_options with default values. Equivalent to\n creating an instance with GIT_DIFF_PATCHID_OPTIONS_INIT.

\n", "group": "diff" }, "git_diff_patchid": { "type": "function", - "file": "diff.h", - "line": 1452, - "lineto": 1452, + "file": "git2/diff.h", + "line": 1502, + "lineto": 1502, "args": [ { "name": "out", "type": "git_oid *", - "comment": "Pointer where the calculated patch ID shoul be\n stored" + "comment": "Pointer where the calculated patch ID should be stored" }, { "name": "diff", @@ -7077,14 +7480,14 @@ "comment": " 0 on success, an error code otherwise." }, "description": "

Calculate the patch ID for the given patch.

\n", - "comments": "

Calculate a stable patch ID for the given patch by summing the hash of the file diffs, ignoring whitespace and line numbers. This can be used to derive whether two diffs are the same with a high probability.

\n\n

Currently, 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", + "comments": "

Calculate a stable patch ID for the given patch by summing the\n hash of the file diffs, ignoring whitespace and line numbers.\n This can be used to derive whether two diffs are the same with\n a high probability.

\n\n

Currently, this function only calculates stable patch IDs, as\n defined in git-patch-id(1), and should in fact generate the\n same IDs as the upstream git project does.

\n", "group": "diff" }, "giterr_last": { "type": "function", - "file": "errors.h", - "line": 115, - "lineto": 115, + "file": "git2/errors.h", + "line": 122, + "lineto": 122, "args": [], "argline": "", "sig": "", @@ -7092,27 +7495,30 @@ "type": "const git_error *", "comment": " A git_error object." }, - "description": "

Return the last git_error object that was generated for the\n current thread or NULL if no error has occurred.

\n", - "comments": "", + "description": "

Return the last git_error object that was generated for the\n current thread.

\n", + "comments": "

The default behaviour of this function is to return NULL if no previous error has occurred.\n However, libgit2's error strings are not cleared aggressively, so a prior\n (unrelated) error may be returned. This can be avoided by only calling\n this function if the prior call to a libgit2 API returned an error.

\n", "group": "giterr", "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#giterr_last-8", + "ex/HEAD/checkout.html#giterr_last-9", + "ex/HEAD/checkout.html#giterr_last-10", + "ex/HEAD/checkout.html#giterr_last-11" + ], "general.c": [ "ex/HEAD/general.html#giterr_last-33" ], "merge.c": [ - "ex/HEAD/merge.html#giterr_last-10", - "ex/HEAD/merge.html#giterr_last-11" - ], - "network/clone.c": [ - "ex/HEAD/network/clone.html#giterr_last-2" + "ex/HEAD/merge.html#giterr_last-8", + "ex/HEAD/merge.html#giterr_last-9" ] } }, "giterr_clear": { "type": "function", - "file": "errors.h", - "line": 120, - "lineto": 120, + "file": "git2/errors.h", + "line": 127, + "lineto": 127, "args": [], "argline": "", "sig": "", @@ -7126,9 +7532,9 @@ }, "giterr_set_str": { "type": "function", - "file": "errors.h", - "line": 138, - "lineto": 138, + "file": "git2/errors.h", + "line": 145, + "lineto": 145, "args": [ { "name": "error_class", @@ -7148,14 +7554,14 @@ "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\n

This error message is stored in thread-local storage and only applies to the particular thread that this libgit2 call is made from.

\n", + "comments": "

This function is public so that custom ODB backends and the like can\n relay an error message through libgit2. Most regular users of libgit2\n will never need to call this function -- actually, calling it in most\n circumstances (for example, calling from within a callback function)\n will just end up having the value overwritten by libgit2 internals.

\n\n

This error message is stored in thread-local storage and only applies\n to the particular thread that this libgit2 call is made from.

\n", "group": "giterr" }, "giterr_set_oom": { "type": "function", - "file": "errors.h", - "line": 149, - "lineto": 149, + "file": "git2/errors.h", + "line": 156, + "lineto": 156, "args": [], "argline": "", "sig": "", @@ -7164,12 +7570,12 @@ "comment": null }, "description": "

Set the error message to a special value for memory allocation failure.

\n", - "comments": "

The normal giterr_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.

\n", + "comments": "

The normal giterr_set_str() function attempts to strdup() the string\n that is passed in. This is not a good idea when the error in question\n is a memory allocation failure. That circumstance has a special setter\n function that sets the error string to a known and statically allocated\n internal value.

\n", "group": "giterr" }, "git_filter_list_load": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 90, "lineto": 96, "args": [ @@ -7211,12 +7617,12 @@ "comment": " 0 on success (which could still return NULL if no filters are\n needed for the requested file), \n<\n0 on error" }, "description": "

Load the filter list for a given path.

\n", - "comments": "

This will return 0 (success) but set the output git_filter_list to NULL if no filters are requested for the given file.

\n", + "comments": "

This will return 0 (success) but set the output git_filter_list to NULL\n if no filters are requested for the given file.

\n", "group": "filter" }, "git_filter_list_contains": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 110, "lineto": 112, "args": [ @@ -7238,12 +7644,12 @@ "comment": " 1 if the filter is in the list, 0 otherwise" }, "description": "

Query the filter list to see if a given filter (by name) will run.\n The built-in filters "crlf" and "ident" can be queried, otherwise this\n is the name of the filter specified by the filter attribute.

\n", - "comments": "

This will return 0 if the given filter is not in the list, or 1 if the filter will be applied.

\n", + "comments": "

This will return 0 if the given filter is not in the list, or 1 if\n the filter will be applied.

\n", "group": "filter" }, "git_filter_list_apply_to_data": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 134, "lineto": 137, "args": [ @@ -7270,12 +7676,12 @@ "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.

\n\n

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.

\n\n

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!

\n", + "comments": "

See git2/buffer.h for background on git_buf objects.

\n\n

If the in buffer holds data allocated by libgit2 (i.e. in->asize is\n not zero), then it will be overwritten when applying the filters. If\n not, then it will be left untouched.

\n\n

If there are no filters to apply (or filters is NULL), then the out\n buffer will reference the in buffer data (with asize set to zero)\n instead of allocating data. This keeps allocations to a minimum, but\n it means you have to be careful about freeing the in data since out\n may be pointing to it!

\n", "group": "filter" }, "git_filter_list_apply_to_file": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 148, "lineto": 152, "args": [ @@ -7312,7 +7718,7 @@ }, "git_filter_list_apply_to_blob": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 161, "lineto": 164, "args": [ @@ -7344,7 +7750,7 @@ }, "git_filter_list_stream_data": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 173, "lineto": 176, "args": [ @@ -7376,7 +7782,7 @@ }, "git_filter_list_stream_file": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 187, "lineto": 191, "args": [ @@ -7413,7 +7819,7 @@ }, "git_filter_list_stream_blob": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 200, "lineto": 203, "args": [ @@ -7445,7 +7851,7 @@ }, "git_filter_list_free": { "type": "function", - "file": "filter.h", + "file": "git2/filter.h", "line": 210, "lineto": 210, "args": [ @@ -7467,7 +7873,7 @@ }, "git_libgit2_init": { "type": "function", - "file": "global.h", + "file": "git2/global.h", "line": 26, "lineto": 26, "args": [], @@ -7478,7 +7884,7 @@ "comment": " the number of initializations of the library, or an error code." }, "description": "

Init the global state

\n", - "comments": "

This function must be called before any other libgit2 function in order to set up global state and threading.

\n\n

This 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", + "comments": "

This function must be called before any other libgit2 function in\n order to set up global state and threading.

\n\n

This function may be called multiple times - it will return the number\n of times the initialization has been called (including this one) that have\n not subsequently been shutdown.

\n", "group": "libgit2", "examples": { "blame.c": [ @@ -7487,8 +7893,11 @@ "cat-file.c": [ "ex/HEAD/cat-file.html#git_libgit2_init-10" ], + "checkout.c": [ + "ex/HEAD/checkout.html#git_libgit2_init-12" + ], "describe.c": [ - "ex/HEAD/describe.html#git_libgit2_init-4" + "ex/HEAD/describe.html#git_libgit2_init-6" ], "diff.c": [ "ex/HEAD/diff.html#git_libgit2_init-13" @@ -7502,8 +7911,11 @@ "log.c": [ "ex/HEAD/log.html#git_libgit2_init-31" ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_libgit2_init-1" + ], "merge.c": [ - "ex/HEAD/merge.html#git_libgit2_init-12" + "ex/HEAD/merge.html#git_libgit2_init-10" ], "remote.c": [ "ex/HEAD/remote.html#git_libgit2_init-2" @@ -7521,7 +7933,7 @@ }, "git_libgit2_shutdown": { "type": "function", - "file": "global.h", + "file": "git2/global.h", "line": 39, "lineto": 39, "args": [], @@ -7532,7 +7944,7 @@ "comment": " the number of remaining initializations of the library, or an\n error code." }, "description": "

Shutdown the global state

\n", - "comments": "

Clean up the global state and threading context after calling it as many times as git_libgit2_init() was called - it will return the number of remainining initializations that have not been shutdown (after this one).

\n", + "comments": "

Clean up the global state and threading context after calling it as\n many times as git_libgit2_init() was called - it will return the\n number of remainining initializations that have not been shutdown\n (after this one).

\n", "group": "libgit2", "examples": { "blame.c": [ @@ -7541,8 +7953,11 @@ "cat-file.c": [ "ex/HEAD/cat-file.html#git_libgit2_shutdown-11" ], + "checkout.c": [ + "ex/HEAD/checkout.html#git_libgit2_shutdown-13" + ], "describe.c": [ - "ex/HEAD/describe.html#git_libgit2_shutdown-5" + "ex/HEAD/describe.html#git_libgit2_shutdown-7" ], "diff.c": [ "ex/HEAD/diff.html#git_libgit2_shutdown-14" @@ -7553,8 +7968,11 @@ "log.c": [ "ex/HEAD/log.html#git_libgit2_shutdown-32" ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_libgit2_shutdown-2" + ], "merge.c": [ - "ex/HEAD/merge.html#git_libgit2_shutdown-13" + "ex/HEAD/merge.html#git_libgit2_shutdown-11" ], "remote.c": [ "ex/HEAD/remote.html#git_libgit2_shutdown-3" @@ -7572,7 +7990,7 @@ }, "git_graph_ahead_behind": { "type": "function", - "file": "graph.h", + "file": "git2/graph.h", "line": 37, "lineto": 37, "args": [ @@ -7609,12 +8027,12 @@ "comment": null }, "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.

\n", + "comments": "

There is no need for branches containing the commits to have any\n upstream relationship, but it helps to think of one as a branch and\n the other as its upstream, the ahead and behind values will be\n what git would report for the branches.

\n", "group": "graph" }, "git_graph_descendant_of": { "type": "function", - "file": "graph.h", + "file": "git2/graph.h", "line": 51, "lineto": 54, "args": [ @@ -7641,12 +8059,12 @@ "comment": " 1 if the given commit is a descendant of the potential ancestor,\n 0 if not, error code otherwise." }, "description": "

Determine if a commit is the descendant of another commit.

\n", - "comments": "

Note that a commit is not considered a descendant of itself, in contrast to git merge-base --is-ancestor.

\n", + "comments": "

Note that a commit is not considered a descendant of itself, in contrast\n to git merge-base --is-ancestor.

\n", "group": "graph" }, "git_ignore_add_rule": { "type": "function", - "file": "ignore.h", + "file": "git2/ignore.h", "line": 37, "lineto": 39, "args": [ @@ -7668,12 +8086,12 @@ "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\n

Example usage:

\n\n
 error = git_ignore_add_rule(myrepo, "*.c/ with space");\n
\n\n

This would add three rules to the ignores.

\n", + "comments": "

Excludesfile rules (i.e. .gitignore rules) are generally read from\n .gitignore files in the repository tree or from a shared system file\n only if a "core.excludesfile" config value is set. The library also\n keeps a set of per-repository internal ignores that can be configured\n in-memory and will not persist. This function allows you to add to\n that internal rules list.

\n\n

Example usage:

\n\n
 error = git_ignore_add_rule(myrepo, "*.c\n
\n\n

/

\n\n

with space

\n\n

");

\n\n

This would add three rules to the ignores.

\n", "group": "ignore" }, "git_ignore_clear_internal_rules": { "type": "function", - "file": "ignore.h", + "file": "git2/ignore.h", "line": 52, "lineto": 53, "args": [ @@ -7690,12 +8108,12 @@ "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\n

The default internal ignores ignore ".", ".." and ".git" entries.

\n", + "comments": "

Resets to the default internal ignore rules. This will not turn off\n rules in .gitignore files that actually exist in the filesystem.

\n\n

The default internal ignores ignore ".", ".." and ".git" entries.

\n", "group": "ignore" }, "git_ignore_path_is_ignored": { "type": "function", - "file": "ignore.h", + "file": "git2/ignore.h", "line": 71, "lineto": 74, "args": [ @@ -7722,12 +8140,12 @@ "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." }, "description": "

Test if the ignore rules apply to a given path.

\n", - "comments": "

This function checks the ignore rules to see if they would apply to the 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\n

One 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", + "comments": "

This function checks the ignore rules to see if they would apply to the\n given file. This indicates if the file would be ignored regardless of\n whether the file is already in the index or committed to the repository.

\n\n

One way to think of this is if you were to do "git check-ignore --no-index"\n on the given file, would it be shown or not?

\n", "group": "ignore" }, "git_index_open": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 203, "lineto": 203, "args": [ @@ -7749,12 +8167,12 @@ "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\n

If you need to access the index of an actual repository, use the git_repository_index wrapper.

\n\n

The index must be freed once it's no longer in use.

\n", + "comments": "

Since there is no ODB or working directory behind this index,\n any Index methods which rely on these (e.g. index_add_bypath)\n will fail with the GIT_ERROR error code.

\n\n

If you need to access the index of an actual repository,\n use the git_repository_index wrapper.

\n\n

The index must be freed once it's no longer in use.

\n", "group": "index" }, "git_index_new": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 216, "lineto": 216, "args": [ @@ -7771,12 +8189,12 @@ "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\n

The index must be freed once it's no longer in use.

\n", + "comments": "

This index object cannot be read/written to the filesystem,\n but may be used to perform in-memory index operations.

\n\n

The index must be freed once it's no longer in use.

\n", "group": "index" }, "git_index_free": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 223, "lineto": 223, "args": [ @@ -7801,12 +8219,15 @@ ], "init.c": [ "ex/HEAD/init.html#git_index_free-4" + ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_index_free-3" ] } }, "git_index_owner": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 231, "lineto": 231, "args": [ @@ -7828,7 +8249,7 @@ }, "git_index_caps": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 239, "lineto": 239, "args": [ @@ -7850,7 +8271,7 @@ }, "git_index_set_caps": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 252, "lineto": 252, "args": [ @@ -7872,12 +8293,12 @@ "comment": " 0 on success, -1 on failure" }, "description": "

Set index capabilities flags.

\n", - "comments": "

If you pass GIT_INDEXCAP_FROM_OWNER for the caps, then the capabilities will be read from the config of the owner object, looking at core.ignorecase, core.filemode, core.symlinks.

\n", + "comments": "

If you pass GIT_INDEXCAP_FROM_OWNER for the caps, then the\n capabilities will be read from the config of the owner object,\n looking at core.ignorecase, core.filemode, core.symlinks.

\n", "group": "index" }, "git_index_version": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 264, "lineto": 264, "args": [ @@ -7894,12 +8315,12 @@ "comment": " the index version" }, "description": "

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", + "comments": "

Valid return values are 2, 3, or 4. If 3 is returned, an index\n with version 2 may be written instead, if the extension data in\n version 3 is not necessary.

\n", "group": "index" }, "git_index_set_version": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 277, "lineto": 277, "args": [ @@ -7921,12 +8342,12 @@ "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", + "comments": "

Valid values are 2, 3, or 4. If 2 is given, git_index_write may\n write an index with version 3 instead, if necessary to accurately\n represent the index.

\n", "group": "index" }, "git_index_read": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 296, "lineto": 296, "args": [ @@ -7948,12 +8369,12 @@ "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.

\n\n

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.

\n", + "comments": "

If force is true, this performs a "hard" read that discards in-memory\n changes and always reloads the on-disk index data. If there is no\n on-disk version, the index will be cleared.

\n\n

If force is false, this does a "soft" read that reloads the index\n data from disk only if it has changed since the last time it was\n loaded. Purely in-memory index data will be untouched. Be aware: if\n there are changes on disk, unwritten in-memory changes are discarded.

\n", "group": "index" }, "git_index_write": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 305, "lineto": 305, "args": [ @@ -7975,7 +8396,7 @@ }, "git_index_path": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 313, "lineto": 313, "args": [ @@ -7997,7 +8418,7 @@ }, "git_index_checksum": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 325, "lineto": 325, "args": [ @@ -8014,12 +8435,12 @@ "comment": " a pointer to the checksum of the index" }, "description": "

Get the checksum of the index

\n", - "comments": "

This checksum is the SHA-1 hash over the index file (except the last 20 bytes which are the checksum itself). In cases where the index does not exist on-disk, it will be zeroed out.

\n", + "comments": "

This checksum is the SHA-1 hash over the index file (except the\n last 20 bytes which are the checksum itself). In cases where the\n index does not exist on-disk, it will be zeroed out.

\n", "group": "index" }, "git_index_read_tree": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 336, "lineto": 336, "args": [ @@ -8046,7 +8467,7 @@ }, "git_index_write_tree": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 357, "lineto": 357, "args": [ @@ -8068,20 +8489,20 @@ "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" }, "description": "

Write the index as a tree

\n", - "comments": "

This method will scan the index and write a representation 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\n

The index instance cannot be bare, and needs to be associated to an existing repository.

\n\n

The index must not contain any file in conflict.

\n", + "comments": "

This method will scan the index and write a representation\n of its current state back to disk; it recursively creates\n tree objects for each of the subtrees stored in the index,\n but only returns the OID of the root tree. This is the OID\n that can be used e.g. to create a commit.

\n\n

The index instance cannot be bare, and needs to be associated\n to an existing repository.

\n\n

The index must not contain any file in conflict.

\n", "group": "index", "examples": { "init.c": [ "ex/HEAD/init.html#git_index_write_tree-5" ], "merge.c": [ - "ex/HEAD/merge.html#git_index_write_tree-14" + "ex/HEAD/merge.html#git_index_write_tree-12" ] } }, "git_index_write_tree_to": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 374, "lineto": 374, "args": [ @@ -8108,12 +8529,12 @@ "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" }, "description": "

Write the index as a tree to the given repository

\n", - "comments": "

This method will do the same as git_index_write_tree, but letting the user choose the repository where the tree will be written.

\n\n

The index must not contain any file in conflict.

\n", + "comments": "

This method will do the same as git_index_write_tree, but\n letting the user choose the repository where the tree will\n be written.

\n\n

The index must not contain any file in conflict.

\n", "group": "index" }, "git_index_entrycount": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 393, "lineto": 393, "args": [ @@ -8135,12 +8556,15 @@ "examples": { "general.c": [ "ex/HEAD/general.html#git_index_entrycount-36" + ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_index_entrycount-4" ] } }, "git_index_clear": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 404, "lineto": 404, "args": [ @@ -8157,12 +8581,12 @@ "comment": " 0 on success, error code \n<\n 0 on failure" }, "description": "

Clear the contents (all the entries) of an index object.

\n", - "comments": "

This clears the index object in memory; changes must be explicitly written to disk for them to take effect persistently.

\n", + "comments": "

This clears the index object in memory; changes must be explicitly\n written to disk for them to take effect persistently.

\n", "group": "index" }, "git_index_get_byindex": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 417, "lineto": 418, "args": [ @@ -8184,17 +8608,20 @@ "comment": " a pointer to the entry; NULL if out of bounds" }, "description": "

Get a pointer to one of the entries in the index

\n", - "comments": "

The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.

\n", + "comments": "

The entry is not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.

\n", "group": "index", "examples": { "general.c": [ "ex/HEAD/general.html#git_index_get_byindex-37" + ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_index_get_byindex-5" ] } }, "git_index_get_bypath": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 432, "lineto": 433, "args": [ @@ -8221,12 +8648,17 @@ "comment": " a pointer to the entry; NULL if it was not found" }, "description": "

Get a pointer to one of the entries in the index

\n", - "comments": "

The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.

\n", - "group": "index" + "comments": "

The entry is not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.

\n", + "group": "index", + "examples": { + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_index_get_bypath-6" + ] + } }, "git_index_remove": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 443, "lineto": 443, "args": [ @@ -8258,7 +8690,7 @@ }, "git_index_remove_directory": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 453, "lineto": 454, "args": [ @@ -8290,7 +8722,7 @@ }, "git_index_add": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 470, "lineto": 470, "args": [ @@ -8312,12 +8744,12 @@ "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\n

A full copy (including the 'path' string) of the given 'source_entry' will be inserted on the index.

\n", + "comments": "

If a previous index entry exists that has the same path and stage\n as the given 'source_entry', it will be replaced. Otherwise, the\n 'source_entry' will be added.

\n\n

A full copy (including the 'path' string) of the given\n 'source_entry' will be inserted on the index.

\n", "group": "index" }, "git_index_entry_stage": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 482, "lineto": 482, "args": [ @@ -8334,12 +8766,12 @@ "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_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT\n
\n", + "comments": "

This entry is calculated from the entry's flag attribute like this:

\n\n
(entry->flags \n
\n\n

&\n GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT

\n", "group": "index" }, "git_index_entry_is_conflict": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 491, "lineto": 491, "args": [ @@ -8361,7 +8793,7 @@ }, "git_index_add_bypath": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 522, "lineto": 522, "args": [ @@ -8383,12 +8815,12 @@ "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.

\n\n

This method will fail in bare index instances.

\n\n

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\n

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", + "comments": "

The file path must be relative to the repository's\n working folder and must be readable.

\n\n

This method will fail in bare index instances.

\n\n

This forces the file to be added to the index, not looking\n at gitignore rules. Those rules can be evaluated through\n the git_status APIs (in status.h) before calling this.

\n\n

If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.

\n", "group": "index" }, "git_index_add_frombuffer": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 551, "lineto": 554, "args": [ @@ -8420,12 +8852,12 @@ "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.

\n\n

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.

\n\n

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\n

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", + "comments": "

This method will create a blob in the repository that owns the\n index and then add the index entry to the index. The path of the\n entry represents the position of the blob relative to the\n repository's root folder.

\n\n

If a previous index entry exists that has the same path as the\n given 'entry', it will be replaced. Otherwise, the 'entry' will be\n added. The id and the file_size of the 'entry' are updated with the\n real value of the blob.

\n\n

This forces the file to be added to the index, not looking\n at gitignore rules. Those rules can be evaluated through\n the git_status APIs (in status.h) before calling this.

\n\n

If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.

\n", "group": "index" }, "git_index_remove_bypath": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 570, "lineto": 570, "args": [ @@ -8447,12 +8879,12 @@ "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.

\n\n

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", + "comments": "

The file path must be relative to the repository's\n working folder. It may exist.

\n\n

If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.

\n", "group": "index" }, "git_index_add_all": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 618, "lineto": 623, "args": [ @@ -8489,12 +8921,12 @@ "comment": " 0 on success, negative callback return value, or error code" }, "description": "

Add or update index entries matching files in the working directory.

\n", - "comments": "

This method will fail in bare index instances.

\n\n

The 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.

\n\n

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.

\n\n

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.

\n\n

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.

\n\n

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\n

If 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", + "comments": "

This method will fail in bare index instances.

\n\n

The pathspec is a list of file names or shell glob patterns that will\n be matched against files in the repository's working directory. Each\n file that matches will be added to the index (either updating an\n existing entry or adding a new entry). You can disable glob expansion\n and force exact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\n flag.

\n\n

Files that are ignored will be skipped (unlike git_index_add_bypath).\n If a file is already tracked in the index, then it will be updated\n even if it is ignored. Pass the GIT_INDEX_ADD_FORCE flag to skip\n the checking of ignore rules.

\n\n

To emulate git add -A and generate an error if the pathspec contains\n the exact path of an ignored file (when not using FORCE), add the\n GIT_INDEX_ADD_CHECK_PATHSPEC flag. This checks that each entry\n in the pathspec that is an exact match to a filename on disk is\n either not ignored or already in the index. If this check fails, the\n function will return GIT_EINVALIDSPEC.

\n\n

To emulate git add -A with the "dry-run" option, just use a callback\n function that always returns a positive value. See below for details.

\n\n

If any files are currently the result of a merge conflict, those files\n will no longer be marked as conflicting. The data about the conflicts\n will be moved to the "resolve undo" (REUC) section.

\n\n

If you provide a callback function, it will be invoked on each matching\n item in the working directory immediately before it is added to /\n updated in the index. Returning zero will add the item to the index,\n greater than zero will skip the item, and less than zero will abort the\n scan and return that value to the caller.

\n", "group": "index" }, "git_index_remove_all": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 640, "lineto": 644, "args": [ @@ -8526,12 +8958,12 @@ "comment": " 0 on success, negative callback return value, or error code" }, "description": "

Remove all matching index entries.

\n", - "comments": "

If you provide a callback function, it will be invoked on each matching item in the index immediately before it is removed. Return 0 to remove the item, > 0 to skip the item, and < 0 to abort the scan.

\n", + "comments": "

If you provide a callback function, it will be invoked on each matching\n item in the index immediately before it is removed. Return 0 to\n remove the item, > 0 to skip the item, and \n<\n 0 to abort the scan.

\n", "group": "index" }, "git_index_update_all": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 669, "lineto": 673, "args": [ @@ -8563,12 +8995,12 @@ "comment": " 0 on success, negative callback return value, or error code" }, "description": "

Update all index entries to match the working directory

\n", - "comments": "

This method will fail in bare index instances.

\n\n

This 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\n

If 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", + "comments": "

This method will fail in bare index instances.

\n\n

This scans the existing index entries and synchronizes them with the\n working directory, deleting them if the corresponding working directory\n file no longer exists otherwise updating the information (including\n adding the latest version of file to the ODB if needed).

\n\n

If you provide a callback function, it will be invoked on each matching\n item in the index immediately before it is updated (either refreshed\n or removed depending on working directory state). Return 0 to proceed\n with updating the item, > 0 to skip the item, and \n<\n 0 to abort the scan.

\n", "group": "index" }, "git_index_find": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 684, "lineto": 684, "args": [ @@ -8600,7 +9032,7 @@ }, "git_index_find_prefix": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 695, "lineto": 695, "args": [ @@ -8632,7 +9064,7 @@ }, "git_index_conflict_add": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 720, "lineto": 724, "args": [ @@ -8664,12 +9096,12 @@ "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", + "comments": "

The entries are the entries from the tree included in the merge. Any\n entry may be null to indicate that that file was not present in the\n trees during the merge. For example, ancestor_entry may be NULL to\n indicate that a file was added in both branches and must be resolved.

\n", "group": "index" }, "git_index_conflict_get": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 740, "lineto": 745, "args": [ @@ -8706,12 +9138,12 @@ "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.

\n", + "comments": "

The entries are not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.

\n", "group": "index" }, "git_index_conflict_remove": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 754, "lineto": 754, "args": [ @@ -8738,7 +9170,7 @@ }, "git_index_conflict_cleanup": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 762, "lineto": 762, "args": [ @@ -8760,7 +9192,7 @@ }, "git_index_has_conflicts": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 769, "lineto": 769, "args": [ @@ -8781,13 +9213,13 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_has_conflicts-15" + "ex/HEAD/merge.html#git_index_has_conflicts-13" ] } }, "git_index_conflict_iterator_new": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 780, "lineto": 782, "args": [ @@ -8813,13 +9245,13 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_iterator_new-16" + "ex/HEAD/merge.html#git_index_conflict_iterator_new-14" ] } }, "git_index_conflict_next": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 794, "lineto": 798, "args": [ @@ -8855,13 +9287,13 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_next-17" + "ex/HEAD/merge.html#git_index_conflict_next-15" ] } }, "git_index_conflict_iterator_free": { "type": "function", - "file": "index.h", + "file": "git2/index.h", "line": 805, "lineto": 806, "args": [ @@ -8882,15 +9314,42 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_iterator_free-18" + "ex/HEAD/merge.html#git_index_conflict_iterator_free-16" ] } }, + "git_indexer_init_options": { + "type": "function", + "file": "git2/indexer.h", + "line": 41, + "lineto": 43, + "args": [ + { + "name": "opts", + "type": "git_indexer_options *", + "comment": "the `git_indexer_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "Version of struct; pass `GIT_INDEXER_OPTIONS_VERSION`" + } + ], + "argline": "git_indexer_options *opts, unsigned int version", + "sig": "git_indexer_options *::unsigned int", + "return": { + "type": "int", + "comment": " Zero on success; -1 on failure." + }, + "description": "

Initializes a git_indexer_options with default values. Equivalent to\n creating an instance with GIT_INDEXER_OPTIONS_INIT.

\n", + "comments": "", + "group": "indexer" + }, "git_indexer_new": { "type": "function", - "file": "indexer.h", - "line": 30, - "lineto": 36, + "file": "git2/indexer.h", + "line": 57, + "lineto": 62, "args": [ { "name": "out", @@ -8913,36 +9372,26 @@ "comment": "object database from which to read base objects when\n fixing thin packs. Pass NULL if no thin pack is expected (an error\n will be returned if there are bases missing)" }, { - "name": "progress_cb", - "type": "git_transfer_progress_cb", - "comment": "function to call with progress information" - }, - { - "name": "progress_cb_payload", - "type": "void *", - "comment": "payload for the progress callback" + "name": "opts", + "type": "git_indexer_options *", + "comment": "Optional structure containing additional options. See\n `git_indexer_options` above." } ], - "argline": "git_indexer **out, const char *path, unsigned int mode, git_odb *odb, git_transfer_progress_cb progress_cb, void *progress_cb_payload", - "sig": "git_indexer **::const char *::unsigned int::git_odb *::git_transfer_progress_cb::void *", + "argline": "git_indexer **out, const char *path, unsigned int mode, git_odb *odb, git_indexer_options *opts", + "sig": "git_indexer **::const char *::unsigned int::git_odb *::git_indexer_options *", "return": { "type": "int", "comment": null }, "description": "

Create a new indexer instance

\n", "comments": "", - "group": "indexer", - "examples": { - "network/index-pack.c": [ - "ex/HEAD/network/index-pack.html#git_indexer_new-1" - ] - } + "group": "indexer" }, "git_indexer_append": { "type": "function", - "file": "indexer.h", - "line": 46, - "lineto": 46, + "file": "git2/indexer.h", + "line": 72, + "lineto": 72, "args": [ { "name": "idx", @@ -8973,18 +9422,13 @@ }, "description": "

Add data to the indexer

\n", "comments": "", - "group": "indexer", - "examples": { - "network/index-pack.c": [ - "ex/HEAD/network/index-pack.html#git_indexer_append-2" - ] - } + "group": "indexer" }, "git_indexer_commit": { "type": "function", - "file": "indexer.h", - "line": 55, - "lineto": 55, + "file": "git2/indexer.h", + "line": 81, + "lineto": 81, "args": [ { "name": "idx", @@ -9005,18 +9449,13 @@ }, "description": "

Finalize the pack and index

\n", "comments": "

Resolve any pending deltas and write out the index file

\n", - "group": "indexer", - "examples": { - "network/index-pack.c": [ - "ex/HEAD/network/index-pack.html#git_indexer_commit-3" - ] - } + "group": "indexer" }, "git_indexer_hash": { "type": "function", - "file": "indexer.h", - "line": 65, - "lineto": 65, + "file": "git2/indexer.h", + "line": 91, + "lineto": 91, "args": [ { "name": "idx", @@ -9031,19 +9470,14 @@ "comment": null }, "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", - "examples": { - "network/index-pack.c": [ - "ex/HEAD/network/index-pack.html#git_indexer_hash-4" - ] - } + "comments": "

A packfile's name is derived from the sorted hashing of all object\n names. This is only correct after the index has been finalized.

\n", + "group": "indexer" }, "git_indexer_free": { "type": "function", - "file": "indexer.h", - "line": 72, - "lineto": 72, + "file": "git2/indexer.h", + "line": 98, + "lineto": 98, "args": [ { "name": "idx", @@ -9059,16 +9493,257 @@ }, "description": "

Free the indexer and its resources

\n", "comments": "", - "group": "indexer", - "examples": { - "network/index-pack.c": [ - "ex/HEAD/network/index-pack.html#git_indexer_free-5" - ] - } + "group": "indexer" + }, + "imaxdiv": { + "type": "function", + "file": "git2/inttypes.h", + "line": 284, + "lineto": 298, + "args": [ + { + "name": "numer", + "type": "intmax_t", + "comment": null + }, + { + "name": "denom", + "type": "intmax_t", + "comment": null + } + ], + "argline": "intmax_t numer, intmax_t denom", + "sig": "intmax_t::intmax_t", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "", + "group": "imaxdiv" + }, + "git_mailmap_new": { + "type": "function", + "file": "git2/mailmap.h", + "line": 32, + "lineto": 32, + "args": [ + { + "name": "out", + "type": "git_mailmap **", + "comment": "pointer to store the new mailmap" + } + ], + "argline": "git_mailmap **out", + "sig": "git_mailmap **", + "return": { + "type": "int", + "comment": " 0 on success, or an error code" + }, + "description": "

Allocate a new mailmap object.

\n", + "comments": "

This object is empty, so you'll have to add a mailmap file before you can do\n anything with it. The mailmap must be freed with 'git_mailmap_free'.

\n", + "group": "mailmap" + }, + "git_mailmap_free": { + "type": "function", + "file": "git2/mailmap.h", + "line": 39, + "lineto": 39, + "args": [ + { + "name": "mm", + "type": "git_mailmap *", + "comment": "the mailmap to free" + } + ], + "argline": "git_mailmap *mm", + "sig": "git_mailmap *", + "return": { + "type": "void", + "comment": null + }, + "description": "

Free the mailmap and its associated memory.

\n", + "comments": "", + "group": "mailmap" + }, + "git_mailmap_add_entry": { + "type": "function", + "file": "git2/mailmap.h", + "line": 52, + "lineto": 54, + "args": [ + { + "name": "mm", + "type": "git_mailmap *", + "comment": "mailmap to add the entry to" + }, + { + "name": "real_name", + "type": "const char *", + "comment": "the real name to use, or NULL" + }, + { + "name": "real_email", + "type": "const char *", + "comment": "the real email to use, or NULL" + }, + { + "name": "replace_name", + "type": "const char *", + "comment": "the name to replace, or NULL" + }, + { + "name": "replace_email", + "type": "const char *", + "comment": "the email to replace" + } + ], + "argline": "git_mailmap *mm, const char *real_name, const char *real_email, const char *replace_name, const char *replace_email", + "sig": "git_mailmap *::const char *::const char *::const char *::const char *", + "return": { + "type": "int", + "comment": " 0 on success, or an error code" + }, + "description": "

Add a single entry to the given mailmap object. If the entry already exists,\n it will be replaced with the new entry.

\n", + "comments": "", + "group": "mailmap" + }, + "git_mailmap_from_buffer": { + "type": "function", + "file": "git2/mailmap.h", + "line": 64, + "lineto": 65, + "args": [ + { + "name": "out", + "type": "git_mailmap **", + "comment": "pointer to store the new mailmap" + }, + { + "name": "buf", + "type": "const char *", + "comment": "buffer to parse the mailmap from" + }, + { + "name": "len", + "type": "size_t", + "comment": "the length of the input buffer" + } + ], + "argline": "git_mailmap **out, const char *buf, size_t len", + "sig": "git_mailmap **::const char *::size_t", + "return": { + "type": "int", + "comment": " 0 on success, or an error code" + }, + "description": "

Create a new mailmap instance containing a single mailmap file

\n", + "comments": "", + "group": "mailmap" + }, + "git_mailmap_from_repository": { + "type": "function", + "file": "git2/mailmap.h", + "line": 81, + "lineto": 82, + "args": [ + { + "name": "out", + "type": "git_mailmap **", + "comment": "pointer to store the new mailmap" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "repository to load mailmap information from" + } + ], + "argline": "git_mailmap **out, git_repository *repo", + "sig": "git_mailmap **::git_repository *", + "return": { + "type": "int", + "comment": " 0 on success, or an error code" + }, + "description": "

Create a new mailmap instance from a repository, loading mailmap files based\n on the repository's configuration.

\n", + "comments": "

Mailmaps are loaded in the following order:\n 1. '.mailmap' in the root of the repository's working directory, if present.\n 2. The blob object identified by the 'mailmap.blob' config entry, if set.\n [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]\n 3. The path in the 'mailmap.file' config entry, if set.

\n", + "group": "mailmap" + }, + "git_mailmap_resolve": { + "type": "function", + "file": "git2/mailmap.h", + "line": 96, + "lineto": 98, + "args": [ + { + "name": "real_name", + "type": "const char **", + "comment": "pointer to store the real name" + }, + { + "name": "real_email", + "type": "const char **", + "comment": "pointer to store the real email" + }, + { + "name": "mm", + "type": "const git_mailmap *", + "comment": "the mailmap to perform a lookup with (may be NULL)" + }, + { + "name": "name", + "type": "const char *", + "comment": "the name to look up" + }, + { + "name": "email", + "type": "const char *", + "comment": "the email to look up" + } + ], + "argline": "const char **real_name, const char **real_email, const git_mailmap *mm, const char *name, const char *email", + "sig": "const char **::const char **::const git_mailmap *::const char *::const char *", + "return": { + "type": "int", + "comment": " 0 on success, or an error code" + }, + "description": "

Resolve a name and email to the corresponding real name and email.

\n", + "comments": "

The lifetime of the strings are tied to mm, name, and email parameters.

\n", + "group": "mailmap" + }, + "git_mailmap_resolve_signature": { + "type": "function", + "file": "git2/mailmap.h", + "line": 110, + "lineto": 111, + "args": [ + { + "name": "out", + "type": "git_signature **", + "comment": "new signature" + }, + { + "name": "mm", + "type": "const git_mailmap *", + "comment": "mailmap to resolve with" + }, + { + "name": "sig", + "type": "const git_signature *", + "comment": "signature to resolve" + } + ], + "argline": "git_signature **out, const git_mailmap *mm, const git_signature *sig", + "sig": "git_signature **::const git_mailmap *::const git_signature *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Resolve a signature to use real names and emails with a mailmap.

\n", + "comments": "

Call git_signature_free() to free the data.

\n", + "group": "mailmap" }, "git_merge_file_init_input": { "type": "function", - "file": "merge.h", + "file": "git2/merge.h", "line": 60, "lineto": 62, "args": [ @@ -9095,19 +9770,19 @@ }, "git_merge_file_init_options": { "type": "function", - "file": "merge.h", - "line": 214, - "lineto": 216, + "file": "git2/merge.h", + "line": 215, + "lineto": 217, "args": [ { "name": "opts", "type": "git_merge_file_options *", - "comment": "the `git_merge_file_options` instance to initialize." + "comment": "The `git_merge_file_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct; you should pass\n `GIT_MERGE_FILE_OPTIONS_VERSION` here." + "comment": "The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`." } ], "argline": "git_merge_file_options *opts, unsigned int version", @@ -9116,25 +9791,25 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_merge_file_options with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_merge_file_options structure

\n", + "comments": "

Initializes a git_merge_file_options with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.

\n", "group": "merge" }, "git_merge_init_options": { "type": "function", - "file": "merge.h", - "line": 311, - "lineto": 313, + "file": "git2/merge.h", + "line": 313, + "lineto": 315, "args": [ { "name": "opts", "type": "git_merge_options *", - "comment": "the `git_merge_options` instance to initialize." + "comment": "The `git_merge_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct; you should pass\n `GIT_MERGE_OPTIONS_VERSION` here." + "comment": "The struct version; pass `GIT_MERGE_OPTIONS_VERSION`." } ], "argline": "git_merge_options *opts, unsigned int version", @@ -9143,15 +9818,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_merge_options with default values. Equivalent to\n creating an instance with GIT_MERGE_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_merge_options structure

\n", + "comments": "

Initializes a git_merge_options with default values. Equivalent to\n creating an instance with GIT_MERGE_OPTIONS_INIT.

\n", "group": "merge" }, "git_merge_analysis": { "type": "function", - "file": "merge.h", - "line": 382, - "lineto": 387, + "file": "git2/merge.h", + "line": 384, + "lineto": 389, "args": [ { "name": "analysis_out", @@ -9190,15 +9865,15 @@ "group": "merge", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_merge_analysis-19" + "ex/HEAD/merge.html#git_merge_analysis-17" ] } }, "git_merge_base": { "type": "function", - "file": "merge.h", - "line": 398, - "lineto": 402, + "file": "git2/merge.h", + "line": 400, + "lineto": 404, "args": [ { "name": "out", @@ -9241,9 +9916,9 @@ }, "git_merge_bases": { "type": "function", - "file": "merge.h", - "line": 413, - "lineto": 417, + "file": "git2/merge.h", + "line": 415, + "lineto": 419, "args": [ { "name": "out", @@ -9278,9 +9953,9 @@ }, "git_merge_base_many": { "type": "function", - "file": "merge.h", - "line": 428, - "lineto": 432, + "file": "git2/merge.h", + "line": 430, + "lineto": 434, "args": [ { "name": "out", @@ -9315,9 +9990,9 @@ }, "git_merge_bases_many": { "type": "function", - "file": "merge.h", - "line": 443, - "lineto": 447, + "file": "git2/merge.h", + "line": 445, + "lineto": 449, "args": [ { "name": "out", @@ -9352,9 +10027,9 @@ }, "git_merge_base_octopus": { "type": "function", - "file": "merge.h", - "line": 458, - "lineto": 462, + "file": "git2/merge.h", + "line": 460, + "lineto": 464, "args": [ { "name": "out", @@ -9389,9 +10064,9 @@ }, "git_merge_file": { "type": "function", - "file": "merge.h", - "line": 480, - "lineto": 485, + "file": "git2/merge.h", + "line": 482, + "lineto": 487, "args": [ { "name": "out", @@ -9426,14 +10101,14 @@ "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.

\n", - "comments": "

Note that this function does not reference a repository and any configuration must be passed as git_merge_file_options.

\n", + "comments": "

Note that this function does not reference a repository and any\n configuration must be passed as git_merge_file_options.

\n", "group": "merge" }, "git_merge_file_from_index": { "type": "function", - "file": "merge.h", - "line": 501, - "lineto": 507, + "file": "git2/merge.h", + "line": 503, + "lineto": 509, "args": [ { "name": "out", @@ -9478,9 +10153,9 @@ }, "git_merge_file_result_free": { "type": "function", - "file": "merge.h", - "line": 514, - "lineto": 514, + "file": "git2/merge.h", + "line": 516, + "lineto": 516, "args": [ { "name": "result", @@ -9500,9 +10175,9 @@ }, "git_merge_trees": { "type": "function", - "file": "merge.h", - "line": 532, - "lineto": 538, + "file": "git2/merge.h", + "line": 534, + "lineto": 540, "args": [ { "name": "out", @@ -9547,9 +10222,9 @@ }, "git_merge_commits": { "type": "function", - "file": "merge.h", - "line": 555, - "lineto": 560, + "file": "git2/merge.h", + "line": 557, + "lineto": 562, "args": [ { "name": "out", @@ -9589,9 +10264,9 @@ }, "git_merge": { "type": "function", - "file": "merge.h", - "line": 580, - "lineto": 585, + "file": "git2/merge.h", + "line": 582, + "lineto": 587, "args": [ { "name": "repo", @@ -9626,17 +10301,17 @@ "comment": " 0 on success or error code" }, "description": "

Merges the given commit(s) into HEAD, writing the results into the working\n directory. Any changes are staged for commit and any conflicts are written\n to the index. Callers should inspect the repository's index after this\n completes, resolve any conflicts and prepare a commit.

\n", - "comments": "

For compatibility with git, the repository is put into a merging state. Once the commit is done (or if the uses wishes to abort), you should clear this state by calling git_repository_state_cleanup().

\n", + "comments": "

For compatibility with git, the repository is put into a merging\n state. Once the commit is done (or if the uses wishes to abort),\n you should clear this state by calling\n git_repository_state_cleanup().

\n", "group": "merge", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_merge-20" + "ex/HEAD/merge.html#git_merge-18" ] } }, "git_message_prettify": { "type": "function", - "file": "message.h", + "file": "git2/message.h", "line": 38, "lineto": 38, "args": [ @@ -9673,7 +10348,7 @@ }, "git_message_trailers": { "type": "function", - "file": "message.h", + "file": "git2/message.h", "line": 73, "lineto": 73, "args": [ @@ -9695,12 +10370,12 @@ "comment": " 0 on success, or non-zero on error." }, "description": "

Parse trailers out of a message, filling the array pointed to by +arr+.

\n", - "comments": "

Trailers are key/value pairs in the last paragraph of a message, not including any patches or conflicts that may be present.

\n", + "comments": "

Trailers are key/value pairs in the last paragraph of a message, not\n including any patches or conflicts that may be present.

\n", "group": "message" }, "git_message_trailer_array_free": { "type": "function", - "file": "message.h", + "file": "git2/message.h", "line": 79, "lineto": 79, "args": [ @@ -9722,7 +10397,7 @@ }, "git_note_iterator_new": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 49, "lineto": 52, "args": [ @@ -9754,7 +10429,7 @@ }, "git_note_commit_iterator_new": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 64, "lineto": 66, "args": [ @@ -9781,7 +10456,7 @@ }, "git_note_iterator_free": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 73, "lineto": 73, "args": [ @@ -9803,7 +10478,7 @@ }, "git_note_next": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 86, "lineto": 89, "args": [ @@ -9835,7 +10510,7 @@ }, "git_note_read": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 105, "lineto": 109, "args": [ @@ -9872,7 +10547,7 @@ }, "git_note_commit_read": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 124, "lineto": 128, "args": [ @@ -9909,7 +10584,7 @@ }, "git_note_author": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 136, "lineto": 136, "args": [ @@ -9931,7 +10606,7 @@ }, "git_note_committer": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 144, "lineto": 144, "args": [ @@ -9953,7 +10628,7 @@ }, "git_note_message": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 153, "lineto": 153, "args": [ @@ -9975,7 +10650,7 @@ }, "git_note_id": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 162, "lineto": 162, "args": [ @@ -9997,7 +10672,7 @@ }, "git_note_create": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 179, "lineto": 187, "args": [ @@ -10054,7 +10729,7 @@ }, "git_note_commit_create": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 209, "lineto": 218, "args": [ @@ -10111,12 +10786,12 @@ "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", + "comments": "

This function will create a notes commit for a given object,\n the commit is a dangling commit, no reference is created.

\n", "group": "note" }, "git_note_remove": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 232, "lineto": 237, "args": [ @@ -10158,7 +10833,7 @@ }, "git_note_commit_remove": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 257, "lineto": 263, "args": [ @@ -10205,7 +10880,7 @@ }, "git_note_free": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 270, "lineto": 270, "args": [ @@ -10225,9 +10900,36 @@ "comments": "", "group": "note" }, + "git_note_default_ref": { + "type": "function", + "file": "git2/notes.h", + "line": 280, + "lineto": 280, + "args": [ + { + "name": "out", + "type": "git_buf *", + "comment": "buffer in which to store the name of the default notes reference" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "The Git repository" + } + ], + "argline": "git_buf *out, git_repository *repo", + "sig": "git_buf *::git_repository *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Get the default notes reference for a repository

\n", + "comments": "", + "group": "note" + }, "git_note_foreach": { "type": "function", - "file": "notes.h", + "file": "git2/notes.h", "line": 298, "lineto": 302, "args": [ @@ -10264,7 +10966,7 @@ }, "git_object_lookup": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 42, "lineto": 46, "args": [ @@ -10296,20 +10998,20 @@ "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.

\n\n

The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'GIT_OBJ_ANY' may be passed to let the method guess the object's type.

\n", + "comments": "

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJ_ANY' may be passed to let\n the method guess the object's type.

\n", "group": "object", "examples": { "log.c": [ "ex/HEAD/log.html#git_object_lookup-34" ], "merge.c": [ - "ex/HEAD/merge.html#git_object_lookup-21" + "ex/HEAD/merge.html#git_object_lookup-19" ] } }, "git_object_lookup_prefix": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 75, "lineto": 80, "args": [ @@ -10346,12 +11048,12 @@ "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\n

The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object in the odb; the method will fail otherwise. The special value 'GIT_OBJ_ANY' may be passed to let the method guess the object's type.

\n", + "comments": "

The object obtained will be so that its identifier\n matches the first 'len' hexadecimal characters\n (packets of 4 bits) of the given 'id'.\n 'len' must be at least GIT_OID_MINPREFIXLEN, and\n long enough to identify a unique object matching\n the prefix; otherwise the method will fail.

\n\n

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJ_ANY' may be passed to let\n the method guess the object's type.

\n", "group": "object" }, "git_object_lookup_bypath": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 93, "lineto": 97, "args": [ @@ -10388,7 +11090,7 @@ }, "git_object_id": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 105, "lineto": 105, "args": [ @@ -10435,7 +11137,7 @@ }, "git_object_short_id": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 119, "lineto": 119, "args": [ @@ -10457,7 +11159,7 @@ "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", + "comments": "

This starts at the "core.abbrev" length (default 7 characters) and\n iteratively extends to a longer string if that length is ambiguous.\n The result will be unambiguous (at least until new objects are added to\n the repository).

\n", "group": "object", "examples": { "tag.c": [ @@ -10467,7 +11169,7 @@ }, "git_object_type": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 127, "lineto": 127, "args": [ @@ -10499,7 +11201,7 @@ }, "git_object_owner": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 141, "lineto": 141, "args": [ @@ -10516,12 +11218,12 @@ "comment": " the repository who owns this object" }, "description": "

Get the repository that owns this object

\n", - "comments": "

Freeing or calling git_repository_close on the returned pointer will invalidate the actual object.

\n\n

Any other operation may be run on the repository without affecting the object.

\n", + "comments": "

Freeing or calling git_repository_close on the\n returned pointer will invalidate the actual object.

\n\n

Any other operation may be run on the repository without\n affecting the object.

\n", "group": "object" }, "git_object_free": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 158, "lineto": 158, "args": [ @@ -10538,7 +11240,7 @@ "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\n

IMPORTANT: It is necessary to call this method when you stop using an object. Failure to do so will cause a memory leak.

\n", + "comments": "

This method instructs the library to close an existing\n object; note that git_objects are owned and cached by the repository\n so the object may or may not be freed after this library call,\n depending on how aggressive is the caching mechanism used\n by the repository.

\n\n

IMPORTANT:\n It is necessary to call this method when you stop using\n an object. Failure to do so will cause a memory leak.

\n", "group": "object", "examples": { "blame.c": [ @@ -10557,7 +11259,7 @@ "ex/HEAD/log.html#git_object_free-39" ], "merge.c": [ - "ex/HEAD/merge.html#git_object_free-22" + "ex/HEAD/merge.html#git_object_free-20" ], "rev-parse.c": [ "ex/HEAD/rev-parse.html#git_object_free-9", @@ -10574,7 +11276,7 @@ }, "git_object_type2string": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 169, "lineto": 169, "args": [ @@ -10591,7 +11293,7 @@ "comment": " the corresponding string representation." }, "description": "

Convert an object type to its string representation.

\n", - "comments": "

The result is a pointer to a string in static memory and should not be free()'ed.

\n", + "comments": "

The result is a pointer to a string in static memory and\n should not be free()'ed.

\n", "group": "object", "examples": { "cat-file.c": [ @@ -10608,7 +11310,7 @@ }, "git_object_string2type": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 177, "lineto": 177, "args": [ @@ -10630,7 +11332,7 @@ }, "git_object_typeisloose": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 186, "lineto": 186, "args": [ @@ -10652,7 +11354,7 @@ }, "git_object__size": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 200, "lineto": 200, "args": [ @@ -10669,12 +11371,12 @@ "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.

\n", + "comments": "

For all the core types, this would the equivalent\n of calling sizeof(git_commit) if the core types\n were not opaque on the external API.

\n", "group": "object" }, "git_object_peel": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 225, "lineto": 228, "args": [ @@ -10701,12 +11403,12 @@ "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EPEEL, or an error code" }, "description": "

Recursively peel an object until an object of the specified type is met.

\n", - "comments": "

If the query cannot be satisfied due to the object model, GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a tree).

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object will be peeled until the type changes. A tag will be peeled until the referenced object is no longer a tag, and a commit will be peeled to a tree. Any other object type will return GIT_EINVALIDSPEC.

\n\n

If peeling a tag we discover an object which cannot be peeled to the target type due to the object model, GIT_EPEEL will be returned.

\n\n

You must free the returned object.

\n", + "comments": "

If the query cannot be satisfied due to the object model,\n GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a\n tree).

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object will\n be peeled until the type changes. A tag will be peeled until the\n referenced object is no longer a tag, and a commit will be peeled\n to a tree. Any other object type will return GIT_EINVALIDSPEC.

\n\n

If peeling a tag we discover an object which cannot be peeled to\n the target type due to the object model, GIT_EPEEL will be\n returned.

\n\n

You must free the returned object.

\n", "group": "object" }, "git_object_dup": { "type": "function", - "file": "object.h", + "file": "git2/object.h", "line": 237, "lineto": 237, "args": [ @@ -10733,7 +11435,7 @@ }, "git_odb_new": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 39, "lineto": 39, "args": [ @@ -10750,12 +11452,12 @@ "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()

\n", + "comments": "

Before the ODB can be used for read/writing, a custom database\n backend must be manually added using git_odb_add_backend()

\n", "group": "odb" }, "git_odb_open": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 57, "lineto": 57, "args": [ @@ -10777,12 +11479,12 @@ "comment": " 0 or an error code" }, "description": "

Create a new object database and automatically add\n the two default backends:

\n", - "comments": "
- git_odb_backend_loose: read and write loose object files      from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles,        assuming `objects_dir` as the Objects folder which      contains a 'pack/' folder with the corresponding data\n
\n", + "comments": "
- git_odb_backend_loose: read and write loose object files\n    from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles,\n    assuming `objects_dir` as the Objects folder which\n    contains a 'pack/' folder with the corresponding data\n
\n", "group": "odb" }, "git_odb_add_disk_alternate": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 74, "lineto": 74, "args": [ @@ -10804,12 +11506,12 @@ "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.

\n\n

Alternate backends are always checked for objects after all the main backends have been exhausted.

\n\n

Writing is disabled on alternate backends.

\n", + "comments": "

Note that the added path must point to an objects, not\n to a full repository, to use it as an alternate store.

\n\n

Alternate backends are always checked for objects after\n all the main backends have been exhausted.

\n\n

Writing is disabled on alternate backends.

\n", "group": "odb" }, "git_odb_free": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 81, "lineto": 81, "args": [ @@ -10839,7 +11541,7 @@ }, "git_odb_read": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 100, "lineto": 100, "args": [ @@ -10866,7 +11568,7 @@ "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." }, "description": "

Read an object from the database.

\n", - "comments": "

This method queries all available ODB backends trying to read the given OID.

\n\n

The 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\n trying to read the given OID.

\n\n

The returned object is reference counted and\n internally cached, so it should be closed\n by the user once it's no longer in use.

\n", "group": "odb", "examples": { "cat-file.c": [ @@ -10879,7 +11581,7 @@ }, "git_odb_read_prefix": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 129, "lineto": 129, "args": [ @@ -10911,12 +11613,12 @@ "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database.\n - GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)" }, "description": "

Read an object from the database, given a prefix\n of its identifier.

\n", - "comments": "

This method queries all available ODB backends 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\n

The 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\n trying to match the 'len' first hexadecimal\n characters of the 'short_id'.\n The remaining (GIT_OID_HEXSZ-len)*4 bits of\n 'short_id' must be 0s.\n 'len' must be at least GIT_OID_MINPREFIXLEN,\n and the prefix must be long enough to identify\n a unique object in all the backends; the\n method will fail otherwise.

\n\n

The returned object is reference counted and\n internally cached, so it should be closed\n by the user once it's no longer in use.

\n", "group": "odb" }, "git_odb_read_header": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 149, "lineto": 149, "args": [ @@ -10948,12 +11650,12 @@ "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." }, "description": "

Read the header of an object from the database, without\n reading its full contents.

\n", - "comments": "

The header includes the length and the type of an object.

\n\n

Note 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", + "comments": "

The header includes the length and the type of an object.

\n\n

Note that most backends do not support reading only the header\n of an object, so the whole object will be read and then the\n header will be returned.

\n", "group": "odb" }, "git_odb_exists": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 160, "lineto": 160, "args": [ @@ -10980,7 +11682,7 @@ }, "git_odb_exists_prefix": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 173, "lineto": 174, "args": [ @@ -11017,7 +11719,7 @@ }, "git_odb_expand_ids": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 215, "lineto": 218, "args": [ @@ -11044,12 +11746,12 @@ "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.

\n", - "comments": "

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", + "comments": "

Note that since this function operates on multiple objects, the\n underlying database will not be asked to be reloaded if an object is\n not found (which is unlike other object database operations.)

\n", "group": "odb" }, "git_odb_refresh": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 238, "lineto": 238, "args": [ @@ -11066,12 +11768,12 @@ "comment": " 0 on success, error code otherwise" }, "description": "

Refresh the object database to load newly added files.

\n", - "comments": "

If the object databases have changed on disk while the library is running, this function will force a reload of the underlying indexes.

\n\n

Use this function when you're confident that an external application has tampered with the ODB.

\n\n

NOTE that it is not necessary to call this function at all. The library will automatically attempt to refresh the ODB when a lookup fails, to see if the looked up object exists on disk but hasn't been loaded yet.

\n", + "comments": "

If the object databases have changed on disk while the library\n is running, this function will force a reload of the underlying\n indexes.

\n\n

Use this function when you're confident that an external\n application has tampered with the ODB.

\n\n

NOTE that it is not necessary to call this function at all. The\n library will automatically attempt to refresh the ODB\n when a lookup fails, to see if the looked up object exists\n on disk but hasn't been loaded yet.

\n", "group": "odb" }, "git_odb_foreach": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 253, "lineto": 253, "args": [ @@ -11098,12 +11800,12 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

List all objects available in the database

\n", - "comments": "

The callback will be called for each object available in the database. Note that the objects are likely to be returned in the index order, which would make accessing the objects in that order inefficient. Return a non-zero value from the callback to stop looping.

\n", + "comments": "

The callback will be called for each object available in the\n database. Note that the objects are likely to be returned in the index\n order, which would make accessing the objects in that order inefficient.\n Return a non-zero value from the callback to stop looping.

\n", "group": "odb" }, "git_odb_write": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 273, "lineto": 273, "args": [ @@ -11140,7 +11842,7 @@ "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\n

This method is provided for compatibility with custom backends which are not able to support streaming writes

\n", + "comments": "

This method writes a full object straight into the ODB.\n For most cases, it is preferred to write objects through a write\n stream, which is both faster and less memory intensive, specially\n for big objects.

\n\n

This method is provided for compatibility with custom backends\n which are not able to support streaming writes

\n", "group": "odb", "examples": { "general.c": [ @@ -11150,7 +11852,7 @@ }, "git_odb_open_wstream": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 296, "lineto": 296, "args": [ @@ -11182,12 +11884,12 @@ "comment": " 0 if the stream was created; error code otherwise" }, "description": "

Open a stream to write an object into the ODB

\n", - "comments": "

The type and final length of the object must be specified when opening the stream.

\n\n

The returned stream will be of type GIT_STREAM_WRONLY, and it won't be effective until git_odb_stream_finalize_write is called and returns without an error

\n\n

The stream must always be freed when done with git_odb_stream_free or will leak memory.

\n", + "comments": "

The type and final length of the object must be specified\n when opening the stream.

\n\n

The returned stream will be of type GIT_STREAM_WRONLY, and it\n won't be effective until git_odb_stream_finalize_write is called\n and returns without an error

\n\n

The stream must always be freed when done with git_odb_stream_free or\n will leak memory.

\n", "group": "odb" }, "git_odb_stream_write": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 309, "lineto": 309, "args": [ @@ -11214,12 +11916,12 @@ "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()

\n", + "comments": "

This method will fail if the total number of received bytes exceeds the\n size declared with git_odb_open_wstream()

\n", "group": "odb" }, "git_odb_stream_finalize_write": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 324, "lineto": 324, "args": [ @@ -11241,12 +11943,12 @@ "comment": " 0 on success; an error code otherwise" }, "description": "

Finish writing to an odb stream

\n", - "comments": "

The object will take its final name and will be available to the odb.

\n\n

This method will fail if the total number of received bytes differs from the size declared with git_odb_open_wstream()

\n", + "comments": "

The object will take its final name and will be available to the\n odb.

\n\n

This method will fail if the total number of received bytes\n differs from the size declared with git_odb_open_wstream()

\n", "group": "odb" }, "git_odb_stream_read": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 331, "lineto": 331, "args": [ @@ -11278,7 +11980,7 @@ }, "git_odb_stream_free": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 338, "lineto": 338, "args": [ @@ -11300,7 +12002,7 @@ }, "git_odb_open_rstream": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 366, "lineto": 371, "args": [ @@ -11337,12 +12039,12 @@ "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\n

It's recommended to use git_odb_read instead, which is assured to work on all backends.

\n\n

The returned stream will be of type GIT_STREAM_RDONLY and will have the following methods:

\n\n
    - stream->read: read `n` bytes from the stream      - stream->free: free the stream\n
\n\n

The stream must always be free'd or will leak memory.

\n", + "comments": "

Note that most backends do not support streaming reads\n because they store their objects as compressed/delta'ed blobs.

\n\n

It's recommended to use git_odb_read instead, which is\n assured to work on all backends.

\n\n

The returned stream will be of type GIT_STREAM_RDONLY and\n will have the following methods:

\n\n
    - stream->read: read `n` bytes from the stream\n    - stream->free: free the stream\n
\n\n

The stream must always be free'd or will leak memory.

\n", "group": "odb" }, "git_odb_write_pack": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 391, "lineto": 395, "args": [ @@ -11374,12 +12076,12 @@ "comment": null }, "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", + "comments": "

If the ODB layer understands pack files, then the given\n packfile will likely be streamed directly to disk (and a\n corresponding index created). If the ODB layer does not\n understand pack files, the objects will be stored in whatever\n format the ODB layer uses.

\n", "group": "odb" }, "git_odb_hash": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 409, "lineto": 409, "args": [ @@ -11411,12 +12113,12 @@ "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", + "comments": "

The resulting SHA-1 OID will be the identifier for the data\n buffer as if the data buffer it were to written to the ODB.

\n", "group": "odb" }, "git_odb_hashfile": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 424, "lineto": 424, "args": [ @@ -11448,7 +12150,7 @@ }, "git_odb_object_dup": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 438, "lineto": 438, "args": [ @@ -11470,12 +12172,12 @@ "comment": " 0 or an error code" }, "description": "

Create a copy of an odb_object

\n", - "comments": "

The returned copy must be manually freed with git_odb_object_free. 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.

\n", + "comments": "

The returned copy must be manually freed with git_odb_object_free.\n Note that because of an implementation detail, the returned copy will be\n the same pointer as source: the object is internally refcounted, so the\n copy still needs to be freed twice.

\n", "group": "odb" }, "git_odb_object_free": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 448, "lineto": 448, "args": [ @@ -11492,7 +12194,7 @@ "comment": null }, "description": "

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.

\n", + "comments": "

This method must always be called once a git_odb_object is no\n longer needed, otherwise memory will leak.

\n", "group": "odb", "examples": { "cat-file.c": [ @@ -11505,7 +12207,7 @@ }, "git_odb_object_id": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 458, "lineto": 458, "args": [ @@ -11527,7 +12229,7 @@ }, "git_odb_object_data": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 471, "lineto": 471, "args": [ @@ -11544,7 +12246,7 @@ "comment": " a pointer to the data" }, "description": "

Return the data of an ODB object

\n", - "comments": "

This is the uncompressed, raw data as read from the ODB, without the leading header.

\n\n

This pointer is owned by the object and shall not be free'd.

\n", + "comments": "

This is the uncompressed, raw data as read from the ODB,\n without the leading header.

\n\n

This pointer is owned by the object and shall not be free'd.

\n", "group": "odb", "examples": { "general.c": [ @@ -11554,7 +12256,7 @@ }, "git_odb_object_size": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 482, "lineto": 482, "args": [ @@ -11571,7 +12273,7 @@ "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.

\n", + "comments": "

This is the real size of the data buffer, not the\n actual size of the object.

\n", "group": "odb", "examples": { "cat-file.c": [ @@ -11584,7 +12286,7 @@ }, "git_odb_object_type": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 490, "lineto": 490, "args": [ @@ -11611,7 +12313,7 @@ }, "git_odb_add_backend": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 505, "lineto": 505, "args": [ @@ -11638,12 +12340,12 @@ "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.

\n\n

Read for more information.

\n", + "comments": "

The backends are checked in relative ordering, based on the\n value of the priority parameter.

\n\n

Read \n for more information.

\n", "group": "odb" }, "git_odb_add_alternate": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 526, "lineto": 526, "args": [ @@ -11670,12 +12372,12 @@ "comment": " 0 on success; error code otherwise" }, "description": "

Add a custom backend to an existing Object DB; this\n backend will work as an alternate.

\n", - "comments": "

Alternate backends are always checked for objects after all the main backends have been exhausted.

\n\n

The backends are checked in relative ordering, based on the value of the priority parameter.

\n\n

Writing is disabled on alternate backends.

\n\n

Read for more information.

\n", + "comments": "

Alternate backends are always checked for objects after\n all the main backends have been exhausted.

\n\n

The backends are checked in relative ordering, based on the\n value of the priority parameter.

\n\n

Writing is disabled on alternate backends.

\n\n

Read \n for more information.

\n", "group": "odb" }, "git_odb_num_backends": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 534, "lineto": 534, "args": [ @@ -11697,7 +12399,7 @@ }, "git_odb_get_backend": { "type": "function", - "file": "odb.h", + "file": "git2/odb.h", "line": 544, "lineto": 544, "args": [ @@ -11729,7 +12431,7 @@ }, "git_odb_backend_pack": { "type": "function", - "file": "odb_backend.h", + "file": "git2/odb_backend.h", "line": 34, "lineto": 34, "args": [ @@ -11756,7 +12458,7 @@ }, "git_odb_backend_loose": { "type": "function", - "file": "odb_backend.h", + "file": "git2/odb_backend.h", "line": 48, "lineto": 54, "args": [ @@ -11803,7 +12505,7 @@ }, "git_odb_backend_one_pack": { "type": "function", - "file": "odb_backend.h", + "file": "git2/odb_backend.h", "line": 67, "lineto": 67, "args": [ @@ -11825,12 +12527,12 @@ "comment": " 0 or an error code" }, "description": "

Create a backend out of a single packfile

\n", - "comments": "

This can be useful for inspecting the contents of a single packfile.

\n", + "comments": "

This can be useful for inspecting the contents of a single\n packfile.

\n", "group": "odb" }, "git_oid_fromstr": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 47, "lineto": 47, "args": [ @@ -11864,15 +12566,12 @@ "ex/HEAD/general.html#git_oid_fromstr-53", "ex/HEAD/general.html#git_oid_fromstr-54", "ex/HEAD/general.html#git_oid_fromstr-55" - ], - "merge.c": [ - "ex/HEAD/merge.html#git_oid_fromstr-23" ] } }, "git_oid_fromstrp": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 56, "lineto": 56, "args": [ @@ -11899,7 +12598,7 @@ }, "git_oid_fromstrn": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 69, "lineto": 69, "args": [ @@ -11926,12 +12625,12 @@ "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", + "comments": "

If N is odd, the last byte's high nibble will be read in and the\n low nibble set to zero.

\n", "group": "oid" }, "git_oid_fromraw": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 77, "lineto": 77, "args": [ @@ -11958,7 +12657,7 @@ }, "git_oid_fmt": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 89, "lineto": 89, "args": [ @@ -11995,9 +12694,6 @@ "ex/HEAD/network/fetch.html#git_oid_fmt-1", "ex/HEAD/network/fetch.html#git_oid_fmt-2" ], - "network/index-pack.c": [ - "ex/HEAD/network/index-pack.html#git_oid_fmt-6" - ], "network/ls-remote.c": [ "ex/HEAD/network/ls-remote.html#git_oid_fmt-1" ] @@ -12005,7 +12701,7 @@ }, "git_oid_nfmt": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 100, "lineto": 100, "args": [ @@ -12037,7 +12733,7 @@ }, "git_oid_pathfmt": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 115, "lineto": 115, "args": [ @@ -12059,12 +12755,12 @@ "comment": null }, "description": "

Format a git_oid into a loose-object path string.

\n", - "comments": "

The resulting string is "aa/...", where "aa" is the first two hex digits of the oid and "..." is the remaining 38 digits.

\n", + "comments": "

The resulting string is "aa/...", where "aa" is the first two\n hex digits of the oid and "..." is the remaining 38 digits.

\n", "group": "oid" }, "git_oid_tostr_s": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 128, "lineto": 128, "args": [ @@ -12081,18 +12777,18 @@ "comment": " the c-string" }, "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", + "comments": "

The c-string is owned by the library and should not be freed\n by the user. If libgit2 is built with thread support, the string\n will be stored in TLS (i.e. one buffer per thread) to allow for\n concurrent calls of the function.

\n", "group": "oid", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_oid_tostr_s-24", - "ex/HEAD/merge.html#git_oid_tostr_s-25" + "ex/HEAD/merge.html#git_oid_tostr_s-21", + "ex/HEAD/merge.html#git_oid_tostr_s-22" ] } }, "git_oid_tostr": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 147, "lineto": 147, "args": [ @@ -12119,7 +12815,7 @@ "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\n

If 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 GIT_OID_HEXSZ+1, then the resulting\n oid c-string will be truncated to n-1 characters (but will still be\n NUL-byte terminated).

\n\n

If there are any input parameter errors (out == NULL, n == 0, oid ==\n NULL), then a pointer to an empty string is returned, so that the\n return value can always be printed.

\n", "group": "oid", "examples": { "blame.c": [ @@ -12147,7 +12843,7 @@ }, "git_oid_cpy": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 155, "lineto": 155, "args": [ @@ -12181,7 +12877,7 @@ }, "git_oid_cmp": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 164, "lineto": 164, "args": [ @@ -12208,7 +12904,7 @@ }, "git_oid_equal": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 173, "lineto": 173, "args": [ @@ -12235,7 +12931,7 @@ }, "git_oid_ncmp": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 184, "lineto": 184, "args": [ @@ -12267,7 +12963,7 @@ }, "git_oid_streq": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 193, "lineto": 193, "args": [ @@ -12294,7 +12990,7 @@ }, "git_oid_strcmp": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 203, "lineto": 203, "args": [ @@ -12321,7 +13017,7 @@ }, "git_oid_iszero": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 210, "lineto": 210, "args": [ @@ -12351,7 +13047,7 @@ }, "git_oid_shorten_new": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 231, "lineto": 231, "args": [ @@ -12368,12 +13064,12 @@ "comment": " a `git_oid_shorten` instance, NULL if OOM" }, "description": "

Create a new OID shortener.

\n", - "comments": "

The OID shortener is used to process a list of OIDs in text form and return the shortest length that would uniquely identify all of them.

\n\n

E.g. look at the result of git log --abbrev.

\n", + "comments": "

The OID shortener is used to process a list of OIDs\n in text form and return the shortest length that would\n uniquely identify all of them.

\n\n

E.g. look at the result of git log --abbrev.

\n", "group": "oid" }, "git_oid_shorten_add": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 257, "lineto": 257, "args": [ @@ -12395,12 +13091,12 @@ "comment": " the minimal length to uniquely identify all OIDs\n\t\tadded so far to the set; or an error code (\n<\n0) if an\n\t\terror occurs." }, "description": "

Add a new OID to set of shortened OIDs and calculate\n the minimal length to uniquely identify all the OIDs in\n the set.

\n", - "comments": "

The OID is expected to be a 40-char hexadecimal string. The OID is owned by the user and will not be modified or freed.

\n\n

For performance reasons, there is a hard-limit of how many OIDs can be added to a single set (around ~32000, assuming a mostly randomized distribution), which should be enough for any kind of program, and keeps the algorithm fast and memory-efficient.

\n\n

Attempting to add more than those OIDs will result in a GITERR_INVALID error

\n", + "comments": "

The OID is expected to be a 40-char hexadecimal string.\n The OID is owned by the user and will not be modified\n or freed.

\n\n

For performance reasons, there is a hard-limit of how many\n OIDs can be added to a single set (around ~32000, assuming\n a mostly randomized distribution), which should be enough\n for any kind of program, and keeps the algorithm fast and\n memory-efficient.

\n\n

Attempting to add more than those OIDs will result in a\n GITERR_INVALID error

\n", "group": "oid" }, "git_oid_shorten_free": { "type": "function", - "file": "oid.h", + "file": "git2/oid.h", "line": 264, "lineto": 264, "args": [ @@ -12422,7 +13118,7 @@ }, "git_oidarray_free": { "type": "function", - "file": "oidarray.h", + "file": "git2/oidarray.h", "line": 34, "lineto": 34, "args": [ @@ -12439,12 +13135,12 @@ "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.

\n\n

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).

\n", + "comments": "

This method must (and must only) be called on git_oidarray\n objects where the array is allocated by the library. Not doing so,\n will result in a memory leak.

\n\n

This does not free the git_oidarray itself, since the library will\n never allocate that object directly itself (it is more commonly embedded\n inside another struct or created on the stack).

\n", "group": "oidarray" }, "git_packbuilder_new": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 64, "lineto": 64, "args": [ @@ -12471,7 +13167,7 @@ }, "git_packbuilder_set_threads": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 77, "lineto": 77, "args": [ @@ -12493,12 +13189,12 @@ "comment": " number of actual threads to be used" }, "description": "

Set number of threads to spawn

\n", - "comments": "

By default, libgit2 won't spawn any threads at all; when set to 0, libgit2 will autodetect the number of CPUs.

\n", + "comments": "

By default, libgit2 won't spawn any threads at all;\n when set to 0, libgit2 will autodetect the number of\n CPUs.

\n", "group": "packbuilder" }, "git_packbuilder_insert": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 91, "lineto": 91, "args": [ @@ -12525,12 +13221,12 @@ "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", + "comments": "

For an optimal pack it's mandatory to insert objects in recency order,\n commits followed by trees and blobs.

\n", "group": "packbuilder" }, "git_packbuilder_insert_tree": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 103, "lineto": 103, "args": [ @@ -12557,7 +13253,7 @@ }, "git_packbuilder_insert_commit": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 115, "lineto": 115, "args": [ @@ -12584,7 +13280,7 @@ }, "git_packbuilder_insert_walk": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 128, "lineto": 128, "args": [ @@ -12606,12 +13302,12 @@ "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", + "comments": "

Those commits and all objects they reference will be inserted into\n the packbuilder.

\n", "group": "packbuilder" }, "git_packbuilder_insert_recur": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 140, "lineto": 140, "args": [ @@ -12641,9 +13337,36 @@ "comments": "

Insert the object as well as any object it references.

\n", "group": "packbuilder" }, + "git_packbuilder_write_buf": { + "type": "function", + "file": "git2/pack.h", + "line": 151, + "lineto": 151, + "args": [ + { + "name": "buf", + "type": "git_buf *", + "comment": "Buffer where to write the packfile" + }, + { + "name": "pb", + "type": "git_packbuilder *", + "comment": "The packbuilder" + } + ], + "argline": "git_buf *buf, git_packbuilder *pb", + "sig": "git_buf *::git_packbuilder *", + "return": { + "type": "int", + "comment": null + }, + "description": "

Write the contents of the packfile to an in-memory buffer

\n", + "comments": "

The contents of the buffer will become a valid packfile, even though there\n will be no attached index

\n", + "group": "packbuilder" + }, "git_packbuilder_write": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 164, "lineto": 169, "args": [ @@ -12685,7 +13408,7 @@ }, "git_packbuilder_hash": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 179, "lineto": 179, "args": [ @@ -12702,12 +13425,12 @@ "comment": null }, "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", + "comments": "

A packfile's name is derived from the sorted hashing of all object\n names. This is only correct after the packfile has been written.

\n", "group": "packbuilder" }, "git_packbuilder_foreach": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 191, "lineto": 191, "args": [ @@ -12739,7 +13462,7 @@ }, "git_packbuilder_object_count": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 199, "lineto": 199, "args": [ @@ -12761,7 +13484,7 @@ }, "git_packbuilder_written": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 207, "lineto": 207, "args": [ @@ -12783,7 +13506,7 @@ }, "git_packbuilder_set_callbacks": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 226, "lineto": 229, "args": [ @@ -12815,7 +13538,7 @@ }, "git_packbuilder_free": { "type": "function", - "file": "pack.h", + "file": "git2/pack.h", "line": 236, "lineto": 236, "args": [ @@ -12837,7 +13560,7 @@ }, "git_patch_from_diff": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 51, "lineto": 52, "args": [ @@ -12864,12 +13587,12 @@ "comment": " 0 on success, other value \n<\n 0 on error" }, "description": "

Return a patch for an entry in the diff list.

\n", - "comments": "

The git_patch is a newly created object contains the text diffs for the delta. You have to call git_patch_free() when you are done with it. You can use the patch object to loop over all the hunks and lines in the diff of the one delta.

\n\n

For an unchanged file or a binary file, no git_patch will be created, the output will be set to NULL, and the binary flag will be set true in the git_diff_delta structure.

\n\n

It is okay to pass NULL for either of the output parameters; if you pass NULL for the git_patch, then the text diff will not be calculated.

\n", + "comments": "

The git_patch is a newly created object contains the text diffs\n for the delta. You have to call git_patch_free() when you are\n done with it. You can use the patch object to loop over all the hunks\n and lines in the diff of the one delta.

\n\n

For an unchanged file or a binary file, no git_patch will be\n created, the output will be set to NULL, and the binary flag will be\n set true in the git_diff_delta structure.

\n\n

It is okay to pass NULL for either of the output parameters; if you pass\n NULL for the git_patch, then the text diff will not be calculated.

\n", "group": "patch" }, "git_patch_from_blobs": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 70, "lineto": 76, "args": [ @@ -12911,12 +13634,12 @@ "comment": " 0 on success or error code \n<\n 0" }, "description": "

Directly generate a patch from the difference between two blobs.

\n", - "comments": "

This is just like git_diff_blobs() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", + "comments": "

This is just like git_diff_blobs() except it generates a patch object\n for the difference instead of directly making callbacks. You can use the\n standard git_patch accessor functions to read the patch data, and\n you must call git_patch_free() on the patch when done.

\n", "group": "patch" }, "git_patch_from_blob_and_buffer": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 95, "lineto": 102, "args": [ @@ -12963,12 +13686,12 @@ "comment": " 0 on success or error code \n<\n 0" }, "description": "

Directly generate a patch from the difference between a blob and a buffer.

\n", - "comments": "

This is just like git_diff_blob_to_buffer() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", + "comments": "

This is just like git_diff_blob_to_buffer() except it generates a patch\n object for the difference instead of directly making callbacks. You can\n use the standard git_patch accessor functions to read the patch\n data, and you must call git_patch_free() on the patch when done.

\n", "group": "patch" }, "git_patch_from_buffers": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 122, "lineto": 130, "args": [ @@ -13020,12 +13743,12 @@ "comment": " 0 on success or error code \n<\n 0" }, "description": "

Directly generate a patch from the difference between two buffers.

\n", - "comments": "

This is just like git_diff_buffers() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", + "comments": "

This is just like git_diff_buffers() except it generates a patch\n object for the difference instead of directly making callbacks. You can\n use the standard git_patch accessor functions to read the patch\n data, and you must call git_patch_free() on the patch when done.

\n", "group": "patch" }, "git_patch_free": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 135, "lineto": 135, "args": [ @@ -13047,7 +13770,7 @@ }, "git_patch_get_delta": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 141, "lineto": 141, "args": [ @@ -13069,7 +13792,7 @@ }, "git_patch_num_hunks": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 146, "lineto": 146, "args": [ @@ -13091,7 +13814,7 @@ }, "git_patch_line_stats": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 164, "lineto": 168, "args": [ @@ -13123,12 +13846,12 @@ "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.

\n\n

All outputs are optional. Pass NULL if you don't need a particular count.

\n", + "comments": "

This helps imitate a diff --numstat type of output. For that purpose,\n you only need the total_additions and total_deletions values, but we\n include the total_context line count in case you want the total number\n of lines of diff output that will be generated.

\n\n

All outputs are optional. Pass NULL if you don't need a particular count.

\n", "group": "patch" }, "git_patch_get_hunk": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 183, "lineto": 187, "args": [ @@ -13160,12 +13883,12 @@ "comment": " 0 on success, GIT_ENOTFOUND if hunk_idx out of range, \n<\n0 on error" }, "description": "

Get the information about a hunk in a patch

\n", - "comments": "

Given a patch and a hunk index into the patch, this returns detailed information about that hunk. Any of the output pointers can be passed as NULL if you don't care about that particular piece of information.

\n", + "comments": "

Given a patch and a hunk index into the patch, this returns detailed\n information about that hunk. Any of the output pointers can be passed\n as NULL if you don't care about that particular piece of information.

\n", "group": "patch" }, "git_patch_num_lines_in_hunk": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 196, "lineto": 198, "args": [ @@ -13192,7 +13915,7 @@ }, "git_patch_get_line_in_hunk": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 214, "lineto": 218, "args": [ @@ -13224,12 +13947,12 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Get data about a line in a hunk of a patch.

\n", - "comments": "

Given a patch, a hunk index, and a line index in the hunk, this will return a lot of details about that line. If you pass a hunk index larger than the number of hunks or a line index larger than the number of lines in the hunk, this will return -1.

\n", + "comments": "

Given a patch, a hunk index, and a line index in the hunk, this\n will return a lot of details about that line. If you pass a hunk\n index larger than the number of hunks or a line index larger than\n the number of lines in the hunk, this will return -1.

\n", "group": "patch" }, "git_patch_size": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 236, "lineto": 240, "args": [ @@ -13261,12 +13984,12 @@ "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\n

If 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).

\n", + "comments": "

This returns the raw size of the patch data. This only includes the\n actual data from the lines of the diff, not the file or hunk headers.

\n\n

If you pass include_context as true (non-zero), this will be the size\n of all of the diff output; if you pass it as false (zero), this will\n only include the actual changed lines (as if context_lines was 0).

\n", "group": "patch" }, "git_patch_print": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 254, "lineto": 257, "args": [ @@ -13293,12 +14016,12 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Serialize the patch to text via callback.

\n", - "comments": "

Returning a non-zero value from the callback will terminate the iteration and return that value to the caller.

\n", + "comments": "

Returning a non-zero value from the callback will terminate the iteration\n and return that value to the caller.

\n", "group": "patch" }, "git_patch_to_buf": { "type": "function", - "file": "patch.h", + "file": "git2/patch.h", "line": 266, "lineto": 268, "args": [ @@ -13325,7 +14048,7 @@ }, "git_pathspec_new": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 82, "lineto": 83, "args": [ @@ -13357,7 +14080,7 @@ }, "git_pathspec_free": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 90, "lineto": 90, "args": [ @@ -13384,7 +14107,7 @@ }, "git_pathspec_matches_path": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 105, "lineto": 106, "args": [ @@ -13411,12 +14134,12 @@ "comment": " 1 is path matches spec, 0 if it does not" }, "description": "

Try to match a path against a pathspec

\n", - "comments": "

Unlike most of the other pathspec matching functions, this will not fall back on the native case-sensitivity for your platform. You must explicitly pass flags to control case sensitivity or else this will fall back on being case sensitive.

\n", + "comments": "

Unlike most of the other pathspec matching functions, this will not\n fall back on the native case-sensitivity for your platform. You must\n explicitly pass flags to control case sensitivity or else this will\n fall back on being case sensitive.

\n", "group": "pathspec" }, "git_pathspec_match_workdir": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 130, "lineto": 134, "args": [ @@ -13448,12 +14171,12 @@ "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag was given" }, "description": "

Match a pathspec against the working directory of a repository.

\n", - "comments": "

This matches the pathspec against the current files in the working directory of the repository. It is an error to invoke this on a bare repo. This handles git ignores (i.e. ignored files will not be considered to match the pathspec unless the file is tracked in the index).

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", + "comments": "

This matches the pathspec against the current files in the working\n directory of the repository. It is an error to invoke this on a bare\n repo. This handles git ignores (i.e. ignored files will not be\n considered to match the pathspec unless the file is tracked in the\n index).

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec" }, "git_pathspec_match_index": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 159, "lineto": 163, "args": [ @@ -13485,12 +14208,12 @@ "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" }, "description": "

Match a pathspec against entries in an index.

\n", - "comments": "

This matches the pathspec against the files in the repository index.

\n\n

NOTE: At the moment, the case sensitivity of this match is controlled by the current case-sensitivity of the index object itself and the USE_CASE and IGNORE_CASE flags will have no effect. This behavior will be corrected in a future release.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", + "comments": "

This matches the pathspec against the files in the repository index.

\n\n

NOTE: At the moment, the case sensitivity of this match is controlled\n by the current case-sensitivity of the index object itself and the\n USE_CASE and IGNORE_CASE flags will have no effect. This behavior will\n be corrected in a future release.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec" }, "git_pathspec_match_tree": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 183, "lineto": 187, "args": [ @@ -13522,7 +14245,7 @@ "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" }, "description": "

Match a pathspec against files in a tree.

\n", - "comments": "

This matches the pathspec against the files in the given tree.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", + "comments": "

This matches the pathspec against the files in the given tree.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec", "examples": { "log.c": [ @@ -13532,7 +14255,7 @@ }, "git_pathspec_match_diff": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 207, "lineto": 211, "args": [ @@ -13564,12 +14287,12 @@ "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" }, "description": "

Match a pathspec against files in a diff list.

\n", - "comments": "

This matches the pathspec against the files in the given diff list.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", + "comments": "

This matches the pathspec against the files in the given diff list.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec" }, "git_pathspec_match_list_free": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 218, "lineto": 218, "args": [ @@ -13591,7 +14314,7 @@ }, "git_pathspec_match_list_entrycount": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 226, "lineto": 227, "args": [ @@ -13613,7 +14336,7 @@ }, "git_pathspec_match_list_entry": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 239, "lineto": 240, "args": [ @@ -13635,12 +14358,12 @@ "comment": " The filename of the match" }, "description": "

Get a matching filename by position.

\n", - "comments": "

This routine cannot be used if the match list was generated by git_pathspec_match_diff. If so, it will always return NULL.

\n", + "comments": "

This routine cannot be used if the match list was generated by\n git_pathspec_match_diff. If so, it will always return NULL.

\n", "group": "pathspec" }, "git_pathspec_match_list_diff_entry": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 252, "lineto": 253, "args": [ @@ -13662,12 +14385,12 @@ "comment": " The filename of the match" }, "description": "

Get a matching diff delta by position.

\n", - "comments": "

This routine can only be used if the match list was generated by git_pathspec_match_diff. Otherwise it will always return NULL.

\n", + "comments": "

This routine can only be used if the match list was generated by\n git_pathspec_match_diff. Otherwise it will always return NULL.

\n", "group": "pathspec" }, "git_pathspec_match_list_failed_entrycount": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 264, "lineto": 265, "args": [ @@ -13684,12 +14407,12 @@ "comment": " Number of items in original pathspec that had no matches" }, "description": "

Get the number of pathspec items that did not match.

\n", - "comments": "

This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when generating the git_pathspec_match_list.

\n", + "comments": "

This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when\n generating the git_pathspec_match_list.

\n", "group": "pathspec" }, "git_pathspec_match_list_failed_entry": { "type": "function", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 276, "lineto": 277, "args": [ @@ -13716,46 +14439,46 @@ }, "git_proxy_init_options": { "type": "function", - "file": "proxy.h", - "line": 88, - "lineto": 88, + "file": "git2/proxy.h", + "line": 92, + "lineto": 92, "args": [ { "name": "opts", "type": "git_proxy_options *", - "comment": "the options struct to initialize" + "comment": "The `git_proxy_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct, use `GIT_PROXY_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_PROXY_OPTIONS_VERSION`." } ], "argline": "git_proxy_options *opts, unsigned int version", "sig": "git_proxy_options *::unsigned int", "return": { "type": "int", - "comment": null + "comment": " Zero on success; -1 on failure." }, - "description": "

Initialize a proxy options structure

\n", - "comments": "", + "description": "

Initialize git_proxy_options structure

\n", + "comments": "

Initializes a git_proxy_options with default values. Equivalent to\n creating an instance with GIT_PROXY_OPTIONS_INIT.

\n", "group": "proxy" }, "git_rebase_init_options": { "type": "function", - "file": "rebase.h", - "line": 156, - "lineto": 158, + "file": "git2/rebase.h", + "line": 159, + "lineto": 161, "args": [ { "name": "opts", "type": "git_rebase_options *", - "comment": "the `git_rebase_options` instance to initialize." + "comment": "The `git_rebase_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct; you should pass\n `GIT_REBASE_OPTIONS_VERSION` here." + "comment": "The struct version; pass `GIT_REBASE_OPTIONS_VERSION`." } ], "argline": "git_rebase_options *opts, unsigned int version", @@ -13764,15 +14487,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_rebase_options with default values. Equivalent to\n creating an instance with GIT_REBASE_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_rebase_options structure

\n", + "comments": "

Initializes a git_rebase_options with default values. Equivalent to\n creating an instance with GIT_REBASE_OPTIONS_INIT.

\n", "group": "rebase" }, "git_rebase_init": { "type": "function", - "file": "rebase.h", - "line": 177, - "lineto": 183, + "file": "git2/rebase.h", + "line": 180, + "lineto": 186, "args": [ { "name": "out", @@ -13817,9 +14540,9 @@ }, "git_rebase_open": { "type": "function", - "file": "rebase.h", - "line": 194, - "lineto": 197, + "file": "git2/rebase.h", + "line": 197, + "lineto": 200, "args": [ { "name": "out", @@ -13849,9 +14572,9 @@ }, "git_rebase_operation_entrycount": { "type": "function", - "file": "rebase.h", - "line": 205, - "lineto": 205, + "file": "git2/rebase.h", + "line": 208, + "lineto": 208, "args": [ { "name": "rebase", @@ -13871,9 +14594,9 @@ }, "git_rebase_operation_current": { "type": "function", - "file": "rebase.h", - "line": 216, - "lineto": 216, + "file": "git2/rebase.h", + "line": 219, + "lineto": 219, "args": [ { "name": "rebase", @@ -13893,9 +14616,9 @@ }, "git_rebase_operation_byindex": { "type": "function", - "file": "rebase.h", - "line": 225, - "lineto": 227, + "file": "git2/rebase.h", + "line": 228, + "lineto": 230, "args": [ { "name": "rebase", @@ -13920,9 +14643,9 @@ }, "git_rebase_next": { "type": "function", - "file": "rebase.h", - "line": 240, - "lineto": 242, + "file": "git2/rebase.h", + "line": 243, + "lineto": 245, "args": [ { "name": "operation", @@ -13947,9 +14670,9 @@ }, "git_rebase_inmemory_index": { "type": "function", - "file": "rebase.h", - "line": 255, - "lineto": 257, + "file": "git2/rebase.h", + "line": 258, + "lineto": 260, "args": [ { "name": "index", @@ -13969,14 +14692,14 @@ "comment": null }, "description": "

Gets the index produced by the last operation, which is the result\n of git_rebase_next and which will be committed by the next\n invocation of git_rebase_commit. This is useful for resolving\n conflicts in an in-memory rebase before committing them. You must\n call git_index_free when you are finished with this.

\n", - "comments": "

This is only applicable for in-memory rebases; for rebases within a working directory, the changes were applied to the repository's index.

\n", + "comments": "

This is only applicable for in-memory rebases; for rebases within\n a working directory, the changes were applied to the repository's\n index.

\n", "group": "rebase" }, "git_rebase_commit": { "type": "function", - "file": "rebase.h", - "line": 281, - "lineto": 287, + "file": "git2/rebase.h", + "line": 284, + "lineto": 290, "args": [ { "name": "id", @@ -14021,9 +14744,9 @@ }, "git_rebase_abort": { "type": "function", - "file": "rebase.h", - "line": 297, - "lineto": 297, + "file": "git2/rebase.h", + "line": 300, + "lineto": 300, "args": [ { "name": "rebase", @@ -14043,9 +14766,9 @@ }, "git_rebase_finish": { "type": "function", - "file": "rebase.h", - "line": 307, - "lineto": 309, + "file": "git2/rebase.h", + "line": 310, + "lineto": 312, "args": [ { "name": "rebase", @@ -14070,9 +14793,9 @@ }, "git_rebase_free": { "type": "function", - "file": "rebase.h", - "line": 316, - "lineto": 316, + "file": "git2/rebase.h", + "line": 319, + "lineto": 319, "args": [ { "name": "rebase", @@ -14092,7 +14815,7 @@ }, "git_refdb_new": { "type": "function", - "file": "refdb.h", + "file": "git2/refdb.h", "line": 35, "lineto": 35, "args": [ @@ -14114,12 +14837,12 @@ "comment": " 0 or an error code" }, "description": "

Create a new reference database with no backends.

\n", - "comments": "

Before the Ref DB can be used for read/writing, a custom database backend must be manually set using git_refdb_set_backend()

\n", + "comments": "

Before the Ref DB can be used for read/writing, a custom database\n backend must be manually set using git_refdb_set_backend()

\n", "group": "refdb" }, "git_refdb_open": { "type": "function", - "file": "refdb.h", + "file": "git2/refdb.h", "line": 49, "lineto": 49, "args": [ @@ -14141,12 +14864,12 @@ "comment": " 0 or an error code" }, "description": "

Create a new reference database and automatically add\n the default backends:

\n", - "comments": "
    \n
  • git_refdb_dir: read and write loose and packed refs from disk, assuming the repository dir as the folder
  • \n
\n", + "comments": "
    \n
  • git_refdb_dir: read and write loose and packed refs\n from disk, assuming the repository dir as the folder
  • \n
\n", "group": "refdb" }, "git_refdb_compress": { "type": "function", - "file": "refdb.h", + "file": "git2/refdb.h", "line": 56, "lineto": 56, "args": [ @@ -14168,7 +14891,7 @@ }, "git_refdb_free": { "type": "function", - "file": "refdb.h", + "file": "git2/refdb.h", "line": 63, "lineto": 63, "args": [ @@ -14190,7 +14913,7 @@ }, "git_reflog_read": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 38, "lineto": 38, "args": [ @@ -14217,12 +14940,12 @@ "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\n

The reflog must be freed manually by using git_reflog_free().

\n", + "comments": "

If there is no reflog file for the given\n reference yet, an empty reflog object will\n be returned.

\n\n

The reflog must be freed manually by using\n git_reflog_free().

\n", "group": "reflog" }, "git_reflog_write": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 47, "lineto": 47, "args": [ @@ -14244,7 +14967,7 @@ }, "git_reflog_append": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 60, "lineto": 60, "args": [ @@ -14281,7 +15004,7 @@ }, "git_reflog_rename": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 75, "lineto": 75, "args": [ @@ -14308,12 +15031,12 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" }, "description": "

Rename a reflog

\n", - "comments": "

The reflog to be renamed is expected to already exist

\n\n

The new name will be checked for validity. See git_reference_create_symbolic() for rules about valid names.

\n", + "comments": "

The reflog to be renamed is expected to already exist

\n\n

The new name will be checked for validity.\n See git_reference_create_symbolic() for rules about valid names.

\n", "group": "reflog" }, "git_reflog_delete": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 84, "lineto": 84, "args": [ @@ -14340,7 +15063,7 @@ }, "git_reflog_entrycount": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 92, "lineto": 92, "args": [ @@ -14362,7 +15085,7 @@ }, "git_reflog_entry_byindex": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 105, "lineto": 105, "args": [ @@ -14384,12 +15107,12 @@ "comment": " the entry; NULL if not found" }, "description": "

Lookup an entry by its index

\n", - "comments": "

Requesting the reflog entry with an index of 0 (zero) will return the most recently created entry.

\n", + "comments": "

Requesting the reflog entry with an index of 0 (zero) will\n return the most recently created entry.

\n", "group": "reflog" }, "git_reflog_drop": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 124, "lineto": 127, "args": [ @@ -14416,12 +15139,12 @@ "comment": " 0 on success, GIT_ENOTFOUND if the entry doesn't exist\n or an error code." }, "description": "

Remove an entry from the reflog by its index

\n", - "comments": "

To ensure there's no gap in the log history, set rewrite_previous_entry param value to 1. When deleting entry n, member old_oid of entry n-1 (if any) will be updated with the value of member new_oid of entry n+1.

\n", + "comments": "

To ensure there's no gap in the log history, set rewrite_previous_entry\n param value to 1. When deleting entry n, member old_oid of entry n-1\n (if any) will be updated with the value of member new_oid of entry n+1.

\n", "group": "reflog" }, "git_reflog_entry_id_old": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 135, "lineto": 135, "args": [ @@ -14443,7 +15166,7 @@ }, "git_reflog_entry_id_new": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 143, "lineto": 143, "args": [ @@ -14465,7 +15188,7 @@ }, "git_reflog_entry_committer": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 151, "lineto": 151, "args": [ @@ -14487,7 +15210,7 @@ }, "git_reflog_entry_message": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 159, "lineto": 159, "args": [ @@ -14509,7 +15232,7 @@ }, "git_reflog_free": { "type": "function", - "file": "reflog.h", + "file": "git2/reflog.h", "line": 166, "lineto": 166, "args": [ @@ -14531,7 +15254,7 @@ }, "git_reference_lookup": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 37, "lineto": 37, "args": [ @@ -14558,20 +15281,20 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code." }, "description": "

Lookup a reference by name in a repository.

\n", - "comments": "

The returned reference must be freed by the user.

\n\n

The name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n", + "comments": "

The returned reference must be freed by the user.

\n\n

The name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference", "examples": { "general.c": [ "ex/HEAD/general.html#git_reference_lookup-62" ], "merge.c": [ - "ex/HEAD/merge.html#git_reference_lookup-26" + "ex/HEAD/merge.html#git_reference_lookup-23" ] } }, "git_reference_name_to_id": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 54, "lineto": 55, "args": [ @@ -14598,12 +15321,12 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code." }, "description": "

Lookup a reference by name and resolve immediately to OID.

\n", - "comments": "

This function provides a quick way to resolve a reference name straight through to the object id that it refers to. This avoids having to allocate or free any git_reference objects for simple situations.

\n\n

The name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n", + "comments": "

This function provides a quick way to resolve a reference name straight\n through to the object id that it refers to. This avoids having to\n allocate or free any git_reference objects for simple situations.

\n\n

The name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference" }, "git_reference_dwim": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 68, "lineto": 68, "args": [ @@ -14630,18 +15353,17 @@ "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 precendence rules to the given shorthand to determine\n which reference the user is referring to.

\n", "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_dwim-27", - "ex/HEAD/merge.html#git_reference_dwim-28" + "ex/HEAD/merge.html#git_reference_dwim-24" ] } }, "git_reference_symbolic_create_matching": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 109, "lineto": 109, "args": [ @@ -14688,12 +15410,12 @@ "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\n

The symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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\n

It 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).

\n", + "comments": "

A symbolic reference is a reference name that refers to another\n reference name. If the other name moves, the symbolic name will move,\n too. As a simple example, the "HEAD" reference might refer to\n "refs/heads/master" while on the "master" branch of a repository.

\n\n

The symbolic reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and it does not have a reflog.

\n\n

It will return GIT_EMODIFIED if the reference's value at the time\n of updating does not match the one passed through current_value\n (i.e. if the ref has changed since the user read it).

\n", "group": "reference" }, "git_reference_symbolic_create": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 145, "lineto": 145, "args": [ @@ -14735,12 +15457,12 @@ "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" }, "description": "

Create a new symbolic reference.

\n", - "comments": "

A symbolic reference is a reference name that refers to another 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\n

The symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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", + "comments": "

A symbolic reference is a reference name that refers to another\n reference name. If the other name moves, the symbolic name will move,\n too. As a simple example, the "HEAD" reference might refer to\n "refs/heads/master" while on the "master" branch of a repository.

\n\n

The symbolic reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and it does not have a reflog.

\n", "group": "reference" }, "git_reference_create": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 182, "lineto": 182, "args": [ @@ -14782,17 +15504,17 @@ "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" }, "description": "

Create a new direct reference.

\n", - "comments": "

A direct reference (also called an object id reference) refers directly 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\n

The direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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\n to a specific object id (a.k.a. OID or SHA) in the repository. The id\n permanently refers to the object (although the reference itself can be\n moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\n refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.

\n\n

The direct reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.

\n", "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_create-29" + "ex/HEAD/merge.html#git_reference_create-25" ] } }, "git_reference_create_matching": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 225, "lineto": 225, "args": [ @@ -14839,12 +15561,12 @@ "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\n

The direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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\n

It 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).

\n", + "comments": "

A direct reference (also called an object id reference) refers directly\n to a specific object id (a.k.a. OID or SHA) in the repository. The id\n permanently refers to the object (although the reference itself can be\n moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\n refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.

\n\n

The direct reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.

\n\n

It will return GIT_EMODIFIED if the reference's value at the time\n of updating does not match the one passed through current_id\n (i.e. if the ref has changed since the user read it).

\n", "group": "reference" }, "git_reference_target": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 240, "lineto": 240, "args": [ @@ -14861,7 +15583,7 @@ "comment": " a pointer to the oid if available, NULL otherwise" }, "description": "

Get the OID pointed to by a direct reference.

\n", - "comments": "

Only available if the reference is direct (i.e. an object id reference, not a symbolic one).

\n\n

To 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).

\n", + "comments": "

Only available if the reference is direct (i.e. an object id reference,\n not a symbolic one).

\n\n

To find the OID of a symbolic ref, call git_reference_resolve() and\n then this function (or maybe use git_reference_name_to_id() to\n directly resolve a reference name all the way through to an OID).

\n", "group": "reference", "examples": { "general.c": [ @@ -14871,7 +15593,7 @@ }, "git_reference_target_peel": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 251, "lineto": 251, "args": [ @@ -14888,12 +15610,12 @@ "comment": " a pointer to the oid if available, NULL otherwise" }, "description": "

Return the peeled OID target of this reference.

\n", - "comments": "

This peeled OID only applies to direct references that point to a hard Tag object: it is the result of peeling such Tag.

\n", + "comments": "

This peeled OID only applies to direct references that point to\n a hard Tag object: it is the result of peeling such Tag.

\n", "group": "reference" }, "git_reference_symbolic_target": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 261, "lineto": 261, "args": [ @@ -14917,13 +15639,13 @@ "ex/HEAD/general.html#git_reference_symbolic_target-64" ], "merge.c": [ - "ex/HEAD/merge.html#git_reference_symbolic_target-30" + "ex/HEAD/merge.html#git_reference_symbolic_target-26" ] } }, "git_reference_type": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 271, "lineto": 271, "args": [ @@ -14950,7 +15672,7 @@ }, "git_reference_name": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 281, "lineto": 281, "args": [ @@ -14971,13 +15693,13 @@ "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_name-31" + "ex/HEAD/merge.html#git_reference_name-27" ] } }, "git_reference_resolve": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 299, "lineto": 299, "args": [ @@ -14999,12 +15721,12 @@ "comment": " 0 or an error code" }, "description": "

Resolve a symbolic reference to a direct reference.

\n", - "comments": "

This method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.

\n\n

The peeled reference is returned in the resolved_ref argument, and must be freed manually once it's no longer needed.

\n\n

If a direct reference is passed as an argument, a copy of that reference is returned. This copy must be manually freed too.

\n", + "comments": "

This method iteratively peels a symbolic reference until it resolves to\n a direct reference to an OID.

\n\n

The peeled reference is returned in the resolved_ref argument, and\n must be freed manually once it's no longer needed.

\n\n

If a direct reference is passed as an argument, a copy of that\n reference is returned. This copy must be manually freed too.

\n", "group": "reference" }, "git_reference_owner": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 307, "lineto": 307, "args": [ @@ -15026,7 +15748,7 @@ }, "git_reference_symbolic_set_target": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 329, "lineto": 333, "args": [ @@ -15058,12 +15780,12 @@ "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\n

The target name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n\n

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\n

The target name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.

\n", "group": "reference" }, "git_reference_set_target": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 349, "lineto": 353, "args": [ @@ -15099,13 +15821,13 @@ "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_set_target-32" + "ex/HEAD/merge.html#git_reference_set_target-28" ] } }, "git_reference_rename": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 378, "lineto": 383, "args": [ @@ -15142,12 +15864,12 @@ "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, "description": "

Rename an existing reference.

\n", - "comments": "

This method works for both direct and symbolic references.

\n\n

The new name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n\n

If the force flag is not enabled, and there's already a reference with the given name, the renaming will fail.

\n\n

IMPORTANT: The user needs to write a proper reflog entry if the reflog is enabled for the repository. We only rename the reflog if it exists.

\n", + "comments": "

This method works for both direct and symbolic references.

\n\n

The new name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n\n

If the force flag is not enabled, and there's already\n a reference with the given name, the renaming will fail.

\n\n

IMPORTANT:\n The user needs to write a proper reflog entry if the\n reflog is enabled for the repository. We only rename\n the reflog if it exists.

\n", "group": "reference" }, "git_reference_delete": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 398, "lineto": 398, "args": [ @@ -15164,12 +15886,12 @@ "comment": " 0, GIT_EMODIFIED or an error code" }, "description": "

Delete an existing reference.

\n", - "comments": "

This method works for both direct and symbolic references. The reference will be immediately removed on disk but the memory will not be freed. Callers must call git_reference_free.

\n\n

This function will return an error if the reference has changed from the time it was looked up.

\n", + "comments": "

This method works for both direct and symbolic references. The reference\n will be immediately removed on disk but the memory will not be freed.\n Callers must call git_reference_free.

\n\n

This function will return an error if the reference has changed\n from the time it was looked up.

\n", "group": "reference" }, "git_reference_remove": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 409, "lineto": 409, "args": [ @@ -15191,12 +15913,12 @@ "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", + "comments": "

This method removes the named reference from the repository without\n looking at its old value.

\n", "group": "reference" }, "git_reference_list": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 423, "lineto": 423, "args": [ @@ -15218,7 +15940,7 @@ "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().

\n", + "comments": "

The string array will be filled with the names of all references; these\n values are owned by the user and should be free'd manually when no\n longer needed, using git_strarray_free().

\n", "group": "reference", "examples": { "general.c": [ @@ -15228,7 +15950,7 @@ }, "git_reference_foreach": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 444, "lineto": 447, "args": [ @@ -15255,12 +15977,12 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Perform a callback on each reference in the repository.

\n", - "comments": "

The callback function will be called for each reference in the repository, receiving the reference object and the payload value passed to this method. Returning a non-zero value from the callback will terminate the iteration.

\n\n

Note that the callback function is responsible to call git_reference_free on each reference passed to it.

\n", + "comments": "

The callback function will be called for each reference in the\n repository, receiving the reference object and the payload value\n passed to this method. Returning a non-zero value from the callback\n will terminate the iteration.

\n\n

Note that the callback function is responsible to call git_reference_free\n on each reference passed to it.

\n", "group": "reference" }, "git_reference_foreach_name": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 462, "lineto": 465, "args": [ @@ -15287,12 +16009,12 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Perform a callback on the fully-qualified name of each reference.

\n", - "comments": "

The callback function will be called for each reference in the repository, receiving the name of the reference and the payload value passed to this method. Returning a non-zero value from the callback will terminate the iteration.

\n", + "comments": "

The callback function will be called for each reference in the\n repository, receiving the name of the reference and the payload value\n passed to this method. Returning a non-zero value from the callback\n will terminate the iteration.

\n", "group": "reference" }, "git_reference_dup": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 476, "lineto": 476, "args": [ @@ -15319,7 +16041,7 @@ }, "git_reference_free": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 483, "lineto": 483, "args": [ @@ -15343,10 +16065,9 @@ "ex/HEAD/general.html#git_reference_free-67" ], "merge.c": [ - "ex/HEAD/merge.html#git_reference_free-33", - "ex/HEAD/merge.html#git_reference_free-34", - "ex/HEAD/merge.html#git_reference_free-35", - "ex/HEAD/merge.html#git_reference_free-36" + "ex/HEAD/merge.html#git_reference_free-29", + "ex/HEAD/merge.html#git_reference_free-30", + "ex/HEAD/merge.html#git_reference_free-31" ], "status.c": [ "ex/HEAD/status.html#git_reference_free-3" @@ -15355,7 +16076,7 @@ }, "git_reference_cmp": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 492, "lineto": 494, "args": [ @@ -15382,7 +16103,7 @@ }, "git_reference_iterator_new": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 503, "lineto": 505, "args": [ @@ -15409,7 +16130,7 @@ }, "git_reference_iterator_glob_new": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 516, "lineto": 519, "args": [ @@ -15441,7 +16162,7 @@ }, "git_reference_next": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 528, "lineto": 528, "args": [ @@ -15468,7 +16189,7 @@ }, "git_reference_next_name": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 541, "lineto": 541, "args": [ @@ -15490,12 +16211,12 @@ "comment": " 0, GIT_ITEROVER if there are no more; or an error code" }, "description": "

Get the next reference's name

\n", - "comments": "

This function is provided for convenience in case only the names are interesting as it avoids the allocation of the git_reference object which git_reference_next() needs.

\n", + "comments": "

This function is provided for convenience in case only the names\n are interesting as it avoids the allocation of the git_reference\n object which git_reference_next() needs.

\n", "group": "reference" }, "git_reference_iterator_free": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 548, "lineto": 548, "args": [ @@ -15517,7 +16238,7 @@ }, "git_reference_foreach_glob": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 568, "lineto": 572, "args": [ @@ -15549,12 +16270,12 @@ "comment": " 0 on success, GIT_EUSER on non-zero callback, or error code" }, "description": "

Perform a callback on each reference in the repository whose name\n matches the given pattern.

\n", - "comments": "

This function acts like git_reference_foreach() with an additional pattern match being applied to the reference name before issuing the callback function. See that function for more information.

\n\n

The pattern is matched using fnmatch or "glob" style where a '*' matches any sequence of letters, a '?' matches any letter, and square brackets can be used to define character ranges (such as "[0-9]" for digits).

\n", + "comments": "

This function acts like git_reference_foreach() with an additional\n pattern match being applied to the reference name before issuing the\n callback function. See that function for more information.

\n\n

The pattern is matched using fnmatch or "glob" style where a '*' matches\n any sequence of letters, a '?' matches any letter, and square brackets\n can be used to define character ranges (such as "[0-9]" for digits).

\n", "group": "reference" }, "git_reference_has_log": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 582, "lineto": 582, "args": [ @@ -15581,7 +16302,7 @@ }, "git_reference_ensure_log": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 594, "lineto": 594, "args": [ @@ -15603,12 +16324,12 @@ "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", + "comments": "

Make sure that successive updates to the reference will append to\n its log.

\n", "group": "reference" }, "git_reference_is_branch": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 604, "lineto": 604, "args": [ @@ -15630,7 +16351,7 @@ }, "git_reference_is_remote": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 614, "lineto": 614, "args": [ @@ -15652,7 +16373,7 @@ }, "git_reference_is_tag": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 624, "lineto": 624, "args": [ @@ -15674,7 +16395,7 @@ }, "git_reference_is_note": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 634, "lineto": 634, "args": [ @@ -15696,7 +16417,7 @@ }, "git_reference_normalize_name": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 690, "lineto": 694, "args": [ @@ -15728,12 +16449,12 @@ "comment": " 0 on success, GIT_EBUFS if buffer is too small, GIT_EINVALIDSPEC\n or an error code." }, "description": "

Normalize reference name and check validity.

\n", - "comments": "

This will normalize the reference name by removing any leading slash '/' characters and collapsing runs of adjacent slashes between name components into a single slash.

\n\n

Once normalized, if the reference name is valid, it will be returned in the user allocated buffer.

\n\n

See git_reference_symbolic_create() for rules about valid names.

\n", + "comments": "

This will normalize the reference name by removing any leading slash\n '/' characters and collapsing runs of adjacent slashes between name\n components into a single slash.

\n\n

Once normalized, if the reference name is valid, it will be returned in\n the user allocated buffer.

\n\n

See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference" }, "git_reference_peel": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 711, "lineto": 714, "args": [ @@ -15760,17 +16481,17 @@ "comment": " 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code" }, "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.

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object will be peeled until a non-tag object is met.

\n", + "comments": "

The retrieved peeled object is owned by the repository\n and should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object\n will be peeled until a non-tag object is met.

\n", "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_peel-37" + "ex/HEAD/merge.html#git_reference_peel-32" ] } }, "git_reference_is_valid_name": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 730, "lineto": 730, "args": [ @@ -15787,12 +16508,12 @@ "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\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n", + "comments": "

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n", "group": "reference" }, "git_reference_shorthand": { "type": "function", - "file": "refs.h", + "file": "git2/refs.h", "line": 744, "lineto": 744, "args": [ @@ -15809,7 +16530,7 @@ "comment": " the human-readable version of the name" }, "description": "

Get the reference's short name

\n", - "comments": "

This will transform the reference name into a name "human-readable" version. If no shortname is appropriate, it will return the full name.

\n\n

The memory is owned by the reference and must not be freed.

\n", + "comments": "

This will transform the reference name into a name "human-readable"\n version. If no shortname is appropriate, it will return the full\n name.

\n\n

The memory is owned by the reference and must not be freed.

\n", "group": "reference", "examples": { "status.c": [ @@ -15817,11 +16538,65 @@ ] } }, + "git_refspec_parse": { + "type": "function", + "file": "git2/refspec.h", + "line": 32, + "lineto": 32, + "args": [ + { + "name": "refspec", + "type": "git_refspec **", + "comment": "a pointer to hold the refspec handle" + }, + { + "name": "input", + "type": "const char *", + "comment": "the refspec string" + }, + { + "name": "is_fetch", + "type": "int", + "comment": "is this a refspec for a fetch" + } + ], + "argline": "git_refspec **refspec, const char *input, int is_fetch", + "sig": "git_refspec **::const char *::int", + "return": { + "type": "int", + "comment": " 0 if the refspec string could be parsed, -1 otherwise" + }, + "description": "

Parse a given refspec string

\n", + "comments": "", + "group": "refspec" + }, + "git_refspec_free": { + "type": "function", + "file": "git2/refspec.h", + "line": 39, + "lineto": 39, + "args": [ + { + "name": "refspec", + "type": "git_refspec *", + "comment": "the refspec object" + } + ], + "argline": "git_refspec *refspec", + "sig": "git_refspec *", + "return": { + "type": "void", + "comment": null + }, + "description": "

Free a refspec object which has been created by git_refspec_parse

\n", + "comments": "", + "group": "refspec" + }, "git_refspec_src": { "type": "function", - "file": "refspec.h", - "line": 30, - "lineto": 30, + "file": "git2/refspec.h", + "line": 47, + "lineto": 47, "args": [ { "name": "refspec", @@ -15841,9 +16616,9 @@ }, "git_refspec_dst": { "type": "function", - "file": "refspec.h", - "line": 38, - "lineto": 38, + "file": "git2/refspec.h", + "line": 55, + "lineto": 55, "args": [ { "name": "refspec", @@ -15863,9 +16638,9 @@ }, "git_refspec_string": { "type": "function", - "file": "refspec.h", - "line": 46, - "lineto": 46, + "file": "git2/refspec.h", + "line": 63, + "lineto": 63, "args": [ { "name": "refspec", @@ -15885,9 +16660,9 @@ }, "git_refspec_force": { "type": "function", - "file": "refspec.h", - "line": 54, - "lineto": 54, + "file": "git2/refspec.h", + "line": 71, + "lineto": 71, "args": [ { "name": "refspec", @@ -15907,9 +16682,9 @@ }, "git_refspec_direction": { "type": "function", - "file": "refspec.h", - "line": 62, - "lineto": 62, + "file": "git2/refspec.h", + "line": 79, + "lineto": 79, "args": [ { "name": "spec", @@ -15929,9 +16704,9 @@ }, "git_refspec_src_matches": { "type": "function", - "file": "refspec.h", - "line": 71, - "lineto": 71, + "file": "git2/refspec.h", + "line": 88, + "lineto": 88, "args": [ { "name": "refspec", @@ -15956,9 +16731,9 @@ }, "git_refspec_dst_matches": { "type": "function", - "file": "refspec.h", - "line": 80, - "lineto": 80, + "file": "git2/refspec.h", + "line": 97, + "lineto": 97, "args": [ { "name": "refspec", @@ -15983,9 +16758,9 @@ }, "git_refspec_transform": { "type": "function", - "file": "refspec.h", - "line": 90, - "lineto": 90, + "file": "git2/refspec.h", + "line": 107, + "lineto": 107, "args": [ { "name": "out", @@ -16015,9 +16790,9 @@ }, "git_refspec_rtransform": { "type": "function", - "file": "refspec.h", - "line": 100, - "lineto": 100, + "file": "git2/refspec.h", + "line": 117, + "lineto": 117, "args": [ { "name": "out", @@ -16047,7 +16822,7 @@ }, "git_remote_create": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 38, "lineto": 42, "args": [ @@ -16089,7 +16864,7 @@ }, "git_remote_create_with_fetchspec": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 55, "lineto": 60, "args": [ @@ -16131,7 +16906,7 @@ }, "git_remote_create_anonymous": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 73, "lineto": 76, "args": [ @@ -16158,7 +16933,7 @@ "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", + "comments": "

Create a remote with the given url in-memory. You can use this when\n you have a URL instead of a remote's name.

\n", "group": "remote", "examples": { "network/fetch.c": [ @@ -16171,7 +16946,7 @@ }, "git_remote_create_detached": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 92, "lineto": 94, "args": [ @@ -16193,12 +16968,12 @@ "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\n

Contrasted with git_remote_create_anonymous, a detached remote will not consider any repo configuration values (such as insteadof url substitutions).

\n", + "comments": "

Create a remote with the given url in-memory. You can use this when\n you have a URL instead of a remote's name.

\n\n

Contrasted with git_remote_create_anonymous, a detached remote\n will not consider any repo configuration values (such as insteadof url\n substitutions).

\n", "group": "remote" }, "git_remote_lookup": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 107, "lineto": 107, "args": [ @@ -16225,7 +17000,7 @@ "comment": " 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code" }, "description": "

Get the information for a particular remote

\n", - "comments": "

The name will be checked for validity. See git_tag_create() for rules about valid names.

\n", + "comments": "

The name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", "group": "remote", "examples": { "network/fetch.c": [ @@ -16241,7 +17016,7 @@ }, "git_remote_dup": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 119, "lineto": 119, "args": [ @@ -16268,7 +17043,7 @@ }, "git_remote_owner": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 127, "lineto": 127, "args": [ @@ -16290,7 +17065,7 @@ }, "git_remote_name": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 135, "lineto": 135, "args": [ @@ -16312,7 +17087,7 @@ }, "git_remote_url": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 146, "lineto": 146, "args": [ @@ -16329,7 +17104,7 @@ "comment": " a pointer to the url" }, "description": "

Get the remote's url

\n", - "comments": "

If url.*.insteadOf has been configured for this URL, it will return the modified URL.

\n", + "comments": "

If url.*.insteadOf has been configured for this URL, it will\n return the modified URL.

\n", "group": "remote", "examples": { "remote.c": [ @@ -16339,7 +17114,7 @@ }, "git_remote_pushurl": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 157, "lineto": 157, "args": [ @@ -16356,7 +17131,7 @@ "comment": " a pointer to the url or NULL if no special url for pushing is set" }, "description": "

Get the remote's url for pushing

\n", - "comments": "

If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL.

\n", + "comments": "

If url.*.pushInsteadOf has been configured for this URL, it\n will return the modified URL.

\n", "group": "remote", "examples": { "remote.c": [ @@ -16366,7 +17141,7 @@ }, "git_remote_set_url": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 170, "lineto": 170, "args": [ @@ -16393,7 +17168,7 @@ "comment": " 0 or an error value" }, "description": "

Set the remote's url in the configuration

\n", - "comments": "

Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.

\n", + "comments": "

Remote objects already in memory will not be affected. This assumes\n the common case of a single-url remote and will otherwise return an error.

\n", "group": "remote", "examples": { "remote.c": [ @@ -16403,7 +17178,7 @@ }, "git_remote_set_pushurl": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 183, "lineto": 183, "args": [ @@ -16430,7 +17205,7 @@ "comment": null }, "description": "

Set the remote's url for pushing in the configuration.

\n", - "comments": "

Remote objects already in memory will not be affected. This assumes the common case of a single-url remote and will otherwise return an error.

\n", + "comments": "

Remote objects already in memory will not be affected. This assumes\n the common case of a single-url remote and will otherwise return an error.

\n", "group": "remote", "examples": { "remote.c": [ @@ -16440,7 +17215,7 @@ }, "git_remote_add_fetch": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 196, "lineto": 196, "args": [ @@ -16467,12 +17242,12 @@ "comment": " 0, GIT_EINVALIDSPEC if refspec is invalid or an error value" }, "description": "

Add a fetch refspec to the remote's configuration

\n", - "comments": "

Add the given refspec to the fetch list in the configuration. No loaded remote instances will be affected.

\n", + "comments": "

Add the given refspec to the fetch list in the configuration. No\n loaded remote instances will be affected.

\n", "group": "remote" }, "git_remote_get_fetch_refspecs": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 207, "lineto": 207, "args": [ @@ -16494,12 +17269,12 @@ "comment": null }, "description": "

Get the remote's list of fetch refspecs

\n", - "comments": "

The memory is owned by the user and should be freed with git_strarray_free.

\n", + "comments": "

The memory is owned by the user and should be freed with\n git_strarray_free.

\n", "group": "remote" }, "git_remote_add_push": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 220, "lineto": 220, "args": [ @@ -16526,12 +17301,12 @@ "comment": " 0, GIT_EINVALIDSPEC if refspec is invalid or an error value" }, "description": "

Add a push refspec to the remote's configuration

\n", - "comments": "

Add the given refspec to the push list in the configuration. No loaded remote instances will be affected.

\n", + "comments": "

Add the given refspec to the push list in the configuration. No\n loaded remote instances will be affected.

\n", "group": "remote" }, "git_remote_get_push_refspecs": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 231, "lineto": 231, "args": [ @@ -16553,12 +17328,12 @@ "comment": null }, "description": "

Get the remote's list of push refspecs

\n", - "comments": "

The memory is owned by the user and should be freed with git_strarray_free.

\n", + "comments": "

The memory is owned by the user and should be freed with\n git_strarray_free.

\n", "group": "remote" }, "git_remote_refspec_count": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 239, "lineto": 239, "args": [ @@ -16580,7 +17355,7 @@ }, "git_remote_get_refspec": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 248, "lineto": 248, "args": [ @@ -16607,7 +17382,7 @@ }, "git_remote_connect": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 265, "lineto": 265, "args": [ @@ -16644,7 +17419,7 @@ "comment": " 0 or an error code" }, "description": "

Open a connection to a remote

\n", - "comments": "

The transport is selected based on the URL. The direction argument is due to a limitation of the git protocol (over TCP or SSH) which starts up a specific binary which can only do the one or the other.

\n", + "comments": "

The transport is selected based on the URL. The direction argument\n is due to a limitation of the git protocol (over TCP or SSH) which\n starts up a specific binary which can only do the one or the other.

\n", "group": "remote", "examples": { "network/ls-remote.c": [ @@ -16654,7 +17429,7 @@ }, "git_remote_ls": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 287, "lineto": 287, "args": [ @@ -16681,7 +17456,7 @@ "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\n

The 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\n

The 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", + "comments": "

Get the list of references with which the server responds to a new\n connection.

\n\n

The remote (or more exactly its transport) must have connected to\n the remote repository. This list is available as soon as the\n connection to the remote is initiated and it remains available\n after disconnecting.

\n\n

The memory belongs to the remote. The pointer will be valid as long\n as a new connection is not initiated, but it is recommended that\n you make a copy in order to make use of the data.

\n", "group": "remote", "examples": { "network/ls-remote.c": [ @@ -16691,7 +17466,7 @@ }, "git_remote_connected": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 298, "lineto": 298, "args": [ @@ -16708,12 +17483,12 @@ "comment": " 1 if it's connected, 0 otherwise." }, "description": "

Check whether the remote is connected

\n", - "comments": "

Check whether the remote's underlying transport is connected to the remote host.

\n", + "comments": "

Check whether the remote's underlying transport is connected to the\n remote host.

\n", "group": "remote" }, "git_remote_stop": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 308, "lineto": 308, "args": [ @@ -16730,12 +17505,12 @@ "comment": null }, "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", + "comments": "

At certain points in its operation, the network code checks whether\n the operation has been cancelled and if so stops the operation.

\n", "group": "remote" }, "git_remote_disconnect": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 317, "lineto": 317, "args": [ @@ -16757,7 +17532,7 @@ }, "git_remote_free": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 327, "lineto": 327, "args": [ @@ -16774,7 +17549,7 @@ "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", + "comments": "

This also disconnects from the remote, if the connection\n has not been closed yet (using git_remote_disconnect).

\n", "group": "remote", "examples": { "network/fetch.c": [ @@ -16791,7 +17566,7 @@ }, "git_remote_list": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 338, "lineto": 338, "args": [ @@ -16823,7 +17598,7 @@ }, "git_remote_init_callbacks": { "type": "function", - "file": "remote.h", + "file": "git2/remote.h", "line": 503, "lineto": 505, "args": [ @@ -16850,19 +17625,19 @@ }, "git_fetch_init_options": { "type": "function", - "file": "remote.h", - "line": 607, - "lineto": 609, + "file": "git2/remote.h", + "line": 608, + "lineto": 610, "args": [ { "name": "opts", "type": "git_fetch_options *", - "comment": "the `git_fetch_options` instance to initialize." + "comment": "The `git_fetch_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct; you should pass\n `GIT_FETCH_OPTIONS_VERSION` here." + "comment": "The struct version; pass `GIT_FETCH_OPTIONS_VERSION`." } ], "argline": "git_fetch_options *opts, unsigned int version", @@ -16871,25 +17646,25 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_fetch_options with default values. Equivalent to\n creating an instance with GIT_FETCH_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_fetch_options structure

\n", + "comments": "

Initializes a git_fetch_options with default values. Equivalent to\n creating an instance with GIT_FETCH_OPTIONS_INIT.

\n", "group": "fetch" }, "git_push_init_options": { "type": "function", - "file": "remote.h", - "line": 656, - "lineto": 658, + "file": "git2/remote.h", + "line": 658, + "lineto": 660, "args": [ { "name": "opts", "type": "git_push_options *", - "comment": "the `git_push_options` instance to initialize." + "comment": "The `git_push_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct; you should pass\n `GIT_PUSH_OPTIONS_VERSION` here." + "comment": "The struct version; pass `GIT_PUSH_OPTIONS_VERSION`." } ], "argline": "git_push_options *opts, unsigned int version", @@ -16898,15 +17673,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_push_options with default values. Equivalent to\n creating an instance with GIT_PUSH_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_push_options structure

\n", + "comments": "

Initializes a git_push_options with default values. Equivalent to\n creating an instance with GIT_PUSH_OPTIONS_INIT.

\n", "group": "push" }, "git_remote_download": { "type": "function", - "file": "remote.h", - "line": 676, - "lineto": 676, + "file": "git2/remote.h", + "line": 678, + "lineto": 678, "args": [ { "name": "remote", @@ -16931,14 +17706,14 @@ "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\n

The .idx file will be created and both it and the packfile with be renamed to their final name.

\n", + "comments": "

Connect to the remote if it hasn't been done yet, negotiate with\n the remote git which objects are missing, download and index the\n packfile.

\n\n

The .idx file will be created and both it and the packfile with be\n renamed to their final name.

\n", "group": "remote" }, "git_remote_upload": { "type": "function", - "file": "remote.h", - "line": 690, - "lineto": 690, + "file": "git2/remote.h", + "line": 692, + "lineto": 692, "args": [ { "name": "remote", @@ -16963,14 +17738,14 @@ "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\n the remote git which objects are missing, create a packfile with the missing objects and send it.

\n", "group": "remote" }, "git_remote_update_tips": { "type": "function", - "file": "remote.h", - "line": 706, - "lineto": 711, + "file": "git2/remote.h", + "line": 708, + "lineto": 713, "args": [ { "name": "remote", @@ -17010,9 +17785,9 @@ }, "git_remote_fetch": { "type": "function", - "file": "remote.h", - "line": 727, - "lineto": 731, + "file": "git2/remote.h", + "line": 729, + "lineto": 733, "args": [ { "name": "remote", @@ -17042,7 +17817,7 @@ "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", + "comments": "

Convenience function to connect to a remote, download the data,\n disconnect and update the remote-tracking branches.

\n", "group": "remote", "examples": { "network/fetch.c": [ @@ -17052,9 +17827,9 @@ }, "git_remote_prune": { "type": "function", - "file": "remote.h", - "line": 740, - "lineto": 740, + "file": "git2/remote.h", + "line": 742, + "lineto": 742, "args": [ { "name": "remote", @@ -17079,9 +17854,9 @@ }, "git_remote_push": { "type": "function", - "file": "remote.h", - "line": 752, - "lineto": 754, + "file": "git2/remote.h", + "line": 754, + "lineto": 756, "args": [ { "name": "remote", @@ -17111,9 +17886,9 @@ }, "git_remote_stats": { "type": "function", - "file": "remote.h", - "line": 759, - "lineto": 759, + "file": "git2/remote.h", + "line": 761, + "lineto": 761, "args": [ { "name": "remote", @@ -17138,9 +17913,9 @@ }, "git_remote_autotag": { "type": "function", - "file": "remote.h", - "line": 767, - "lineto": 767, + "file": "git2/remote.h", + "line": 769, + "lineto": 769, "args": [ { "name": "remote", @@ -17160,9 +17935,9 @@ }, "git_remote_set_autotag": { "type": "function", - "file": "remote.h", - "line": 779, - "lineto": 779, + "file": "git2/remote.h", + "line": 781, + "lineto": 781, "args": [ { "name": "repo", @@ -17187,14 +17962,14 @@ "comment": null }, "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", + "comments": "

The change will be made in the configuration. No loaded remotes\n will be affected.

\n", "group": "remote" }, "git_remote_prune_refs": { "type": "function", - "file": "remote.h", - "line": 786, - "lineto": 786, + "file": "git2/remote.h", + "line": 788, + "lineto": 788, "args": [ { "name": "remote", @@ -17214,9 +17989,9 @@ }, "git_remote_rename": { "type": "function", - "file": "remote.h", - "line": 808, - "lineto": 812, + "file": "git2/remote.h", + "line": 810, + "lineto": 814, "args": [ { "name": "problems", @@ -17246,7 +18021,7 @@ "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, "description": "

Give the remote a new name

\n", - "comments": "

All remote-tracking branches and configuration settings for the remote are updated.

\n\n

The new name will be checked for validity. See git_tag_create() for rules about valid names.

\n\n

No loaded instances of a the remote with the old name will change their name or their list of refspecs.

\n", + "comments": "

All remote-tracking branches and configuration settings\n for the remote are updated.

\n\n

The new name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n\n

No loaded instances of a the remote with the old name will change\n their name or their list of refspecs.

\n", "group": "remote", "examples": { "remote.c": [ @@ -17256,9 +18031,9 @@ }, "git_remote_is_valid_name": { "type": "function", - "file": "remote.h", - "line": 820, - "lineto": 820, + "file": "git2/remote.h", + "line": 822, + "lineto": 822, "args": [ { "name": "remote_name", @@ -17278,9 +18053,9 @@ }, "git_remote_delete": { "type": "function", - "file": "remote.h", - "line": 832, - "lineto": 832, + "file": "git2/remote.h", + "line": 834, + "lineto": 834, "args": [ { "name": "repo", @@ -17300,7 +18075,7 @@ "comment": " 0 on success, or an error code." }, "description": "

Delete an existing persisted remote.

\n", - "comments": "

All remote-tracking branches and configuration settings for the remote will be removed.

\n", + "comments": "

All remote-tracking branches and configuration settings\n for the remote will be removed.

\n", "group": "remote", "examples": { "remote.c": [ @@ -17310,9 +18085,9 @@ }, "git_remote_default_branch": { "type": "function", - "file": "remote.h", - "line": 850, - "lineto": 850, + "file": "git2/remote.h", + "line": 852, + "lineto": 852, "args": [ { "name": "out", @@ -17332,12 +18107,12 @@ "comment": " 0, GIT_ENOTFOUND if the remote does not have any references\n or none of them point to HEAD's commit, or an error message." }, "description": "

Retrieve the name of the remote's default branch

\n", - "comments": "

The default branch of a repository is the branch which HEAD points to. If the remote does not support reporting this information directly, it performs the guess as git does; that is, if there are multiple branches which point to the same commit, the first one is chosen. If the master branch is a candidate, it wins.

\n\n

This function must only be called after connecting.

\n", + "comments": "

The default branch of a repository is the branch which HEAD points\n to. If the remote does not support reporting this information\n directly, it performs the guess as git does; that is, if there are\n multiple branches which point to the same commit, the first one is\n chosen. If the master branch is a candidate, it wins.

\n\n

This function must only be called after connecting.

\n", "group": "remote" }, "git_repository_open": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 37, "lineto": 37, "args": [ @@ -17359,7 +18134,7 @@ "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\n

The method will automatically detect if 'path' is a normal or bare repository or fail is 'path' is neither.

\n", + "comments": "

The 'path' argument must point to either a git repository\n folder, or an existing work dir.

\n\n

The method will automatically detect if 'path' is a normal\n or bare repository or fail is 'path' is neither.

\n", "group": "repository", "examples": { "general.c": [ @@ -17372,7 +18147,7 @@ }, "git_repository_open_from_worktree": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 48, "lineto": 48, "args": [ @@ -17394,12 +18169,12 @@ "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", + "comments": "

Open the working directory of the working tree as a normal\n repository that can then be worked on.

\n", "group": "repository" }, "git_repository_wrap_odb": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 61, "lineto": 61, "args": [ @@ -17421,12 +18196,12 @@ "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", + "comments": "

Create a repository object to wrap an object database to be used\n with the API when all you have is an object database. This doesn't\n have any paths associated with it, so use with care.

\n", "group": "repository" }, "git_repository_discover": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 89, "lineto": 93, "args": [ @@ -17458,7 +18233,7 @@ "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", + "comments": "

The method will automatically detect if the repository is bare\n (if there is a repository).

\n", "group": "repository", "examples": { "remote.c": [ @@ -17468,7 +18243,7 @@ }, "git_repository_open_ext": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 152, "lineto": 156, "args": [ @@ -17509,8 +18284,11 @@ "cat-file.c": [ "ex/HEAD/cat-file.html#git_repository_open_ext-31" ], + "checkout.c": [ + "ex/HEAD/checkout.html#git_repository_open_ext-14" + ], "describe.c": [ - "ex/HEAD/describe.html#git_repository_open_ext-6" + "ex/HEAD/describe.html#git_repository_open_ext-8" ], "diff.c": [ "ex/HEAD/diff.html#git_repository_open_ext-15" @@ -17519,8 +18297,11 @@ "ex/HEAD/log.html#git_repository_open_ext-45", "ex/HEAD/log.html#git_repository_open_ext-46" ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_repository_open_ext-7" + ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_open_ext-38" + "ex/HEAD/merge.html#git_repository_open_ext-33" ], "rev-parse.c": [ "ex/HEAD/rev-parse.html#git_repository_open_ext-16" @@ -17535,7 +18316,7 @@ }, "git_repository_open_bare": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 169, "lineto": 169, "args": [ @@ -17557,12 +18338,12 @@ "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", + "comments": "

This is a fast open for bare repositories that will come in handy\n if you're e.g. hosting git repositories and need to access them\n efficiently

\n", "group": "repository" }, "git_repository_free": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 182, "lineto": 182, "args": [ @@ -17579,7 +18360,7 @@ "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

\n", + "comments": "

Note that after a repository is free'd, all the objects it has spawned\n will still exist until they are manually closed by the user\n with git_object_free, but accessing any of the attributes of\n an object without a backing repository will result in undefined\n behavior

\n", "group": "repository", "examples": { "blame.c": [ @@ -17588,8 +18369,11 @@ "cat-file.c": [ "ex/HEAD/cat-file.html#git_repository_free-32" ], + "checkout.c": [ + "ex/HEAD/checkout.html#git_repository_free-15" + ], "describe.c": [ - "ex/HEAD/describe.html#git_repository_free-7" + "ex/HEAD/describe.html#git_repository_free-9" ], "diff.c": [ "ex/HEAD/diff.html#git_repository_free-16" @@ -17603,11 +18387,11 @@ "log.c": [ "ex/HEAD/log.html#git_repository_free-47" ], - "merge.c": [ - "ex/HEAD/merge.html#git_repository_free-39" + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_repository_free-8" ], - "network/clone.c": [ - "ex/HEAD/network/clone.html#git_repository_free-3" + "merge.c": [ + "ex/HEAD/merge.html#git_repository_free-34" ], "rev-parse.c": [ "ex/HEAD/rev-parse.html#git_repository_free-17" @@ -17622,7 +18406,7 @@ }, "git_repository_init": { "type": "function", - "file": "repository.h", + "file": "git2/repository.h", "line": 199, "lineto": 202, "args": [ @@ -17649,7 +18433,7 @@ "comment": " 0 or an error code" }, "description": "

Creates a new Git repository in the given folder.

\n", - "comments": "

TODO: - Reinit the repository

\n", + "comments": "

TODO:\n - Reinit the repository

\n", "group": "repository", "examples": { "init.c": [ @@ -17659,19 +18443,19 @@ }, "git_repository_init_init_options": { "type": "function", - "file": "repository.h", - "line": 311, - "lineto": 313, + "file": "git2/repository.h", + "line": 313, + "lineto": 315, "args": [ { "name": "opts", "type": "git_repository_init_options *", - "comment": "the `git_repository_init_options` struct to initialize" + "comment": "The `git_repository_init_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_REPOSITORY_INIT_OPTIONS_VERSION`." } ], "argline": "git_repository_init_options *opts, unsigned int version", @@ -17680,15 +18464,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_repository_init_options with default values. Equivalent\n to creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_repository_init_options structure

\n", + "comments": "

Initializes a git_repository_init_options with default values. Equivalent to\n creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.

\n", "group": "repository" }, "git_repository_init_ext": { "type": "function", - "file": "repository.h", - "line": 328, - "lineto": 331, + "file": "git2/repository.h", + "line": 330, + "lineto": 333, "args": [ { "name": "out", @@ -17713,7 +18497,7 @@ "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", + "comments": "

This will initialize a new git repository (creating the repo_path\n if requested by flags) and working directory as needed. It will\n auto-detect the case sensitivity of the file system and if the\n file system supports file mode bits correctly.

\n", "group": "repository", "examples": { "init.c": [ @@ -17723,9 +18507,9 @@ }, "git_repository_head": { "type": "function", - "file": "repository.h", - "line": 346, - "lineto": 346, + "file": "git2/repository.h", + "line": 348, + "lineto": 348, "args": [ { "name": "out", @@ -17745,12 +18529,12 @@ "comment": " 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise" }, "description": "

Retrieve and resolve the reference pointed at by HEAD.

\n", - "comments": "

The returned git_reference will be owned by caller and git_reference_free() must be called when done with it to release the allocated memory and prevent a leak.

\n", + "comments": "

The returned git_reference will be owned by caller and\n git_reference_free() must be called when done with it to release the\n allocated memory and prevent a leak.

\n", "group": "repository", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_repository_head-40", - "ex/HEAD/merge.html#git_repository_head-41" + "ex/HEAD/merge.html#git_repository_head-35", + "ex/HEAD/merge.html#git_repository_head-36" ], "status.c": [ "ex/HEAD/status.html#git_repository_head-7" @@ -17759,9 +18543,9 @@ }, "git_repository_head_for_worktree": { "type": "function", - "file": "repository.h", - "line": 356, - "lineto": 357, + "file": "git2/repository.h", + "line": 358, + "lineto": 359, "args": [ { "name": "out", @@ -17791,9 +18575,9 @@ }, "git_repository_head_detached": { "type": "function", - "file": "repository.h", - "line": 369, - "lineto": 369, + "file": "git2/repository.h", + "line": 371, + "lineto": 371, "args": [ { "name": "repo", @@ -17808,14 +18592,41 @@ "comment": " 1 if HEAD is detached, 0 if it's not; error code if there\n was an error." }, "description": "

Check if a repository's HEAD is detached

\n", - "comments": "

A repository's HEAD is detached when it points directly to a commit instead of a branch.

\n", + "comments": "

A repository's HEAD is detached when it points directly to a commit\n instead of a branch.

\n", + "group": "repository" + }, + "git_repository_head_detached_for_worktree": { + "type": "function", + "file": "git2/repository.h", + "line": 384, + "lineto": 385, + "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "a repository object" + }, + { + "name": "name", + "type": "const char *", + "comment": "name of the worktree to retrieve HEAD for" + } + ], + "argline": "git_repository *repo, const char *name", + "sig": "git_repository *::const char *", + "return": { + "type": "int", + "comment": " 1 if HEAD is detached, 0 if its not; error code if\n there was an error" + }, + "description": "

Check if a worktree's HEAD is detached

\n", + "comments": "

A worktree's HEAD is detached when it points directly to a\n commit instead of a branch.

\n", "group": "repository" }, "git_repository_head_unborn": { "type": "function", - "file": "repository.h", - "line": 395, - "lineto": 395, + "file": "git2/repository.h", + "line": 397, + "lineto": 397, "args": [ { "name": "repo", @@ -17830,14 +18641,14 @@ "comment": " 1 if the current branch is unborn, 0 if it's not; error\n code if there was an error" }, "description": "

Check if the current branch is unborn

\n", - "comments": "

An unborn branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.

\n", + "comments": "

An unborn branch is one named from HEAD but which doesn't exist in\n the refs namespace, because it doesn't have any commit to point to.

\n", "group": "repository" }, "git_repository_is_empty": { "type": "function", - "file": "repository.h", - "line": 407, - "lineto": 407, + "file": "git2/repository.h", + "line": 409, + "lineto": 409, "args": [ { "name": "repo", @@ -17852,14 +18663,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\n apart from HEAD, which must be pointing to the unborn master branch.

\n", "group": "repository" }, "git_repository_item_path": { "type": "function", - "file": "repository.h", - "line": 443, - "lineto": 443, + "file": "git2/repository.h", + "line": 445, + "lineto": 445, "args": [ { "name": "out", @@ -17884,14 +18695,14 @@ "comment": " 0, GIT_ENOTFOUND if the path cannot exist or an error code" }, "description": "

Get the location of a specific repository file or directory

\n", - "comments": "

This function will retrieve the path of a specific repository item. It will thereby honor things like the repository's common directory, gitdir, etc. In case a file path cannot exist for a given item (e.g. the working directory of a bare repository), GIT_ENOTFOUND is returned.

\n", + "comments": "

This function will retrieve the path of a specific repository\n item. It will thereby honor things like the repository's\n common directory, gitdir, etc. In case a file path cannot\n exist for a given item (e.g. the working directory of a bare\n repository), GIT_ENOTFOUND is returned.

\n", "group": "repository" }, "git_repository_path": { "type": "function", - "file": "repository.h", - "line": 454, - "lineto": 454, + "file": "git2/repository.h", + "line": 456, + "lineto": 456, "args": [ { "name": "repo", @@ -17906,7 +18717,7 @@ "comment": " the path to the repository" }, "description": "

Get the path of this repository

\n", - "comments": "

This is the path of the .git folder for normal repositories, or of the repository itself for bare repositories.

\n", + "comments": "

This is the path of the .git folder for normal repositories,\n or of the repository itself for bare repositories.

\n", "group": "repository", "examples": { "init.c": [ @@ -17919,9 +18730,9 @@ }, "git_repository_workdir": { "type": "function", - "file": "repository.h", - "line": 465, - "lineto": 465, + "file": "git2/repository.h", + "line": 467, + "lineto": 467, "args": [ { "name": "repo", @@ -17936,7 +18747,7 @@ "comment": " the path to the working dir, if it exists" }, "description": "

Get the path of the working directory for this repository

\n", - "comments": "

If the repository is bare, this function will always return NULL.

\n", + "comments": "

If the repository is bare, this function will always return\n NULL.

\n", "group": "repository", "examples": { "init.c": [ @@ -17946,9 +18757,9 @@ }, "git_repository_commondir": { "type": "function", - "file": "repository.h", - "line": 476, - "lineto": 476, + "file": "git2/repository.h", + "line": 478, + "lineto": 478, "args": [ { "name": "repo", @@ -17963,14 +18774,14 @@ "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", + "comments": "

If the repository is bare is not a worktree, the git directory\n path is returned.

\n", "group": "repository" }, "git_repository_set_workdir": { "type": "function", - "file": "repository.h", - "line": 495, - "lineto": 496, + "file": "git2/repository.h", + "line": 497, + "lineto": 498, "args": [ { "name": "repo", @@ -17995,14 +18806,14 @@ "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.

\n\n

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", + "comments": "

The working directory doesn't need to be the same one\n that contains the .git folder for this repository.

\n\n

If this repository is bare, setting its working directory\n will turn it into a normal repository, capable of performing\n all the common workdir operations (checkout, status, index\n manipulation, etc).

\n", "group": "repository" }, "git_repository_is_bare": { "type": "function", - "file": "repository.h", - "line": 504, - "lineto": 504, + "file": "git2/repository.h", + "line": 506, + "lineto": 506, "args": [ { "name": "repo", @@ -18027,9 +18838,9 @@ }, "git_repository_is_worktree": { "type": "function", - "file": "repository.h", - "line": 512, - "lineto": 512, + "file": "git2/repository.h", + "line": 514, + "lineto": 514, "args": [ { "name": "repo", @@ -18049,9 +18860,9 @@ }, "git_repository_config": { "type": "function", - "file": "repository.h", - "line": 528, - "lineto": 528, + "file": "git2/repository.h", + "line": 530, + "lineto": 530, "args": [ { "name": "out", @@ -18071,14 +18882,14 @@ "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\n

The configuration file must be freed once it's no longer being used by the user.

\n", + "comments": "

If a configuration file has not been set, the default\n config set for the repository will be returned, including\n global and system configurations (if they are available).

\n\n

The configuration file must be freed once it's no longer\n being used by the user.

\n", "group": "repository" }, "git_repository_config_snapshot": { "type": "function", - "file": "repository.h", - "line": 544, - "lineto": 544, + "file": "git2/repository.h", + "line": 546, + "lineto": 546, "args": [ { "name": "out", @@ -18098,7 +18909,7 @@ "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\n

The configuration file must be freed once it's no longer being used by the user.

\n", + "comments": "

Convenience function to take a snapshot from the repository's\n configuration. The contents of this snapshot will not change,\n even if the underlying config files are modified.

\n\n

The configuration file must be freed once it's no longer\n being used by the user.

\n", "group": "repository", "examples": { "general.c": [ @@ -18109,9 +18920,9 @@ }, "git_repository_odb": { "type": "function", - "file": "repository.h", - "line": 560, - "lineto": 560, + "file": "git2/repository.h", + "line": 562, + "lineto": 562, "args": [ { "name": "out", @@ -18131,7 +18942,7 @@ "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).

\n\n

The ODB must be freed once it's no longer being used by the user.

\n", + "comments": "

If a custom ODB has not been set, the default\n database for the repository will be returned (the one\n located in .git/objects).

\n\n

The ODB must be freed once it's no longer being used by\n the user.

\n", "group": "repository", "examples": { "cat-file.c": [ @@ -18144,9 +18955,9 @@ }, "git_repository_refdb": { "type": "function", - "file": "repository.h", - "line": 576, - "lineto": 576, + "file": "git2/repository.h", + "line": 578, + "lineto": 578, "args": [ { "name": "out", @@ -18166,14 +18977,14 @@ "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).

\n\n

The refdb must be freed once it's no longer being used by the user.

\n", + "comments": "

If a custom refsdb has not been set, the default database for\n the repository will be returned (the one that manipulates loose\n and packed references in the .git directory).

\n\n

The refdb must be freed once it's no longer being used by\n the user.

\n", "group": "repository" }, "git_repository_index": { "type": "function", - "file": "repository.h", - "line": 592, - "lineto": 592, + "file": "git2/repository.h", + "line": 594, + "lineto": 594, "args": [ { "name": "out", @@ -18193,7 +19004,7 @@ "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).

\n\n

The index must be freed once it's no longer being used by the user.

\n", + "comments": "

If a custom index has not been set, the default\n index for the repository will be returned (the one\n located in .git/index).

\n\n

The index must be freed once it's no longer being used by\n the user.

\n", "group": "repository", "examples": { "general.c": [ @@ -18202,16 +19013,19 @@ "init.c": [ "ex/HEAD/init.html#git_repository_index-11" ], + "ls-files.c": [ + "ex/HEAD/ls-files.html#git_repository_index-9" + ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_index-42" + "ex/HEAD/merge.html#git_repository_index-37" ] } }, "git_repository_message": { "type": "function", - "file": "repository.h", - "line": 610, - "lineto": 610, + "file": "git2/repository.h", + "line": 612, + "lineto": 612, "args": [ { "name": "out", @@ -18231,14 +19045,14 @@ "comment": " 0, GIT_ENOTFOUND if no message exists or an error code" }, "description": "

Retrieve git's prepared message

\n", - "comments": "

Operations such as git revert/cherry-pick/merge with the -n option stop just short of creating a commit with the changes and save their prepared message in .git/MERGE_MSG so the next git-commit execution can present it to the user for them to amend if they wish.

\n\n

Use this function to get the contents of this file. Don't forget to remove the file after you create the commit.

\n", + "comments": "

Operations such as git revert/cherry-pick/merge with the -n option\n stop just short of creating a commit with the changes and save\n their prepared message in .git/MERGE_MSG so the next git-commit\n execution can present it to the user for them to amend if they\n wish.

\n\n

Use this function to get the contents of this file. Don't forget to\n remove the file after you create the commit.

\n", "group": "repository" }, "git_repository_message_remove": { "type": "function", - "file": "repository.h", - "line": 617, - "lineto": 617, + "file": "git2/repository.h", + "line": 619, + "lineto": 619, "args": [ { "name": "repo", @@ -18258,9 +19072,9 @@ }, "git_repository_state_cleanup": { "type": "function", - "file": "repository.h", - "line": 626, - "lineto": 626, + "file": "git2/repository.h", + "line": 628, + "lineto": 628, "args": [ { "name": "repo", @@ -18279,15 +19093,15 @@ "group": "repository", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_repository_state_cleanup-43" + "ex/HEAD/merge.html#git_repository_state_cleanup-38" ] } }, "git_repository_fetchhead_foreach": { "type": "function", - "file": "repository.h", - "line": 645, - "lineto": 648, + "file": "git2/repository.h", + "line": 647, + "lineto": 650, "args": [ { "name": "repo", @@ -18317,9 +19131,9 @@ }, "git_repository_mergehead_foreach": { "type": "function", - "file": "repository.h", - "line": 665, - "lineto": 668, + "file": "git2/repository.h", + "line": 667, + "lineto": 670, "args": [ { "name": "repo", @@ -18349,9 +19163,9 @@ }, "git_repository_hashfile": { "type": "function", - "file": "repository.h", - "line": 693, - "lineto": 698, + "file": "git2/repository.h", + "line": 695, + "lineto": 700, "args": [ { "name": "out", @@ -18386,14 +19200,14 @@ "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.

\n\n

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.

\n", + "comments": "

If you simply want to calculate the hash of a file on disk with no filters,\n you can just use the git_odb_hashfile() API. However, if you want to\n hash a file in the repository and you want to apply filtering rules (e.g.\n crlf filters) before generating the SHA, then use this function.

\n\n

Note: if the repository has core.safecrlf set to fail and the\n filtering triggers that failure, then this function will return an\n error and not calculate the hash of the file.

\n", "group": "repository" }, "git_repository_set_head": { "type": "function", - "file": "repository.h", - "line": 718, - "lineto": 720, + "file": "git2/repository.h", + "line": 720, + "lineto": 722, "args": [ { "name": "repo", @@ -18413,14 +19227,19 @@ "comment": " 0 on success, or an error code" }, "description": "

Make the repository HEAD point to the specified reference.

\n", - "comments": "

If the provided reference points to a Tree or a Blob, the HEAD is unaltered and -1 is returned.

\n\n

If 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\n

Otherwise, the HEAD will be detached and will directly point to the Commit.

\n", - "group": "repository" + "comments": "

If the provided reference points to a Tree or a Blob, the HEAD is\n unaltered and -1 is returned.

\n\n

If the provided reference points to a branch, the HEAD will point\n to that branch, staying attached, or become attached if it isn't yet.\n If the branch doesn't exist yet, no error will be return. The HEAD\n will then be attached to an unborn branch.

\n\n

Otherwise, the HEAD will be detached and will directly point to\n the Commit.

\n", + "group": "repository", + "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_repository_set_head-16" + ] + } }, "git_repository_set_head_detached": { "type": "function", - "file": "repository.h", - "line": 738, - "lineto": 740, + "file": "git2/repository.h", + "line": 740, + "lineto": 742, "args": [ { "name": "repo", @@ -18440,14 +19259,14 @@ "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\n

If the provided commitish cannot be peeled into a commit, the HEAD is unaltered and -1 is returned.

\n\n

Otherwise, 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\n is unaltered and GIT_ENOTFOUND is returned.

\n\n

If the provided commitish cannot be peeled into a commit, the HEAD\n is unaltered and -1 is returned.

\n\n

Otherwise, the HEAD will eventually be detached and will directly point to\n the peeled Commit.

\n", "group": "repository" }, "git_repository_set_head_detached_from_annotated": { "type": "function", - "file": "repository.h", - "line": 754, - "lineto": 756, + "file": "git2/repository.h", + "line": 756, + "lineto": 758, "args": [ { "name": "repo", @@ -18467,14 +19286,19 @@ "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.

\n\n

See the documentation for git_repository_set_head_detached().

\n", - "group": "repository" + "comments": "

This behaves like git_repository_set_head_detached() but takes an\n annotated commit, which lets you specify which extended sha syntax\n string was specified by a user, allowing for more exact reflog\n messages.

\n\n

See the documentation for git_repository_set_head_detached().

\n", + "group": "repository", + "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_repository_set_head_detached_from_annotated-17" + ] + } }, "git_repository_detach_head": { "type": "function", - "file": "repository.h", - "line": 775, - "lineto": 776, + "file": "git2/repository.h", + "line": 777, + "lineto": 778, "args": [ { "name": "repo", @@ -18489,14 +19313,14 @@ "comment": " 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch or an error code" }, "description": "

Detach the HEAD.

\n", - "comments": "

If the HEAD is already detached and points to a Commit, 0 is returned.

\n\n

If 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\n

If the HEAD is already detached and points to a non commitish, the HEAD is unaltered, and -1 is returned.

\n\n

Otherwise, 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\n

If the HEAD is already detached and points to a Tag, the HEAD is\n updated into making it point to the peeled Commit, and 0 is returned.

\n\n

If the HEAD is already detached and points to a non commitish, the HEAD is\n unaltered, and -1 is returned.

\n\n

Otherwise, the HEAD will be detached and point to the peeled Commit.

\n", "group": "repository" }, "git_repository_state": { "type": "function", - "file": "repository.h", - "line": 806, - "lineto": 806, + "file": "git2/repository.h", + "line": 808, + "lineto": 808, "args": [ { "name": "repo", @@ -18514,16 +19338,19 @@ "comments": "", "group": "repository", "examples": { + "checkout.c": [ + "ex/HEAD/checkout.html#git_repository_state-18" + ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_state-44" + "ex/HEAD/merge.html#git_repository_state-39" ] } }, "git_repository_set_namespace": { "type": "function", - "file": "repository.h", - "line": 820, - "lineto": 820, + "file": "git2/repository.h", + "line": 822, + "lineto": 822, "args": [ { "name": "repo", @@ -18543,14 +19370,14 @@ "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

\n", + "comments": "

This namespace affects all reference operations for the repo.\n See man gitnamespaces

\n", "group": "repository" }, "git_repository_get_namespace": { "type": "function", - "file": "repository.h", - "line": 828, - "lineto": 828, + "file": "git2/repository.h", + "line": 830, + "lineto": 830, "args": [ { "name": "repo", @@ -18570,9 +19397,9 @@ }, "git_repository_is_shallow": { "type": "function", - "file": "repository.h", - "line": 837, - "lineto": 837, + "file": "git2/repository.h", + "line": 839, + "lineto": 839, "args": [ { "name": "repo", @@ -18592,9 +19419,9 @@ }, "git_repository_ident": { "type": "function", - "file": "repository.h", - "line": 849, - "lineto": 849, + "file": "git2/repository.h", + "line": 851, + "lineto": 851, "args": [ { "name": "name", @@ -18619,14 +19446,14 @@ "comment": null }, "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", + "comments": "

The memory is owned by the repository and must not be freed by the\n user.

\n", "group": "repository" }, "git_repository_set_ident": { "type": "function", - "file": "repository.h", - "line": 862, - "lineto": 862, + "file": "git2/repository.h", + "line": 864, + "lineto": 864, "args": [ { "name": "repo", @@ -18651,12 +19478,12 @@ "comment": null }, "description": "

Set the identity to be used for writing reflogs

\n", - "comments": "

If both are set, this name and email will be used to write to the reflog. Pass NULL to unset. When unset, the identity will be taken from the repository's configuration.

\n", + "comments": "

If both are set, this name and email will be used to write to the\n reflog. Pass NULL to unset. When unset, the identity will be taken\n from the repository's configuration.

\n", "group": "repository" }, "git_reset": { "type": "function", - "file": "reset.h", + "file": "git2/reset.h", "line": 62, "lineto": 66, "args": [ @@ -18688,12 +19515,12 @@ "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\n

MIXED reset will trigger a SOFT reset, plus the index will be replaced with the content of the commit tree.

\n\n

HARD 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\n

TODO: Implement remaining kinds of resets.

\n", + "comments": "

SOFT reset means the Head will be moved to the commit.

\n\n

MIXED reset will trigger a SOFT reset, plus the index will be replaced\n with the content of the commit tree.

\n\n

HARD reset will trigger a MIXED reset and the working directory will be\n replaced with the content of the index. (Untracked and ignored files\n will be left alone, however.)

\n\n

TODO: Implement remaining kinds of resets.

\n", "group": "reset" }, "git_reset_from_annotated": { "type": "function", - "file": "reset.h", + "file": "git2/reset.h", "line": 80, "lineto": 84, "args": [ @@ -18725,12 +19552,12 @@ "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.

\n\n

See the documentation for git_reset().

\n", + "comments": "

This behaves like git_reset() but takes an annotated commit,\n which lets you specify which extended sha syntax string was\n specified by a user, allowing for more exact reflog messages.

\n\n

See the documentation for git_reset().

\n", "group": "reset" }, "git_reset_default": { "type": "function", - "file": "reset.h", + "file": "git2/reset.h", "line": 104, "lineto": 107, "args": [ @@ -18757,24 +19584,24 @@ "comment": " 0 on success or an error code \n<\n 0" }, "description": "

Updates some entries in the index from the target commit tree.

\n", - "comments": "

The scope of the updated entries is determined by the paths being passed in the pathspec parameters.

\n\n

Passing a NULL target will result in removing entries in the index matching the provided pathspecs.

\n", + "comments": "

The scope of the updated entries is determined by the paths\n being passed in the pathspec parameters.

\n\n

Passing a NULL target will result in removing\n entries in the index matching the provided pathspecs.

\n", "group": "reset" }, "git_revert_init_options": { "type": "function", - "file": "revert.h", - "line": 47, - "lineto": 49, + "file": "git2/revert.h", + "line": 49, + "lineto": 51, "args": [ { "name": "opts", "type": "git_revert_options *", - "comment": "the `git_revert_options` struct to initialize" + "comment": "The `git_revert_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_REVERT_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_REVERT_OPTIONS_VERSION`." } ], "argline": "git_revert_options *opts, unsigned int version", @@ -18783,15 +19610,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_revert_options with default values. Equivalent to\n creating an instance with GIT_REVERT_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_revert_options structure

\n", + "comments": "

Initializes a git_revert_options with default values. Equivalent to\n creating an instance with GIT_REVERT_OPTIONS_INIT.

\n", "group": "revert" }, "git_revert_commit": { "type": "function", - "file": "revert.h", - "line": 65, - "lineto": 71, + "file": "git2/revert.h", + "line": 67, + "lineto": 73, "args": [ { "name": "out", @@ -18836,9 +19663,9 @@ }, "git_revert": { "type": "function", - "file": "revert.h", - "line": 81, - "lineto": 84, + "file": "git2/revert.h", + "line": 83, + "lineto": 86, "args": [ { "name": "repo", @@ -18868,7 +19695,7 @@ }, "git_revparse_single": { "type": "function", - "file": "revparse.h", + "file": "git2/revparse.h", "line": 37, "lineto": 38, "args": [ @@ -18895,7 +19722,7 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code" }, "description": "

Find a single object, as specified by a revision string.

\n", - "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n\n

The returned object should be released with git_object_free when no longer needed.

\n", + "comments": "

See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n\n

The returned object should be released with git_object_free when no\n longer needed.

\n", "group": "revparse", "examples": { "blame.c": [ @@ -18905,7 +19732,7 @@ "ex/HEAD/cat-file.html#git_revparse_single-34" ], "describe.c": [ - "ex/HEAD/describe.html#git_revparse_single-8" + "ex/HEAD/describe.html#git_revparse_single-10" ], "log.c": [ "ex/HEAD/log.html#git_revparse_single-48" @@ -18920,7 +19747,7 @@ }, "git_revparse_ext": { "type": "function", - "file": "revparse.h", + "file": "git2/revparse.h", "line": 61, "lineto": 65, "args": [ @@ -18952,12 +19779,12 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC\n or an error code" }, "description": "

Find a single object and intermediate reference by a revision string.

\n", - "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n\n

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.

\n\n

The returned object should be released with git_object_free and the returned reference with git_reference_free when no longer needed.

\n", + "comments": "

See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n\n

In some cases (\n@\n{\n<\n-n>} or `\n<branchname

\n\n
\n

@\n{upstream}), the expression may\n point to an intermediate reference. When such expressions are being passed\n in,reference_out` will be valued as well.

\n
\n\n

The returned object should be released with git_object_free and the\n returned reference with git_reference_free when no longer needed.

\n", "group": "revparse" }, "git_revparse": { "type": "function", - "file": "revparse.h", + "file": "git2/revparse.h", "line": 105, "lineto": 108, "args": [ @@ -18984,7 +19811,7 @@ "comment": " 0 on success, GIT_INVALIDSPEC, GIT_ENOTFOUND, GIT_EAMBIGUOUS or an error code" }, "description": "

Parse a revision string for from, to, and intent.

\n", - "comments": "

See man gitrevisions or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n", + "comments": "

See man gitrevisions or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n", "group": "revparse", "examples": { "blame.c": [ @@ -19001,7 +19828,7 @@ }, "git_revwalk_new": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 73, "lineto": 73, "args": [ @@ -19023,7 +19850,7 @@ "comment": " 0 or an error code" }, "description": "

Allocate a new revision walker to iterate through a repo.

\n", - "comments": "

This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.

\n\n

For maximum performance, this revision walker should be reused for different walks.

\n\n

This 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", + "comments": "

This revision walker uses a custom memory pool and an internal\n commit cache, so it is relatively expensive to allocate.

\n\n

For maximum performance, this revision walker should be\n reused for different walks.

\n\n

This revision walker is not thread safe: it may only be\n used to walk a repository on a single thread; however,\n it is possible to have several revision walkers in\n several different threads walking the same repository.

\n", "group": "revwalk", "examples": { "general.c": [ @@ -19037,7 +19864,7 @@ }, "git_revwalk_reset": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 88, "lineto": 88, "args": [ @@ -19054,12 +19881,12 @@ "comment": null }, "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\n

The revision walk is automatically reset when a walk is over.

\n", + "comments": "

This will clear all the pushed and hidden commits, and\n leave the walker in a blank state (just like at\n creation) ready to receive new commit pushes and\n start a new walk.

\n\n

The revision walk is automatically reset when a walk\n is over.

\n", "group": "revwalk" }, "git_revwalk_push": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 107, "lineto": 107, "args": [ @@ -19081,7 +19908,7 @@ "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\n

At least one commit must be pushed onto the walker before a walk can be started.

\n\n

The given id must belong to a committish on the walked repository.

\n", + "comments": "

The pushed commit will be marked as one of the roots from which to\n start the walk. This commit may not be walked if it or a child is\n hidden.

\n\n

At least one commit must be pushed onto the walker before a walk\n can be started.

\n\n

The given id must belong to a committish on the walked\n repository.

\n", "group": "revwalk", "examples": { "general.c": [ @@ -19094,7 +19921,7 @@ }, "git_revwalk_push_glob": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 125, "lineto": 125, "args": [ @@ -19116,12 +19943,12 @@ "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\n

A leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.

\n\n

Any references matching this glob which do not point to a committish will be ignored.

\n", + "comments": "

The OIDs pointed to by the references that match the given glob\n pattern will be pushed to the revision walker.

\n\n

A leading 'refs/' is implied if not present as well as a trailing\n '/\n\\\n*' if the glob lacks '?', '\n\\\n*' or '['.

\n\n

Any references matching this glob which do not point to a\n committish will be ignored.

\n", "group": "revwalk" }, "git_revwalk_push_head": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 133, "lineto": 133, "args": [ @@ -19148,7 +19975,7 @@ }, "git_revwalk_hide": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 148, "lineto": 148, "args": [ @@ -19170,7 +19997,7 @@ "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\n

The resolved commit and all its parents will be hidden from the output on the revision walk.

\n", + "comments": "

The given id must belong to a committish on the walked\n repository.

\n\n

The resolved commit and all its parents will be hidden from the\n output on the revision walk.

\n", "group": "revwalk", "examples": { "log.c": [ @@ -19180,7 +20007,7 @@ }, "git_revwalk_hide_glob": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 167, "lineto": 167, "args": [ @@ -19202,12 +20029,12 @@ "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\n

A leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.

\n\n

Any references matching this glob which do not point to a committish will be ignored.

\n", + "comments": "

The OIDs pointed to by the references that match the given glob\n pattern and their ancestors will be hidden from the output on the\n revision walk.

\n\n

A leading 'refs/' is implied if not present as well as a trailing\n '/\n\\\n*' if the glob lacks '?', '\n\\\n*' or '['.

\n\n

Any references matching this glob which do not point to a\n committish will be ignored.

\n", "group": "revwalk" }, "git_revwalk_hide_head": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 175, "lineto": 175, "args": [ @@ -19229,7 +20056,7 @@ }, "git_revwalk_push_ref": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 186, "lineto": 186, "args": [ @@ -19256,7 +20083,7 @@ }, "git_revwalk_hide_ref": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 197, "lineto": 197, "args": [ @@ -19283,7 +20110,7 @@ }, "git_revwalk_next": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 217, "lineto": 217, "args": [ @@ -19305,7 +20132,7 @@ "comment": " 0 if the next commit was found;\n\tGIT_ITEROVER if there are no commits left to iterate" }, "description": "

Get the next commit from the revision walk.

\n", - "comments": "

The initial call to this method is not blocking when iterating through a repo with a time-sorting mode.

\n\n

Iterating 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\n

The revision walker is reset when the walk is over.

\n", + "comments": "

The initial call to this method is not blocking when\n iterating through a repo with a time-sorting mode.

\n\n

Iterating with Topological or inverted modes makes the initial\n call blocking to preprocess the commit list, but this block should be\n mostly unnoticeable on most repositories (topological preprocessing\n times at 0.3s on the git.git repo).

\n\n

The revision walker is reset when the walk is over.

\n", "group": "revwalk", "examples": { "general.c": [ @@ -19318,7 +20145,7 @@ }, "git_revwalk_sorting": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 228, "lineto": 228, "args": [ @@ -19354,7 +20181,7 @@ }, "git_revwalk_push_range": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 243, "lineto": 243, "args": [ @@ -19376,12 +20203,12 @@ "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 .. where each is in the form accepted by 'git_revparse_single'. The left-hand commit will be hidden and the right-hand commit pushed.

\n", + "comments": "

The range should be of the form

\n\n

<commit

\n\n
\n

..\n<commit

\n\n

where each \n<commit\nis in the form accepted by 'git_revparse_single'.\n The left-hand commit will be hidden and the right-hand commit pushed.

\n
\n", "group": "revwalk" }, "git_revwalk_simplify_first_parent": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 250, "lineto": 250, "args": [ @@ -19403,7 +20230,7 @@ }, "git_revwalk_free": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 258, "lineto": 258, "args": [ @@ -19433,7 +20260,7 @@ }, "git_revwalk_repository": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 267, "lineto": 267, "args": [ @@ -19455,7 +20282,7 @@ }, "git_revwalk_add_hide_cb": { "type": "function", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 288, "lineto": 291, "args": [ @@ -19487,7 +20314,7 @@ }, "git_signature_new": { "type": "function", - "file": "signature.h", + "file": "git2/signature.h", "line": 37, "lineto": 37, "args": [ @@ -19524,7 +20351,7 @@ "comment": " 0 or an error code" }, "description": "

Create a new action signature.

\n", - "comments": "

Call git_signature_free() to free the data.

\n\n

Note: angle brackets ('<' and '>') characters are not allowed to be used in either the name or the email parameter.

\n", + "comments": "

Call git_signature_free() to free the data.

\n\n

Note: angle brackets ('\n<\n' and '>') characters are not allowed\n to be used in either the name or the email parameter.

\n", "group": "signature", "examples": { "general.c": [ @@ -19535,7 +20362,7 @@ }, "git_signature_now": { "type": "function", - "file": "signature.h", + "file": "git2/signature.h", "line": 49, "lineto": 49, "args": [ @@ -19566,13 +20393,13 @@ "group": "signature", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_signature_now-45" + "ex/HEAD/merge.html#git_signature_now-40" ] } }, "git_signature_default": { "type": "function", - "file": "signature.h", + "file": "git2/signature.h", "line": 63, "lineto": 63, "args": [ @@ -19594,7 +20421,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if config is missing, or error code" }, "description": "

Create a new action signature with default user and now timestamp.

\n", - "comments": "

This looks up the user.name and user.email from the configuration and 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", + "comments": "

This looks up the user.name and user.email from the configuration and\n uses the current time as the timestamp, and creates a new signature\n based on that information. It will return GIT_ENOTFOUND if either the\n user.name or user.email are not set.

\n", "group": "signature", "examples": { "init.c": [ @@ -19607,7 +20434,7 @@ }, "git_signature_from_buffer": { "type": "function", - "file": "signature.h", + "file": "git2/signature.h", "line": 76, "lineto": 76, "args": [ @@ -19634,7 +20461,7 @@ }, "git_signature_dup": { "type": "function", - "file": "signature.h", + "file": "git2/signature.h", "line": 88, "lineto": 88, "args": [ @@ -19661,7 +20488,7 @@ }, "git_signature_free": { "type": "function", - "file": "signature.h", + "file": "git2/signature.h", "line": 99, "lineto": 99, "args": [ @@ -19678,7 +20505,7 @@ "comment": null }, "description": "

Free an existing signature.

\n", - "comments": "

Because the signature is not an opaque structure, it is legal to free it manually, but be sure to free the "name" and "email" strings in addition to the structure itself.

\n", + "comments": "

Because the signature is not an opaque structure, it is legal to free it\n manually, but be sure to free the "name" and "email" strings in addition\n to the structure itself.

\n", "group": "signature", "examples": { "general.c": [ @@ -19693,21 +20520,63 @@ ] } }, + "git_stash_save": { + "type": "function", + "file": "git2/stash.h", + "line": 67, + "lineto": 72, + "args": [ + { + "name": "out", + "type": "git_oid *", + "comment": "Object id of the commit containing the stashed state.\n This commit is also the target of the direct reference refs/stash." + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "The owning repository." + }, + { + "name": "stasher", + "type": "const git_signature *", + "comment": "The identity of the person performing the stashing." + }, + { + "name": "message", + "type": "const char *", + "comment": "Optional description along with the stashed state." + }, + { + "name": "flags", + "type": "uint32_t", + "comment": "Flags to control the stashing process. (see GIT_STASH_* above)" + } + ], + "argline": "git_oid *out, git_repository *repo, const git_signature *stasher, const char *message, uint32_t flags", + "sig": "git_oid *::git_repository *::const git_signature *::const char *::uint32_t", + "return": { + "type": "int", + "comment": " 0 on success, GIT_ENOTFOUND where there's nothing to stash,\n or error code." + }, + "description": "

Save the local modifications to a new stash.

\n", + "comments": "", + "group": "stash" + }, "git_stash_apply_init_options": { "type": "function", - "file": "stash.h", - "line": 153, - "lineto": 154, + "file": "git2/stash.h", + "line": 156, + "lineto": 157, "args": [ { "name": "opts", "type": "git_stash_apply_options *", - "comment": "the `git_stash_apply_options` instance to initialize." + "comment": "The `git_stash_apply_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "the version of the struct; you should pass\n `GIT_STASH_APPLY_OPTIONS_INIT` here." + "comment": "The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`." } ], "argline": "git_stash_apply_options *opts, unsigned int version", @@ -19716,15 +20585,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_stash_apply_options with default values. Equivalent to\n creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_stash_apply_options structure

\n", + "comments": "

Initializes a git_stash_apply_options with default values. Equivalent to\n creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.

\n", "group": "stash" }, "git_stash_apply": { "type": "function", - "file": "stash.h", - "line": 182, - "lineto": 185, + "file": "git2/stash.h", + "line": 185, + "lineto": 188, "args": [ { "name": "repo", @@ -19749,14 +20618,14 @@ "comment": " 0 on success, GIT_ENOTFOUND if there's no stashed state for the\n given index, GIT_EMERGECONFLICT if changes exist in the working\n directory, or an error code" }, "description": "

Apply a single stashed state from the stash list.

\n", - "comments": "

If local changes in the working directory conflict with changes in the stash then GIT_EMERGECONFLICT will be returned. In this case, the index will always remain unmodified and all files in the working directory will remain unmodified. However, if you are restoring untracked files or ignored files and there is a conflict when applying the modified files, then those files will remain in the working directory.

\n\n

If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be conflicts when reinstating the index, the function will return GIT_EMERGECONFLICT and both the working directory and index will be left unmodified.

\n\n

Note that a minimum checkout strategy of GIT_CHECKOUT_SAFE is implied.

\n", + "comments": "

If local changes in the working directory conflict with changes in the\n stash then GIT_EMERGECONFLICT will be returned. In this case, the index\n will always remain unmodified and all files in the working directory will\n remain unmodified. However, if you are restoring untracked files or\n ignored files and there is a conflict when applying the modified files,\n then those files will remain in the working directory.

\n\n

If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be\n conflicts when reinstating the index, the function will return\n GIT_EMERGECONFLICT and both the working directory and index will be left\n unmodified.

\n\n

Note that a minimum checkout strategy of GIT_CHECKOUT_SAFE is implied.

\n", "group": "stash" }, "git_stash_foreach": { "type": "function", - "file": "stash.h", - "line": 218, - "lineto": 221, + "file": "git2/stash.h", + "line": 221, + "lineto": 224, "args": [ { "name": "repo", @@ -19786,9 +20655,9 @@ }, "git_stash_drop": { "type": "function", - "file": "stash.h", - "line": 234, - "lineto": 236, + "file": "git2/stash.h", + "line": 237, + "lineto": 239, "args": [ { "name": "repo", @@ -19813,9 +20682,9 @@ }, "git_stash_pop": { "type": "function", - "file": "stash.h", - "line": 250, - "lineto": 253, + "file": "git2/stash.h", + "line": 253, + "lineto": 256, "args": [ { "name": "repo", @@ -19845,19 +20714,19 @@ }, "git_status_init_options": { "type": "function", - "file": "status.h", - "line": 199, - "lineto": 201, + "file": "git2/status.h", + "line": 203, + "lineto": 205, "args": [ { "name": "opts", "type": "git_status_options *", - "comment": "The `git_status_options` instance to initialize." + "comment": "The `git_status_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_STATUS_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_STATUS_OPTIONS_VERSION`." } ], "argline": "git_status_options *opts, unsigned int version", @@ -19866,15 +20735,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_status_options with default values. Equivalent to\n creating an instance with GIT_STATUS_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_status_options structure

\n", + "comments": "

Initializes a git_status_options with default values. Equivalent to\n creating an instance with GIT_STATUS_OPTIONS_INIT.

\n", "group": "status" }, "git_status_foreach": { "type": "function", - "file": "status.h", - "line": 239, - "lineto": 242, + "file": "git2/status.h", + "line": 243, + "lineto": 246, "args": [ { "name": "repo", @@ -19899,7 +20768,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "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.

\n\n

If the callback returns a non-zero value, this function will stop looping and return that value to caller.

\n", + "comments": "

The callback is passed the path of the file, the status (a combination of\n the git_status_t values above) and the payload data pointer passed\n into this function.

\n\n

If the callback returns a non-zero value, this function will stop looping\n and return that value to caller.

\n", "group": "status", "examples": { "status.c": [ @@ -19909,9 +20778,9 @@ }, "git_status_foreach_ext": { "type": "function", - "file": "status.h", - "line": 263, - "lineto": 267, + "file": "git2/status.h", + "line": 267, + "lineto": 271, "args": [ { "name": "repo", @@ -19941,7 +20810,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Gather file status information and run callbacks as requested.

\n", - "comments": "

This is an extended version of the git_status_foreach() API that allows for more granular control over which paths will be processed and in what order. See the git_status_options structure for details about the additional controls that this makes available.

\n\n

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.

\n", + "comments": "

This is an extended version of the git_status_foreach() API that\n allows for more granular control over which paths will be processed and\n in what order. See the git_status_options structure for details\n about the additional controls that this makes available.

\n\n

Note that if a pathspec is given in the git_status_options to filter\n the status, then the results from rename detection (if you enable it) may\n not be accurate. To do rename detection properly, this must be called\n with no pathspec so that all files can be considered.

\n", "group": "status", "examples": { "status.c": [ @@ -19951,9 +20820,9 @@ }, "git_status_file": { "type": "function", - "file": "status.h", - "line": 295, - "lineto": 298, + "file": "git2/status.h", + "line": 299, + "lineto": 302, "args": [ { "name": "status_flags", @@ -19978,14 +20847,14 @@ "comment": " 0 on success, GIT_ENOTFOUND if the file is not found in the HEAD,\n index, and work tree, GIT_EAMBIGUOUS if `path` matches multiple files\n or if it refers to a folder, and -1 on other errors." }, "description": "

Get file status for a single file.

\n", - "comments": "

This tries to get status for the filename that you give. If no files match that name (in either the HEAD, index, or working directory), this returns GIT_ENOTFOUND.

\n\n

If 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.

\n\n

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.

\n", + "comments": "

This tries to get status for the filename that you give. If no files\n match that name (in either the HEAD, index, or working directory), this\n returns GIT_ENOTFOUND.

\n\n

If the name matches multiple files (for example, if the path names a\n directory or if running on a case- insensitive filesystem and yet the\n HEAD has two entries that both match the path), then this returns\n GIT_EAMBIGUOUS because it cannot give correct results.

\n\n

This does not do any sort of rename detection. Renames require a set of\n targets and because of the path filtering, there is not enough\n information to check renames correctly. To check file status with rename\n detection, there is no choice but to do a full git_status_list_new and\n scan through looking for the path that you are interested in.

\n", "group": "status" }, "git_status_list_new": { "type": "function", - "file": "status.h", - "line": 313, - "lineto": 316, + "file": "git2/status.h", + "line": 317, + "lineto": 320, "args": [ { "name": "out", @@ -20010,7 +20879,7 @@ "comment": " 0 on success or error code" }, "description": "

Gather file status information and populate the git_status_list.

\n", - "comments": "

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.

\n", + "comments": "

Note that if a pathspec is given in the git_status_options to filter\n the status, then the results from rename detection (if you enable it) may\n not be accurate. To do rename detection properly, this must be called\n with no pathspec so that all files can be considered.

\n", "group": "status", "examples": { "status.c": [ @@ -20021,9 +20890,9 @@ }, "git_status_list_entrycount": { "type": "function", - "file": "status.h", - "line": 327, - "lineto": 328, + "file": "git2/status.h", + "line": 331, + "lineto": 332, "args": [ { "name": "statuslist", @@ -20038,7 +20907,7 @@ "comment": " the number of status entries" }, "description": "

Gets the count of status entries in this list.

\n", - "comments": "

If there are no changes in status (at least according the options given when the status list was created), this can return 0.

\n", + "comments": "

If there are no changes in status (at least according the options given\n when the status list was created), this can return 0.

\n", "group": "status", "examples": { "status.c": [ @@ -20049,9 +20918,9 @@ }, "git_status_byindex": { "type": "function", - "file": "status.h", - "line": 339, - "lineto": 341, + "file": "git2/status.h", + "line": 343, + "lineto": 345, "args": [ { "name": "statuslist", @@ -20086,9 +20955,9 @@ }, "git_status_list_free": { "type": "function", - "file": "status.h", - "line": 348, - "lineto": 349, + "file": "git2/status.h", + "line": 352, + "lineto": 353, "args": [ { "name": "statuslist", @@ -20113,9 +20982,9 @@ }, "git_status_should_ignore": { "type": "function", - "file": "status.h", - "line": 367, - "lineto": 370, + "file": "git2/status.h", + "line": 371, + "lineto": 374, "args": [ { "name": "ignored", @@ -20140,12 +21009,12 @@ "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." }, "description": "

Test if the ignore rules apply to a given file.

\n", - "comments": "

This function checks the ignore rules to see if they would apply to the given file. This indicates if the file would be ignored regardless of whether the file is already in the index or committed to the repository.

\n\n

One 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", + "comments": "

This function checks the ignore rules to see if they would apply to the\n given file. This indicates if the file would be ignored regardless of\n whether the file is already in the index or committed to the repository.

\n\n

One way to think of this is if you were to do "git add ." on the\n directory containing the file, would it be added or not?

\n", "group": "status" }, "git_strarray_free": { "type": "function", - "file": "strarray.h", + "file": "git2/strarray.h", "line": 41, "lineto": 41, "args": [ @@ -20162,7 +21031,7 @@ "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.

\n\n

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).

\n", + "comments": "

This method should be called on git_strarray objects where the strings\n array is allocated and contains allocated strings, such as what you\n would get from git_strarray_copy(). Not doing so, will result in a\n memory leak.

\n\n

This does not free the git_strarray itself, since the library will\n never allocate that object directly itself (it is more commonly embedded\n inside another struct or created on the stack).

\n", "group": "strarray", "examples": { "general.c": [ @@ -20179,7 +21048,7 @@ }, "git_strarray_copy": { "type": "function", - "file": "strarray.h", + "file": "git2/strarray.h", "line": 53, "lineto": 53, "args": [ @@ -20201,24 +21070,24 @@ "comment": " 0 on success, \n<\n 0 on allocation failure" }, "description": "

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", + "comments": "

Note: target is overwritten and hence should be empty, otherwise its\n contents are leaked. Call git_strarray_free() if necessary.

\n", "group": "strarray" }, "git_submodule_update_init_options": { "type": "function", - "file": "submodule.h", - "line": 170, - "lineto": 171, + "file": "git2/submodule.h", + "line": 171, + "lineto": 172, "args": [ { "name": "opts", "type": "git_submodule_update_options *", - "comment": "The `git_submodule_update_options` instance to initialize." + "comment": "The `git_submodule_update_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Version of struct; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_SUBMODULE_UPDATE_OPTIONS_VERSION`." } ], "argline": "git_submodule_update_options *opts, unsigned int version", @@ -20227,15 +21096,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_submodule_update_options with default values.\n Equivalent to creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_submodule_update_options structure

\n", + "comments": "

Initializes a git_submodule_update_options with default values. Equivalent to\n creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.

\n", "group": "submodule" }, "git_submodule_update": { "type": "function", - "file": "submodule.h", - "line": 191, - "lineto": 191, + "file": "git2/submodule.h", + "line": 192, + "lineto": 192, "args": [ { "name": "submodule", @@ -20265,9 +21134,9 @@ }, "git_submodule_lookup": { "type": "function", - "file": "submodule.h", - "line": 220, - "lineto": 223, + "file": "git2/submodule.h", + "line": 221, + "lineto": 224, "args": [ { "name": "out", @@ -20292,14 +21161,14 @@ "comment": " 0 on success, GIT_ENOTFOUND if submodule does not exist,\n GIT_EEXISTS if a repository is found in working directory only,\n -1 on other errors." }, "description": "

Lookup submodule information by name or path.

\n", - "comments": "

Given either the submodule name or path (they are usually the same), this returns a structure describing the submodule.

\n\n

There are two expected error scenarios:

\n\n
    \n
  • The submodule is not mentioned in the HEAD, the index, and the config, but does "exist" in the working directory (i.e. there is a subdirectory that appears to be a Git repository). In this case, this function returns GIT_EEXISTS to indicate a sub-repository exists but not in a state where a git_submodule can be instantiated. - The submodule is not mentioned in the HEAD, index, or config and the working directory doesn't contain a value git repo at that path. There may or may not be anything else at that path, but nothing that looks like a submodule. In this case, this returns GIT_ENOTFOUND.
  • \n
\n\n

You must call git_submodule_free when done with the submodule.

\n", + "comments": "

Given either the submodule name or path (they are usually the same), this\n returns a structure describing the submodule.

\n\n

There are two expected error scenarios:

\n\n
    \n
  • The submodule is not mentioned in the HEAD, the index, and the config,\nbut does "exist" in the working directory (i.e. there is a subdirectory\nthat appears to be a Git repository). In this case, this function\nreturns GIT_EEXISTS to indicate a sub-repository exists but not in a\nstate where a git_submodule can be instantiated.
  • \n
  • The submodule is not mentioned in the HEAD, index, or config and the\nworking directory doesn't contain a value git repo at that path.\nThere may or may not be anything else at that path, but nothing that\nlooks like a submodule. In this case, this returns GIT_ENOTFOUND.
  • \n
\n\n

You must call git_submodule_free when done with the submodule.

\n", "group": "submodule" }, "git_submodule_free": { "type": "function", - "file": "submodule.h", - "line": 230, - "lineto": 230, + "file": "git2/submodule.h", + "line": 231, + "lineto": 231, "args": [ { "name": "submodule", @@ -20319,9 +21188,9 @@ }, "git_submodule_foreach": { "type": "function", - "file": "submodule.h", - "line": 250, - "lineto": 253, + "file": "git2/submodule.h", + "line": 251, + "lineto": 254, "args": [ { "name": "repo", @@ -20346,7 +21215,7 @@ "comment": " 0 on success, -1 on error, or non-zero return value of callback" }, "description": "

Iterate over all tracked submodules of a repository.

\n", - "comments": "

See the note on git_submodule above. This iterates over the tracked submodules as described therein.

\n\n

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", + "comments": "

See the note on git_submodule above. This iterates over the tracked\n submodules as described therein.

\n\n

If you are concerned about items in the working directory that look like\n submodules but are not tracked, the diff API will generate a diff record\n for workdir items that look like submodules but are not tracked, showing\n them as added in the workdir. Also, the status API will treat the entire\n subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.

\n", "group": "submodule", "examples": { "status.c": [ @@ -20356,9 +21225,9 @@ }, "git_submodule_add_setup": { "type": "function", - "file": "submodule.h", - "line": 280, - "lineto": 285, + "file": "git2/submodule.h", + "line": 281, + "lineto": 286, "args": [ { "name": "out", @@ -20393,14 +21262,14 @@ "comment": " 0 on success, GIT_EEXISTS if submodule already exists,\n -1 on other errors." }, "description": "

Set up a new git submodule for checkout.

\n", - "comments": "

This does "git submodule add" up to the fetch and checkout of the submodule contents. It preps a new submodule, creates an entry in .gitmodules and creates an empty initialized repository either at the given path in the working directory or in .git/modules with a gitlink from the working directory to the new repo.

\n\n

To fully emulate "git submodule add" call this function, then open the submodule repo and perform the clone step as needed. Lastly, call git_submodule_add_finalize() to wrap up adding the new submodule and .gitmodules to the index to be ready to commit.

\n\n

You must call git_submodule_free on the submodule object when done.

\n", + "comments": "

This does "git submodule add" up to the fetch and checkout of the\n submodule contents. It preps a new submodule, creates an entry in\n .gitmodules and creates an empty initialized repository either at the\n given path in the working directory or in .git/modules with a gitlink\n from the working directory to the new repo.

\n\n

To fully emulate "git submodule add" call this function, then open the\n submodule repo and perform the clone step as needed. Lastly, call\n git_submodule_add_finalize() to wrap up adding the new submodule and\n .gitmodules to the index to be ready to commit.

\n\n

You must call git_submodule_free on the submodule object when done.

\n", "group": "submodule" }, "git_submodule_add_finalize": { "type": "function", - "file": "submodule.h", - "line": 297, - "lineto": 297, + "file": "git2/submodule.h", + "line": 298, + "lineto": 298, "args": [ { "name": "submodule", @@ -20415,14 +21284,14 @@ "comment": null }, "description": "

Resolve the setup of a new git submodule.

\n", - "comments": "

This should be called on a submodule once you have called add setup 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", + "comments": "

This should be called on a submodule once you have called add setup\n and done the clone of the submodule. This adds the .gitmodules file\n and the newly cloned submodule to the index to be ready to be committed\n (but doesn't actually do the commit).

\n", "group": "submodule" }, "git_submodule_add_to_index": { "type": "function", - "file": "submodule.h", - "line": 309, - "lineto": 311, + "file": "git2/submodule.h", + "line": 310, + "lineto": 312, "args": [ { "name": "submodule", @@ -20447,9 +21316,9 @@ }, "git_submodule_owner": { "type": "function", - "file": "submodule.h", - "line": 324, - "lineto": 324, + "file": "git2/submodule.h", + "line": 325, + "lineto": 325, "args": [ { "name": "submodule", @@ -20464,14 +21333,14 @@ "comment": " Pointer to `git_repository`" }, "description": "

Get the containing repository for a submodule.

\n", - "comments": "

This returns a pointer to the repository that contains the submodule. This is a just a reference to the repository that was passed to the original git_submodule_lookup() call, so if that repository has been freed, then this may be a dangling reference.

\n", + "comments": "

This returns a pointer to the repository that contains the submodule.\n This is a just a reference to the repository that was passed to the\n original git_submodule_lookup() call, so if that repository has been\n freed, then this may be a dangling reference.

\n", "group": "submodule" }, "git_submodule_name": { "type": "function", - "file": "submodule.h", - "line": 332, - "lineto": 332, + "file": "git2/submodule.h", + "line": 333, + "lineto": 333, "args": [ { "name": "submodule", @@ -20496,9 +21365,9 @@ }, "git_submodule_path": { "type": "function", - "file": "submodule.h", - "line": 343, - "lineto": 343, + "file": "git2/submodule.h", + "line": 344, + "lineto": 344, "args": [ { "name": "submodule", @@ -20513,7 +21382,7 @@ "comment": " Pointer to the submodule path" }, "description": "

Get the path to the submodule.

\n", - "comments": "

The path is almost always the same as the submodule name, but the two are actually not required to match.

\n", + "comments": "

The path is almost always the same as the submodule name, but the\n two are actually not required to match.

\n", "group": "submodule", "examples": { "status.c": [ @@ -20523,9 +21392,9 @@ }, "git_submodule_url": { "type": "function", - "file": "submodule.h", - "line": 351, - "lineto": 351, + "file": "git2/submodule.h", + "line": 352, + "lineto": 352, "args": [ { "name": "submodule", @@ -20545,9 +21414,9 @@ }, "git_submodule_resolve_url": { "type": "function", - "file": "submodule.h", - "line": 361, - "lineto": 361, + "file": "git2/submodule.h", + "line": 362, + "lineto": 362, "args": [ { "name": "out", @@ -20577,9 +21446,9 @@ }, "git_submodule_branch": { "type": "function", - "file": "submodule.h", - "line": 369, - "lineto": 369, + "file": "git2/submodule.h", + "line": 370, + "lineto": 370, "args": [ { "name": "submodule", @@ -20599,9 +21468,9 @@ }, "git_submodule_set_branch": { "type": "function", - "file": "submodule.h", - "line": 382, - "lineto": 382, + "file": "git2/submodule.h", + "line": 383, + "lineto": 383, "args": [ { "name": "repo", @@ -20626,14 +21495,14 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set the branch for the submodule in the configuration

\n", - "comments": "

After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.

\n", + "comments": "

After calling this, you may wish to call git_submodule_sync() to\n write the changes to the checked out submodule repository.

\n", "group": "submodule" }, "git_submodule_set_url": { "type": "function", - "file": "submodule.h", - "line": 396, - "lineto": 396, + "file": "git2/submodule.h", + "line": 397, + "lineto": 397, "args": [ { "name": "repo", @@ -20658,14 +21527,14 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set the URL for the submodule in the configuration

\n", - "comments": "

After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.

\n", + "comments": "

After calling this, you may wish to call git_submodule_sync() to\n write the changes to the checked out submodule repository.

\n", "group": "submodule" }, "git_submodule_index_id": { "type": "function", - "file": "submodule.h", - "line": 404, - "lineto": 404, + "file": "git2/submodule.h", + "line": 405, + "lineto": 405, "args": [ { "name": "submodule", @@ -20685,9 +21554,9 @@ }, "git_submodule_head_id": { "type": "function", - "file": "submodule.h", - "line": 412, - "lineto": 412, + "file": "git2/submodule.h", + "line": 413, + "lineto": 413, "args": [ { "name": "submodule", @@ -20707,9 +21576,9 @@ }, "git_submodule_wd_id": { "type": "function", - "file": "submodule.h", - "line": 425, - "lineto": 425, + "file": "git2/submodule.h", + "line": 426, + "lineto": 426, "args": [ { "name": "submodule", @@ -20724,14 +21593,14 @@ "comment": " Pointer to git_oid or NULL if submodule is not checked out." }, "description": "

Get the OID for the submodule in the current working directory.

\n", - "comments": "

This returns the OID that corresponds to looking up 'HEAD' in the checked out submodule. If there are pending changes in the index or anything else, this won't notice that. You should call git_submodule_status() for a more complete picture about the state of the working directory.

\n", + "comments": "

This returns the OID that corresponds to looking up 'HEAD' in the checked\n out submodule. If there are pending changes in the index or anything\n else, this won't notice that. You should call git_submodule_status()\n for a more complete picture about the state of the working directory.

\n", "group": "submodule" }, "git_submodule_ignore": { "type": "function", - "file": "submodule.h", - "line": 450, - "lineto": 451, + "file": "git2/submodule.h", + "line": 451, + "lineto": 452, "args": [ { "name": "submodule", @@ -20746,14 +21615,14 @@ "comment": " The current git_submodule_ignore_t valyue what will be used for\n this submodule." }, "description": "

Get the ignore rule that will be used for the submodule.

\n", - "comments": "

These values control the behavior of git_submodule_status() for this submodule. There are four ignore values:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_NONE will consider any change to the contents of the submodule from a clean checkout to be dirty, including the addition of untracked files. This is the default if unspecified. - GIT_SUBMODULE_IGNORE_UNTRACKED examines the contents of the working tree (i.e. call git_status_foreach() on the submodule) but UNTRACKED files will not count as making the submodule dirty. - GIT_SUBMODULE_IGNORE_DIRTY means to only check if the HEAD of the submodule has moved for status. This is fast since it does not need to scan the working tree of the submodule at all. - GIT_SUBMODULE_IGNORE_ALL means not to open the submodule repo. The working directory will be consider clean so long as there is a checked out version present.
  • \n
\n", + "comments": "

These values control the behavior of git_submodule_status() for this\n submodule. There are four ignore values:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_NONE will consider any change to the contents\nof the submodule from a clean checkout to be dirty, including the\naddition of untracked files. This is the default if unspecified.
  • \n
  • GIT_SUBMODULE_IGNORE_UNTRACKED examines the contents of the\nworking tree (i.e. call git_status_foreach() on the submodule) but\nUNTRACKED files will not count as making the submodule dirty.
  • \n
  • GIT_SUBMODULE_IGNORE_DIRTY means to only check if the HEAD of the\nsubmodule has moved for status. This is fast since it does not need to\nscan the working tree of the submodule at all.
  • \n
  • GIT_SUBMODULE_IGNORE_ALL means not to open the submodule repo.\nThe working directory will be consider clean so long as there is a\nchecked out version present.
  • \n
\n", "group": "submodule" }, "git_submodule_set_ignore": { "type": "function", - "file": "submodule.h", - "line": 463, - "lineto": 466, + "file": "git2/submodule.h", + "line": 464, + "lineto": 467, "args": [ { "name": "repo", @@ -20783,9 +21652,9 @@ }, "git_submodule_update_strategy": { "type": "function", - "file": "submodule.h", - "line": 478, - "lineto": 479, + "file": "git2/submodule.h", + "line": 479, + "lineto": 480, "args": [ { "name": "submodule", @@ -20800,14 +21669,14 @@ "comment": " The current git_submodule_update_t value that will be used\n for this submodule." }, "description": "

Get the update rule that will be used for the submodule.

\n", - "comments": "

This value controls the behavior of the git submodule update command. There are four useful values documented with git_submodule_update_t.

\n", + "comments": "

This value controls the behavior of the git submodule update command.\n There are four useful values documented with git_submodule_update_t.

\n", "group": "submodule" }, "git_submodule_set_update": { "type": "function", - "file": "submodule.h", - "line": 491, - "lineto": 494, + "file": "git2/submodule.h", + "line": 492, + "lineto": 495, "args": [ { "name": "repo", @@ -20837,9 +21706,9 @@ }, "git_submodule_fetch_recurse_submodules": { "type": "function", - "file": "submodule.h", - "line": 507, - "lineto": 508, + "file": "git2/submodule.h", + "line": 508, + "lineto": 509, "args": [ { "name": "submodule", @@ -20854,14 +21723,14 @@ "comment": " 0 if fetchRecurseSubmodules is false, 1 if true" }, "description": "

Read the fetchRecurseSubmodules rule for a submodule.

\n", - "comments": "

This accesses the submodule..fetchRecurseSubmodules value for the submodule that controls fetching behavior for the submodule.

\n\n

Note that at this time, libgit2 does not honor this setting and the fetch functionality current ignores submodules.

\n", + "comments": "

This accesses the submodule.\n<name

\n\n
\n

.fetchRecurseSubmodules value for\n the submodule that controls fetching behavior for the submodule.

\n
\n\n

Note that at this time, libgit2 does not honor this setting and the\n fetch functionality current ignores submodules.

\n", "group": "submodule" }, "git_submodule_set_fetch_recurse_submodules": { "type": "function", - "file": "submodule.h", - "line": 520, - "lineto": 523, + "file": "git2/submodule.h", + "line": 521, + "lineto": 524, "args": [ { "name": "repo", @@ -20891,9 +21760,9 @@ }, "git_submodule_init": { "type": "function", - "file": "submodule.h", - "line": 538, - "lineto": 538, + "file": "git2/submodule.h", + "line": 539, + "lineto": 539, "args": [ { "name": "submodule", @@ -20913,14 +21782,14 @@ "comment": " 0 on success, \n<\n0 on failure." }, "description": "

Copy submodule info into ".git/config" file.

\n", - "comments": "

Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.

\n", + "comments": "

Just like "git submodule init", this copies information about the\n submodule into ".git/config". You can use the accessor functions\n above to alter the in-memory git_submodule object and control what\n is written to the config, overriding what is in .gitmodules.

\n", "group": "submodule" }, "git_submodule_repo_init": { "type": "function", - "file": "submodule.h", - "line": 553, - "lineto": 556, + "file": "git2/submodule.h", + "line": 554, + "lineto": 557, "args": [ { "name": "out", @@ -20945,14 +21814,14 @@ "comment": " 0 on success, \n<\n0 on failure." }, "description": "

Set up the subrepository for a submodule in preparation for clone.

\n", - "comments": "

This function can be called to init and set up a submodule repository from a submodule in preparation to clone it from its remote.

\n", + "comments": "

This function can be called to init and set up a submodule\n repository from a submodule in preparation to clone it from\n its remote.

\n", "group": "submodule" }, "git_submodule_sync": { "type": "function", - "file": "submodule.h", - "line": 566, - "lineto": 566, + "file": "git2/submodule.h", + "line": 567, + "lineto": 567, "args": [ { "name": "submodule", @@ -20967,14 +21836,14 @@ "comment": null }, "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", + "comments": "

This copies the information about the submodules URL into the checked out\n submodule config, acting like "git submodule sync". This is useful if\n you have altered the URL for the submodule (or it has been altered by a\n fetch of upstream changes) and you need to update your local repo.

\n", "group": "submodule" }, "git_submodule_open": { "type": "function", - "file": "submodule.h", - "line": 580, - "lineto": 582, + "file": "git2/submodule.h", + "line": 581, + "lineto": 583, "args": [ { "name": "repo", @@ -20994,14 +21863,14 @@ "comment": " 0 on success, \n<\n0 if submodule repo could not be opened." }, "description": "

Open the repository for a submodule.

\n", - "comments": "

This is a newly opened repository object. The caller is responsible for calling git_repository_free() on it when done. Multiple calls to this function will return distinct git_repository objects. This will only work if the submodule is checked out into the working directory.

\n", + "comments": "

This is a newly opened repository object. The caller is responsible for\n calling git_repository_free() on it when done. Multiple calls to this\n function will return distinct git_repository objects. This will only\n work if the submodule is checked out into the working directory.

\n", "group": "submodule" }, "git_submodule_reload": { "type": "function", - "file": "submodule.h", - "line": 594, - "lineto": 594, + "file": "git2/submodule.h", + "line": 595, + "lineto": 595, "args": [ { "name": "submodule", @@ -21021,14 +21890,14 @@ "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", + "comments": "

Call this to reread cached submodule information for this submodule if\n you have reason to believe that it has changed.

\n", "group": "submodule" }, "git_submodule_status": { "type": "function", - "file": "submodule.h", - "line": 610, - "lineto": 614, + "file": "git2/submodule.h", + "line": 611, + "lineto": 615, "args": [ { "name": "status", @@ -21058,7 +21927,7 @@ "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.

\n", + "comments": "

This looks at a submodule and tries to determine the status. It\n will return a combination of the GIT_SUBMODULE_STATUS values above.\n How deeply it examines the working directory to do this will depend\n on the git_submodule_ignore_t value for the submodule.

\n", "group": "submodule", "examples": { "status.c": [ @@ -21068,9 +21937,9 @@ }, "git_submodule_location": { "type": "function", - "file": "submodule.h", - "line": 630, - "lineto": 632, + "file": "git2/submodule.h", + "line": 631, + "lineto": 633, "args": [ { "name": "location_status", @@ -21090,12 +21959,56 @@ "comment": " 0 on success, \n<\n0 on error" }, "description": "

Get the locations of submodule information.

\n", - "comments": "

This is a bit like a very lightweight version of git_submodule_status. It just returns a made of the first four submodule status values (i.e. the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.). This can be useful if you want to know if the submodule is present in the working directory at this point in time, etc.

\n", + "comments": "

This is a bit like a very lightweight version of git_submodule_status.\n It just returns a made of the first four submodule status values (i.e.\n the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the\n submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.).\n This can be useful if you want to know if the submodule is present in the\n working directory at this point in time, etc.

\n", "group": "submodule" }, + "git_stdalloc_init_allocator": { + "type": "function", + "file": "git2/sys/alloc.h", + "line": 85, + "lineto": 85, + "args": [ + { + "name": "allocator", + "type": "git_allocator *", + "comment": "The allocator that is to be initialized." + } + ], + "argline": "git_allocator *allocator", + "sig": "git_allocator *", + "return": { + "type": "int", + "comment": " An error code or 0." + }, + "description": "

Initialize the allocator structure to use the stdalloc pointer.

\n", + "comments": "

Set up the structure so that all of its members are using the standard\n "stdalloc" allocator functions. The structure can then be used with\n git_allocator_setup.

\n", + "group": "stdalloc" + }, + "git_win32_crtdbg_init_allocator": { + "type": "function", + "file": "git2/sys/alloc.h", + "line": 97, + "lineto": 97, + "args": [ + { + "name": "allocator", + "type": "git_allocator *", + "comment": "The allocator that is to be initialized." + } + ], + "argline": "git_allocator *allocator", + "sig": "git_allocator *", + "return": { + "type": "int", + "comment": " An error code or 0." + }, + "description": "

Initialize the allocator structure to use the crtdbg pointer.

\n", + "comments": "

Set up the structure so that all of its members are using the "crtdbg"\n allocator functions. Note that this allocator is only available on Windows\n platforms and only if libgit2 is being compiled with "-DMSVC_CRTDBG".

\n", + "group": "win32" + }, "git_commit_create_from_ids": { "type": "function", - "file": "sys/commit.h", + "file": "git2/sys/commit.h", "line": 34, "lineto": 44, "args": [ @@ -21157,12 +22070,12 @@ "comment": null }, "description": "

Create new commit in the repository from a list of git_oid values.

\n", - "comments": "

See documentation for git_commit_create() for information about the parameters, as the meaning is identical excepting that tree and parents now take git_oid. This is a dangerous API in that nor the tree, neither the parents list of git_oids are checked for validity.

\n", + "comments": "

See documentation for git_commit_create() for information about the\n parameters, as the meaning is identical excepting that tree and\n parents now take git_oid. This is a dangerous API in that nor\n the tree, neither the parents list of git_oids are checked for\n validity.

\n", "group": "commit" }, "git_commit_create_from_callback": { "type": "function", - "file": "sys/commit.h", + "file": "git2/sys/commit.h", "line": 66, "lineto": 76, "args": [ @@ -21224,12 +22137,12 @@ "comment": null }, "description": "

Create a new commit in the repository with an callback to supply parents.

\n", - "comments": "

See documentation for git_commit_create() for information about the parameters, as the meaning is identical excepting that tree takes a git_oid and doesn't check for validity, and parent_cb is invoked with parent_payload and should return git_oid values or NULL to indicate that all parents are accounted for.

\n", + "comments": "

See documentation for git_commit_create() for information about the\n parameters, as the meaning is identical excepting that tree takes a\n git_oid and doesn't check for validity, and parent_cb is invoked\n with parent_payload and should return git_oid values or NULL to\n indicate that all parents are accounted for.

\n", "group": "commit" }, "git_config_init_backend": { "type": "function", - "file": "sys/config.h", + "file": "git2/sys/config.h", "line": 97, "lineto": 99, "args": [ @@ -21256,7 +22169,7 @@ }, "git_config_add_backend": { "type": "function", - "file": "sys/config.h", + "file": "git2/sys/config.h", "line": 121, "lineto": 126, "args": [ @@ -21293,12 +22206,12 @@ "comment": " 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0), or error code" }, "description": "

Add a generic config file instance to an existing config

\n", - "comments": "

Note that the configuration object will free the file automatically.

\n\n

Further queries on this config object will access each of the config file instances in order (instances with a higher priority level will be accessed first).

\n", + "comments": "

Note that the configuration object will free the file\n automatically.

\n\n

Further queries on this config object will access each\n of the config file instances in order (instances with\n a higher priority level will be accessed first).

\n", "group": "config" }, "git_diff_print_callback__to_buf": { "type": "function", - "file": "sys/diff.h", + "file": "git2/sys/diff.h", "line": 37, "lineto": 41, "args": [ @@ -21330,12 +22243,12 @@ "comment": null }, "description": "

Diff print callback that writes to a git_buf.

\n", - "comments": "

This function is provided not for you to call it directly, but instead so you can use it as a function pointer to the git_diff_print or git_patch_print APIs. When using those APIs, you specify a callback to actually handle the diff and/or patch data.

\n\n

Use this callback to easily write that data to a git_buf buffer. You must pass a git_buf * value as the payload to the git_diff_print and/or git_patch_print function. The data will be appended to the buffer (after any existing content).

\n", + "comments": "

This function is provided not for you to call it directly, but instead\n so you can use it as a function pointer to the git_diff_print or\n git_patch_print APIs. When using those APIs, you specify a callback\n to actually handle the diff and/or patch data.

\n\n

Use this callback to easily write that data to a git_buf buffer. You\n must pass a git_buf * value as the payload to the git_diff_print\n and/or git_patch_print function. The data will be appended to the\n buffer (after any existing content).

\n", "group": "diff" }, "git_diff_print_callback__to_file_handle": { "type": "function", - "file": "sys/diff.h", + "file": "git2/sys/diff.h", "line": 57, "lineto": 61, "args": [ @@ -21367,12 +22280,12 @@ "comment": null }, "description": "

Diff print callback that writes to stdio FILE handle.

\n", - "comments": "

This function is provided not for you to call it directly, but instead so you can use it as a function pointer to the git_diff_print or git_patch_print APIs. When using those APIs, you specify a callback to actually handle the diff and/or patch data.

\n\n

Use this callback to easily write that data to a stdio FILE handle. You must pass a FILE * value (such as stdout or stderr or the return value from fopen()) as the payload to the git_diff_print and/or git_patch_print function. If you pass NULL, this will write data to stdout.

\n", + "comments": "

This function is provided not for you to call it directly, but instead\n so you can use it as a function pointer to the git_diff_print or\n git_patch_print APIs. When using those APIs, you specify a callback\n to actually handle the diff and/or patch data.

\n\n

Use this callback to easily write that data to a stdio FILE handle. You\n must pass a FILE * value (such as stdout or stderr or the return\n value from fopen()) as the payload to the git_diff_print\n and/or git_patch_print function. If you pass NULL, this will write\n data to stdout.

\n", "group": "diff" }, "git_diff_get_perfdata": { "type": "function", - "file": "sys/diff.h", + "file": "git2/sys/diff.h", "line": 83, "lineto": 84, "args": [ @@ -21399,7 +22312,7 @@ }, "git_status_list_get_perfdata": { "type": "function", - "file": "sys/diff.h", + "file": "git2/sys/diff.h", "line": 89, "lineto": 90, "args": [ @@ -21426,7 +22339,7 @@ }, "git_filter_lookup": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 27, "lineto": 27, "args": [ @@ -21448,7 +22361,7 @@ }, "git_filter_list_new": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 57, "lineto": 61, "args": [ @@ -21480,12 +22393,12 @@ "comment": null }, "description": "

Create a new empty filter list

\n", - "comments": "

Normally you won't use this because git_filter_list_load will create the filter list for you, but you can use this in combination with the git_filter_lookup and git_filter_list_push functions to assemble your own chains of filters.

\n", + "comments": "

Normally you won't use this because git_filter_list_load will create\n the filter list for you, but you can use this in combination with the\n git_filter_lookup and git_filter_list_push functions to assemble\n your own chains of filters.

\n", "group": "filter" }, "git_filter_list_push": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 76, "lineto": 77, "args": [ @@ -21512,12 +22425,12 @@ "comment": null }, "description": "

Add a filter to a filter list with the given payload.

\n", - "comments": "

Normally you won't have to do this because the filter list is created by calling the "check" function on registered filters when the filter attributes are set, but this does allow more direct manipulation of filter lists when desired.

\n\n

Note that normally the "check" function can set up a payload for the filter. Using this function, you can either pass in a payload if you know the expected payload format, or you can pass NULL. Some filters may fail with a NULL payload. Good luck!

\n", + "comments": "

Normally you won't have to do this because the filter list is created\n by calling the "check" function on registered filters when the filter\n attributes are set, but this does allow more direct manipulation of\n filter lists when desired.

\n\n

Note that normally the "check" function can set up a payload for the\n filter. Using this function, you can either pass in a payload if you\n know the expected payload format, or you can pass NULL. Some filters\n may fail with a NULL payload. Good luck!

\n", "group": "filter" }, "git_filter_list_length": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 90, "lineto": 90, "args": [ @@ -21534,12 +22447,12 @@ "comment": " The number of filters in the list" }, "description": "

Look up how many filters are in the list

\n", - "comments": "

We will attempt to apply all of these filters to any data passed in, but note that the filter apply action still has the option of skipping data that is passed in (for example, the CRLF filter will skip data that appears to be binary).

\n", + "comments": "

We will attempt to apply all of these filters to any data passed in,\n but note that the filter apply action still has the option of skipping\n data that is passed in (for example, the CRLF filter will skip data\n that appears to be binary).

\n", "group": "filter" }, "git_filter_source_repo": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 100, "lineto": 100, "args": [ @@ -21561,7 +22474,7 @@ }, "git_filter_source_path": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 105, "lineto": 105, "args": [ @@ -21583,7 +22496,7 @@ }, "git_filter_source_filemode": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 111, "lineto": 111, "args": [ @@ -21605,7 +22518,7 @@ }, "git_filter_source_id": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 118, "lineto": 118, "args": [ @@ -21627,7 +22540,7 @@ }, "git_filter_source_mode": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 123, "lineto": 123, "args": [ @@ -21649,7 +22562,7 @@ }, "git_filter_source_flags": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 128, "lineto": 128, "args": [ @@ -21671,7 +22584,7 @@ }, "git_filter_init": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 284, "lineto": 284, "args": [ @@ -21698,7 +22611,7 @@ }, "git_filter_register": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 312, "lineto": 313, "args": [ @@ -21725,12 +22638,12 @@ "comment": " 0 on successful registry, error code \n<\n0 on failure" }, "description": "

Register a filter under a given name with a given priority.

\n", - "comments": "

As mentioned elsewhere, the initialize callback will not be invoked immediately. It is deferred until the filter is used in some way.

\n\n

A filter's attribute checks and check and apply callbacks will be issued in order of priority on smudge (to workdir), and in reverse order of priority on clean (to odb).

\n\n

Two filters are preregistered with libgit2: - GIT_FILTER_CRLF with priority 0 - GIT_FILTER_IDENT with priority 100

\n\n

Currently the filter registry is not thread safe, so any registering or deregistering of filters must be done outside of any possible usage of the filters (i.e. during application setup or shutdown).

\n", + "comments": "

As mentioned elsewhere, the initialize callback will not be invoked\n immediately. It is deferred until the filter is used in some way.

\n\n

A filter's attribute checks and check and apply callbacks will be\n issued in order of priority on smudge (to workdir), and in reverse\n order of priority on clean (to odb).

\n\n

Two filters are preregistered with libgit2:\n - GIT_FILTER_CRLF with priority 0\n - GIT_FILTER_IDENT with priority 100

\n\n

Currently the filter registry is not thread safe, so any registering or\n deregistering of filters must be done outside of any possible usage of\n the filters (i.e. during application setup or shutdown).

\n", "group": "filter" }, "git_filter_unregister": { "type": "function", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 328, "lineto": 328, "args": [ @@ -21747,12 +22660,12 @@ "comment": " 0 on success, error code \n<\n0 on failure" }, "description": "

Remove the filter with the given name

\n", - "comments": "

Attempting to remove the builtin libgit2 filters is not permitted and will return an error.

\n\n

Currently the filter registry is not thread safe, so any registering or deregistering of filters must be done outside of any possible usage of the filters (i.e. during application setup or shutdown).

\n", + "comments": "

Attempting to remove the builtin libgit2 filters is not permitted and\n will return an error.

\n\n

Currently the filter registry is not thread safe, so any registering or\n deregistering of filters must be done outside of any possible usage of\n the filters (i.e. during application setup or shutdown).

\n", "group": "filter" }, "git_hashsig_create": { "type": "function", - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "line": 62, "lineto": 66, "args": [ @@ -21784,12 +22697,12 @@ "comment": " 0 on success, GIT_EBUFS if the buffer doesn't contain enough data to\n compute a valid signature (unless GIT_HASHSIG_ALLOW_SMALL_FILES is set), or\n error code." }, "description": "

Compute a similarity signature for a text buffer

\n", - "comments": "

If you have passed the option GIT_HASHSIG_IGNORE_WHITESPACE, then the whitespace will be removed from the buffer while it is being processed, modifying the buffer in place. Sorry about that!

\n", + "comments": "

If you have passed the option GIT_HASHSIG_IGNORE_WHITESPACE, then the\n whitespace will be removed from the buffer while it is being processed,\n modifying the buffer in place. Sorry about that!

\n", "group": "hashsig" }, "git_hashsig_create_fromfile": { "type": "function", - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "line": 81, "lineto": 84, "args": [ @@ -21816,12 +22729,12 @@ "comment": " 0 on success, GIT_EBUFS if the buffer doesn't contain enough data to\n compute a valid signature (unless GIT_HASHSIG_ALLOW_SMALL_FILES is set), or\n error code." }, "description": "

Compute a similarity signature for a text file

\n", - "comments": "

This walks through the file, only loading a maximum of 4K of file data at a time. Otherwise, it acts just like git_hashsig_create.

\n", + "comments": "

This walks through the file, only loading a maximum of 4K of file data at\n a time. Otherwise, it acts just like git_hashsig_create.

\n", "group": "hashsig" }, "git_hashsig_free": { "type": "function", - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "line": 91, "lineto": 91, "args": [ @@ -21843,7 +22756,7 @@ }, "git_hashsig_compare": { "type": "function", - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "line": 100, "lineto": 102, "args": [ @@ -21868,9 +22781,331 @@ "comments": "", "group": "hashsig" }, + "git_index_name_entrycount": { + "type": "function", + "file": "git2/sys/index.h", + "line": 48, + "lineto": 48, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + } + ], + "argline": "git_index *index", + "sig": "git_index *", + "return": { + "type": "size_t", + "comment": " integer of count of current filename conflict entries" + }, + "description": "

Get the count of filename conflict entries currently in the index.

\n", + "comments": "", + "group": "index" + }, + "git_index_name_get_byindex": { + "type": "function", + "file": "git2/sys/index.h", + "line": 60, + "lineto": 61, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "n", + "type": "size_t", + "comment": "the position of the entry" + } + ], + "argline": "git_index *index, size_t n", + "sig": "git_index *::size_t", + "return": { + "type": "const git_index_name_entry *", + "comment": " a pointer to the filename conflict entry; NULL if out of bounds" + }, + "description": "

Get a filename conflict entry from the index.

\n", + "comments": "

The returned entry is read-only and should not be modified\n or freed by the caller.

\n", + "group": "index" + }, + "git_index_name_add": { + "type": "function", + "file": "git2/sys/index.h", + "line": 71, + "lineto": 72, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "ancestor", + "type": "const char *", + "comment": "the path of the file as it existed in the ancestor" + }, + { + "name": "ours", + "type": "const char *", + "comment": "the path of the file as it existed in our tree" + }, + { + "name": "theirs", + "type": "const char *", + "comment": "the path of the file as it existed in their tree" + } + ], + "argline": "git_index *index, const char *ancestor, const char *ours, const char *theirs", + "sig": "git_index *::const char *::const char *::const char *", + "return": { + "type": "int", + "comment": null + }, + "description": "

Record the filenames involved in a rename conflict.

\n", + "comments": "", + "group": "index" + }, + "git_index_name_clear": { + "type": "function", + "file": "git2/sys/index.h", + "line": 79, + "lineto": 79, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + } + ], + "argline": "git_index *index", + "sig": "git_index *", + "return": { + "type": "void", + "comment": null + }, + "description": "

Remove all filename conflict entries.

\n", + "comments": "", + "group": "index" + }, + "git_index_reuc_entrycount": { + "type": "function", + "file": "git2/sys/index.h", + "line": 96, + "lineto": 96, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + } + ], + "argline": "git_index *index", + "sig": "git_index *", + "return": { + "type": "size_t", + "comment": " integer of count of current resolve undo entries" + }, + "description": "

Get the count of resolve undo entries currently in the index.

\n", + "comments": "", + "group": "index" + }, + "git_index_reuc_find": { + "type": "function", + "file": "git2/sys/index.h", + "line": 107, + "lineto": 107, + "args": [ + { + "name": "at_pos", + "type": "size_t *", + "comment": "the address to which the position of the reuc entry is written (optional)" + }, + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "path", + "type": "const char *", + "comment": "path to search" + } + ], + "argline": "size_t *at_pos, git_index *index, const char *path", + "sig": "size_t *::git_index *::const char *", + "return": { + "type": "int", + "comment": " 0 if found, \n<\n 0 otherwise (GIT_ENOTFOUND)" + }, + "description": "

Finds the resolve undo entry that points to the given path in the Git\n index.

\n", + "comments": "", + "group": "index" + }, + "git_index_reuc_get_bypath": { + "type": "function", + "file": "git2/sys/index.h", + "line": 119, + "lineto": 119, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "path", + "type": "const char *", + "comment": "path to search" + } + ], + "argline": "git_index *index, const char *path", + "sig": "git_index *::const char *", + "return": { + "type": "const git_index_reuc_entry *", + "comment": " the resolve undo entry; NULL if not found" + }, + "description": "

Get a resolve undo entry from the index.

\n", + "comments": "

The returned entry is read-only and should not be modified\n or freed by the caller.

\n", + "group": "index" + }, + "git_index_reuc_get_byindex": { + "type": "function", + "file": "git2/sys/index.h", + "line": 131, + "lineto": 131, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "n", + "type": "size_t", + "comment": "the position of the entry" + } + ], + "argline": "git_index *index, size_t n", + "sig": "git_index *::size_t", + "return": { + "type": "const git_index_reuc_entry *", + "comment": " a pointer to the resolve undo entry; NULL if out of bounds" + }, + "description": "

Get a resolve undo entry from the index.

\n", + "comments": "

The returned entry is read-only and should not be modified\n or freed by the caller.

\n", + "group": "index" + }, + "git_index_reuc_add": { + "type": "function", + "file": "git2/sys/index.h", + "line": 155, + "lineto": 158, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "path", + "type": "const char *", + "comment": "filename to add" + }, + { + "name": "ancestor_mode", + "type": "int", + "comment": "mode of the ancestor file" + }, + { + "name": "ancestor_id", + "type": "const git_oid *", + "comment": "oid of the ancestor file" + }, + { + "name": "our_mode", + "type": "int", + "comment": "mode of our file" + }, + { + "name": "our_id", + "type": "const git_oid *", + "comment": "oid of our file" + }, + { + "name": "their_mode", + "type": "int", + "comment": "mode of their file" + }, + { + "name": "their_id", + "type": "const git_oid *", + "comment": "oid of their file" + } + ], + "argline": "git_index *index, const char *path, int ancestor_mode, const git_oid *ancestor_id, int our_mode, const git_oid *our_id, int their_mode, const git_oid *their_id", + "sig": "git_index *::const char *::int::const git_oid *::int::const git_oid *::int::const git_oid *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Adds a resolve undo entry for a file based on the given parameters.

\n", + "comments": "

The resolve undo entry contains the OIDs of files that were involved\n in a merge conflict after the conflict has been resolved. This allows\n conflicts to be re-resolved later.

\n\n

If there exists a resolve undo entry for the given path in the index,\n it will be removed.

\n\n

This method will fail in bare index instances.

\n", + "group": "index" + }, + "git_index_reuc_remove": { + "type": "function", + "file": "git2/sys/index.h", + "line": 167, + "lineto": 167, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + }, + { + "name": "n", + "type": "size_t", + "comment": "position of the resolve undo entry to remove" + } + ], + "argline": "git_index *index, size_t n", + "sig": "git_index *::size_t", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Remove an resolve undo entry from the index

\n", + "comments": "", + "group": "index" + }, + "git_index_reuc_clear": { + "type": "function", + "file": "git2/sys/index.h", + "line": 174, + "lineto": 174, + "args": [ + { + "name": "index", + "type": "git_index *", + "comment": "an existing index object" + } + ], + "argline": "git_index *index", + "sig": "git_index *", + "return": { + "type": "void", + "comment": null + }, + "description": "

Remove all resolve undo entries from the index

\n", + "comments": "", + "group": "index" + }, "git_mempack_new": { "type": "function", - "file": "sys/mempack.h", + "file": "git2/sys/mempack.h", "line": 45, "lineto": 45, "args": [ @@ -21886,13 +23121,13 @@ "type": "int", "comment": " 0 on success; error code otherwise" }, - "description": "
Instantiate a new mempack backend.\n
\n", - "comments": "
The backend must be added to an existing ODB with the highest   priority.\n\n    git_mempack_new(&mempacker);        git_repository_odb(&odb, repository);       git_odb_add_backend(odb, mempacker, 999);\n\nOnce the backend has been loaded, all writes to the ODB will    instead be queued in memory, and can be finalized with  `git_mempack_dump`.\n\nSubsequent reads will also be served from the in-memory store   to ensure consistency, until the memory store is dumped.\n
\n", + "description": "

Instantiate a new mempack backend.

\n", + "comments": "

The backend must be added to an existing ODB with the highest\n priority.

\n\n
 git_mempack_new(\n
\n\n

&mempacker\n);\n git_repository_odb(\n&odb\n, repository);\n git_odb_add_backend(odb, mempacker, 999);

\n\n

Once the backend has been loaded, all writes to the ODB will\n instead be queued in memory, and can be finalized with\n git_mempack_dump.

\n\n

Subsequent reads will also be served from the in-memory store\n to ensure consistency, until the memory store is dumped.

\n", "group": "mempack" }, "git_mempack_dump": { "type": "function", - "file": "sys/mempack.h", + "file": "git2/sys/mempack.h", "line": 68, "lineto": 68, "args": [ @@ -21918,13 +23153,13 @@ "type": "int", "comment": " 0 on success; error code otherwise" }, - "description": "
Dump all the queued in-memory writes to a packfile.\n
\n", - "comments": "
The contents of the packfile will be stored in the given buffer.    It is the caller's responsibility to ensure that the generated  packfile is available to the repository (e.g. by writing it to disk, or doing something crazy like distributing it across   several copies of the repository over a network).\n\nOnce the generated packfile is available to the repository, call `git_mempack_reset` to cleanup the memory store.\n\nCalling `git_mempack_reset` before the packfile has been    written to disk will result in an inconsistent repository   (the objects in the memory store won't be accessible).\n
\n", + "description": "

Dump all the queued in-memory writes to a packfile.

\n", + "comments": "

The contents of the packfile will be stored in the given buffer.\n It is the caller's responsibility to ensure that the generated\n packfile is available to the repository (e.g. by writing it\n to disk, or doing something crazy like distributing it across\n several copies of the repository over a network).

\n\n

Once the generated packfile is available to the repository,\n call git_mempack_reset to cleanup the memory store.

\n\n

Calling git_mempack_reset before the packfile has been\n written to disk will result in an inconsistent repository\n (the objects in the memory store won't be accessible).

\n", "group": "mempack" }, "git_mempack_reset": { "type": "function", - "file": "sys/mempack.h", + "file": "git2/sys/mempack.h", "line": 82, "lineto": 82, "args": [ @@ -21940,13 +23175,194 @@ "type": "void", "comment": null }, - "description": "
Reset the memory packer by clearing all the queued objects.\n
\n", - "comments": "
This assumes that `git_mempack_dump` has been called before to  store all the queued objects into a single packfile.\n\nAlternatively, call `reset` without a previous dump to "undo"   all the recently written objects, giving transaction-like   semantics to the Git repository.\n
\n", + "description": "

Reset the memory packer by clearing all the queued objects.

\n", + "comments": "

This assumes that git_mempack_dump has been called before to\n store all the queued objects into a single packfile.

\n\n

Alternatively, call reset without a previous dump to "undo"\n all the recently written objects, giving transaction-like\n semantics to the Git repository.

\n", "group": "mempack" }, + "git_merge_driver_lookup": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 32, + "lineto": 32, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": "The name of the merge driver" + } + ], + "argline": "const char *name", + "sig": "const char *", + "return": { + "type": "git_merge_driver *", + "comment": " Pointer to the merge driver object or NULL if not found" + }, + "description": "

Look up a merge driver by name

\n", + "comments": "", + "group": "merge" + }, + "git_merge_driver_source_repo": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 44, + "lineto": 45, + "args": [ + { + "name": "src", + "type": "const git_merge_driver_source *", + "comment": null + } + ], + "argline": "const git_merge_driver_source *src", + "sig": "const git_merge_driver_source *", + "return": { + "type": "const git_repository *", + "comment": null + }, + "description": "

Get the repository that the source data is coming from.

\n", + "comments": "", + "group": "merge" + }, + "git_merge_driver_source_ancestor": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 48, + "lineto": 49, + "args": [ + { + "name": "src", + "type": "const git_merge_driver_source *", + "comment": null + } + ], + "argline": "const git_merge_driver_source *src", + "sig": "const git_merge_driver_source *", + "return": { + "type": "const git_index_entry *", + "comment": null + }, + "description": "

Gets the ancestor of the file to merge.

\n", + "comments": "", + "group": "merge" + }, + "git_merge_driver_source_ours": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 52, + "lineto": 53, + "args": [ + { + "name": "src", + "type": "const git_merge_driver_source *", + "comment": null + } + ], + "argline": "const git_merge_driver_source *src", + "sig": "const git_merge_driver_source *", + "return": { + "type": "const git_index_entry *", + "comment": null + }, + "description": "

Gets the ours side of the file to merge.

\n", + "comments": "", + "group": "merge" + }, + "git_merge_driver_source_theirs": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 56, + "lineto": 57, + "args": [ + { + "name": "src", + "type": "const git_merge_driver_source *", + "comment": null + } + ], + "argline": "const git_merge_driver_source *src", + "sig": "const git_merge_driver_source *", + "return": { + "type": "const git_index_entry *", + "comment": null + }, + "description": "

Gets the theirs side of the file to merge.

\n", + "comments": "", + "group": "merge" + }, + "git_merge_driver_source_file_options": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 60, + "lineto": 61, + "args": [ + { + "name": "src", + "type": "const git_merge_driver_source *", + "comment": null + } + ], + "argline": "const git_merge_driver_source *src", + "sig": "const git_merge_driver_source *", + "return": { + "type": "const git_merge_file_options *", + "comment": null + }, + "description": "

Gets the merge file options that the merge was invoked with

\n", + "comments": "", + "group": "merge" + }, + "git_merge_driver_register": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 162, + "lineto": 163, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": "The name of this driver to match an attribute. Attempting\n \t\t\tto register with an in-use name will return GIT_EEXISTS." + }, + { + "name": "driver", + "type": "git_merge_driver *", + "comment": "The merge driver definition. This pointer will be stored\n\t\t\tas is by libgit2 so it must be a durable allocation (either\n\t\t\tstatic or on the heap)." + } + ], + "argline": "const char *name, git_merge_driver *driver", + "sig": "const char *::git_merge_driver *", + "return": { + "type": "int", + "comment": " 0 on successful registry, error code \n<\n0 on failure" + }, + "description": "

Register a merge driver under a given name.

\n", + "comments": "

As mentioned elsewhere, the initialize callback will not be invoked\n immediately. It is deferred until the driver is used in some way.

\n\n

Currently the merge driver registry is not thread safe, so any\n registering or deregistering of merge drivers must be done outside of\n any possible usage of the drivers (i.e. during application setup or\n shutdown).

\n", + "group": "merge" + }, + "git_merge_driver_unregister": { + "type": "function", + "file": "git2/sys/merge.h", + "line": 178, + "lineto": 178, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": "The name under which the merge driver was registered" + } + ], + "argline": "const char *name", + "sig": "const char *", + "return": { + "type": "int", + "comment": " 0 on success, error code \n<\n0 on failure" + }, + "description": "

Remove the merge driver with the given name.

\n", + "comments": "

Attempting to remove the builtin libgit2 merge drivers is not permitted\n and will return an error.

\n\n

Currently the merge driver registry is not thread safe, so any\n registering or deregistering of drivers must be done outside of any\n possible usage of the drivers (i.e. during application setup or shutdown).

\n", + "group": "merge" + }, "git_odb_init_backend": { "type": "function", - "file": "sys/odb_backend.h", + "file": "git2/sys/odb_backend.h", "line": 116, "lineto": 118, "args": [ @@ -21971,9 +23387,36 @@ "comments": "", "group": "odb" }, + "git_odb_backend_malloc": { + "type": "function", + "file": "git2/sys/odb_backend.h", + "line": 120, + "lineto": 120, + "args": [ + { + "name": "backend", + "type": "git_odb_backend *", + "comment": null + }, + { + "name": "len", + "type": "size_t", + "comment": null + } + ], + "argline": "git_odb_backend *backend, size_t len", + "sig": "git_odb_backend *::size_t", + "return": { + "type": "void *", + "comment": null + }, + "description": "", + "comments": "", + "group": "odb" + }, "git_openssl_set_locking": { "type": "function", - "file": "sys/openssl.h", + "file": "git2/sys/openssl.h", "line": 34, "lineto": 34, "args": [], @@ -21984,12 +23427,49 @@ "comment": " 0 on success, -1 if there are errors or if libgit2 was not\n built with OpenSSL and threading support." }, "description": "

Initialize the OpenSSL locks

\n", - "comments": "

OpenSSL requires the application to determine how it performs locking.

\n\n

This is a last-resort convenience function which libgit2 provides for allocating and initializing the locks as well as setting the locking function to use the system's native locking functions.

\n\n

The locking function will be cleared and the memory will be freed when you call git_threads_sutdown().

\n\n

If your programming language has an OpenSSL package/bindings, it likely sets up locking. You should very strongly prefer that over this function.

\n", + "comments": "

OpenSSL requires the application to determine how it performs\n locking.

\n\n

This is a last-resort convenience function which libgit2 provides for\n allocating and initializing the locks as well as setting the\n locking function to use the system's native locking functions.

\n\n

The locking function will be cleared and the memory will be freed\n when you call git_threads_sutdown().

\n\n

If your programming language has an OpenSSL package/bindings, it\n likely sets up locking. You should very strongly prefer that over\n this function.

\n", "group": "openssl" }, + "git_path_is_gitfile": { + "type": "function", + "file": "git2/sys/path.h", + "line": 60, + "lineto": 60, + "args": [ + { + "name": "path", + "type": "const char *", + "comment": "the path component to check" + }, + { + "name": "pathlen", + "type": "size_t", + "comment": "the length of `path` that is to be checked" + }, + { + "name": "gitfile", + "type": "git_path_gitfile", + "comment": "which file to check against" + }, + { + "name": "fs", + "type": "git_path_fs", + "comment": "which filesystem-specific checks to use" + } + ], + "argline": "const char *path, size_t pathlen, git_path_gitfile gitfile, git_path_fs fs", + "sig": "const char *::size_t::git_path_gitfile::git_path_fs", + "return": { + "type": "int", + "comment": " 0 in case the file does not match, a positive value if\n it does; -1 in case of an error" + }, + "description": "

Check whether a path component corresponds to a .git$SUFFIX\n file.

\n", + "comments": "

As some filesystems do special things to filenames when\n writing files to disk, you cannot always do a plain string\n comparison to verify whether a file name matches an expected\n path or not. This function can do the comparison for you,\n depending on the filesystem you're on.

\n", + "group": "path" + }, "git_refdb_init_backend": { "type": "function", - "file": "sys/refdb_backend.h", + "file": "git2/sys/refdb_backend.h", "line": 183, "lineto": 185, "args": [ @@ -22016,7 +23496,7 @@ }, "git_refdb_backend_fs": { "type": "function", - "file": "sys/refdb_backend.h", + "file": "git2/sys/refdb_backend.h", "line": 198, "lineto": 200, "args": [ @@ -22038,12 +23518,12 @@ "comment": " 0 on success, \n<\n0 error code on failure" }, "description": "

Constructors for default filesystem-based refdb backend

\n", - "comments": "

Under normal usage, this is called for you when the repository is opened / created, but you can use this to explicitly construct a filesystem refdb backend for a repository.

\n", + "comments": "

Under normal usage, this is called for you when the repository is\n opened / created, but you can use this to explicitly construct a\n filesystem refdb backend for a repository.

\n", "group": "refdb" }, "git_refdb_set_backend": { "type": "function", - "file": "sys/refdb_backend.h", + "file": "git2/sys/refdb_backend.h", "line": 212, "lineto": 214, "args": [ @@ -22065,12 +23545,50 @@ "comment": " 0 on success; error code otherwise" }, "description": "

Sets the custom backend to an existing reference DB

\n", - "comments": "

The git_refdb will take ownership of the git_refdb_backend so you should NOT free it after calling this function.

\n", + "comments": "

The git_refdb will take ownership of the git_refdb_backend so you\n should NOT free it after calling this function.

\n", "group": "refdb" }, + "git_reflog_entry__alloc": { + "type": "function", + "file": "git2/sys/reflog.h", + "line": 16, + "lineto": 16, + "args": [], + "argline": "", + "sig": "", + "return": { + "type": "git_reflog_entry *", + "comment": null + }, + "description": "", + "comments": "", + "group": "reflog" + }, + "git_reflog_entry__free": { + "type": "function", + "file": "git2/sys/reflog.h", + "line": 17, + "lineto": 17, + "args": [ + { + "name": "entry", + "type": "git_reflog_entry *", + "comment": null + } + ], + "argline": "git_reflog_entry *entry", + "sig": "git_reflog_entry *", + "return": { + "type": "void", + "comment": null + }, + "description": "", + "comments": "", + "group": "reflog" + }, "git_reference__alloc": { "type": "function", - "file": "sys/refs.h", + "file": "git2/sys/refs.h", "line": 31, "lineto": 34, "args": [ @@ -22102,7 +23620,7 @@ }, "git_reference__alloc_symbolic": { "type": "function", - "file": "sys/refs.h", + "file": "git2/sys/refs.h", "line": 43, "lineto": 45, "args": [ @@ -22129,7 +23647,7 @@ }, "git_repository_new": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 31, "lineto": 31, "args": [ @@ -22146,12 +23664,12 @@ "comment": " 0 on success, or an error code" }, "description": "

Create a new repository with neither backends nor config object

\n", - "comments": "

Note that this is only useful if you wish to associate the repository with a non-filesystem-backed object database and config store.

\n", + "comments": "

Note that this is only useful if you wish to associate the repository\n with a non-filesystem-backed object database and config store.

\n", "group": "repository" }, "git_repository__cleanup": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 44, "lineto": 44, "args": [ @@ -22168,12 +23686,12 @@ "comment": null }, "description": "

Reset all the internal state in a repository.

\n", - "comments": "

This will free all the mapped memory and internal objects of the repository and leave it in a "blank" state.

\n\n

There's no need to call this function directly unless you're trying to aggressively cleanup the repo before its deallocation. git_repository_free already performs this operation before deallocation the repo.

\n", + "comments": "

This will free all the mapped memory and internal objects\n of the repository and leave it in a "blank" state.

\n\n

There's no need to call this function directly unless you're\n trying to aggressively cleanup the repo before its\n deallocation. git_repository_free already performs this operation\n before deallocation the repo.

\n", "group": "repository" }, "git_repository_reinit_filesystem": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 61, "lineto": 63, "args": [ @@ -22195,12 +23713,12 @@ "comment": " 0 on success, \n<\n 0 on error" }, "description": "

Update the filesystem config settings for an open repository

\n", - "comments": "

When a repository is initialized, config values are set based on the properties of the filesystem that the repository is on, such as "core.ignorecase", "core.filemode", "core.symlinks", etc. If the repository is moved to a new filesystem, these properties may no longer be correct and API calls may not behave as expected. This call reruns the phase of repository initialization that sets those properties to compensate for the current filesystem of the repo.

\n", + "comments": "

When a repository is initialized, config values are set based on the\n properties of the filesystem that the repository is on, such as\n "core.ignorecase", "core.filemode", "core.symlinks", etc. If the\n repository is moved to a new filesystem, these properties may no\n longer be correct and API calls may not behave as expected. This\n call reruns the phase of repository initialization that sets those\n properties to compensate for the current filesystem of the repo.

\n", "group": "repository" }, "git_repository_set_config": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 78, "lineto": 78, "args": [ @@ -22222,12 +23740,12 @@ "comment": null }, "description": "

Set the configuration file for this repository

\n", - "comments": "

This configuration file will be used for all configuration queries involving this repository.

\n\n

The repository will keep a reference to the config file; the user must still free the config after setting it to the repository, or it will leak.

\n", + "comments": "

This configuration file will be used for all configuration\n queries involving this repository.

\n\n

The repository will keep a reference to the config file;\n the user must still free the config after setting it\n to the repository, or it will leak.

\n", "group": "repository" }, "git_repository_set_odb": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 93, "lineto": 93, "args": [ @@ -22249,12 +23767,12 @@ "comment": null }, "description": "

Set the Object Database for this repository

\n", - "comments": "

The ODB will be used for all object-related operations involving this repository.

\n\n

The repository will keep a reference to the ODB; the user must still free the ODB object after setting it to the repository, or it will leak.

\n", + "comments": "

The ODB will be used for all object-related operations\n involving this repository.

\n\n

The repository will keep a reference to the ODB; the user\n must still free the ODB object after setting it to the\n repository, or it will leak.

\n", "group": "repository" }, "git_repository_set_refdb": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 108, "lineto": 108, "args": [ @@ -22276,12 +23794,12 @@ "comment": null }, "description": "

Set the Reference Database Backend for this repository

\n", - "comments": "

The refdb will be used for all reference related operations involving this repository.

\n\n

The repository will keep a reference to the refdb; the user must still free the refdb object after setting it to the repository, or it will leak.

\n", + "comments": "

The refdb will be used for all reference related operations\n involving this repository.

\n\n

The repository will keep a reference to the refdb; the user\n must still free the refdb object after setting it to the\n repository, or it will leak.

\n", "group": "repository" }, "git_repository_set_index": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 123, "lineto": 123, "args": [ @@ -22303,12 +23821,12 @@ "comment": null }, "description": "

Set the index file for this repository

\n", - "comments": "

This index will be used for all index-related operations involving this repository.

\n\n

The repository will keep a reference to the index file; the user must still free the index after setting it to the repository, or it will leak.

\n", + "comments": "

This index will be used for all index-related operations\n involving this repository.

\n\n

The repository will keep a reference to the index file;\n the user must still free the index after setting it\n to the repository, or it will leak.

\n", "group": "repository" }, "git_repository_set_bare": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 136, "lineto": 136, "args": [ @@ -22325,12 +23843,12 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set a repository to be bare.

\n", - "comments": "

Clear the working directory and set core.bare to true. You may also want to call git_repository_set_index(repo, NULL) since a bare repo typically does not have an index, but this function will not do that for you.

\n", + "comments": "

Clear the working directory and set core.bare to true. You may also\n want to call git_repository_set_index(repo, NULL) since a bare repo\n typically does not have an index, but this function will not do that\n for you.

\n", "group": "repository" }, "git_repository_submodule_cache_all": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 149, "lineto": 150, "args": [ @@ -22347,12 +23865,12 @@ "comment": null }, "description": "

Load and cache all submodules.

\n", - "comments": "

Because the .gitmodules file is unstructured, loading submodules is an O(N) operation. Any operation (such as git_rebase_init) that requires accessing all submodules is O(N^2) in the number of submodules, if it has to look each one up individually. This function loads all submodules and caches them so that subsequent calls to git_submodule_lookup are O(1).

\n", + "comments": "

Because the .gitmodules file is unstructured, loading submodules is an\n O(N) operation. Any operation (such as git_rebase_init) that requires\n accessing all submodules is O(N^2) in the number of submodules, if it\n has to look each one up individually. This function loads all submodules\n and caches them so that subsequent calls to git_submodule_lookup are O(1).

\n", "group": "repository" }, "git_repository_submodule_cache_clear": { "type": "function", - "file": "sys/repository.h", + "file": "git2/sys/repository.h", "line": 164, "lineto": 165, "args": [ @@ -22369,12 +23887,12 @@ "comment": null }, "description": "

Clear the submodule cache.

\n", - "comments": "

Clear the submodule cache populated by git_repository_submodule_cache_all. If there is no cache, do nothing.

\n\n

The cache incorporates data from the repository's configuration, as well as the state of the working tree, the index, and HEAD. So any time any of these has changed, the cache might become invalid.

\n", + "comments": "

Clear the submodule cache populated by git_repository_submodule_cache_all.\n If there is no cache, do nothing.

\n\n

The cache incorporates data from the repository's configuration, as well\n as the state of the working tree, the index, and HEAD. So any time any\n of these has changed, the cache might become invalid.

\n", "group": "repository" }, "git_stream_register_tls": { "type": "function", - "file": "sys/stream.h", + "file": "git2/sys/stream.h", "line": 54, "lineto": 54, "args": [ @@ -22391,12 +23909,12 @@ "comment": " 0 or an error code" }, "description": "

Register a TLS stream constructor for the library to use

\n", - "comments": "

If a constructor is already set, it will be overwritten. Pass NULL in order to deregister the current constructor.

\n", + "comments": "

If a constructor is already set, it will be overwritten. Pass\n NULL in order to deregister the current constructor.

\n", "group": "stream" }, "git_time_monotonic": { "type": "function", - "file": "sys/time.h", + "file": "git2/sys/time.h", "line": 27, "lineto": 27, "args": [], @@ -22407,12 +23925,12 @@ "comment": null }, "description": "

Return a monotonic time value, useful for measuring running time\n and setting up timeouts.

\n", - "comments": "

The returned value is an arbitrary point in time -- it can only be used when comparing it to another git_time_monotonic call.

\n\n

The time is returned in seconds, with a decimal fraction that differs on accuracy based on the underlying system, but should be least accurate to Nanoseconds.

\n\n

This function cannot fail.

\n", + "comments": "

The returned value is an arbitrary point in time -- it can only be\n used when comparing it to another git_time_monotonic call.

\n\n

The time is returned in seconds, with a decimal fraction that differs\n on accuracy based on the underlying system, but should be least\n accurate to Nanoseconds.

\n\n

This function cannot fail.

\n", "group": "time" }, "git_transport_init": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 119, "lineto": 121, "args": [ @@ -22439,7 +23957,7 @@ }, "git_transport_new": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 133, "lineto": 133, "args": [ @@ -22471,7 +23989,7 @@ }, "git_transport_ssh_with_paths": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 149, "lineto": 149, "args": [ @@ -22498,12 +24016,12 @@ "comment": " 0 or an error code" }, "description": "

Create an ssh transport with custom git command paths

\n", - "comments": "

This is a factory function suitable for setting as the transport callback in a remote (or for a clone in the options).

\n\n

The payload argument must be a strarray pointer with the paths for the git-upload-pack and git-receive-pack at index 0 and 1.

\n", + "comments": "

This is a factory function suitable for setting as the transport\n callback in a remote (or for a clone in the options).

\n\n

The payload argument must be a strarray pointer with the paths for\n the git-upload-pack and git-receive-pack at index 0 and 1.

\n", "group": "transport" }, "git_transport_register": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 164, "lineto": 167, "args": [ @@ -22530,12 +24048,12 @@ "comment": " 0 or an error code" }, "description": "

Add a custom transport definition, to be used in addition to the built-in\n set of transports that come with libgit2.

\n", - "comments": "

The caller is responsible for synchronizing calls to git_transport_register and git_transport_unregister with other calls to the library that instantiate transports.

\n", + "comments": "

The caller is responsible for synchronizing calls to git_transport_register\n and git_transport_unregister with other calls to the library that\n instantiate transports.

\n", "group": "transport" }, "git_transport_unregister": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 177, "lineto": 178, "args": [ @@ -22557,7 +24075,7 @@ }, "git_transport_dummy": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 191, "lineto": 194, "args": [ @@ -22589,7 +24107,7 @@ }, "git_transport_local": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 204, "lineto": 207, "args": [ @@ -22621,7 +24139,7 @@ }, "git_transport_smart": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 217, "lineto": 220, "args": [ @@ -22653,7 +24171,7 @@ }, "git_transport_smart_certificate_check": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 231, "lineto": 231, "args": [ @@ -22690,7 +24208,7 @@ }, "git_transport_smart_credentials": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 242, "lineto": 242, "args": [ @@ -22727,7 +24245,7 @@ }, "git_transport_smart_proxy_options": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 252, "lineto": 252, "args": [ @@ -22754,7 +24272,7 @@ }, "git_smart_subtransport_http": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 362, "lineto": 365, "args": [ @@ -22786,7 +24304,7 @@ }, "git_smart_subtransport_git": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 374, "lineto": 377, "args": [ @@ -22818,7 +24336,7 @@ }, "git_smart_subtransport_ssh": { "type": "function", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 386, "lineto": 389, "args": [ @@ -22850,7 +24368,7 @@ }, "git_tag_lookup": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 33, "lineto": 34, "args": [ @@ -22887,7 +24405,7 @@ }, "git_tag_lookup_prefix": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 48, "lineto": 49, "args": [ @@ -22924,7 +24442,7 @@ }, "git_tag_free": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 61, "lineto": 61, "args": [ @@ -22941,7 +24459,7 @@ "comment": null }, "description": "

Close an open tag

\n", - "comments": "

You can no longer use the git_tag pointer after this call.

\n\n

IMPORTANT: 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", + "comments": "

You can no longer use the git_tag pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you are through with a tag to\n release memory. Failure to do so will cause a memory leak.

\n", "group": "tag", "examples": { "general.c": [ @@ -22951,7 +24469,7 @@ }, "git_tag_id": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 69, "lineto": 69, "args": [ @@ -22973,7 +24491,7 @@ }, "git_tag_owner": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 77, "lineto": 77, "args": [ @@ -22995,7 +24513,7 @@ }, "git_tag_target": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 89, "lineto": 89, "args": [ @@ -23017,7 +24535,7 @@ "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", + "comments": "

This method performs a repository lookup for the\n given object and returns it

\n", "group": "tag", "examples": { "general.c": [ @@ -23027,7 +24545,7 @@ }, "git_tag_target_id": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 97, "lineto": 97, "args": [ @@ -23054,7 +24572,7 @@ }, "git_tag_target_type": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 105, "lineto": 105, "args": [ @@ -23084,7 +24602,7 @@ }, "git_tag_name": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 113, "lineto": 113, "args": [ @@ -23117,7 +24635,7 @@ }, "git_tag_tagger": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 121, "lineto": 121, "args": [ @@ -23144,7 +24662,7 @@ }, "git_tag_message": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 129, "lineto": 129, "args": [ @@ -23178,7 +24696,7 @@ }, "git_tag_create": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 171, "lineto": 178, "args": [ @@ -23225,7 +24743,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code\n\tA tag object is written to the ODB, and a proper reference\n\tis written in the /refs/tags folder, pointing to it" }, "description": "

Create a new tag in the repository from an object

\n", - "comments": "

A new reference will also be created pointing to this tag object. If force is true and a reference already exists with the given name, it'll be replaced.

\n\n

The message will not be cleaned up. This can be achieved through git_message_prettify().

\n\n

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", + "comments": "

A new reference will also be created pointing to\n this tag object. If force is true and a reference\n already exists with the given name, it'll be replaced.

\n\n

The message will not be cleaned up. This can be achieved\n through git_message_prettify().

\n\n

The tag name will be checked for validity. You must avoid\n the characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\n sequences ".." and "\n@\n{" which have special meaning to revparse.

\n", "group": "tag", "examples": { "tag.c": [ @@ -23235,7 +24753,7 @@ }, "git_tag_annotation_create": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 203, "lineto": 209, "args": [ @@ -23277,12 +24795,12 @@ "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().

\n", + "comments": "

The message will not be cleaned up. This can be achieved\n through git_message_prettify().

\n", "group": "tag" }, "git_tag_create_frombuffer": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 220, "lineto": 224, "args": [ @@ -23319,7 +24837,7 @@ }, "git_tag_create_lightweight": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 256, "lineto": 261, "args": [ @@ -23356,7 +24874,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code\n\tA proper reference is written in the /refs/tags folder,\n pointing to the provided target object" }, "description": "

Create a new lightweight tag pointing at a target object

\n", - "comments": "

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.

\n\n

The tag name will be checked for validity. See git_tag_create() for rules about valid names.

\n", + "comments": "

A new direct reference will be created pointing to\n this target object. If force is true and a reference\n already exists with the given name, it'll be replaced.

\n\n

The tag name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", "group": "tag", "examples": { "tag.c": [ @@ -23366,7 +24884,7 @@ }, "git_tag_delete": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 276, "lineto": 278, "args": [ @@ -23388,7 +24906,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" }, "description": "

Delete an existing tag reference.

\n", - "comments": "

The tag name will be checked for validity. See git_tag_create() for rules about valid names.

\n", + "comments": "

The tag name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", "group": "tag", "examples": { "tag.c": [ @@ -23398,7 +24916,7 @@ }, "git_tag_list": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 293, "lineto": 295, "args": [ @@ -23420,12 +24938,12 @@ "comment": " 0 or an error code" }, "description": "

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.

\n", + "comments": "

The string array will be filled with the names of the\n matching tags; these values are owned by the user and\n should be free'd manually when no longer needed, using\n git_strarray_free.

\n", "group": "tag" }, "git_tag_list_match": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 315, "lineto": 318, "args": [ @@ -23452,7 +24970,7 @@ "comment": " 0 or an error code" }, "description": "

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\n

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.

\n", + "comments": "

If an empty pattern is provided, all the tags\n will be returned.

\n\n

The string array will be filled with the names of the\n matching tags; these values are owned by the user and\n should be free'd manually when no longer needed, using\n git_strarray_free.

\n", "group": "tag", "examples": { "tag.c": [ @@ -23462,7 +24980,7 @@ }, "git_tag_foreach": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 330, "lineto": 333, "args": [ @@ -23494,7 +25012,7 @@ }, "git_tag_peel": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 346, "lineto": 348, "args": [ @@ -23516,12 +25034,12 @@ "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.

\n", + "comments": "

The retrieved tag_target object is owned by the repository\n and should be closed with the git_object_free method.

\n", "group": "tag" }, "git_tag_dup": { "type": "function", - "file": "tag.h", + "file": "git2/tag.h", "line": 357, "lineto": 357, "args": [ @@ -23548,7 +25066,7 @@ }, "git_trace_set": { "type": "function", - "file": "trace.h", + "file": "git2/trace.h", "line": 63, "lineto": 63, "args": [ @@ -23573,11 +25091,252 @@ "comments": "", "group": "trace" }, + "git_transaction_new": { + "type": "function", + "file": "git2/transaction.h", + "line": 32, + "lineto": 32, + "args": [ + { + "name": "out", + "type": "git_transaction **", + "comment": "the resulting transaction" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository in which to lock" + } + ], + "argline": "git_transaction **out, git_repository *repo", + "sig": "git_transaction **::git_repository *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Create a new transaction object

\n", + "comments": "

This does not lock anything, but sets up the transaction object to\n know from which repository to lock.

\n", + "group": "transaction" + }, + "git_transaction_lock_ref": { + "type": "function", + "file": "git2/transaction.h", + "line": 44, + "lineto": 44, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + }, + { + "name": "refname", + "type": "const char *", + "comment": "the reference to lock" + } + ], + "argline": "git_transaction *tx, const char *refname", + "sig": "git_transaction *::const char *", + "return": { + "type": "int", + "comment": " 0 or an error message" + }, + "description": "

Lock a reference

\n", + "comments": "

Lock the specified reference. This is the first step to updating a\n reference.

\n", + "group": "transaction" + }, + "git_transaction_set_target": { + "type": "function", + "file": "git2/transaction.h", + "line": 59, + "lineto": 59, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + }, + { + "name": "refname", + "type": "const char *", + "comment": "reference to update" + }, + { + "name": "target", + "type": "const git_oid *", + "comment": "target to set the reference to" + }, + { + "name": "sig", + "type": "const git_signature *", + "comment": "signature to use in the reflog; pass NULL to read the identity from the config" + }, + { + "name": "msg", + "type": "const char *", + "comment": "message to use in the reflog" + } + ], + "argline": "git_transaction *tx, const char *refname, const git_oid *target, const git_signature *sig, const char *msg", + "sig": "git_transaction *::const char *::const git_oid *::const git_signature *::const char *", + "return": { + "type": "int", + "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" + }, + "description": "

Set the target of a reference

\n", + "comments": "

Set the target of the specified reference. This reference must be\n locked.

\n", + "group": "transaction" + }, + "git_transaction_set_symbolic_target": { + "type": "function", + "file": "git2/transaction.h", + "line": 74, + "lineto": 74, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + }, + { + "name": "refname", + "type": "const char *", + "comment": "reference to update" + }, + { + "name": "target", + "type": "const char *", + "comment": "target to set the reference to" + }, + { + "name": "sig", + "type": "const git_signature *", + "comment": "signature to use in the reflog; pass NULL to read the identity from the config" + }, + { + "name": "msg", + "type": "const char *", + "comment": "message to use in the reflog" + } + ], + "argline": "git_transaction *tx, const char *refname, const char *target, const git_signature *sig, const char *msg", + "sig": "git_transaction *::const char *::const char *::const git_signature *::const char *", + "return": { + "type": "int", + "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" + }, + "description": "

Set the target of a reference

\n", + "comments": "

Set the target of the specified reference. This reference must be\n locked.

\n", + "group": "transaction" + }, + "git_transaction_set_reflog": { + "type": "function", + "file": "git2/transaction.h", + "line": 87, + "lineto": 87, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + }, + { + "name": "refname", + "type": "const char *", + "comment": "the reference whose reflog to set" + }, + { + "name": "reflog", + "type": "const git_reflog *", + "comment": "the reflog as it should be written out" + } + ], + "argline": "git_transaction *tx, const char *refname, const git_reflog *reflog", + "sig": "git_transaction *::const char *::const git_reflog *", + "return": { + "type": "int", + "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" + }, + "description": "

Set the reflog of a reference

\n", + "comments": "

Set the specified reference's reflog. If this is combined with\n setting the target, that update won't be written to the reflog.

\n", + "group": "transaction" + }, + "git_transaction_remove": { + "type": "function", + "file": "git2/transaction.h", + "line": 96, + "lineto": 96, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + }, + { + "name": "refname", + "type": "const char *", + "comment": "the reference to remove" + } + ], + "argline": "git_transaction *tx, const char *refname", + "sig": "git_transaction *::const char *", + "return": { + "type": "int", + "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" + }, + "description": "

Remove a reference

\n", + "comments": "", + "group": "transaction" + }, + "git_transaction_commit": { + "type": "function", + "file": "git2/transaction.h", + "line": 107, + "lineto": 107, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + } + ], + "argline": "git_transaction *tx", + "sig": "git_transaction *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Commit the changes from the transaction

\n", + "comments": "

Perform the changes that have been queued. The updates will be made\n one by one, and the first failure will stop the processing.

\n", + "group": "transaction" + }, + "git_transaction_free": { + "type": "function", + "file": "git2/transaction.h", + "line": 117, + "lineto": 117, + "args": [ + { + "name": "tx", + "type": "git_transaction *", + "comment": "the transaction" + } + ], + "argline": "git_transaction *tx", + "sig": "git_transaction *", + "return": { + "type": "void", + "comment": null + }, + "description": "

Free the resources allocated by this transaction

\n", + "comments": "

If any references remain locked, they will be unlocked without any\n changes made to them.

\n", + "group": "transaction" + }, "git_cred_has_username": { "type": "function", - "file": "transport.h", - "line": 190, - "lineto": 190, + "file": "git2/transport.h", + "line": 219, + "lineto": 219, "args": [ { "name": "cred", @@ -23597,9 +25356,9 @@ }, "git_cred_userpass_plaintext_new": { "type": "function", - "file": "transport.h", - "line": 201, - "lineto": 204, + "file": "git2/transport.h", + "line": 230, + "lineto": 233, "args": [ { "name": "out", @@ -23629,9 +25388,9 @@ }, "git_cred_ssh_key_new": { "type": "function", - "file": "transport.h", - "line": 217, - "lineto": 222, + "file": "git2/transport.h", + "line": 246, + "lineto": 251, "args": [ { "name": "out", @@ -23671,9 +25430,9 @@ }, "git_cred_ssh_interactive_new": { "type": "function", - "file": "transport.h", - "line": 233, - "lineto": 237, + "file": "git2/transport.h", + "line": 262, + "lineto": 266, "args": [ { "name": "out", @@ -23708,9 +25467,9 @@ }, "git_cred_ssh_key_from_agent": { "type": "function", - "file": "transport.h", - "line": 247, - "lineto": 249, + "file": "git2/transport.h", + "line": 276, + "lineto": 278, "args": [ { "name": "out", @@ -23735,9 +25494,9 @@ }, "git_cred_ssh_custom_new": { "type": "function", - "file": "transport.h", - "line": 269, - "lineto": 275, + "file": "git2/transport.h", + "line": 298, + "lineto": 304, "args": [ { "name": "out", @@ -23777,14 +25536,14 @@ "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\n

This function and its credential type is provided for completeness and wraps libssh2_userauth_publickey(), which is undocumented.

\n\n

The supplied credential parameter will be internally duplicated.

\n", + "comments": "

This lets you use your own function to sign the challenge.

\n\n

This function and its credential type is provided for completeness\n and wraps libssh2_userauth_publickey(), which is undocumented.

\n\n

The supplied credential parameter will be internally duplicated.

\n", "group": "cred" }, "git_cred_default_new": { "type": "function", - "file": "transport.h", - "line": 283, - "lineto": 283, + "file": "git2/transport.h", + "line": 312, + "lineto": 312, "args": [ { "name": "out", @@ -23804,9 +25563,9 @@ }, "git_cred_username_new": { "type": "function", - "file": "transport.h", - "line": 291, - "lineto": 291, + "file": "git2/transport.h", + "line": 320, + "lineto": 320, "args": [ { "name": "cred", @@ -23826,14 +25585,14 @@ "comment": null }, "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", + "comments": "

This is used with ssh authentication to query for the username if\n none is specified in the url.

\n", "group": "cred" }, "git_cred_ssh_key_memory_new": { "type": "function", - "file": "transport.h", - "line": 303, - "lineto": 308, + "file": "git2/transport.h", + "line": 332, + "lineto": 337, "args": [ { "name": "out", @@ -23873,9 +25632,9 @@ }, "git_cred_free": { "type": "function", - "file": "transport.h", - "line": 319, - "lineto": 319, + "file": "git2/transport.h", + "line": 348, + "lineto": 348, "args": [ { "name": "cred", @@ -23890,12 +25649,12 @@ "comment": null }, "description": "

Free a credential.

\n", - "comments": "

This is only necessary if you own the object; that is, if you are a transport.

\n", + "comments": "

This is only necessary if you own the object; that is, if you are a\n transport.

\n", "group": "cred" }, "git_tree_lookup": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 32, "lineto": 33, "args": [ @@ -23933,13 +25692,13 @@ "ex/HEAD/init.html#git_tree_lookup-14" ], "merge.c": [ - "ex/HEAD/merge.html#git_tree_lookup-46" + "ex/HEAD/merge.html#git_tree_lookup-41" ] } }, "git_tree_lookup_prefix": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 47, "lineto": 51, "args": [ @@ -23976,7 +25735,7 @@ }, "git_tree_free": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 63, "lineto": 63, "args": [ @@ -23993,7 +25752,7 @@ "comment": null }, "description": "

Close an open tree

\n", - "comments": "

You can no longer use the git_tree pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you stop using a tree to release memory. Failure to do so will cause a memory leak.

\n", + "comments": "

You can no longer use the git_tree pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you stop using a tree to\n release memory. Failure to do so will cause a memory leak.

\n", "group": "tree", "examples": { "diff.c": [ @@ -24018,7 +25777,7 @@ }, "git_tree_id": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 71, "lineto": 71, "args": [ @@ -24040,7 +25799,7 @@ }, "git_tree_owner": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 79, "lineto": 79, "args": [ @@ -24062,7 +25821,7 @@ }, "git_tree_entrycount": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 87, "lineto": 87, "args": [ @@ -24092,7 +25851,7 @@ }, "git_tree_entry_byname": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 99, "lineto": 100, "args": [ @@ -24114,7 +25873,7 @@ "comment": " the tree entry; NULL if not found" }, "description": "

Lookup a tree entry by its filename

\n", - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n", + "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.

\n", "group": "tree", "examples": { "general.c": [ @@ -24124,7 +25883,7 @@ }, "git_tree_entry_byindex": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 112, "lineto": 113, "args": [ @@ -24146,7 +25905,7 @@ "comment": " the tree entry; NULL if not found" }, "description": "

Lookup a tree entry by its position in the tree

\n", - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n", + "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.

\n", "group": "tree", "examples": { "cat-file.c": [ @@ -24159,7 +25918,7 @@ }, "git_tree_entry_byid": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 127, "lineto": 128, "args": [ @@ -24181,12 +25940,12 @@ "comment": " the tree entry; NULL if not found" }, "description": "

Lookup a tree entry by SHA value.

\n", - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n\n

Warning: this must examine every entry in the tree, so it is not fast.

\n", + "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.

\n\n

Warning: this must examine every entry in the tree, so it is not fast.

\n", "group": "tree" }, "git_tree_entry_bypath": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 142, "lineto": 145, "args": [ @@ -24213,12 +25972,12 @@ "comment": " 0 on success; GIT_ENOTFOUND if the path does not exist" }, "description": "

Retrieve a tree entry contained in a tree or in any of its subtrees,\n given its relative path.

\n", - "comments": "

Unlike the other lookup functions, the returned tree entry is owned by the user and must be freed explicitly with git_tree_entry_free().

\n", + "comments": "

Unlike the other lookup functions, the returned tree entry is owned by\n the user and must be freed explicitly with git_tree_entry_free().

\n", "group": "tree" }, "git_tree_entry_dup": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 157, "lineto": 157, "args": [ @@ -24240,12 +25999,12 @@ "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().

\n", + "comments": "

Create a copy of a tree entry. The returned copy is owned by the user,\n and must be freed explicitly with git_tree_entry_free().

\n", "group": "tree" }, "git_tree_entry_free": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 168, "lineto": 168, "args": [ @@ -24262,12 +26021,12 @@ "comment": null }, "description": "

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().

\n", + "comments": "

IMPORTANT: This function is only needed for tree entries owned by the\n user, such as the ones returned by git_tree_entry_dup() or\n git_tree_entry_bypath().

\n", "group": "tree" }, "git_tree_entry_name": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 176, "lineto": 176, "args": [ @@ -24298,7 +26057,7 @@ }, "git_tree_entry_id": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 184, "lineto": 184, "args": [ @@ -24325,7 +26084,7 @@ }, "git_tree_entry_type": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 192, "lineto": 192, "args": [ @@ -24352,7 +26111,7 @@ }, "git_tree_entry_filemode": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 200, "lineto": 200, "args": [ @@ -24379,7 +26138,7 @@ }, "git_tree_entry_filemode_raw": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 212, "lineto": 212, "args": [ @@ -24396,12 +26155,12 @@ "comment": " filemode as an integer" }, "description": "

Get the raw UNIX file attributes of a tree entry

\n", - "comments": "

This function does not perform any normalization and is only useful if you need to be able to recreate the original tree object.

\n", + "comments": "

This function does not perform any normalization and is only useful\n if you need to be able to recreate the original tree object.

\n", "group": "tree" }, "git_tree_entry_cmp": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 220, "lineto": 220, "args": [ @@ -24428,7 +26187,7 @@ }, "git_tree_entry_to_object": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 232, "lineto": 235, "args": [ @@ -24465,7 +26224,7 @@ }, "git_treebuilder_new": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 254, "lineto": 255, "args": [ @@ -24492,12 +26251,12 @@ "comment": " 0 on success; error code otherwise" }, "description": "

Create a new tree builder.

\n", - "comments": "

The tree builder can be used to create or modify trees in memory and write them as tree objects to the database.

\n\n

If the source parameter is not NULL, the tree builder will be initialized with the entries of the given tree.

\n\n

If the source parameter is NULL, the tree builder will start with no entries and will have to be filled manually.

\n", + "comments": "

The tree builder can be used to create or modify trees in memory and\n write them as tree objects to the database.

\n\n

If the source parameter is not NULL, the tree builder will be\n initialized with the entries of the given tree.

\n\n

If the source parameter is NULL, the tree builder will start with no\n entries and will have to be filled manually.

\n", "group": "treebuilder" }, "git_treebuilder_clear": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 262, "lineto": 262, "args": [ @@ -24519,7 +26278,7 @@ }, "git_treebuilder_entrycount": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 270, "lineto": 270, "args": [ @@ -24541,7 +26300,7 @@ }, "git_treebuilder_free": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 281, "lineto": 281, "args": [ @@ -24558,12 +26317,12 @@ "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", + "comments": "

This will clear all the entries and free to builder.\n Failing to free the builder after you're done using it\n will result in a memory leak

\n", "group": "treebuilder" }, "git_treebuilder_get": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 293, "lineto": 294, "args": [ @@ -24585,12 +26344,12 @@ "comment": " pointer to the entry; NULL if not found" }, "description": "

Get an entry from the builder from its filename

\n", - "comments": "

The returned entry is owned by the builder and should not be freed manually.

\n", + "comments": "

The returned entry is owned by the builder and should\n not be freed manually.

\n", "group": "treebuilder" }, "git_treebuilder_insert": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 324, "lineto": 329, "args": [ @@ -24627,12 +26386,12 @@ "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.

\n\n

If an entry named filename already exists, its attributes will be updated with the given ones.

\n\n

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.

\n\n

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.

\n", + "comments": "

Insert a new entry for filename in the builder with the\n given attributes.

\n\n

If an entry named filename already exists, its attributes\n will be updated with the given ones.

\n\n

The optional pointer out can be used to retrieve a pointer to the\n newly created/updated entry. Pass NULL if you do not need it. The\n pointer may not be valid past the next operation in this\n builder. Duplicate the entry if you want to keep it.

\n\n

By default the entry that you are inserting will be checked for\n validity; that it exists in the object database and is of the\n correct type. If you do not want this behavior, set the\n GIT_OPT_ENABLE_STRICT_OBJECT_CREATION library option to false.

\n", "group": "treebuilder" }, "git_treebuilder_remove": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 337, "lineto": 338, "args": [ @@ -24659,7 +26418,7 @@ }, "git_treebuilder_filter": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 361, "lineto": 364, "args": [ @@ -24686,12 +26445,12 @@ "comment": null }, "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).

\n", + "comments": "

The filter callback will be called for each entry in the tree with a\n pointer to the entry and the provided payload; if the callback returns\n non-zero, the entry will be filtered (removed from the builder).

\n", "group": "treebuilder" }, "git_treebuilder_write": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 376, "lineto": 377, "args": [ @@ -24713,12 +26472,12 @@ "comment": " 0 or an error code" }, "description": "

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.

\n", + "comments": "

The tree builder will be written to the given repo, and its\n identifying SHA1 hash will be stored in the id pointer.

\n", "group": "treebuilder" }, "git_treebuilder_write_with_buffer": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 390, "lineto": 391, "args": [ @@ -24750,7 +26509,7 @@ }, "git_tree_walk": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 420, "lineto": 424, "args": [ @@ -24782,12 +26541,12 @@ "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.

\n\n

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", + "comments": "

The entries will be traversed in the specified order, children subtrees\n will be automatically loaded as required, and the callback will be\n called once per entry with the current (relative) root for the entry and\n the entry data itself.

\n\n

If the callback returns a positive value, the passed entry will be\n skipped on the traversal (in pre mode). A negative value stops the walk.

\n", "group": "tree" }, "git_tree_dup": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 433, "lineto": 433, "args": [ @@ -24814,7 +26573,7 @@ }, "git_tree_create_updated": { "type": "function", - "file": "tree.h", + "file": "git2/tree.h", "line": 479, "lineto": 479, "args": [ @@ -24851,12 +26610,12 @@ "comment": null }, "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.

\n\n

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.

\n\n

Deleting and adding the same entry is undefined behaviour, changing a tree to a blob or viceversa is not supported.

\n", + "comments": "

Given the baseline perform the changes described in the list of\n updates and create a new tree.

\n\n

This function is optimized for common file/directory addition, removal and\n replacement in trees. It is much more efficient than reading the tree into a\n git_index and modifying that, but in exchange it is not as flexible.

\n\n

Deleting and adding the same entry is undefined behaviour, changing\n a tree to a blob or viceversa is not supported.

\n", "group": "tree" }, "git_worktree_list": { "type": "function", - "file": "worktree.h", + "file": "git2/worktree.h", "line": 34, "lineto": 34, "args": [ @@ -24878,12 +26637,12 @@ "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.

\n", + "comments": "

The returned list should be released with git_strarray_free\n when no longer needed.

\n", "group": "worktree" }, "git_worktree_lookup": { "type": "function", - "file": "worktree.h", + "file": "git2/worktree.h", "line": 44, "lineto": 44, "args": [ @@ -24915,7 +26674,7 @@ }, "git_worktree_open_from_repository": { "type": "function", - "file": "worktree.h", + "file": "git2/worktree.h", "line": 56, "lineto": 56, "args": [ @@ -24937,12 +26696,12 @@ "comment": null }, "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.

\n", + "comments": "

If a repository is not the main tree but a worktree, this\n function will look up the worktree inside the parent\n repository and create a new git_worktree structure.

\n", "group": "worktree" }, "git_worktree_free": { "type": "function", - "file": "worktree.h", + "file": "git2/worktree.h", "line": 63, "lineto": 63, "args": [ @@ -24964,7 +26723,7 @@ }, "git_worktree_validate": { "type": "function", - "file": "worktree.h", + "file": "git2/worktree.h", "line": 75, "lineto": 75, "args": [ @@ -24981,24 +26740,24 @@ "comment": " 0 when worktree is valid, error-code otherwise" }, "description": "

Check if worktree is valid

\n", - "comments": "

A valid worktree requires both the git data structures inside the linked parent repository and the linked working copy to be present.

\n", + "comments": "

A valid worktree requires both the git data structures inside\n the linked parent repository and the linked working copy to be\n present.

\n", "group": "worktree" }, "git_worktree_add_init_options": { "type": "function", - "file": "worktree.h", - "line": 95, - "lineto": 96, + "file": "git2/worktree.h", + "line": 104, + "lineto": 105, "args": [ { "name": "opts", "type": "git_worktree_add_options *", - "comment": "the struct to initialize" + "comment": "The `git_worktree_add_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Verison of struct; pass `GIT_WORKTREE_ADD_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_WORKTREE_ADD_OPTIONS_VERSION`." } ], "argline": "git_worktree_add_options *opts, unsigned int version", @@ -25007,15 +26766,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_worktree_add_options with default vaules.\n Equivalent to creating an instance with\n GIT_WORKTREE_ADD_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_worktree_add_options structure

\n", + "comments": "

Initializes a git_worktree_add_options with default values. Equivalent to\n creating an instance with GIT_WORKTREE_ADD_OPTIONS_INIT.

\n", "group": "worktree" }, "git_worktree_add": { "type": "function", - "file": "worktree.h", - "line": 112, - "lineto": 114, + "file": "git2/worktree.h", + "line": 121, + "lineto": 123, "args": [ { "name": "out", @@ -25050,14 +26809,14 @@ "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

\n", + "comments": "

Add a new working tree for the repository, that is create the\n required data structures inside the repository and check out\n the current HEAD at path

\n", "group": "worktree" }, "git_worktree_lock": { "type": "function", - "file": "worktree.h", - "line": 126, - "lineto": 126, + "file": "git2/worktree.h", + "line": 135, + "lineto": 135, "args": [ { "name": "wt", @@ -25077,14 +26836,14 @@ "comment": " 0 on success, non-zero otherwise" }, "description": "

Lock worktree if not already locked

\n", - "comments": "

Lock a worktree, optionally specifying a reason why the linked working tree is being locked.

\n", + "comments": "

Lock a worktree, optionally specifying a reason why the linked\n working tree is being locked.

\n", "group": "worktree" }, "git_worktree_unlock": { "type": "function", - "file": "worktree.h", - "line": 135, - "lineto": 135, + "file": "git2/worktree.h", + "line": 144, + "lineto": 144, "args": [ { "name": "wt", @@ -25104,9 +26863,9 @@ }, "git_worktree_is_locked": { "type": "function", - "file": "worktree.h", - "line": 149, - "lineto": 149, + "file": "git2/worktree.h", + "line": 158, + "lineto": 158, "args": [ { "name": "reason", @@ -25126,24 +26885,68 @@ "comment": " 0 when the working tree not locked, a value greater\n than zero if it is locked, less than zero if there was an\n error" }, "description": "

Check if worktree is locked

\n", - "comments": "

A worktree may be locked if the linked working tree is stored on a portable device which is not available.

\n", + "comments": "

A worktree may be locked if the linked working tree is stored\n on a portable device which is not available.

\n", + "group": "worktree" + }, + "git_worktree_name": { + "type": "function", + "file": "git2/worktree.h", + "line": 167, + "lineto": 167, + "args": [ + { + "name": "wt", + "type": "const git_worktree *", + "comment": "Worktree to get the name for" + } + ], + "argline": "const git_worktree *wt", + "sig": "const git_worktree *", + "return": { + "type": "const char *", + "comment": " The worktree's name. The pointer returned is valid for the\n lifetime of the git_worktree" + }, + "description": "

Retrieve the name of the worktree

\n", + "comments": "", + "group": "worktree" + }, + "git_worktree_path": { + "type": "function", + "file": "git2/worktree.h", + "line": 176, + "lineto": 176, + "args": [ + { + "name": "wt", + "type": "const git_worktree *", + "comment": "Worktree to get the path for" + } + ], + "argline": "const git_worktree *wt", + "sig": "const git_worktree *", + "return": { + "type": "const char *", + "comment": " The worktree's filesystem path. The pointer returned\n is valid for the lifetime of the git_worktree." + }, + "description": "

Retrieve the filesystem path for the worktree

\n", + "comments": "", "group": "worktree" }, "git_worktree_prune_init_options": { "type": "function", - "file": "worktree.h", - "line": 182, - "lineto": 184, + "file": "git2/worktree.h", + "line": 217, + "lineto": 219, "args": [ { "name": "opts", "type": "git_worktree_prune_options *", - "comment": "the struct to initialize" + "comment": "The `git_worktree_prune_options` struct to initialize." }, { "name": "version", "type": "unsigned int", - "comment": "Verison of struct; pass `GIT_WORKTREE_PRUNE_OPTIONS_VERSION`" + "comment": "The struct version; pass `GIT_WORKTREE_PRUNE_OPTIONS_VERSION`." } ], "argline": "git_worktree_prune_options *opts, unsigned int version", @@ -25152,15 +26955,15 @@ "type": "int", "comment": " Zero on success; -1 on failure." }, - "description": "

Initializes a git_worktree_prune_options with default vaules.\n Equivalent to creating an instance with\n GIT_WORKTREE_PRUNE_OPTIONS_INIT.

\n", - "comments": "", + "description": "

Initialize git_worktree_prune_options structure

\n", + "comments": "

Initializes a git_worktree_prune_options with default values. Equivalent to\n creating an instance with GIT_WORKTREE_PRUNE_OPTIONS_INIT.

\n", "group": "worktree" }, "git_worktree_is_prunable": { "type": "function", - "file": "worktree.h", - "line": 200, - "lineto": 201, + "file": "git2/worktree.h", + "line": 235, + "lineto": 236, "args": [ { "name": "wt", @@ -25180,14 +26983,14 @@ "comment": null }, "description": "

Is the worktree prunable with the given options?

\n", - "comments": "

A worktree is not prunable in the following scenarios:

\n\n
    \n
  • the worktree is linking to a valid on-disk worktree. The valid member will cause this check to be ignored. - the worktree is locked. The locked flag will cause this check to be ignored.
  • \n
\n\n

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\n
    \n
  • the worktree is linking to a valid on-disk worktree. The\nvalid member will cause this check to be ignored.
  • \n
  • the worktree is locked. The locked flag will cause this\ncheck to be ignored.
  • \n
\n\n

If the worktree is not valid and not locked or if the above\n flags have been passed in, this function will return a\n positive value.

\n", "group": "worktree" }, "git_worktree_prune": { "type": "function", - "file": "worktree.h", - "line": 215, - "lineto": 216, + "file": "git2/worktree.h", + "line": 250, + "lineto": 251, "args": [ { "name": "wt", @@ -25207,14 +27010,45 @@ "comment": " 0 or an error code" }, "description": "

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.

\n", + "comments": "

Prune the working tree, that is remove the git data\n structures on disk. The repository will only be pruned of\n git_worktree_is_prunable succeeds.

\n", "group": "worktree" } }, "callbacks": { + "git_attr_foreach_cb": { + "type": "callback", + "file": "git2/attr.h", + "line": 205, + "lineto": 205, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": "The attribute name." + }, + { + "name": "value", + "type": "const char *", + "comment": "The attribute value. May be NULL if the attribute is explicitly\n set to UNSPECIFIED using the '!' sign." + }, + { + "name": "payload", + "type": "void *", + "comment": "A user-specified pointer." + } + ], + "argline": "const char *name, const char *value, void *payload", + "sig": "const char *::const char *::void *", + "return": { + "type": "int", + "comment": " 0 to continue looping, non-zero to stop. This value will be returned\n from git_attr_foreach." + }, + "description": "

The callback used with git_attr_foreach.

\n", + "comments": "

This callback will be invoked only once per attribute name, even if there\n are multiple rules for a given file. The highest priority rule will be\n used.

\n" + }, "git_checkout_notify_cb": { "type": "callback", - "file": "checkout.h", + "file": "git2/checkout.h", "line": 223, "lineto": 229, "args": [ @@ -25260,7 +27094,7 @@ }, "git_checkout_progress_cb": { "type": "callback", - "file": "checkout.h", + "file": "git2/checkout.h", "line": 232, "lineto": 236, "args": [ @@ -25296,7 +27130,7 @@ }, "git_checkout_perfdata_cb": { "type": "callback", - "file": "checkout.h", + "file": "git2/checkout.h", "line": 239, "lineto": 241, "args": [ @@ -25322,7 +27156,7 @@ }, "git_remote_create_cb": { "type": "callback", - "file": "clone.h", + "file": "git2/clone.h", "line": 69, "lineto": 74, "args": [ @@ -25359,11 +27193,11 @@ "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, "description": "

The signature of a function matching git_remote_create, with an additional\n void* as a callback payload.

\n", - "comments": "

Callers of git_clone may provide a function matching this signature to override the remote creation and customization process during a clone operation.

\n" + "comments": "

Callers of git_clone may provide a function matching this signature to override\n the remote creation and customization process during a clone operation.

\n" }, "git_repository_create_cb": { "type": "callback", - "file": "clone.h", + "file": "git2/clone.h", "line": 90, "lineto": 94, "args": [ @@ -25395,13 +27229,39 @@ "comment": " 0, or a negative value to indicate error" }, "description": "

The signature of a function matchin git_repository_init, with an\n aditional void * as callback payload.

\n", - "comments": "

Callers of git_clone my provide a function matching this signature to override the repository creation and customization process during a clone operation.

\n" + "comments": "

Callers of git_clone my provide a function matching this signature\n to override the repository creation and customization process\n during a clone operation.

\n" + }, + "git_config_foreach_cb": { + "type": "callback", + "file": "git2/config.h", + "line": 84, + "lineto": 84, + "args": [ + { + "name": "entry", + "type": "const git_config_entry *", + "comment": "the entry currently being enumerated" + }, + { + "name": "payload", + "type": "void *", + "comment": "a user-specified pointer" + } + ], + "argline": "const git_config_entry *entry, void *payload", + "sig": "const git_config_entry *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "

A config enumeration callback

\n", + "comments": "" }, "git_diff_notify_cb": { "type": "callback", - "file": "diff.h", - "line": 359, - "lineto": 363, + "file": "git2/diff.h", + "line": 331, + "lineto": 335, "args": [ { "name": "diff_so_far", @@ -25431,13 +27291,13 @@ "comment": null }, "description": "

Diff notification callback function.

\n", - "comments": "

The callback will be called for each file, just before the git_delta_t gets inserted into the diff.

\n\n

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" + "comments": "

The callback will be called for each file, just before the git_diff_delta\n gets inserted into the diff.

\n\n

When the callback:\n - returns \n<\n 0, the diff process will be aborted.\n - returns > 0, the delta will not be inserted into the diff, but the\n diff process continues.\n - returns 0, the delta is inserted into the diff, and the diff process\n continues.

\n" }, "git_diff_progress_cb": { "type": "callback", - "file": "diff.h", - "line": 375, - "lineto": 379, + "file": "git2/diff.h", + "line": 347, + "lineto": 351, "args": [ { "name": "diff_so_far", @@ -25471,9 +27331,9 @@ }, "git_diff_file_cb": { "type": "callback", - "file": "diff.h", - "line": 458, - "lineto": 461, + "file": "git2/diff.h", + "line": 465, + "lineto": 468, "args": [ { "name": "delta", @@ -25502,9 +27362,9 @@ }, "git_diff_binary_cb": { "type": "callback", - "file": "diff.h", - "line": 515, - "lineto": 518, + "file": "git2/diff.h", + "line": 531, + "lineto": 534, "args": [ { "name": "delta", @@ -25533,9 +27393,9 @@ }, "git_diff_hunk_cb": { "type": "callback", - "file": "diff.h", - "line": 535, - "lineto": 538, + "file": "git2/diff.h", + "line": 557, + "lineto": 560, "args": [ { "name": "delta", @@ -25564,9 +27424,9 @@ }, "git_diff_line_cb": { "type": "callback", - "file": "diff.h", - "line": 588, - "lineto": 592, + "file": "git2/diff.h", + "line": 618, + "lineto": 622, "args": [ { "name": "delta", @@ -25596,11 +27456,11 @@ "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" + "comments": "

When printing a diff, callback that will be made to output each line\n of text. This uses some extra GIT_DIFF_LINE_... constants for output\n of lines of file and hunk headers.

\n" }, "git_index_matched_path_cb": { "type": "callback", - "file": "index.h", + "file": "git2/index.h", "line": 146, "lineto": 147, "args": [ @@ -25631,7 +27491,7 @@ }, "git_headlist_cb": { "type": "callback", - "file": "net.h", + "file": "git2/net.h", "line": 55, "lineto": 55, "args": [ @@ -25657,7 +27517,7 @@ }, "git_note_foreach_cb": { "type": "callback", - "file": "notes.h", + "file": "git2/notes.h", "line": 29, "lineto": 30, "args": [ @@ -25684,11 +27544,11 @@ "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

\n" + "comments": "

Receives:\n - blob_id: Oid of the blob containing the message\n - annotated_object_id: Oid of the git object being annotated\n - payload: Payload data passed to git_note_foreach

\n" }, "git_odb_foreach_cb": { "type": "callback", - "file": "odb.h", + "file": "git2/odb.h", "line": 27, "lineto": 27, "args": [ @@ -25712,9 +27572,40 @@ "description": "

Function type for callbacks from git_odb_foreach.

\n", "comments": "" }, + "git_packbuilder_foreach_cb": { + "type": "callback", + "file": "git2/pack.h", + "line": 181, + "lineto": 181, + "args": [ + { + "name": "buf", + "type": "void *", + "comment": null + }, + { + "name": "size", + "type": "size_t", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "void *buf, size_t size, void *payload", + "sig": "void *::size_t::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, "git_packbuilder_progress": { "type": "callback", - "file": "pack.h", + "file": "git2/pack.h", "line": 210, "lineto": 214, "args": [ @@ -25748,9 +27639,61 @@ "description": "

Packbuilder progress notification function

\n", "comments": "" }, + "git_reference_foreach_cb": { + "type": "callback", + "file": "git2/refs.h", + "line": 425, + "lineto": 425, + "args": [ + { + "name": "reference", + "type": "git_reference *", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "git_reference *reference, void *payload", + "sig": "git_reference *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, + "git_reference_foreach_name_cb": { + "type": "callback", + "file": "git2/refs.h", + "line": 426, + "lineto": 426, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "const char *name, void *payload", + "sig": "const char *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, "git_push_transfer_progress": { "type": "callback", - "file": "remote.h", + "file": "git2/remote.h", "line": 351, "lineto": 355, "args": [ @@ -25786,7 +27729,7 @@ }, "git_push_negotiation": { "type": "callback", - "file": "remote.h", + "file": "git2/remote.h", "line": 386, "lineto": 386, "args": [ @@ -25817,7 +27760,7 @@ }, "git_push_update_reference_cb": { "type": "callback", - "file": "remote.h", + "file": "git2/remote.h", "line": 400, "lineto": 400, "args": [ @@ -25844,11 +27787,78 @@ "comment": " 0 on success, otherwise an error" }, "description": "

Callback used to inform of the update status from the remote.

\n", - "comments": "

Called for each updated reference on push. If status is not NULL, the update was rejected by the remote server and status contains the reason given.

\n" + "comments": "

Called for each updated reference on push. If status is\n not NULL, the update was rejected by the remote server\n and status contains the reason given.

\n" + }, + "git_repository_fetchhead_foreach_cb": { + "type": "callback", + "file": "git2/repository.h", + "line": 630, + "lineto": 634, + "args": [ + { + "name": "ref_name", + "type": "const char *", + "comment": null + }, + { + "name": "remote_url", + "type": "const char *", + "comment": null + }, + { + "name": "oid", + "type": "const git_oid *", + "comment": null + }, + { + "name": "is_merge", + "type": "unsigned int", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "const char *ref_name, const char *remote_url, const git_oid *oid, unsigned int is_merge, void *payload", + "sig": "const char *::const char *::const git_oid *::unsigned int::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, + "git_repository_mergehead_foreach_cb": { + "type": "callback", + "file": "git2/repository.h", + "line": 652, + "lineto": 653, + "args": [ + { + "name": "oid", + "type": "const git_oid *", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "const git_oid *oid, void *payload", + "sig": "const git_oid *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" }, "git_revwalk_hide_cb": { "type": "callback", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 277, "lineto": 279, "args": [ @@ -25874,9 +27884,9 @@ }, "git_stash_apply_progress_cb": { "type": "callback", - "file": "stash.h", - "line": 113, - "lineto": 115, + "file": "git2/stash.h", + "line": 115, + "lineto": 117, "args": [ { "name": "progress", @@ -25900,9 +27910,9 @@ }, "git_stash_cb": { "type": "callback", - "file": "stash.h", - "line": 198, - "lineto": 202, + "file": "git2/stash.h", + "line": 201, + "lineto": 205, "args": [ { "name": "index", @@ -25916,7 +27926,7 @@ }, { "name": "stash_id", - "type": "const int *", + "type": "const git_oid *", "comment": "The commit oid of the stashed state." }, { @@ -25925,8 +27935,8 @@ "comment": "Extra parameter to callback function." } ], - "argline": "size_t index, const char *message, const int *stash_id, void *payload", - "sig": "size_t::const char *::const int *::void *", + "argline": "size_t index, const char *message, const git_oid *stash_id, void *payload", + "sig": "size_t::const char *::const git_oid *::void *", "return": { "type": "int", "comment": " 0 to continue iterating or non-zero to stop." @@ -25936,9 +27946,9 @@ }, "git_status_cb": { "type": "callback", - "file": "status.h", - "line": 61, - "lineto": 62, + "file": "git2/status.h", + "line": 63, + "lineto": 64, "args": [ { "name": "path", @@ -25967,7 +27977,7 @@ }, "git_submodule_cb": { "type": "callback", - "file": "submodule.h", + "file": "git2/submodule.h", "line": 118, "lineto": 119, "args": [ @@ -25998,7 +28008,7 @@ }, "git_filter_init_fn": { "type": "callback", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 141, "lineto": 141, "args": [ @@ -26015,11 +28025,11 @@ "comment": null }, "description": "

Initialize callback on filter

\n", - "comments": "

Specified as filter.initialize, this is an optional callback invoked before a filter is first used. It will be called once at most.

\n\n

If non-NULL, the filter's initialize callback will be invoked right before the first use of the filter, so you can defer expensive initialization operations (in case libgit2 is being used in a way that doesn't need the filter).

\n" + "comments": "

Specified as filter.initialize, this is an optional callback invoked\n before a filter is first used. It will be called once at most.

\n\n

If non-NULL, the filter's initialize callback will be invoked right\n before the first use of the filter, so you can defer expensive\n initialization operations (in case libgit2 is being used in a way that\n doesn't need the filter).

\n" }, "git_filter_shutdown_fn": { "type": "callback", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 153, "lineto": 153, "args": [ @@ -26036,11 +28046,11 @@ "comment": null }, "description": "

Shutdown callback on filter

\n", - "comments": "

Specified as filter.shutdown, this is an optional callback invoked when the filter is unregistered or when libgit2 is shutting down. It will be called once at most and should release resources as needed. This may be called even if the initialize callback was not made.

\n\n

Typically this function will free the git_filter object itself.

\n" + "comments": "

Specified as filter.shutdown, this is an optional callback invoked\n when the filter is unregistered or when libgit2 is shutting down. It\n will be called once at most and should release resources as needed.\n This may be called even if the initialize callback was not made.

\n\n

Typically this function will free the git_filter object itself.

\n" }, "git_filter_check_fn": { "type": "callback", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 175, "lineto": 179, "args": [ @@ -26072,11 +28082,11 @@ "comment": null }, "description": "

Callback to decide if a given source needs this filter

\n", - "comments": "

Specified as filter.check, this is an optional callback that checks if filtering is needed for a given source.

\n\n

It should return 0 if the filter should be applied (i.e. success), GIT_PASSTHROUGH if the filter should not be applied, or an error code to fail out of the filter processing pipeline and return to the caller.

\n\n

The attr_values will be set to the values of any attributes given in the filter definition. See git_filter below for more detail.

\n\n

The payload will be a pointer to a reference payload for the filter. This will start as NULL, but check can assign to this pointer for later use by the apply callback. Note that the value should be heap allocated (not stack), so that it doesn't go away before the apply callback can use it. If a filter allocates and assigns a value to the payload, it will need a cleanup callback to free the payload.

\n" + "comments": "

Specified as filter.check, this is an optional callback that checks\n if filtering is needed for a given source.

\n\n

It should return 0 if the filter should be applied (i.e. success),\n GIT_PASSTHROUGH if the filter should not be applied, or an error code\n to fail out of the filter processing pipeline and return to the caller.

\n\n

The attr_values will be set to the values of any attributes given in\n the filter definition. See git_filter below for more detail.

\n\n

The payload will be a pointer to a reference payload for the filter.\n This will start as NULL, but check can assign to this pointer for\n later use by the apply callback. Note that the value should be heap\n allocated (not stack), so that it doesn't go away before the apply\n callback can use it. If a filter allocates and assigns a value to the\n payload, it will need a cleanup callback to free the payload.

\n" }, "git_filter_apply_fn": { "type": "callback", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 193, "lineto": 198, "args": [ @@ -26113,11 +28123,52 @@ "comment": null }, "description": "

Callback to actually perform the data filtering

\n", - "comments": "

Specified as filter.apply, this is the callback that actually filters data. If it successfully writes the output, it should return 0. Like check, it can return GIT_PASSTHROUGH to indicate that the filter doesn't want to run. Other error codes will stop filter processing and return to the caller.

\n\n

The payload value will refer to any payload that was set by the check callback. It may be read from or written to as needed.

\n" + "comments": "

Specified as filter.apply, this is the callback that actually filters\n data. If it successfully writes the output, it should return 0. Like\n check, it can return GIT_PASSTHROUGH to indicate that the filter\n doesn't want to run. Other error codes will stop filter processing and\n return to the caller.

\n\n

The payload value will refer to any payload that was set by the\n check callback. It may be read from or written to as needed.

\n" + }, + "git_filter_stream_fn": { + "type": "callback", + "file": "git2/sys/filter.h", + "line": 200, + "lineto": 205, + "args": [ + { + "name": "out", + "type": "git_writestream **", + "comment": null + }, + { + "name": "self", + "type": "git_filter *", + "comment": null + }, + { + "name": "payload", + "type": "void **", + "comment": null + }, + { + "name": "src", + "type": "const git_filter_source *", + "comment": null + }, + { + "name": "next", + "type": "git_writestream *", + "comment": null + } + ], + "argline": "git_writestream **out, git_filter *self, void **payload, const git_filter_source *src, git_writestream *next", + "sig": "git_writestream **::git_filter *::void **::const git_filter_source *::git_writestream *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" }, "git_filter_cleanup_fn": { "type": "callback", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 215, "lineto": 217, "args": [ @@ -26139,59 +28190,59 @@ "comment": null }, "description": "

Callback to clean up after filtering has been applied

\n", - "comments": "

Specified as filter.cleanup, this is an optional callback invoked after the filter has been applied. If the check or apply callbacks allocated a payload to keep per-source filter state, use this callback to free that payload and release resources as required.

\n" + "comments": "

Specified as filter.cleanup, this is an optional callback invoked\n after the filter has been applied. If the check or apply callbacks\n allocated a payload to keep per-source filter state, use this\n callback to free that payload and release resources as required.

\n" }, "git_merge_driver_init_fn": { "type": "callback", - "file": "sys/merge.h", - "line": 71, - "lineto": 71, + "file": "git2/sys/merge.h", + "line": 76, + "lineto": 76, "args": [ { "name": "self", - "type": "int *", + "type": "git_merge_driver *", "comment": null } ], - "argline": "int *self", - "sig": "int *", + "argline": "git_merge_driver *self", + "sig": "git_merge_driver *", "return": { "type": "int", "comment": null }, "description": "

Initialize callback on merge driver

\n", - "comments": "

Specified as driver.initialize, this is an optional callback invoked before a merge driver is first used. It will be called once at most per library lifetime.

\n\n

If non-NULL, the merge driver's initialize callback will be invoked right before the first use of the driver, so you can defer expensive initialization operations (in case libgit2 is being used in a way that doesn't need the merge driver).

\n" + "comments": "

Specified as driver.initialize, this is an optional callback invoked\n before a merge driver is first used. It will be called once at most\n per library lifetime.

\n\n

If non-NULL, the merge driver's initialize callback will be invoked\n right before the first use of the driver, so you can defer expensive\n initialization operations (in case libgit2 is being used in a way that\n doesn't need the merge driver).

\n" }, "git_merge_driver_shutdown_fn": { "type": "callback", - "file": "sys/merge.h", - "line": 83, - "lineto": 83, + "file": "git2/sys/merge.h", + "line": 88, + "lineto": 88, "args": [ { "name": "self", - "type": "int *", + "type": "git_merge_driver *", "comment": null } ], - "argline": "int *self", - "sig": "int *", + "argline": "git_merge_driver *self", + "sig": "git_merge_driver *", "return": { "type": "void", "comment": null }, "description": "

Shutdown callback on merge driver

\n", - "comments": "

Specified as driver.shutdown, this is an optional callback invoked when the merge driver is unregistered or when libgit2 is shutting down. It will be called once at most and should release resources as needed. This may be called even if the initialize callback was not made.

\n\n

Typically this function will free the git_merge_driver object itself.

\n" + "comments": "

Specified as driver.shutdown, this is an optional callback invoked\n when the merge driver is unregistered or when libgit2 is shutting down.\n It will be called once at most and should release resources as needed.\n This may be called even if the initialize callback was not made.

\n\n

Typically this function will free the git_merge_driver object itself.

\n" }, "git_merge_driver_apply_fn": { "type": "callback", - "file": "sys/merge.h", - "line": 103, - "lineto": 109, + "file": "git2/sys/merge.h", + "line": 108, + "lineto": 114, "args": [ { "name": "self", - "type": "int *", + "type": "git_merge_driver *", "comment": null }, { @@ -26201,12 +28252,12 @@ }, { "name": "mode_out", - "type": "int *", + "type": "uint32_t *", "comment": null }, { "name": "merged_out", - "type": "int *", + "type": "git_buf *", "comment": null }, { @@ -26220,18 +28271,111 @@ "comment": null } ], - "argline": "int *self, const char **path_out, int *mode_out, int *merged_out, const char *filter_name, const git_merge_driver_source *src", - "sig": "int *::const char **::int *::int *::const char *::const git_merge_driver_source *", + "argline": "git_merge_driver *self, const char **path_out, uint32_t *mode_out, git_buf *merged_out, const char *filter_name, const git_merge_driver_source *src", + "sig": "git_merge_driver *::const char **::uint32_t *::git_buf *::const char *::const git_merge_driver_source *", "return": { "type": "int", "comment": null }, "description": "

Callback to perform the merge.

\n", - "comments": "

Specified as driver.apply, this is the callback that actually does the merge. If it can successfully perform a merge, it should populate path_out with a pointer to the filename to accept, mode_out with the resultant mode, and merged_out with the buffer of the merged file and then return 0. If the driver returns GIT_PASSTHROUGH, then the default merge driver should instead be run. It can also return GIT_EMERGECONFLICT if the driver is not able to produce a merge result, and the file will remain conflicted. Any other errors will fail and return to the caller.

\n\n

The filter_name contains the name of the filter that was invoked, as specified by the file's attributes.

\n\n

The src contains the data about the file to be merged.

\n" + "comments": "

Specified as driver.apply, this is the callback that actually does the\n merge. If it can successfully perform a merge, it should populate\n path_out with a pointer to the filename to accept, mode_out with\n the resultant mode, and merged_out with the buffer of the merged file\n and then return 0. If the driver returns GIT_PASSTHROUGH, then the\n default merge driver should instead be run. It can also return\n GIT_EMERGECONFLICT if the driver is not able to produce a merge result,\n and the file will remain conflicted. Any other errors will fail and\n return to the caller.

\n\n

The filter_name contains the name of the filter that was invoked, as\n specified by the file's attributes.

\n\n

The src contains the data about the file to be merged.

\n" + }, + "git_stream_cb": { + "type": "callback", + "file": "git2/sys/stream.h", + "line": 43, + "lineto": 43, + "args": [ + { + "name": "out", + "type": "git_stream **", + "comment": null + }, + { + "name": "host", + "type": "const char *", + "comment": null + }, + { + "name": "port", + "type": "const char *", + "comment": null + } + ], + "argline": "git_stream **out, const char *host, const char *port", + "sig": "git_stream **::const char *::const char *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, + "git_smart_subtransport_cb": { + "type": "callback", + "file": "git2/sys/transport.h", + "line": 325, + "lineto": 328, + "args": [ + { + "name": "out", + "type": "git_smart_subtransport **", + "comment": null + }, + { + "name": "owner", + "type": "git_transport *", + "comment": null + }, + { + "name": "param", + "type": "void *", + "comment": null + } + ], + "argline": "git_smart_subtransport **out, git_transport *owner, void *param", + "sig": "git_smart_subtransport **::git_transport *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, + "git_tag_foreach_cb": { + "type": "callback", + "file": "git2/tag.h", + "line": 321, + "lineto": 321, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": null + }, + { + "name": "oid", + "type": "git_oid *", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "const char *name, git_oid *oid, void *payload", + "sig": "const char *::git_oid *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" }, "git_trace_callback": { "type": "callback", - "file": "trace.h", + "file": "git2/trace.h", "line": 52, "lineto": 52, "args": [ @@ -26257,7 +28401,7 @@ }, "git_transport_cb": { "type": "callback", - "file": "transport.h", + "file": "git2/transport.h", "line": 24, "lineto": 24, "args": [ @@ -26286,11 +28430,113 @@ "description": "

Signature of a function which creates a transport

\n", "comments": "" }, + "git_cred_sign_callback": { + "type": "callback", + "file": "git2/transport.h", + "line": 168, + "lineto": 168, + "args": [ + { + "name": "session", + "type": "LIBSSH2_SESSION *", + "comment": null + }, + { + "name": "sig", + "type": "unsigned char **", + "comment": null + }, + { + "name": "sig_len", + "type": "size_t *", + "comment": null + }, + { + "name": "data", + "type": "const unsigned char *", + "comment": null + }, + { + "name": "data_len", + "type": "size_t", + "comment": null + }, + { + "name": "abstract", + "type": "void **", + "comment": null + } + ], + "argline": "LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract", + "sig": "LIBSSH2_SESSION *::unsigned char **::size_t *::const unsigned char *::size_t::void **", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "" + }, + "git_cred_ssh_interactive_callback": { + "type": "callback", + "file": "git2/transport.h", + "line": 169, + "lineto": 169, + "args": [ + { + "name": "name", + "type": "const char *", + "comment": null + }, + { + "name": "name_len", + "type": "int", + "comment": null + }, + { + "name": "instruction", + "type": "const char *", + "comment": null + }, + { + "name": "instruction_len", + "type": "int", + "comment": null + }, + { + "name": "num_prompts", + "type": "int", + "comment": null + }, + { + "name": "prompts", + "type": "const LIBSSH2_USERAUTH_KBDINT_PROMPT *", + "comment": null + }, + { + "name": "responses", + "type": "LIBSSH2_USERAUTH_KBDINT_RESPONSE *", + "comment": null + }, + { + "name": "abstract", + "type": "void **", + "comment": null + } + ], + "argline": "const char *name, int name_len, const char *instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, void **abstract", + "sig": "const char *::int::const char *::int::int::const LIBSSH2_USERAUTH_KBDINT_PROMPT *::LIBSSH2_USERAUTH_KBDINT_RESPONSE *::void **", + "return": { + "type": "void", + "comment": null + }, + "description": "", + "comments": "" + }, "git_cred_acquire_cb": { "type": "callback", - "file": "transport.h", - "line": 333, - "lineto": 338, + "file": "git2/transport.h", + "line": 362, + "lineto": 367, "args": [ { "name": "cred", @@ -26329,7 +28575,7 @@ }, "git_treebuilder_filter_cb": { "type": "callback", - "file": "tree.h", + "file": "git2/tree.h", "line": 347, "lineto": 348, "args": [ @@ -26351,11 +28597,11 @@ "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" + "comments": "

The return value is treated as a boolean, with zero indicating that the\n entry should be left alone and any non-zero value meaning that the\n entry should be removed from the treebuilder list (i.e. filtered out).

\n" }, "git_treewalk_cb": { "type": "callback", - "file": "tree.h", + "file": "git2/tree.h", "line": 394, "lineto": 395, "args": [ @@ -26386,7 +28632,7 @@ }, "git_transfer_progress_cb": { "type": "callback", - "file": "types.h", + "file": "git2/types.h", "line": 274, "lineto": 274, "args": [ @@ -26412,7 +28658,7 @@ }, "git_transport_message_cb": { "type": "callback", - "file": "types.h", + "file": "git2/types.h", "line": 284, "lineto": 284, "args": [ @@ -26443,7 +28689,7 @@ }, "git_transport_certificate_check_cb": { "type": "callback", - "file": "types.h", + "file": "git2/types.h", "line": 334, "lineto": 334, "args": [ @@ -26480,18 +28726,215 @@ }, "globals": {}, "types": [ + [ + "LIBSSH2_SESSION", + { + "decl": "LIBSSH2_SESSION", + "type": "struct", + "value": "LIBSSH2_SESSION", + "file": "git2/transport.h", + "line": 163, + "lineto": 163, + "tdef": "typedef", + "description": "", + "comments": "", + "used": { + "returns": [], + "needs": [ + "git_cred_sign_callback" + ] + } + } + ], + [ + "LIBSSH2_USERAUTH_KBDINT_PROMPT", + { + "decl": "LIBSSH2_USERAUTH_KBDINT_PROMPT", + "type": "struct", + "value": "LIBSSH2_USERAUTH_KBDINT_PROMPT", + "file": "git2/transport.h", + "line": 164, + "lineto": 164, + "tdef": "typedef", + "description": "", + "comments": "", + "used": { + "returns": [], + "needs": [ + "git_cred_ssh_interactive_callback" + ] + } + } + ], + [ + "LIBSSH2_USERAUTH_KBDINT_RESPONSE", + { + "decl": "LIBSSH2_USERAUTH_KBDINT_RESPONSE", + "type": "struct", + "value": "LIBSSH2_USERAUTH_KBDINT_RESPONSE", + "file": "git2/transport.h", + "line": 165, + "lineto": 165, + "tdef": "typedef", + "description": "", + "comments": "", + "used": { + "returns": [], + "needs": [ + "git_cred_ssh_interactive_callback" + ] + } + } + ], + [ + "_LIBSSH2_SESSION", + { + "decl": [], + "type": "struct", + "value": "_LIBSSH2_SESSION", + "file": "git2/transport.h", + "line": 163, + "lineto": 163, + "tdef": null, + "description": "", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "_LIBSSH2_USERAUTH_KBDINT_PROMPT", + { + "decl": [], + "type": "struct", + "value": "_LIBSSH2_USERAUTH_KBDINT_PROMPT", + "file": "git2/transport.h", + "line": 164, + "lineto": 164, + "tdef": null, + "description": "", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "_LIBSSH2_USERAUTH_KBDINT_RESPONSE", + { + "decl": [], + "type": "struct", + "value": "_LIBSSH2_USERAUTH_KBDINT_RESPONSE", + "file": "git2/transport.h", + "line": 165, + "lineto": 165, + "tdef": null, + "description": "", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "git_allocator", + { + "decl": [ + "void *(*)(size_t, const char *, int) gmalloc", + "void *(*)(size_t, size_t, const char *, int) gcalloc", + "char *(*)(const char *, const char *, int) gstrdup", + "char *(*)(const char *, size_t, const char *, int) gstrndup", + "char *(*)(const char *, size_t, const char *, int) gsubstrdup", + "void *(*)(void *, size_t, const char *, int) grealloc", + "void *(*)(void *, size_t, size_t, const char *, int) greallocarray", + "void *(*)(size_t, size_t, const char *, int) gmallocarray", + "void (*)(void *) gfree" + ], + "type": "struct", + "value": "git_allocator", + "file": "git2/sys/alloc.h", + "line": 23, + "lineto": 73, + "block": "void *(*)(size_t, const char *, int) gmalloc\nvoid *(*)(size_t, size_t, const char *, int) gcalloc\nchar *(*)(const char *, const char *, int) gstrdup\nchar *(*)(const char *, size_t, const char *, int) gstrndup\nchar *(*)(const char *, size_t, const char *, int) gsubstrdup\nvoid *(*)(void *, size_t, const char *, int) grealloc\nvoid *(*)(void *, size_t, size_t, const char *, int) greallocarray\nvoid *(*)(size_t, size_t, const char *, int) gmallocarray\nvoid (*)(void *) gfree", + "tdef": "typedef", + "description": " An instance for a custom memory allocator", + "comments": "

Setting the pointers of this structure allows the developer to implement\n custom memory allocators. The global memory allocator can be set by using\n "GIT_OPT_SET_ALLOCATOR" with the git_libgit2_opts function. Keep in mind\n that all fields need to be set to a proper function.

\n", + "fields": [ + { + "type": "void *(*)(size_t, const char *, int)", + "name": "gmalloc", + "comments": "" + }, + { + "type": "void *(*)(size_t, size_t, const char *, int)", + "name": "gcalloc", + "comments": "" + }, + { + "type": "char *(*)(const char *, const char *, int)", + "name": "gstrdup", + "comments": "" + }, + { + "type": "char *(*)(const char *, size_t, const char *, int)", + "name": "gstrndup", + "comments": "" + }, + { + "type": "char *(*)(const char *, size_t, const char *, int)", + "name": "gsubstrdup", + "comments": "" + }, + { + "type": "void *(*)(void *, size_t, const char *, int)", + "name": "grealloc", + "comments": "" + }, + { + "type": "void *(*)(void *, size_t, size_t, const char *, int)", + "name": "greallocarray", + "comments": "" + }, + { + "type": "void *(*)(size_t, size_t, const char *, int)", + "name": "gmallocarray", + "comments": "" + }, + { + "type": "void (*)(void *)", + "name": "gfree", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_stdalloc_init_allocator", + "git_win32_crtdbg_init_allocator" + ] + } + } + ], [ "git_annotated_commit", { "decl": "git_annotated_commit", "type": "struct", "value": "git_annotated_commit", - "file": "types.h", - "line": 182, - "lineto": 182, + "file": "git2/types.h", + "line": 185, + "lineto": 185, "tdef": "typedef", "description": " Annotated commits, the input to merge and rebase. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -26501,6 +28944,7 @@ "git_annotated_commit_from_revspec", "git_annotated_commit_id", "git_annotated_commit_lookup", + "git_annotated_commit_ref", "git_branch_create_from_annotated", "git_merge", "git_merge_analysis", @@ -26521,7 +28965,7 @@ "GIT_ATTR_VALUE_T" ], "type": "enum", - "file": "attr.h", + "file": "git2/attr.h", "line": 82, "lineto": 87, "block": "GIT_ATTR_UNSPECIFIED_T\nGIT_ATTR_TRUE_T\nGIT_ATTR_FALSE_T\nGIT_ATTR_VALUE_T", @@ -26562,6 +29006,36 @@ } } ], + [ + "git_blame", + { + "decl": "git_blame", + "type": "struct", + "value": "git_blame", + "file": "git2/blame.h", + "line": 149, + "lineto": 149, + "tdef": "typedef", + "description": " Opaque structure to hold blame results ", + "comments": "", + "fields": [], + "used": { + "returns": [ + "git_blame_get_hunk_byindex", + "git_blame_get_hunk_byline" + ], + "needs": [ + "git_blame_buffer", + "git_blame_file", + "git_blame_free", + "git_blame_get_hunk_byindex", + "git_blame_get_hunk_byline", + "git_blame_get_hunk_count", + "git_blame_init_options" + ] + } + } + ], [ "git_blame_flag_t", { @@ -26571,13 +29045,14 @@ "GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES", "GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES", "GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES", - "GIT_BLAME_FIRST_PARENT" + "GIT_BLAME_FIRST_PARENT", + "GIT_BLAME_USE_MAILMAP" ], "type": "enum", - "file": "blame.h", + "file": "git2/blame.h", "line": 26, - "lineto": 46, - "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", + "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", "tdef": "typedef", "description": " Flags for indicating option behavior for git_blame APIs.", "comments": "", @@ -26617,6 +29092,12 @@ "name": "GIT_BLAME_FIRST_PARENT", "comments": "

Restrict the search of commits to those reachable following only the\n 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", + "value": 32 } ], "used": { @@ -26641,13 +29122,13 @@ ], "type": "struct", "value": "git_blame_hunk", - "file": "blame.h", - "line": 115, - "lineto": 128, + "file": "git2/blame.h", + "line": 132, + "lineto": 145, "block": "size_t lines_in_hunk\ngit_oid final_commit_id\nsize_t final_start_line_number\ngit_signature * final_signature\ngit_oid orig_commit_id\nconst char * orig_path\nsize_t orig_start_line_number\ngit_signature * orig_signature\nchar boundary", "tdef": "typedef", "description": " Structure that represents a blame hunk.", - "comments": "
    \n
  • 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 - 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. - 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)
  • \n
\n", + "comments": "
    \n
  • lines_in_hunk is the number of lines in this hunk
  • \n
  • final_commit_id is the OID of the commit where this line was last\nchanged.
  • \n
  • final_start_line_number is the 1-based line number where this hunk\nbegins, in the final version of the file
  • \n
  • final_signature is the author of final_commit_id. If\nGIT_BLAME_USE_MAILMAP has been specified, it will contain the canonical\nreal name and email address.
  • \n
  • orig_commit_id is the OID of the commit where this hunk was found. This\nwill usually be the same as final_commit_id, except when\nGIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES has been specified.
  • \n
  • orig_path is the path to the file where this hunk originated, as of the\ncommit specified by orig_commit_id.
  • \n
  • orig_start_line_number is the 1-based line number where this hunk begins\nin the file named by orig_path in the commit specified by\norig_commit_id.
  • \n
  • orig_signature is the author of orig_commit_id. If\nGIT_BLAME_USE_MAILMAP has been specified, it will contain the canonical\nreal name and email address.
  • \n
  • boundary is 1 iff the hunk has been tracked to a boundary commit (the\nroot, or the commit specified in git_blame_options.oldest_commit)
  • \n
\n", "fields": [ { "type": "size_t", @@ -26718,13 +29199,13 @@ ], "type": "struct", "value": "git_blame_options", - "file": "blame.h", - "line": 70, - "lineto": 79, + "file": "git2/blame.h", + "line": 59, + "lineto": 88, "block": "unsigned int version\nuint32_t flags\nuint16_t min_match_characters\ngit_oid newest_commit\ngit_oid oldest_commit\nsize_t min_line\nsize_t max_line", "tdef": "typedef", "description": " Blame options structure", - "comments": "

Use zeros to indicate default settings. It's easiest to use the GIT_BLAME_OPTIONS_INIT macro: git_blame_options opts = GIT_BLAME_OPTIONS_INIT;

\n\n
    \n
  • flags is a combination of the git_blame_flag_t values above. - min_match_characters is the lower bound on the number of alphanumeric characters that must be detected as moving/copying within a file for it to associate those lines with the parent commit. The default value is 20. This value only takes effect if any of the GIT_BLAME_TRACK_COPIES_* flags are specified. - newest_commit is the id of the newest commit to consider. The default is HEAD. - oldest_commit is the id of the oldest commit to consider. The default is the first commit encountered with a NULL parent. - min_line is the first line in the file to blame. The default is 1 (line numbers start with 1). - max_line is the last line in the file to blame. The default is the last line of the file.
  • \n
\n", + "comments": "

Initialize with GIT_BLAME_OPTIONS_INIT. Alternatively, you can\n use git_blame_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -26734,32 +29215,32 @@ { "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " A combination of `git_blame_flag_t` " }, { "type": "uint16_t", "name": "min_match_characters", - "comments": "" + "comments": " The lower bound on the number of alphanumeric\n characters that must be detected as moving/copying within a file for it to\n associate those lines with the parent commit. The default value is 20.\n This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*`\n flags are specified." }, { "type": "git_oid", "name": "newest_commit", - "comments": "" + "comments": " The id of the newest commit to consider. The default is HEAD. " }, { "type": "git_oid", "name": "oldest_commit", - "comments": "" + "comments": " The id of the oldest commit to consider.\n The default is the first commit encountered with a NULL parent." }, { "type": "size_t", "name": "min_line", - "comments": "" + "comments": " The first line in the file to blame.\n The default is 1 (line numbers start with 1)." }, { "type": "size_t", "name": "max_line", - "comments": "" + "comments": " The last line in the file to blame.\n The default is the last line of the file." } ], "used": { @@ -26777,12 +29258,13 @@ "decl": "git_blob", "type": "struct", "value": "git_blob", - "file": "types.h", - "line": 120, - "lineto": 120, + "file": "git2/types.h", + "line": 123, + "lineto": 123, "tdef": "typedef", "description": " In-memory representation of a blob object. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -26813,12 +29295,13 @@ "decl": "git_branch_iterator", "type": "struct", "value": "git_branch_iterator", - "file": "branch.h", + "file": "git2/branch.h", "line": 88, "lineto": 88, "tdef": "typedef", "description": " Iterator type for branches ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -26838,7 +29321,7 @@ "GIT_BRANCH_ALL" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 202, "lineto": 206, "block": "GIT_BRANCH_LOCAL\nGIT_BRANCH_REMOTE\nGIT_BRANCH_ALL", @@ -26885,13 +29368,13 @@ ], "type": "struct", "value": "git_buf", - "file": "buffer.h", + "file": "git2/buffer.h", "line": 52, "lineto": 55, "block": "char * ptr\nsize_t asize\nsize_t size", "tdef": "typedef", "description": " A data buffer for exporting data from libgit2", - "comments": "

Sometimes libgit2 wants to return an allocated data buffer to the 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_free() to release it when they are done.

\n\n

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.

\n\n

A git_buf is a public structure with three fields:

\n\n
    \n
  • ptr points to the start of the allocated memory. If it is NULL, then the git_buf is considered empty and libgit2 will feel free to overwrite it with new data.

  • \n
  • size holds the size (in bytes) of the data that is actually used.

  • \n
  • asize holds the known total amount of allocated memory if the ptr was allocated by libgit2. It may be larger than size. If ptr was not allocated by libgit2 and should not be resized and/or freed, then asize will be set to zero.

  • \n
\n\n

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.

\n", + "comments": "

Sometimes libgit2 wants to return an allocated data buffer to the\n caller and have the caller take responsibility for freeing that memory.\n This can be awkward if the caller does not have easy access to the same\n allocation functions that libgit2 is using. In those cases, libgit2\n will fill in a git_buf and the caller can use git_buf_dispose() to\n release it when they are done.

\n\n

A git_buf may also be used for the caller to pass in a reference to\n a block of memory they hold. In this case, libgit2 will not resize or\n free the memory, but will read from it as needed.

\n\n

A git_buf is a public structure with three fields:

\n\n
    \n
  • ptr points to the start of the allocated memory. If it is NULL,\nthen the git_buf is considered empty and libgit2 will feel free\nto overwrite it with new data.

  • \n
  • size holds the size (in bytes) of the data that is actually used.

  • \n
  • asize holds the known total amount of allocated memory if the ptr\nwas allocated by libgit2. It may be larger than size. If ptr\nwas not allocated by libgit2 and should not be resized and/or freed,\nthen asize will be set to zero.

  • \n
\n\n

Some APIs may occasionally do something slightly unusual with a buffer,\n such as setting ptr to a value that was passed in by the user. In\n those cases, the behavior will be clearly documented by the API.

\n", "fields": [ { "type": "char *", @@ -26913,7 +29396,11 @@ "returns": [], "needs": [ "git_blob_filtered_content", + "git_branch_remote_name", + "git_branch_upstream_name", + "git_branch_upstream_remote", "git_buf_contains_nul", + "git_buf_dispose", "git_buf_free", "git_buf_grow", "git_buf_is_binary", @@ -26939,8 +29426,11 @@ "git_filter_list_apply_to_file", "git_filter_list_stream_data", "git_mempack_dump", + "git_merge_driver_apply_fn", "git_message_prettify", + "git_note_default_ref", "git_object_short_id", + "git_packbuilder_write_buf", "git_patch_to_buf", "git_refspec_rtransform", "git_refspec_transform", @@ -26963,7 +29453,7 @@ ], "type": "struct", "value": "git_cert", - "file": "types.h", + "file": "git2/types.h", "line": 318, "lineto": 323, "block": "git_cert_t cert_type", @@ -26997,7 +29487,7 @@ ], "type": "struct", "value": "git_cert_hostkey", - "file": "transport.h", + "file": "git2/transport.h", "line": 39, "lineto": 59, "block": "git_cert parent\ngit_cert_ssh_t type\nunsigned char [16] hash_md5\nunsigned char [20] hash_sha1", @@ -27040,7 +29530,7 @@ "GIT_CERT_SSH_SHA1" ], "type": "enum", - "file": "transport.h", + "file": "git2/transport.h", "line": 29, "lineto": 34, "block": "GIT_CERT_SSH_MD5\nGIT_CERT_SSH_SHA1", @@ -27077,7 +29567,7 @@ "GIT_CERT_STRARRAY" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 290, "lineto": 313, "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", @@ -27126,7 +29616,7 @@ ], "type": "struct", "value": "git_cert_x509", - "file": "transport.h", + "file": "git2/transport.h", "line": 64, "lineto": 74, "block": "git_cert parent\nvoid * data\nsize_t len", @@ -27169,13 +29659,13 @@ "GIT_CHECKOUT_NOTIFY_ALL" ], "type": "enum", - "file": "checkout.h", + "file": "git2/checkout.h", "line": 205, "lineto": 214, "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:

\n\n
    \n
  • GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.

  • \n
  • 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.

  • \n
  • GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.

  • \n
  • GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.

  • \n
  • GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.

  • \n
\n\n

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\n

Notification 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\n certain cases - you pick which ones via notify_flags:

\n\n
    \n
  • GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.

  • \n
  • GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that\ndo not need an update but no longer match the baseline. Core git\ndisplays these files when checkout runs, but won't stop the checkout.

  • \n
  • GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.

  • \n
  • GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.

  • \n
  • GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.

  • \n
\n\n

Returning a non-zero value from this callback will cancel the checkout.\n The non-zero return value will be propagated back and returned by the\n git_checkout_... call.

\n\n

Notification callbacks are made prior to modifying any files on disk,\n so canceling on any notification will still happen prior to any files\n being modified.

\n", "fields": [ { "type": "int", @@ -27255,13 +29745,13 @@ ], "type": "struct", "value": "git_checkout_options", - "file": "checkout.h", - "line": 251, - "lineto": 295, + "file": "git2/checkout.h", + "line": 250, + "lineto": 294, "block": "unsigned int version\nunsigned int checkout_strategy\nint disable_filters\nunsigned int dir_mode\nunsigned int file_mode\nint file_open_flags\nunsigned int notify_flags\ngit_checkout_notify_cb notify_cb\nvoid * notify_payload\ngit_checkout_progress_cb progress_cb\nvoid * progress_payload\ngit_strarray paths\ngit_tree * baseline\ngit_index * baseline_index\nconst char * target_directory\nconst char * ancestor_label\nconst char * our_label\nconst char * their_label\ngit_checkout_perfdata_cb perfdata_cb\nvoid * perfdata_payload", "tdef": "typedef", "description": " Checkout options structure", - "comments": "

Zero out for defaults. Initialize with GIT_CHECKOUT_OPTIONS_INIT macro to correctly set the version field. E.g.

\n\n
    git_checkout_options opts = GIT_CHECKOUT_OPTIONS_INIT;\n
\n", + "comments": "

Initialize with GIT_CHECKOUT_OPTIONS_INIT. Alternatively, you can\n use git_checkout_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -27271,7 +29761,7 @@ { "type": "unsigned int", "name": "checkout_strategy", - "comments": " default will be a dry run " + "comments": " default will be a safe checkout " }, { "type": "int", @@ -27378,6 +29868,48 @@ } } ], + [ + "git_checkout_perfdata", + { + "decl": [ + "size_t mkdir_calls", + "size_t stat_calls", + "size_t chmod_calls" + ], + "type": "struct", + "value": "git_checkout_perfdata", + "file": "git2/checkout.h", + "line": 216, + "lineto": 220, + "block": "size_t mkdir_calls\nsize_t stat_calls\nsize_t chmod_calls", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "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" + ] + } + } + ], [ "git_checkout_strategy_t", { @@ -27406,13 +29938,13 @@ "GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED" ], "type": "enum", - "file": "checkout.h", + "file": "git2/checkout.h", "line": 106, "lineto": 177, "block": "GIT_CHECKOUT_NONE\nGIT_CHECKOUT_SAFE\nGIT_CHECKOUT_FORCE\nGIT_CHECKOUT_RECREATE_MISSING\nGIT_CHECKOUT_ALLOW_CONFLICTS\nGIT_CHECKOUT_REMOVE_UNTRACKED\nGIT_CHECKOUT_REMOVE_IGNORED\nGIT_CHECKOUT_UPDATE_ONLY\nGIT_CHECKOUT_DONT_UPDATE_INDEX\nGIT_CHECKOUT_NO_REFRESH\nGIT_CHECKOUT_SKIP_UNMERGED\nGIT_CHECKOUT_USE_OURS\nGIT_CHECKOUT_USE_THEIRS\nGIT_CHECKOUT_DISABLE_PATHSPEC_MATCH\nGIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES\nGIT_CHECKOUT_DONT_OVERWRITE_IGNORED\nGIT_CHECKOUT_CONFLICT_STYLE_MERGE\nGIT_CHECKOUT_CONFLICT_STYLE_DIFF3\nGIT_CHECKOUT_DONT_REMOVE_EXISTING\nGIT_CHECKOUT_DONT_WRITE_INDEX\nGIT_CHECKOUT_UPDATE_SUBMODULES\nGIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED", "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.

\n\n

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\n

You give checkout one of three strategies for update:

\n\n
    \n
  • GIT_CHECKOUT_NONE is a dry-run strategy that checks for conflicts, etc., but doesn't make any actual changes.

  • \n
  • GIT_CHECKOUT_FORCE is at the opposite extreme, taking any action to make the working directory match the target (including potentially discarding modified files).

  • \n
  • GIT_CHECKOUT_SAFE is between these two options, it will only make modifications that will not lose changes.

    \n\n
                     |  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
  • \n
\n\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.

\n\n

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.

\n\n

To emulate git checkout -f, use GIT_CHECKOUT_FORCE.

\n\n

There are some additional flags to modified the behavior of checkout:

\n\n
    \n
  • GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates even if there are conflicts (instead of cancelling the checkout).

  • \n
  • GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not in target, baseline, or index, and not ignored) from the working dir.

  • \n
  • GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also untracked) from the working directory as well.

  • \n
  • 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.

  • \n
  • GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the updated files' information to the index.

  • \n
  • Normally, checkout will reload the index and git attributes from disk before any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.

  • \n
  • 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.

  • \n
  • 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.

  • \n
  • 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.

  • \n
\n", + "comments": "

In libgit2, checkout is used to update the working directory and index\n to match a target tree. Unlike git checkout, it does not move the HEAD\n commit for you - use git_repository_set_head or the like to do that.

\n\n

Checkout looks at (up to) four things: the "target" tree you want to\n check out, the "baseline" tree of what was checked out previously, the\n working directory for actual files, and the index for staged changes.

\n\n

You give checkout one of three strategies for update:

\n\n
    \n
  • GIT_CHECKOUT_NONE is a dry-run strategy that checks for conflicts,\netc., but doesn't make any actual changes.

  • \n
  • GIT_CHECKOUT_FORCE is at the opposite extreme, taking any action to\nmake the working directory match the target (including potentially\ndiscarding modified files).

  • \n
  • GIT_CHECKOUT_SAFE is between these two options, it will only make\nmodifications that will not lose changes.

    \n\n
                     |  target == baseline   |  target != baseline  |\n
    \n\n

    ---------------------|-----------------------|----------------------|\n workdir == baseline | no action | create, update, or |\n | | delete file |\n---------------------|-----------------------|----------------------|\n workdir exists and | no action | conflict (notify |\n is != baseline | notify dirty MODIFIED | and cancel checkout) |\n---------------------|-----------------------|----------------------|\n workdir missing, | notify dirty DELETED | create file |\n baseline present | | |\n---------------------|-----------------------|----------------------|

  • \n
\n\n

To emulate git checkout, use GIT_CHECKOUT_SAFE with a checkout\n notification callback (see below) that displays information about dirty\n files. The default behavior will cancel checkout on conflicts.

\n\n

To emulate git checkout-index, use GIT_CHECKOUT_SAFE with a\n notification callback that cancels the operation if a dirty-but-existing\n file is found in the working directory. This core git command isn't\n quite "force" but is sensitive about some types of changes.

\n\n

To emulate git checkout -f, use GIT_CHECKOUT_FORCE.

\n\n

There are some additional flags to modify the behavior of checkout:

\n\n
    \n
  • GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates\neven if there are conflicts (instead of cancelling the checkout).

  • \n
  • GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not\nin target, baseline, or index, and not ignored) from the working dir.

  • \n
  • GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also\nuntracked) from the working directory as well.

  • \n
  • GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that\nalready exist. Files will not be created nor deleted. This just skips\napplying adds, deletes, and typechanges.

  • \n
  • GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the\nupdated files' information to the index.

  • \n
  • Normally, checkout will reload the index and git attributes from disk\nbefore any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.

  • \n
  • Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips\nfiles with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and\nGIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the\nstage 2 ("ours") or stage 3 ("theirs") version of files in the index.

  • \n
  • GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being\noverwritten. Normally, files that are ignored in the working directory\nare not considered "precious" and may be overwritten if the checkout\ntarget contains that file.

  • \n
  • GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing\nfiles or folders that fold to the same name on case insensitive\nfilesystems. This can cause files to retain their existing names\nand write through existing symbolic links.

  • \n
\n", "fields": [ { "type": "int", @@ -27564,7 +30096,7 @@ ], "type": "struct", "value": "git_cherrypick_options", - "file": "cherrypick.h", + "file": "git2/cherrypick.h", "line": 26, "lineto": 34, "block": "unsigned int version\nunsigned int mainline\ngit_merge_options merge_opts\ngit_checkout_options checkout_opts", @@ -27612,7 +30144,7 @@ "GIT_CLONE_LOCAL_NO_LINKS" ], "type": "enum", - "file": "clone.h", + "file": "git2/clone.h", "line": 33, "lineto": 53, "block": "GIT_CLONE_LOCAL_AUTO\nGIT_CLONE_LOCAL\nGIT_CLONE_NO_LOCAL\nGIT_CLONE_LOCAL_NO_LINKS", @@ -27668,13 +30200,13 @@ ], "type": "struct", "value": "git_clone_options", - "file": "clone.h", + "file": "git2/clone.h", "line": 103, "lineto": 164, "block": "unsigned int version\ngit_checkout_options checkout_opts\ngit_fetch_options fetch_opts\nint bare\ngit_clone_local_t local\nconst char * checkout_branch\ngit_repository_create_cb repository_cb\nvoid * repository_cb_payload\ngit_remote_create_cb remote_cb\nvoid * remote_cb_payload", "tdef": "typedef", "description": " Clone options structure", - "comments": "

Use the GIT_CLONE_OPTIONS_INIT to get the default settings, like this:

\n\n
    git_clone_options opts = GIT_CLONE_OPTIONS_INIT;\n
\n", + "comments": "

Initialize with GIT_CLONE_OPTIONS_INIT. Alternatively, you can\n use git_clone_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -27742,12 +30274,13 @@ "decl": "git_commit", "type": "struct", "value": "git_commit", - "file": "types.h", - "line": 123, - "lineto": 123, + "file": "git2/types.h", + "line": 126, + "lineto": 126, "tdef": "typedef", "description": " Parsed representation of a commit object. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -27756,8 +30289,10 @@ "git_cherrypick_commit", "git_commit_amend", "git_commit_author", + "git_commit_author_with_mailmap", "git_commit_body", "git_commit_committer", + "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", "git_commit_create_from_callback", @@ -27799,12 +30334,13 @@ "decl": "git_config", "type": "struct", "value": "git_config", - "file": "types.h", - "line": 141, - "lineto": 141, + "file": "git2/types.h", + "line": 144, + "lineto": 144, "tdef": "typedef", "description": " Memory representation of a set of config files ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -27815,6 +30351,7 @@ "git_config_delete_multivar", "git_config_entry_free", "git_config_foreach", + "git_config_foreach_cb", "git_config_foreach_match", "git_config_free", "git_config_get_bool", @@ -27857,9 +30394,9 @@ "decl": "git_config_backend", "type": "struct", "value": "git_config_backend", - "file": "types.h", - "line": 144, - "lineto": 144, + "file": "git2/types.h", + "line": 147, + "lineto": 147, "block": "unsigned int version\nint readonly\nstruct git_config * cfg\nint (*)(struct git_config_backend *, git_config_level_t, const git_repository *) open\nint (*)(struct git_config_backend *, const char *, git_config_entry **) get\nint (*)(struct git_config_backend *, const char *, const char *) set\nint (*)(git_config_backend *, const char *, const char *, const char *) set_multivar\nint (*)(struct git_config_backend *, const char *) del\nint (*)(struct git_config_backend *, const char *, const char *) del_multivar\nint (*)(git_config_iterator **, struct git_config_backend *) iterator\nint (*)(struct git_config_backend **, struct git_config_backend *) snapshot\nint (*)(struct git_config_backend *) lock\nint (*)(struct git_config_backend *, int) unlock\nvoid (*)(struct git_config_backend *) free", "tdef": "typedef", "description": " Interface to access a configuration file ", @@ -27952,16 +30489,17 @@ "decl": [ "const char * name", "const char * value", + "unsigned int include_depth", "git_config_level_t level", "void (*)(struct git_config_entry *) free", "void * payload" ], "type": "struct", "value": "git_config_entry", - "file": "config.h", + "file": "git2/config.h", "line": 64, - "lineto": 70, - "block": "const char * name\nconst char * value\ngit_config_level_t level\nvoid (*)(struct git_config_entry *) free\nvoid * payload", + "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", "tdef": "typedef", "description": " An entry in a configuration file", "comments": "", @@ -27976,6 +30514,11 @@ "name": "value", "comments": " String value of the entry " }, + { + "type": "unsigned int", + "name": "include_depth", + "comments": " Depth of includes where this variable was found " + }, { "type": "git_config_level_t", "name": "level", @@ -27996,6 +30539,7 @@ "returns": [], "needs": [ "git_config_entry_free", + "git_config_foreach_cb", "git_config_get_entry", "git_config_next" ] @@ -28005,21 +30549,15 @@ [ "git_config_iterator", { - "decl": [ - "git_config_backend * backend", - "unsigned int flags", - "int (*)(git_config_entry **, git_config_iterator *) next", - "void (*)(git_config_iterator *) free" - ], + "decl": "git_config_iterator", "type": "struct", "value": "git_config_iterator", - "file": "sys/config.h", - "line": 34, - "lineto": 48, - "block": "git_config_backend * backend\nunsigned int flags\nint (*)(git_config_entry **, git_config_iterator *) next\nvoid (*)(git_config_iterator *) free", - "tdef": null, - "description": " Every iterator must have this struct as its first element, so the\n API can talk to it. You'd define your iterator as", - "comments": "
 struct my_iterator {             git_config_iterator parent;             ...     }\n
\n\n

and assign iter->parent.backend to your git_config_backend.

\n", + "file": "git2/config.h", + "line": 89, + "lineto": 89, + "tdef": "typedef", + "description": " An opaque structure for a configuration iterator", + "comments": "", "fields": [ { "type": "git_config_backend *", @@ -28067,13 +30605,13 @@ "GIT_CONFIG_HIGHEST_LEVEL" ], "type": "enum", - "file": "config.h", + "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", "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", + "comments": "

git_config_open_default() and git_repository_config() honor those\n priority levels as well.

\n", "fields": [ { "type": "int", @@ -28128,15 +30666,59 @@ } } ], + [ + "git_cred", + { + "decl": "git_cred", + "type": "struct", + "value": "git_cred", + "file": "git2/transport.h", + "line": 140, + "lineto": 140, + "tdef": "typedef", + "description": " The base structure for all credential types", + "comments": "", + "fields": [ + { + "type": "git_credtype_t", + "name": "credtype", + "comments": " A type of credential " + }, + { + "type": "void (*)(git_cred *)", + "name": "free", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_cred_acquire_cb", + "git_cred_default_new", + "git_cred_free", + "git_cred_has_username", + "git_cred_ssh_custom_new", + "git_cred_ssh_interactive_new", + "git_cred_ssh_key_from_agent", + "git_cred_ssh_key_memory_new", + "git_cred_ssh_key_new", + "git_cred_username_new", + "git_cred_userpass", + "git_cred_userpass_plaintext_new", + "git_transport_smart_credentials" + ] + } + } + ], [ "git_cred_default", { "decl": "git_cred_default", "type": "struct", "value": "git_cred_default", - "file": "transport.h", - "line": 176, - "lineto": 176, + "file": "git2/transport.h", + "line": 205, + "lineto": 205, "tdef": "typedef", "description": " A key for NTLM/Kerberos \"default\" credentials ", "comments": "", @@ -28159,9 +30741,9 @@ ], "type": "struct", "value": "git_cred_ssh_custom", - "file": "transport.h", - "line": 166, - "lineto": 173, + "file": "git2/transport.h", + "line": 195, + "lineto": 202, "block": "git_cred parent\nchar * username\nchar * publickey\nsize_t publickey_len\ngit_cred_sign_callback sign_callback\nvoid * payload", "tdef": "typedef", "description": " A key with a custom signature function", @@ -28215,9 +30797,9 @@ ], "type": "struct", "value": "git_cred_ssh_interactive", - "file": "transport.h", - "line": 156, - "lineto": 161, + "file": "git2/transport.h", + "line": 185, + "lineto": 190, "block": "git_cred parent\nchar * username\ngit_cred_ssh_interactive_callback prompt_callback\nvoid * payload", "tdef": "typedef", "description": " Keyboard-interactive based ssh authentication", @@ -28264,9 +30846,9 @@ ], "type": "struct", "value": "git_cred_ssh_key", - "file": "transport.h", - "line": 145, - "lineto": 151, + "file": "git2/transport.h", + "line": 174, + "lineto": 180, "block": "git_cred parent\nchar * username\nchar * publickey\nchar * privatekey\nchar * passphrase", "tdef": "typedef", "description": " A ssh key from disk", @@ -28313,9 +30895,9 @@ ], "type": "struct", "value": "git_cred_username", - "file": "transport.h", - "line": 179, - "lineto": 182, + "file": "git2/transport.h", + "line": 208, + "lineto": 211, "block": "git_cred parent\nchar [1] username", "tdef": "typedef", "description": " Username-only credential information ", @@ -28347,7 +30929,7 @@ ], "type": "struct", "value": "git_cred_userpass_payload", - "file": "cred_helpers.h", + "file": "git2/cred_helpers.h", "line": 24, "lineto": 27, "block": "const char * username\nconst char * password", @@ -28382,9 +30964,9 @@ ], "type": "struct", "value": "git_cred_userpass_plaintext", - "file": "transport.h", - "line": 122, - "lineto": 126, + "file": "git2/transport.h", + "line": 151, + "lineto": 155, "block": "git_cred parent\nchar * username\nchar * password", "tdef": "typedef", "description": " A plaintext username and password ", @@ -28425,54 +31007,54 @@ "GIT_CREDTYPE_SSH_MEMORY" ], "type": "enum", - "file": "transport.h", - "line": 81, - "lineto": 111, + "file": "git2/transport.h", + "line": 86, + "lineto": 138, "block": "GIT_CREDTYPE_USERPASS_PLAINTEXT\nGIT_CREDTYPE_SSH_KEY\nGIT_CREDTYPE_SSH_CUSTOM\nGIT_CREDTYPE_DEFAULT\nGIT_CREDTYPE_SSH_INTERACTIVE\nGIT_CREDTYPE_USERNAME\nGIT_CREDTYPE_SSH_MEMORY", "tdef": "typedef", - "description": " Authentication type requested ", - "comments": "", + "description": " Supported credential types", + "comments": "

This represents the various types of authentication methods supported by\n the library.

\n", "fields": [ { "type": "int", "name": "GIT_CREDTYPE_USERPASS_PLAINTEXT", - "comments": "", + "comments": "

A vanilla user/password request

\n", "value": 1 }, { "type": "int", "name": "GIT_CREDTYPE_SSH_KEY", - "comments": "", + "comments": "

An SSH key-based authentication request

\n", "value": 2 }, { "type": "int", "name": "GIT_CREDTYPE_SSH_CUSTOM", - "comments": "", + "comments": "

An SSH key-based authentication request, with a custom signature

\n", "value": 4 }, { "type": "int", "name": "GIT_CREDTYPE_DEFAULT", - "comments": "", + "comments": "

An NTLM/Negotiate-based authentication request.

\n", "value": 8 }, { "type": "int", "name": "GIT_CREDTYPE_SSH_INTERACTIVE", - "comments": "", + "comments": "

An SSH interactive authentication request

\n", "value": 16 }, { "type": "int", "name": "GIT_CREDTYPE_USERNAME", - "comments": "

Username-only information

\n\n

If the SSH transport does not know which username to use,\n it will ask via this credential type.

\n", + "comments": "

Username-only authentication request

\n\n

Used 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", - "comments": "

Credentials read from memory.

\n\n

Only available for libssh2+OpenSSL for now.

\n", + "comments": "

An SSH key-based authentication request

\n\n

Allows 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 } ], @@ -28492,9 +31074,9 @@ ], "type": "struct", "value": "git_cvar_map", - "file": "config.h", - "line": 93, - "lineto": 97, + "file": "git2/config.h", + "line": 104, + "lineto": 108, "block": "git_cvar_t cvar_type\nconst char * str_match\nint map_value", "tdef": "typedef", "description": " Mapping from config variables to values.", @@ -28535,9 +31117,9 @@ "GIT_CVAR_STRING" ], "type": "enum", - "file": "config.h", - "line": 83, - "lineto": 88, + "file": "git2/config.h", + "line": 94, + "lineto": 99, "block": "GIT_CVAR_FALSE\nGIT_CVAR_TRUE\nGIT_CVAR_INT32\nGIT_CVAR_STRING", "tdef": "typedef", "description": " Config var type", @@ -28591,13 +31173,13 @@ "GIT_DELTA_CONFLICTED" ], "type": "enum", - "file": "diff.h", - "line": 252, - "lineto": 264, + "file": "git2/diff.h", + "line": 220, + "lineto": 232, "block": "GIT_DELTA_UNMODIFIED\nGIT_DELTA_ADDED\nGIT_DELTA_DELETED\nGIT_DELTA_MODIFIED\nGIT_DELTA_RENAMED\nGIT_DELTA_COPIED\nGIT_DELTA_IGNORED\nGIT_DELTA_UNTRACKED\nGIT_DELTA_TYPECHANGE\nGIT_DELTA_UNREADABLE\nGIT_DELTA_CONFLICTED", "tdef": "typedef", "description": " What type of change is described by a git_diff_delta?", - "comments": "

GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run git_diff_find_similar() on the diff object.

\n\n

GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE in the option flags (otherwise type changes will be split into ADDED / DELETED pairs).

\n", + "comments": "

GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run\n git_diff_find_similar() on the diff object.

\n\n

GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE\n in the option flags (otherwise type changes will be split into ADDED /\n DELETED pairs).

\n", "fields": [ { "type": "int", @@ -28686,13 +31268,13 @@ ], "type": "struct", "value": "git_describe_format_options", - "file": "describe.h", - "line": 78, - "lineto": 98, + "file": "git2/describe.h", + "line": 91, + "lineto": 111, "block": "unsigned int version\nunsigned int abbreviated_size\nint always_use_long_format\nconst char * dirty_suffix", "tdef": "typedef", - "description": " Options for formatting the describe string", - "comments": "", + "description": " Describe format options structure", + "comments": "

Initialize with GIT_DESCRIBE_FORMAT_OPTIONS_INIT. Alternatively, you can\n use git_describe_format_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -28718,7 +31300,8 @@ "used": { "returns": [], "needs": [ - "git_describe_format" + "git_describe_format", + "git_describe_init_format_options" ] } } @@ -28736,13 +31319,13 @@ ], "type": "struct", "value": "git_describe_options", - "file": "describe.h", - "line": 44, - "lineto": 62, + "file": "git2/describe.h", + "line": 43, + "lineto": 61, "block": "unsigned int version\nunsigned int max_candidates_tags\nunsigned int describe_strategy\nconst char * pattern\nint only_follow_first_parent\nint show_commit_oid_as_fallback", "tdef": "typedef", "description": " Describe options structure", - "comments": "

Initialize with GIT_DESCRIBE_OPTIONS_INIT macro to correctly set the version field. E.g.

\n\n
    git_describe_options opts = GIT_DESCRIBE_OPTIONS_INIT;\n
\n", + "comments": "

Initialize with GIT_DESCRIBE_OPTIONS_INIT. Alternatively, you can\n use git_describe_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -28779,6 +31362,7 @@ "returns": [], "needs": [ "git_describe_commit", + "git_describe_init_options", "git_describe_workdir" ] } @@ -28790,12 +31374,13 @@ "decl": "git_describe_result", "type": "struct", "value": "git_describe_result", - "file": "describe.h", - "line": 111, - "lineto": 111, + "file": "git2/describe.h", + "line": 134, + "lineto": 134, "tdef": "typedef", "description": " A struct that stores the result of a describe operation.", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -28816,13 +31401,13 @@ "GIT_DESCRIBE_ALL" ], "type": "enum", - "file": "describe.h", + "file": "git2/describe.h", "line": 30, "lineto": 34, "block": "GIT_DESCRIBE_DEFAULT\nGIT_DESCRIBE_TAGS\nGIT_DESCRIBE_ALL", "tdef": "typedef", "description": " Reference lookup strategy", - "comments": "

These behave like the --tags and --all options to git-describe, namely they say to look for any reference in either refs/tags/ or refs/ respectively.

\n", + "comments": "

These behave like the --tags and --all options to git-describe,\n namely they say to look for any reference in either refs/tags/ or\n refs/ respectively.

\n", "fields": [ { "type": "int", @@ -28855,12 +31440,13 @@ "decl": "git_diff", "type": "struct", "value": "git_diff", - "file": "diff.h", - "line": 225, - "lineto": 225, + "file": "git2/diff.h", + "line": 193, + "lineto": 193, "tdef": "typedef", "description": " The diff object that contains all individual file deltas.", - "comments": "

This 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.

\n", + "comments": "

A diff represents the cumulative list of differences between two\n snapshots of a repository (possibly filtered by a set of file name\n patterns).

\n\n

Calculating diffs is generally done in two phases: building a list of\n diffs then traversing it. This makes is easier to share logic across\n the various types of diffs (tree vs tree, workdir vs index, etc.), and\n also allows you to insert optional diff post-processing phases,\n such as rename detection, in between the steps. When you are done with\n a diff object, it must be freed.

\n\n

This is an opaque structure which will be allocated by one of the diff\n generator functions below (such as git_diff_tree_to_tree). You are\n responsible for releasing the object memory when done, using the\n git_diff_free() function.

\n", + "fields": [], "used": { "returns": [ "git_diff_get_delta", @@ -28934,18 +31520,18 @@ ], "type": "struct", "value": "git_diff_binary", - "file": "diff.h", - "line": 498, - "lineto": 509, + "file": "git2/diff.h", + "line": 513, + "lineto": 525, "block": "unsigned int contains_data\ngit_diff_binary_file old_file\ngit_diff_binary_file new_file", "tdef": "typedef", - "description": " Structure describing the binary contents of a diff. ", - "comments": "", + "description": " Structure describing the binary contents of a diff.", + "comments": "

A binary file / delta is a file (or pair) for which no text diffs\n should be generated. A diff can contain delta entries that are\n binary, but no diff content will be output for those files. There is\n a base heuristic for binary detection and you can further tune the\n behavior with git attributes or diff flags and option settings.

\n", "fields": [ { "type": "unsigned int", "name": "contains_data", - "comments": " Whether there is data in this binary structure or not. If this\n is `1`, then this was produced and included binary content. If\n this is `0` then this was generated knowing only that a binary\n file changed but without providing the data, probably from a patch\n that said `Binary files a/file.txt and b/file.txt differ`." + "comments": " Whether there is data in this binary structure or not.\n\n If this is `1`, then this was produced and included binary content.\n If this is `0` then this was generated knowing only that a binary\n file changed but without providing the data, probably from a patch\n that said `Binary files a/file.txt and b/file.txt differ`." }, { "type": "git_diff_binary_file", @@ -28981,9 +31567,9 @@ ], "type": "struct", "value": "git_diff_binary_file", - "file": "diff.h", - "line": 483, - "lineto": 495, + "file": "git2/diff.h", + "line": 490, + "lineto": 502, "block": "git_diff_binary_t type\nconst char * data\nsize_t datalen\nsize_t inflatedlen", "tdef": "typedef", "description": " The contents of one of the files in a binary diff. ", @@ -29025,9 +31611,9 @@ "GIT_DIFF_BINARY_DELTA" ], "type": "enum", - "file": "diff.h", - "line": 471, - "lineto": 480, + "file": "git2/diff.h", + "line": 478, + "lineto": 487, "block": "GIT_DIFF_BINARY_NONE\nGIT_DIFF_BINARY_LITERAL\nGIT_DIFF_BINARY_DELTA", "tdef": "typedef", "description": " When producing a binary diff, the binary data returned will be\n either the deflated full (\"literal\") contents of the file, or\n the deflated binary delta between the two sides (whichever is\n smaller).", @@ -29071,13 +31657,13 @@ ], "type": "struct", "value": "git_diff_delta", - "file": "diff.h", - "line": 337, - "lineto": 344, + "file": "git2/diff.h", + "line": 309, + "lineto": 316, "block": "git_delta_t status\nuint32_t flags\nuint16_t similarity\nuint16_t nfiles\ngit_diff_file old_file\ngit_diff_file new_file", "tdef": "typedef", "description": " Description of changes to one entry.", - "comments": "

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\n

The 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.

\n\n

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\n

Under 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.

\n\n

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.

\n\n

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)).

\n", + "comments": "

A delta is a file pair with an old and new revision. The old version\n may be absent if the file was just created and the new version may be\n absent if the file was deleted. A diff is mostly just a list of deltas.

\n\n

When iterating over a diff, this will be passed to most callbacks and\n you can use the contents to understand exactly what has changed.

\n\n

The old_file represents the "from" side of the diff and the new_file\n represents to "to" side of the diff. What those means depend on the\n function that was used to generate the diff and will be documented below.\n You can also use the GIT_DIFF_REVERSE flag to flip it around.

\n\n

Although the two sides of the delta are named "old_file" and "new_file",\n they actually may correspond to entries that represent a file, a symbolic\n link, a submodule commit id, or even a tree (if you are tracking type\n changes or ignored/untracked directories).

\n\n

Under some circumstances, in the name of efficiency, not all fields will\n be filled in, but we generally try to fill in as much as possible. One\n example is that the "flags" field may not have either the BINARY or the\n NOT_BINARY flag set to avoid examining file contents if you do not pass\n in hunk and/or line callbacks to the diff foreach iteration function. It\n will just use the git attributes for those files.

\n\n

The similarity score is zero unless you call git_diff_find_similar()\n which does a similarity analysis of files in the diff. Use that\n function to do rename and copy detection, and to split heavily modified\n files in add/delete pairs. After that call, deltas with a status of\n GIT_DELTA_RENAMED or GIT_DELTA_COPIED will have a similarity score\n between 0 and 100 indicating how similar the old and new sides are.

\n\n

If you ask git_diff_find_similar to find heavily modified files to\n break, but to not actually break the records, then GIT_DELTA_MODIFIED\n records may have a non-zero similarity score if the self-similarity is\n below the split threshold. To display this value like core Git, invert\n the score (a la printf("M%03d", 100 - delta->similarity)).

\n", "fields": [ { "type": "git_delta_t", @@ -29141,13 +31727,13 @@ ], "type": "struct", "value": "git_diff_file", - "file": "diff.h", - "line": 292, - "lineto": 299, + "file": "git2/diff.h", + "line": 260, + "lineto": 267, "block": "git_oid id\nconst char * path\ngit_off_t size\nuint32_t flags\nuint16_t mode\nuint16_t id_abbrev", "tdef": "typedef", "description": " Description of one side of a delta.", - "comments": "

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\n

The 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.

\n\n

path is the NUL-terminated path to the entry relative to the working directory of the repository.

\n\n

size is the size of the entry in bytes.

\n\n

flags is a combination of the git_diff_flag_t types

\n\n

mode is, roughly, the stat() st_mode value for the item. This will be restricted to one of the git_filemode_t values.

\n\n

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.

\n", + "comments": "

Although this is called a "file", it could represent a file, a symbolic\n link, a submodule commit id, or even a tree (although that only if you\n are tracking type changes or ignored/untracked directories).

\n\n

The id is 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.

\n\n

path is the NUL-terminated path to the entry relative to the working\n directory of the repository.

\n\n

size is the size of the entry in bytes.

\n\n

flags is a combination of the git_diff_flag_t types

\n\n

mode is, roughly, the stat() st_mode value for the item. This will\n be restricted to one of the git_filemode_t values.

\n\n

The id_abbrev represents the known length of the id field, when\n converted to a hex string. It is generally GIT_OID_HEXSZ, 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.

\n", "fields": [ { "type": "git_oid", @@ -29207,13 +31793,13 @@ ], "type": "struct", "value": "git_diff_find_options", - "file": "diff.h", - "line": 703, - "lineto": 729, + "file": "git2/diff.h", + "line": 718, + "lineto": 772, "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\n
    \n
  • rename_threshold is the same as the -M option with a value - copy_threshold is the same as the -C option with a value - rename_from_rewrite_threshold matches the top of the -B option - break_rewrite_threshold matches the bottom of the -B option - rename_limit is the maximum number of matches to consider for a particular file. This is a little different from the -l option to regular Git because we will still process up to this many matches before abandoning the search.
  • \n
\n\n

The metric option allows you to plug in a custom similarity metric. Set it to NULL for the default internal metric which is based on sampling hashes of ranges of data in the file. The default metric is a pretty good similarity approximation that should work fairly well for both text and binary data, and is pretty fast with fixed memory overhead.

\n", + "comments": "

These options mostly mimic parameters that can be passed to git-diff.

\n", "fields": [ { "type": "unsigned int", @@ -29228,32 +31814,32 @@ { "type": "uint16_t", "name": "rename_threshold", - "comments": " Similarity to consider a file renamed (default 50) " + "comments": " Threshold above which similar files will be considered renames.\n This is equivalent to the -M option. Defaults to 50." }, { "type": "uint16_t", "name": "rename_from_rewrite_threshold", - "comments": " Similarity of modified to be eligible rename source (default 50) " + "comments": " Threshold below which similar files will be eligible to be a rename source.\n This is equivalent to the first part of the -B option. Defaults to 50." }, { "type": "uint16_t", "name": "copy_threshold", - "comments": " Similarity to consider a file a copy (default 50) " + "comments": " Threshold above which similar files will be considered copies.\n This is equivalent to the -C option. Defaults to 50." }, { "type": "uint16_t", "name": "break_rewrite_threshold", - "comments": " Similarity to split modify into delete/add pair (default 60) " + "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." }, { "type": "size_t", "name": "rename_limit", - "comments": " Maximum similarity sources to examine for a file (somewhat like\n git-diff's `-l` option or `diff.renameLimit` config) (default 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 200." }, { "type": "git_diff_similarity_metric *", "name": "metric", - "comments": " Pluggable similarity metric; pass NULL to use internal metric " + "comments": " The `metric` option allows you to plug in a custom similarity metric.\n\n Set it to NULL to use the default internal metric.\n\n The default metric is based on sampling hashes of ranges of data in\n the file, which is a pretty good similarity approximation that should\n work fairly well for both text and binary data while still being\n pretty fast with a fixed memory overhead." } ], "used": { @@ -29287,9 +31873,9 @@ "GIT_DIFF_FIND_REMOVE_UNMODIFIED" ], "type": "enum", - "file": "diff.h", - "line": 597, - "lineto": 666, + "file": "git2/diff.h", + "line": 627, + "lineto": 696, "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.", @@ -29408,13 +31994,13 @@ "GIT_DIFF_FLAG_EXISTS" ], "type": "enum", - "file": "diff.h", - "line": 235, - "lineto": 240, + "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", "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.

\n", + "comments": "

These flags are used for both the flags value of the git_diff_delta\n and the flags for the git_diff_file objects representing the old and\n new sides of the delta. Values outside of this public range should be\n considered reserved for internal or future use.

\n", "fields": [ { "type": "int", @@ -29455,9 +32041,9 @@ "GIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER" ], "type": "enum", - "file": "diff.h", - "line": 1321, - "lineto": 1328, + "file": "git2/diff.h", + "line": 1366, + "lineto": 1373, "block": "GIT_DIFF_FORMAT_EMAIL_NONE\nGIT_DIFF_FORMAT_EMAIL_EXCLUDE_SUBJECT_PATCH_MARKER", "tdef": "typedef", "description": " Formatting options for diff e-mail generation", @@ -29499,9 +32085,9 @@ ], "type": "struct", "value": "git_diff_format_email_options", - "file": "diff.h", - "line": 1333, - "lineto": 1355, + "file": "git2/diff.h", + "line": 1378, + "lineto": 1400, "block": "unsigned int version\ngit_diff_format_email_flags_t flags\nsize_t patch_no\nsize_t total_patches\nconst git_oid * id\nconst char * summary\nconst char * body\nconst git_signature * author", "tdef": "typedef", "description": " Options for controlling the formatting of the generated e-mail.", @@ -29568,9 +32154,9 @@ "GIT_DIFF_FORMAT_NAME_STATUS" ], "type": "enum", - "file": "diff.h", - "line": 1045, - "lineto": 1051, + "file": "git2/diff.h", + "line": 1090, + "lineto": 1096, "block": "GIT_DIFF_FORMAT_PATCH\nGIT_DIFF_FORMAT_PATCH_HEADER\nGIT_DIFF_FORMAT_RAW\nGIT_DIFF_FORMAT_NAME_ONLY\nGIT_DIFF_FORMAT_NAME_STATUS", "tdef": "typedef", "description": " Possible output formats for diff data", @@ -29629,13 +32215,13 @@ ], "type": "struct", "value": "git_diff_hunk", - "file": "diff.h", - "line": 523, - "lineto": 530, + "file": "git2/diff.h", + "line": 545, + "lineto": 552, "block": "int old_start\nint old_lines\nint new_start\nint new_lines\nsize_t header_len\nchar [128] header", "tdef": "typedef", "description": " Structure describing a hunk of a diff.", - "comments": "", + "comments": "

A hunk is a span of modified lines in a delta along with some stable\n surrounding context. You can configure the amount of context and other\n properties of how hunks are generated. Each hunk also comes with a\n header that described where it starts and ends in both the old and new\n versions in the delta.

\n", "fields": [ { "type": "int", @@ -29698,13 +32284,13 @@ ], "type": "struct", "value": "git_diff_line", - "file": "diff.h", - "line": 570, - "lineto": 578, + "file": "git2/diff.h", + "line": 600, + "lineto": 608, "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.", - "comments": "", + "comments": "

A line is a range of characters inside a hunk. It could be a context\n line (i.e. in both old and new versions), an added line (i.e. only in\n the new version), or a removed line (i.e. only in the old version).\n Unfortunately, we don't know anything about the encoding of data in the\n file being diffed, so we cannot tell you much about the line content.\n Line data will not be NUL-byte terminated, however, because it will be\n just a span of bytes inside the larger file.

\n", "fields": [ { "type": "char", @@ -29774,13 +32360,13 @@ "GIT_DIFF_LINE_BINARY" ], "type": "enum", - "file": "diff.h", - "line": 549, - "lineto": 565, + "file": "git2/diff.h", + "line": 571, + "lineto": 587, "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.", - "comments": "

These values describe where a line came from and will be passed to the git_diff_line_cb when iterating over a diff. There are some special origin constants at the end that are used for the text output callbacks to demarcate lines that are actually part of the file or hunk headers.

\n", + "comments": "

These values describe where a line came from and will be passed to\n the git_diff_line_cb when iterating over a diff. There are some\n special origin constants at the end that are used for the text\n output callbacks to demarcate lines that are actually part of\n the file or hunk headers.

\n", "fields": [ { "type": "int", @@ -29866,6 +32452,7 @@ "GIT_DIFF_UPDATE_INDEX", "GIT_DIFF_INCLUDE_UNREADABLE", "GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED", + "GIT_DIFF_INDENT_HEURISTIC", "GIT_DIFF_FORCE_TEXT", "GIT_DIFF_FORCE_BINARY", "GIT_DIFF_IGNORE_WHITESPACE", @@ -29875,14 +32462,13 @@ "GIT_DIFF_SHOW_UNMODIFIED", "GIT_DIFF_PATIENCE", "GIT_DIFF_MINIMAL", - "GIT_DIFF_SHOW_BINARY", - "GIT_DIFF_INDENT_HEURISTIC" + "GIT_DIFF_SHOW_BINARY" ], "type": "enum", - "file": "diff.h", - "line": 72, - "lineto": 215, - "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_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\nGIT_DIFF_INDENT_HEURISTIC", + "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", "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": "", @@ -30001,6 +32587,12 @@ "comments": "

Include unreadable files in the diff

\n", "value": 131072 }, + { + "type": "int", + "name": "GIT_DIFF_INDENT_HEURISTIC", + "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_FORCE_TEXT", @@ -30060,12 +32652,6 @@ "name": "GIT_DIFF_SHOW_BINARY", "comments": "

Include the necessary deflate / delta information so that git-apply\n can apply given diff information to binary files.

\n", "value": 1073741824 - }, - { - "type": "unsigned int", - "name": "GIT_DIFF_INDENT_HEURISTIC", - "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": -2147483648 } ], "used": { @@ -30094,13 +32680,13 @@ ], "type": "struct", "value": "git_diff_options", - "file": "diff.h", - "line": 408, - "lineto": 428, + "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", "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\n
    \n
  • flags is a combination of the git_diff_option_t values above - context_lines is the number of unchanged lines that define the boundary of a hunk (and to display before and after) - interhunk_lines is the maximum number of unchanged lines between hunk boundaries before the hunks will be merged into a one. - old_prefix is the virtual "directory" to prefix to old file names in hunk headers (default "a") - new_prefix is the virtual "directory" to prefix to new file names in hunk headers (default "b") - pathspec is an array of paths / fnmatch patterns to constrain diff - max_size is a file size (in bytes) above which a blob will be marked as binary automatically; pass a negative value to disable. - notify_cb is an optional callback function, notifying the consumer of changes to the diff as new deltas are added. - progress_cb is an optional callback function, notifying the consumer of which files are being examined as the diff is generated. - payload is the payload to pass to the callback functions. - ignore_submodules overrides the submodule ignore setting for all submodules in the diff.
  • \n
\n", + "comments": "

Setting all values of the structure to zero will yield the default\n values. Similarly, passing NULL for the options structure will\n give the defaults. The default values are marked below.

\n", "fields": [ { "type": "unsigned int", @@ -30110,62 +32696,62 @@ { "type": "uint32_t", "name": "flags", - "comments": " defaults to GIT_DIFF_NORMAL " + "comments": " A combination of `git_diff_option_t` values above.\n Defaults to GIT_DIFF_NORMAL" }, { "type": "git_submodule_ignore_t", "name": "ignore_submodules", - "comments": " submodule ignore rule " + "comments": " Overrides the submodule ignore setting for all submodules in the diff. " }, { "type": "git_strarray", "name": "pathspec", - "comments": " defaults to include all paths " + "comments": " An array of paths / fnmatch patterns to constrain diff.\n All paths are included by default." }, { "type": "git_diff_notify_cb", "name": "notify_cb", - "comments": "" + "comments": " An optional callback function, notifying the consumer of changes to\n the diff as new deltas are added." }, { "type": "git_diff_progress_cb", "name": "progress_cb", - "comments": "" + "comments": " An optional callback function, notifying the consumer of which files\n are being examined as the diff is generated." }, { "type": "void *", "name": "payload", - "comments": "" + "comments": " The payload to pass to the callback functions. " }, { "type": "uint32_t", "name": "context_lines", - "comments": " defaults to 3 " + "comments": " The number of unchanged lines that define the boundary of a hunk\n (and to display before and after). Defaults to 3." }, { "type": "uint32_t", "name": "interhunk_lines", - "comments": " defaults to 0 " + "comments": " The maximum number of unchanged lines between hunk boundaries before\n the hunks will be merged into one. Defaults to 0." }, { "type": "uint16_t", "name": "id_abbrev", - "comments": " default 'core.abbrev' or 7 if unset " + "comments": " The abbreviation length to use when formatting object ids.\n Defaults to the value of 'core.abbrev' from the config, or 7 if unset." }, { "type": "git_off_t", "name": "max_size", - "comments": " defaults to 512MB " + "comments": " A size (in bytes) above which a blob will be marked as binary\n automatically; pass a negative value to disable.\n Defaults to 512MB." }, { "type": "const char *", "name": "old_prefix", - "comments": " defaults to \"a\" " + "comments": " The virtual \"directory\" prefix for old file names in hunk headers.\n Default is \"a\"." }, { "type": "const char *", "name": "new_prefix", - "comments": " defaults to \"b\" " + "comments": " The virtual \"directory\" prefix for new file names in hunk headers.\n Defaults to \"b\"." } ], "used": { @@ -30197,13 +32783,13 @@ ], "type": "struct", "value": "git_diff_patchid_options", - "file": "diff.h", - "line": 1415, - "lineto": 1417, + "file": "git2/diff.h", + "line": 1462, + "lineto": 1464, "block": "unsigned int version", "tdef": "typedef", "description": " Patch ID options structure", - "comments": "

Initialize with GIT_DIFF_PATCHID_OPTIONS_INIT macro to correctly set the default values and version.

\n", + "comments": "

Initialize with GIT_PATCHID_OPTIONS_INIT. Alternatively, you can\n use git_patchid_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -30230,7 +32816,7 @@ ], "type": "struct", "value": "git_diff_perfdata", - "file": "sys/diff.h", + "file": "git2/sys/diff.h", "line": 67, "lineto": 71, "block": "unsigned int version\nsize_t stat_calls\nsize_t oid_calculations", @@ -30275,9 +32861,9 @@ ], "type": "struct", "value": "git_diff_similarity_metric", - "file": "diff.h", - "line": 671, - "lineto": 681, + "file": "git2/diff.h", + "line": 701, + "lineto": 711, "block": "int (*)(void **, const git_diff_file *, const char *, void *) file_signature\nint (*)(void **, const git_diff_file *, const char *, size_t, void *) buffer_signature\nvoid (*)(void *, void *) free_signature\nint (*)(int *, void *, void *, void *) similarity\nvoid * payload", "tdef": "typedef", "description": " Pluggable similarity metric", @@ -30321,12 +32907,13 @@ "decl": "git_diff_stats", "type": "struct", "value": "git_diff_stats", - "file": "diff.h", - "line": 1235, - "lineto": 1235, + "file": "git2/diff.h", + "line": 1280, + "lineto": 1280, "tdef": "typedef", "description": " This is an opaque structure which is allocated by `git_diff_get_stats`.\n You are responsible for releasing the object memory when done, using the\n `git_diff_stats_free()` function.", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -30351,9 +32938,9 @@ "GIT_DIFF_STATS_INCLUDE_SUMMARY" ], "type": "enum", - "file": "diff.h", - "line": 1240, - "lineto": 1255, + "file": "git2/diff.h", + "line": 1285, + "lineto": 1300, "block": "GIT_DIFF_STATS_NONE\nGIT_DIFF_STATS_FULL\nGIT_DIFF_STATS_SHORT\nGIT_DIFF_STATS_NUMBER\nGIT_DIFF_STATS_INCLUDE_SUMMARY", "tdef": "typedef", "description": " Formatting options for diff stats", @@ -30406,13 +32993,13 @@ "GIT_DIRECTION_PUSH" ], "type": "enum", - "file": "net.h", + "file": "git2/net.h", "line": 31, "lineto": 34, "block": "GIT_DIRECTION_FETCH\nGIT_DIRECTION_PUSH", "tdef": "typedef", "description": " Direction of the connection.", - "comments": "

We need this because we need to know whether we should call git-upload-pack or git-receive-pack on the remote end when get_refs gets called.

\n", + "comments": "

We need this because we need to know whether we should call\n git-upload-pack or git-receive-pack on the remote end when get_refs\n gets called.

\n", "fields": [ { "type": "int", @@ -30446,13 +33033,13 @@ ], "type": "struct", "value": "git_error", - "file": "errors.h", - "line": 66, - "lineto": 69, + "file": "git2/errors.h", + "line": 68, + "lineto": 71, "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", + "comments": "

This is kept on a per-thread basis if GIT_THREADS was defined when the\n library was build, otherwise one is kept globally for the library

\n", "fields": [ { "type": "char *", @@ -30504,13 +33091,14 @@ "GIT_PASSTHROUGH", "GIT_ITEROVER", "GIT_RETRY", - "GIT_EMISMATCH" + "GIT_EMISMATCH", + "GIT_EINDEXDIRTY" ], "type": "enum", - "file": "errors.h", + "file": "git2/errors.h", "line": 21, - "lineto": 58, - "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", + "lineto": 60, + "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", "tdef": "typedef", "description": " Generic return codes ", "comments": "", @@ -30554,7 +33142,7 @@ { "type": "int", "name": "GIT_EUSER", - "comments": "", + "comments": "

GIT_EUSER is a special error that is never generated by libgit2\n code. You can return it from a callback (e.g to stop an iteration)\n to know that it was generated by the callback and not by libgit2.

\n", "value": -7 }, { @@ -30682,6 +33270,12 @@ "name": "GIT_EMISMATCH", "comments": "

Hashsum mismatch in object

\n", "value": -33 + }, + { + "type": "int", + "name": "GIT_EINDEXDIRTY", + "comments": "

Unsaved changes in the index would be overwritten

\n", + "value": -34 } ], "used": { @@ -30730,9 +33324,9 @@ "GITERR_SHA1" ], "type": "enum", - "file": "errors.h", - "line": 72, - "lineto": 107, + "file": "git2/errors.h", + "line": 74, + "lineto": 109, "block": "GITERR_NONE\nGITERR_NOMEMORY\nGITERR_OS\nGITERR_INVALID\nGITERR_REFERENCE\nGITERR_ZLIB\nGITERR_REPOSITORY\nGITERR_CONFIG\nGITERR_REGEX\nGITERR_ODB\nGITERR_INDEX\nGITERR_OBJECT\nGITERR_NET\nGITERR_TAG\nGITERR_TREE\nGITERR_INDEXER\nGITERR_SSL\nGITERR_SUBMODULE\nGITERR_THREAD\nGITERR_STASH\nGITERR_CHECKOUT\nGITERR_FETCHHEAD\nGITERR_MERGE\nGITERR_SSH\nGITERR_FILTER\nGITERR_REVERT\nGITERR_CALLBACK\nGITERR_CHERRYPICK\nGITERR_DESCRIBE\nGITERR_REBASE\nGITERR_FILESYSTEM\nGITERR_PATCH\nGITERR_WORKTREE\nGITERR_SHA1", "tdef": "typedef", "description": " Error classes ", @@ -30959,9 +33553,9 @@ "GIT_FEATURE_NSEC" ], "type": "enum", - "file": "common.h", - "line": 111, - "lineto": 134, + "file": "git2/common.h", + "line": 122, + "lineto": 145, "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", @@ -31012,13 +33606,13 @@ ], "type": "struct", "value": "git_fetch_options", - "file": "remote.h", + "file": "git2/remote.h", "line": 555, "lineto": 592, "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", "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.

\n\n
    git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;\n
\n", + "comments": "

Zero out for defaults. Initialize with GIT_FETCH_OPTIONS_INIT macro to\n correctly set the version field. E.g.

\n\n
    git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;\n
\n", "fields": [ { "type": "int", @@ -31066,6 +33660,48 @@ } } ], + [ + "git_fetch_prune_t", + { + "decl": [ + "GIT_FETCH_PRUNE_UNSPECIFIED", + "GIT_FETCH_PRUNE", + "GIT_FETCH_NO_PRUNE" + ], + "type": "enum", + "file": "git2/remote.h", + "line": 507, + "lineto": 520, + "block": "GIT_FETCH_PRUNE_UNSPECIFIED\nGIT_FETCH_PRUNE\nGIT_FETCH_NO_PRUNE", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_FETCH_PRUNE_UNSPECIFIED", + "comments": "

Use the setting from the configuration

\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_FETCH_PRUNE", + "comments": "

Force pruning on

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_FETCH_NO_PRUNE", + "comments": "

Force pruning off

\n", + "value": 2 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], [ "git_filemode_t", { @@ -31078,7 +33714,7 @@ "GIT_FILEMODE_COMMIT" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 209, "lineto": 216, "block": "GIT_FILEMODE_UNREADABLE\nGIT_FILEMODE_TREE\nGIT_FILEMODE_BLOB\nGIT_FILEMODE_BLOB_EXECUTABLE\nGIT_FILEMODE_LINK\nGIT_FILEMODE_COMMIT", @@ -31137,25 +33773,15 @@ [ "git_filter", { - "decl": [ - "unsigned int version", - "const char * attributes", - "git_filter_init_fn initialize", - "git_filter_shutdown_fn shutdown", - "git_filter_check_fn check", - "git_filter_apply_fn apply", - "git_filter_stream_fn stream", - "git_filter_cleanup_fn cleanup" - ], + "decl": "git_filter", "type": "struct", "value": "git_filter", - "file": "sys/filter.h", - "line": 226, - "lineto": 271, - "tdef": null, - "description": " Filter structure used to register custom filters.", - "comments": "

To associate extra data with a filter, allocate extra data and put the git_filter struct at the start of your data buffer, then cast the self pointer to your larger structure when your callback is invoked.

\n", - "block": "unsigned int version\nconst char * attributes\ngit_filter_init_fn initialize\ngit_filter_shutdown_fn shutdown\ngit_filter_check_fn check\ngit_filter_apply_fn apply\ngit_filter_stream_fn stream\ngit_filter_cleanup_fn cleanup", + "file": "git2/filter.h", + "line": 61, + "lineto": 61, + "tdef": "typedef", + "description": " A filter that can transform file data", + "comments": "

This represents a filter that can be used to transform or even replace\n file data. Libgit2 includes one built in filter and it is possible to\n write your own (see git2/sys/filter.h for information on that).

\n\n

The two builtin filters are:

\n\n
    \n
  • "crlf" which uses the complex rules with the "text", "eol", and\n"crlf" file attributes to decide how to convert between LF and CRLF\nline endings
  • \n
  • "ident" which replaces "$Id$" in a blob with "$Id: \n$" upon\ncheckout and replaced "$Id: \n$" with "$Id$" on checkin.
  • \n
\n", "fields": [ { "type": "unsigned int", @@ -31228,7 +33854,8 @@ "git_filter_source_id", "git_filter_source_mode", "git_filter_source_path", - "git_filter_source_repo" + "git_filter_source_repo", + "git_filter_stream_fn" ] } } @@ -31241,7 +33868,7 @@ "GIT_FILTER_ALLOW_UNSAFE" ], "type": "enum", - "file": "filter.h", + "file": "git2/filter.h", "line": 41, "lineto": 44, "block": "GIT_FILTER_DEFAULT\nGIT_FILTER_ALLOW_UNSAFE", @@ -31274,12 +33901,13 @@ "decl": "git_filter_list", "type": "struct", "value": "git_filter_list", - "file": "filter.h", + "file": "git2/filter.h", "line": 73, "lineto": 73, "tdef": "typedef", "description": " List of filters to be applied", - "comments": "

This represents a list of filters to be applied to a file / blob. You can build the list with one call, apply it with another, and dispose it with a third. In typical usage, there are not many occasions where a git_filter_list is needed directly since the library will generally handle conversions for you, but it can be convenient to be able to build and apply the list sometimes.

\n", + "comments": "

This represents a list of filters to be applied to a file / blob. You\n can build the list with one call, apply it with another, and dispose it\n with a third. In typical usage, there are not many occasions where a\n git_filter_list is needed directly since the library will generally\n handle conversions for you, but it can be convenient to be able to\n build and apply the list sometimes.

\n", + "fields": [], "used": { "returns": [], "needs": [ @@ -31309,7 +33937,7 @@ "GIT_FILTER_CLEAN" ], "type": "enum", - "file": "filter.h", + "file": "git2/filter.h", "line": 31, "lineto": 36, "block": "GIT_FILTER_TO_WORKTREE\nGIT_FILTER_SMUDGE\nGIT_FILTER_TO_ODB\nGIT_FILTER_CLEAN", @@ -31359,12 +33987,13 @@ "decl": "git_filter_source", "type": "struct", "value": "git_filter_source", - "file": "sys/filter.h", + "file": "git2/sys/filter.h", "line": 95, "lineto": 95, "tdef": "typedef", "description": " A filter source represents a file/blob to be processed", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -31375,7 +34004,8 @@ "git_filter_source_id", "git_filter_source_mode", "git_filter_source_path", - "git_filter_source_repo" + "git_filter_source_repo", + "git_filter_stream_fn" ] } } @@ -31386,12 +34016,13 @@ "decl": "git_hashsig", "type": "struct", "value": "git_hashsig", - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "line": 17, "lineto": 17, "tdef": "typedef", "description": " Similarity signature of arbitrary text content based on line hashes", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -31413,13 +34044,13 @@ "GIT_HASHSIG_ALLOW_SMALL_FILES" ], "type": "enum", - "file": "sys/hashsig.h", + "file": "git2/sys/hashsig.h", "line": 25, "lineto": 45, "block": "GIT_HASHSIG_NORMAL\nGIT_HASHSIG_IGNORE_WHITESPACE\nGIT_HASHSIG_SMART_WHITESPACE\nGIT_HASHSIG_ALLOW_SMALL_FILES", "tdef": "typedef", "description": " Options for hashsig computation", - "comments": "

The options GIT_HASHSIG_NORMAL, GIT_HASHSIG_IGNORE_WHITESPACE, GIT_HASHSIG_SMART_WHITESPACE are exclusive and should not be combined.

\n", + "comments": "

The options GIT_HASHSIG_NORMAL, GIT_HASHSIG_IGNORE_WHITESPACE,\n GIT_HASHSIG_SMART_WHITESPACE are exclusive and should not be combined.

\n", "fields": [ { "type": "int", @@ -31475,13 +34106,13 @@ "GIT_IDXENTRY_NEW_SKIP_WORKTREE" ], "type": "enum", - "file": "index.h", + "file": "git2/index.h", "line": 115, "lineto": 135, "block": "GIT_IDXENTRY_INTENT_TO_ADD\nGIT_IDXENTRY_SKIP_WORKTREE\nGIT_IDXENTRY_EXTENDED2\nGIT_IDXENTRY_EXTENDED_FLAGS\nGIT_IDXENTRY_UPDATE\nGIT_IDXENTRY_REMOVE\nGIT_IDXENTRY_UPTODATE\nGIT_IDXENTRY_ADDED\nGIT_IDXENTRY_HASHED\nGIT_IDXENTRY_UNHASHED\nGIT_IDXENTRY_WT_REMOVE\nGIT_IDXENTRY_CONFLICTED\nGIT_IDXENTRY_UNPACKED\nGIT_IDXENTRY_NEW_SKIP_WORKTREE", "tdef": "typedef", "description": " Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`", - "comments": "

In memory, the flags_extended fields are divided into two parts: the fields that are read from and written to disk, and other fields that in-memory only and used by libgit2. Only the flags in GIT_IDXENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

Thee first three bitmasks match the three fields in the git_index_entry flags_extended value that belong on disk. You can use them to interpret the data in the flags_extended.

\n\n

The rest of the bitmasks match the other fields in the git_index_entry flags_extended value that are only used in-memory by libgit2. You can use them to interpret the data in the flags_extended.

\n", + "comments": "

In memory, the flags_extended fields are divided into two parts: the\n fields that are read from and written to disk, and other fields that\n in-memory only and used by libgit2. Only the flags in\n GIT_IDXENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

Thee first three bitmasks match the three fields in the\n git_index_entry flags_extended value that belong on disk. You\n can use them to interpret the data in the flags_extended.

\n\n

The rest of the bitmasks match the other fields in the git_index_entry\n flags_extended value that are only used in-memory by libgit2.\n You can use them to interpret the data in the flags_extended.

\n", "fields": [ { "type": "int", @@ -31580,16 +34211,23 @@ "decl": "git_index", "type": "struct", "value": "git_index", - "file": "types.h", - "line": 135, - "lineto": 135, + "file": "git2/types.h", + "line": 138, + "lineto": 138, "tdef": "typedef", "description": " Memory representation of an index file. ", "comments": "", + "fields": [], "used": { "returns": [ "git_index_get_byindex", - "git_index_get_bypath" + "git_index_get_bypath", + "git_index_name_get_byindex", + "git_index_reuc_get_byindex", + "git_index_reuc_get_bypath", + "git_merge_driver_source_ancestor", + "git_merge_driver_source_ours", + "git_merge_driver_source_theirs" ], "needs": [ "git_checkout_index", @@ -31620,6 +34258,10 @@ "git_index_get_byindex", "git_index_get_bypath", "git_index_has_conflicts", + "git_index_name_add", + "git_index_name_clear", + "git_index_name_entrycount", + "git_index_name_get_byindex", "git_index_new", "git_index_open", "git_index_owner", @@ -31630,6 +34272,13 @@ "git_index_remove_all", "git_index_remove_bypath", "git_index_remove_directory", + "git_index_reuc_add", + "git_index_reuc_clear", + "git_index_reuc_entrycount", + "git_index_reuc_find", + "git_index_reuc_get_byindex", + "git_index_reuc_get_bypath", + "git_index_reuc_remove", "git_index_set_caps", "git_index_set_version", "git_index_update_all", @@ -31641,6 +34290,7 @@ "git_indexer_commit", "git_indexer_free", "git_indexer_hash", + "git_indexer_init_options", "git_indexer_new", "git_merge_commits", "git_merge_file_from_index", @@ -31664,7 +34314,7 @@ "GIT_INDEX_ADD_CHECK_PATHSPEC" ], "type": "enum", - "file": "index.h", + "file": "git2/index.h", "line": 150, "lineto": 155, "block": "GIT_INDEX_ADD_DEFAULT\nGIT_INDEX_ADD_FORCE\nGIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\nGIT_INDEX_ADD_CHECK_PATHSPEC", @@ -31709,12 +34359,13 @@ "decl": "git_index_conflict_iterator", "type": "struct", "value": "git_index_conflict_iterator", - "file": "types.h", - "line": 138, - "lineto": 138, + "file": "git2/types.h", + "line": 141, + "lineto": 141, "tdef": "typedef", "description": " An iterator for conflicts in the index. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -31744,13 +34395,13 @@ ], "type": "struct", "value": "git_index_entry", - "file": "index.h", + "file": "git2/index.h", "line": 53, "lineto": 70, "block": "git_index_time ctime\ngit_index_time mtime\nuint32_t dev\nuint32_t ino\nuint32_t mode\nuint32_t uid\nuint32_t gid\nuint32_t file_size\ngit_oid id\nuint16_t flags\nuint16_t flags_extended\nconst char * path", "tdef": "typedef", "description": " 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\n

The flags field consists of a number of bit fields which can be accessed via the first set of GIT_IDXENTRY_... bitmasks below. These flags are all read from and persisted to disk.

\n\n

The flags_extended field also has a number of bit fields which can be accessed via the later GIT_IDXENTRY_... bitmasks below. Some of these flags are read from and written to disk, but some are set aside for in-memory only reference.

\n\n

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", + "comments": "

This is a public structure that represents a file entry in the index.\n The meaning of the fields corresponds to core Git's documentation (in\n "Documentation/technical/index-format.txt").

\n\n

The flags field consists of a number of bit fields which can be\n accessed via the first set of GIT_IDXENTRY_... bitmasks below. These\n flags are all read from and persisted to disk.

\n\n

The flags_extended field also has a number of bit fields which can be\n accessed via the later GIT_IDXENTRY_... bitmasks below. Some of\n these flags are read from and written to disk, but some are set aside\n for in-memory only reference.

\n\n

Note that the time and size fields are truncated to 32 bits. This\n is enough to detect changes, which is enough for the index to\n function as a cache, but it should not be taken as an authoritative\n source for that data.

\n", "fields": [ { "type": "git_index_time", @@ -31816,7 +34467,10 @@ "used": { "returns": [ "git_index_get_byindex", - "git_index_get_bypath" + "git_index_get_bypath", + "git_merge_driver_source_ancestor", + "git_merge_driver_source_ours", + "git_merge_driver_source_theirs" ], "needs": [ "git_index_add", @@ -31831,6 +34485,147 @@ } } ], + [ + "git_index_name_entry", + { + "decl": [ + "char * ancestor", + "char * ours", + "char * theirs" + ], + "type": "struct", + "value": "git_index_name_entry", + "file": "git2/sys/index.h", + "line": 23, + "lineto": 27, + "block": "char * ancestor\nchar * ours\nchar * theirs", + "tdef": "typedef", + "description": " Representation of a rename conflict entry in the index. ", + "comments": "", + "fields": [ + { + "type": "char *", + "name": "ancestor", + "comments": "" + }, + { + "type": "char *", + "name": "ours", + "comments": "" + }, + { + "type": "char *", + "name": "theirs", + "comments": "" + } + ], + "used": { + "returns": [ + "git_index_name_get_byindex" + ], + "needs": [] + } + } + ], + [ + "git_index_reuc_entry", + { + "decl": [ + "uint32_t [3] mode", + "git_oid [3] oid", + "char * path" + ], + "type": "struct", + "value": "git_index_reuc_entry", + "file": "git2/sys/index.h", + "line": 30, + "lineto": 34, + "block": "uint32_t [3] mode\ngit_oid [3] oid\nchar * path", + "tdef": "typedef", + "description": " Representation of a resolve undo entry in the index. ", + "comments": "", + "fields": [ + { + "type": "uint32_t [3]", + "name": "mode", + "comments": "" + }, + { + "type": "git_oid [3]", + "name": "oid", + "comments": "" + }, + { + "type": "char *", + "name": "path", + "comments": "" + } + ], + "used": { + "returns": [ + "git_index_reuc_get_byindex", + "git_index_reuc_get_bypath" + ], + "needs": [] + } + } + ], + [ + "git_index_stage_t", + { + "decl": [ + "GIT_INDEX_STAGE_ANY", + "GIT_INDEX_STAGE_NORMAL", + "GIT_INDEX_STAGE_ANCESTOR", + "GIT_INDEX_STAGE_OURS", + "GIT_INDEX_STAGE_THEIRS" + ], + "type": "enum", + "file": "git2/index.h", + "line": 157, + "lineto": 177, + "block": "GIT_INDEX_STAGE_ANY\nGIT_INDEX_STAGE_NORMAL\nGIT_INDEX_STAGE_ANCESTOR\nGIT_INDEX_STAGE_OURS\nGIT_INDEX_STAGE_THEIRS", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_INDEX_STAGE_ANY", + "comments": "

Match any index stage.

\n\n

Some index APIs take a stage to match; pass this value to match\n any entry matching the path regardless of stage.

\n", + "value": -1 + }, + { + "type": "int", + "name": "GIT_INDEX_STAGE_NORMAL", + "comments": "

A normal staged file in the index.

\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_INDEX_STAGE_ANCESTOR", + "comments": "

The ancestor side of a conflict.

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_INDEX_STAGE_OURS", + "comments": "

The "ours" side of a conflict.

\n", + "value": 2 + }, + { + "type": "int", + "name": "GIT_INDEX_STAGE_THEIRS", + "comments": "

The "theirs" side of a conflict.

\n", + "value": 3 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], [ "git_index_time", { @@ -31840,7 +34635,7 @@ ], "type": "struct", "value": "git_index_time", - "file": "index.h", + "file": "git2/index.h", "line": 26, "lineto": 30, "block": "int32_t seconds\nuint32_t nanoseconds", @@ -31875,7 +34670,7 @@ "GIT_INDEXCAP_FROM_OWNER" ], "type": "enum", - "file": "index.h", + "file": "git2/index.h", "line": 138, "lineto": 143, "block": "GIT_INDEXCAP_IGNORE_CASE\nGIT_INDEXCAP_NO_FILEMODE\nGIT_INDEXCAP_NO_SYMLINKS\nGIT_INDEXCAP_FROM_OWNER", @@ -31914,6 +34709,81 @@ } } ], + [ + "git_indexer", + { + "decl": "git_indexer", + "type": "struct", + "value": "git_indexer", + "file": "git2/indexer.h", + "line": 16, + "lineto": 16, + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [ + "git_indexer_append", + "git_indexer_commit", + "git_indexer_free", + "git_indexer_hash", + "git_indexer_init_options", + "git_indexer_new" + ] + } + } + ], + [ + "git_indexer_options", + { + "decl": [ + "unsigned int version", + "git_transfer_progress_cb progress_cb", + "void * progress_cb_payload", + "unsigned char verify" + ], + "type": "struct", + "value": "git_indexer_options", + "file": "git2/indexer.h", + "line": 18, + "lineto": 28, + "block": "unsigned int version\ngit_transfer_progress_cb progress_cb\nvoid * progress_cb_payload\nunsigned char verify", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "git_transfer_progress_cb", + "name": "progress_cb", + "comments": " progress_cb function to call with progress information " + }, + { + "type": "void *", + "name": "progress_cb_payload", + "comments": " progress_cb_payload payload for the progress callback " + }, + { + "type": "unsigned char", + "name": "verify", + "comments": " Do connectivity checks for the received pack " + } + ], + "used": { + "returns": [], + "needs": [ + "git_indexer_init_options", + "git_indexer_new" + ] + } + } + ], [ "git_indxentry_flag_t", { @@ -31922,7 +34792,7 @@ "GIT_IDXENTRY_VALID" ], "type": "enum", - "file": "index.h", + "file": "git2/index.h", "line": 86, "lineto": 89, "block": "GIT_IDXENTRY_EXTENDED\nGIT_IDXENTRY_VALID", @@ -31949,6 +34819,25 @@ } } ], + [ + "git_iterator", + { + "decl": [], + "type": "struct", + "value": "git_iterator", + "file": "git2/notes.h", + "line": 35, + "lineto": 35, + "tdef": null, + "description": "", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [] + } + } + ], [ "git_libgit2_opt_t", { @@ -31975,16 +34864,20 @@ "GIT_OPT_ENABLE_FSYNC_GITDIR", "GIT_OPT_GET_WINDOWS_SHAREMODE", "GIT_OPT_SET_WINDOWS_SHAREMODE", - "GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION" + "GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION", + "GIT_OPT_SET_ALLOCATOR", + "GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY", + "GIT_OPT_GET_PACK_MAX_OBJECTS", + "GIT_OPT_SET_PACK_MAX_OBJECTS" ], "type": "enum", - "file": "common.h", - "line": 162, - "lineto": 186, - "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", + "file": "git2/common.h", + "line": 173, + "lineto": 201, + "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", "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().

\n", + "comments": "

These are used to select which global option to set or get and are\n used in git_libgit2_opts().

\n", "fields": [ { "type": "int", @@ -32123,6 +35016,30 @@ "name": "GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION", "comments": "", "value": 22 + }, + { + "type": "int", + "name": "GIT_OPT_SET_ALLOCATOR", + "comments": "", + "value": 23 + }, + { + "type": "int", + "name": "GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY", + "comments": "", + "value": 24 + }, + { + "type": "int", + "name": "GIT_OPT_GET_PACK_MAX_OBJECTS", + "comments": "", + "value": 25 + }, + { + "type": "int", + "name": "GIT_OPT_SET_PACK_MAX_OBJECTS", + "comments": "", + "value": 26 } ], "used": { @@ -32131,6 +35048,35 @@ } } ], + [ + "git_mailmap", + { + "decl": "git_mailmap", + "type": "struct", + "value": "git_mailmap", + "file": "git2/types.h", + "line": 438, + "lineto": 438, + "tdef": "typedef", + "description": " Representation of .mailmap file state. ", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [ + "git_commit_author_with_mailmap", + "git_commit_committer_with_mailmap", + "git_mailmap_add_entry", + "git_mailmap_free", + "git_mailmap_from_buffer", + "git_mailmap_from_repository", + "git_mailmap_new", + "git_mailmap_resolve", + "git_mailmap_resolve_signature" + ] + } + } + ], [ "git_merge_analysis_t", { @@ -32142,9 +35088,9 @@ "GIT_MERGE_ANALYSIS_UNBORN" ], "type": "enum", - "file": "merge.h", - "line": 318, - "lineto": 347, + "file": "git2/merge.h", + "line": 320, + "lineto": 349, "block": "GIT_MERGE_ANALYSIS_NONE\nGIT_MERGE_ANALYSIS_NORMAL\nGIT_MERGE_ANALYSIS_UP_TO_DATE\nGIT_MERGE_ANALYSIS_FASTFORWARD\nGIT_MERGE_ANALYSIS_UNBORN", "tdef": "typedef", "description": " The results of `git_merge_analysis` indicate the merge opportunities.", @@ -32192,21 +35138,15 @@ [ "git_merge_driver", { - "decl": [ - "unsigned int version", - "git_merge_driver_init_fn initialize", - "git_merge_driver_shutdown_fn shutdown", - "git_merge_driver_apply_fn apply" - ], + "decl": "git_merge_driver", "type": "struct", "value": "git_merge_driver", - "file": "sys/merge.h", - "line": 118, - "lineto": 135, - "block": "unsigned int version\ngit_merge_driver_init_fn initialize\ngit_merge_driver_shutdown_fn shutdown\ngit_merge_driver_apply_fn apply", - "tdef": null, - "description": " Merge driver structure used to register custom merge drivers.", - "comments": "

To associate extra data with a driver, allocate extra data and put the git_merge_driver struct at the start of your data buffer, then cast the self pointer to your larger structure when your callback is invoked.

\n", + "file": "git2/sys/merge.h", + "line": 24, + "lineto": 24, + "tdef": "typedef", + "description": " \n\n git2/sys/merge.h\n ", + "comments": "

@\n{

\n", "fields": [ { "type": "unsigned int", @@ -32230,9 +35170,19 @@ } ], "used": { - "returns": [], + "returns": [ + "git_merge_driver_lookup" + ], "needs": [ - "git_merge_driver_apply_fn" + "git_merge_driver_apply_fn", + "git_merge_driver_init_fn", + "git_merge_driver_register", + "git_merge_driver_shutdown_fn", + "git_merge_driver_source_ancestor", + "git_merge_driver_source_file_options", + "git_merge_driver_source_ours", + "git_merge_driver_source_repo", + "git_merge_driver_source_theirs" ] } } @@ -32243,16 +35193,22 @@ "decl": "git_merge_driver_source", "type": "struct", "value": "git_merge_driver_source", - "file": "sys/merge.h", - "line": 36, - "lineto": 36, + "file": "git2/sys/merge.h", + "line": 41, + "lineto": 41, "tdef": "typedef", "description": " A merge driver source represents the file to be merged", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ - "git_merge_driver_apply_fn" + "git_merge_driver_apply_fn", + "git_merge_driver_source_ancestor", + "git_merge_driver_source_file_options", + "git_merge_driver_source_ours", + "git_merge_driver_source_repo", + "git_merge_driver_source_theirs" ] } } @@ -32267,7 +35223,7 @@ "GIT_MERGE_FILE_FAVOR_UNION" ], "type": "enum", - "file": "merge.h", + "file": "git2/merge.h", "line": 101, "lineto": 131, "block": "GIT_MERGE_FILE_FAVOR_NORMAL\nGIT_MERGE_FILE_FAVOR_OURS\nGIT_MERGE_FILE_FAVOR_THEIRS\nGIT_MERGE_FILE_FAVOR_UNION", @@ -32321,7 +35277,7 @@ "GIT_MERGE_FILE_DIFF_MINIMAL" ], "type": "enum", - "file": "merge.h", + "file": "git2/merge.h", "line": 136, "lineto": 163, "block": "GIT_MERGE_FILE_DEFAULT\nGIT_MERGE_FILE_STYLE_MERGE\nGIT_MERGE_FILE_STYLE_DIFF3\nGIT_MERGE_FILE_SIMPLIFY_ALNUM\nGIT_MERGE_FILE_IGNORE_WHITESPACE\nGIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE\nGIT_MERGE_FILE_IGNORE_WHITESPACE_EOL\nGIT_MERGE_FILE_DIFF_PATIENCE\nGIT_MERGE_FILE_DIFF_MINIMAL", @@ -32402,7 +35358,7 @@ ], "type": "struct", "value": "git_merge_file_input", - "file": "merge.h", + "file": "git2/merge.h", "line": 32, "lineto": 46, "block": "unsigned int version\nconst char * ptr\nsize_t size\nconst char * path\nunsigned int mode", @@ -32459,7 +35415,7 @@ ], "type": "struct", "value": "git_merge_file_options", - "file": "merge.h", + "file": "git2/merge.h", "line": 170, "lineto": 200, "block": "unsigned int version\nconst char * ancestor_label\nconst char * our_label\nconst char * their_label\ngit_merge_file_favor_t favor\ngit_merge_file_flag_t flags\nunsigned short marker_size", @@ -32504,7 +35460,9 @@ } ], "used": { - "returns": [], + "returns": [ + "git_merge_driver_source_file_options" + ], "needs": [ "git_merge_file", "git_merge_file_from_index", @@ -32525,9 +35483,9 @@ ], "type": "struct", "value": "git_merge_file_result", - "file": "merge.h", - "line": 221, - "lineto": 242, + "file": "git2/merge.h", + "line": 222, + "lineto": 243, "block": "unsigned int automergeable\nconst char * path\nunsigned int mode\nconst char * ptr\nsize_t len", "tdef": "typedef", "description": " Information about file-level merging", @@ -32579,7 +35537,7 @@ "GIT_MERGE_NO_RECURSIVE" ], "type": "enum", - "file": "merge.h", + "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", @@ -32634,9 +35592,9 @@ ], "type": "struct", "value": "git_merge_options", - "file": "merge.h", - "line": 247, - "lineto": 296, + "file": "git2/merge.h", + "line": 248, + "lineto": 297, "block": "unsigned int version\ngit_merge_flag_t flags\nunsigned int rename_threshold\nunsigned int target_limit\ngit_diff_similarity_metric * metric\nunsigned int recursion_limit\nconst char * default_driver\ngit_merge_file_favor_t file_favor\ngit_merge_file_flag_t file_flags", "tdef": "typedef", "description": " Merging options", @@ -32710,9 +35668,9 @@ "GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY" ], "type": "enum", - "file": "merge.h", - "line": 352, - "lineto": 370, + "file": "git2/merge.h", + "line": 354, + "lineto": 372, "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.", @@ -32745,24 +35703,6 @@ } } ], - [ - "git_merge_result", - { - "decl": "git_merge_result", - "type": "struct", - "value": "git_merge_result", - "file": "types.h", - "line": 185, - "lineto": 185, - "tdef": "typedef", - "description": " Merge result ", - "comments": "", - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_message_trailer", { @@ -32772,7 +35712,7 @@ ], "type": "struct", "value": "git_message_trailer", - "file": "message.h", + "file": "git2/message.h", "line": 43, "lineto": 46, "block": "const char * key\nconst char * value", @@ -32810,13 +35750,13 @@ ], "type": "struct", "value": "git_message_trailer_array", - "file": "message.h", + "file": "git2/message.h", "line": 54, "lineto": 60, "block": "git_message_trailer * trailers\nsize_t count\nchar * _trailer_block", "tdef": "typedef", "description": " Represents an array of git message trailers.", - "comments": "

Struct members under the private comment are private, subject to change and should not be used by callers.

\n", + "comments": "

Struct members under the private comment are private, subject to change\n and should not be used by callers.

\n", "fields": [ { "type": "git_message_trailer *", @@ -32849,12 +35789,13 @@ "decl": "git_note", "type": "struct", "value": "git_note", - "file": "types.h", - "line": 153, - "lineto": 153, + "file": "git2/types.h", + "line": 156, + "lineto": 156, "tdef": "typedef", "description": " Representation of a git note ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -32880,7 +35821,7 @@ "decl": "git_note_iterator", "type": "struct", "value": "git_note_iterator", - "file": "notes.h", + "file": "git2/notes.h", "line": 35, "lineto": 35, "tdef": "typedef", @@ -32903,12 +35844,13 @@ "decl": "git_object", "type": "struct", "value": "git_object", - "file": "types.h", - "line": 111, - "lineto": 111, + "file": "git2/types.h", + "line": 114, + "lineto": 114, "tdef": "typedef", "description": " Representation of a generic object in a repository ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -32945,12 +35887,13 @@ "decl": "git_odb", "type": "struct", "value": "git_odb", - "file": "types.h", - "line": 81, - "lineto": 81, + "file": "git2/types.h", + "line": 84, + "lineto": 84, "tdef": "typedef", "description": " An open object database handle. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -32962,6 +35905,7 @@ "git_odb_add_backend", "git_odb_add_disk_alternate", "git_odb_backend_loose", + "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", "git_odb_exists", @@ -33005,9 +35949,9 @@ "decl": "git_odb_backend", "type": "struct", "value": "git_odb_backend", - "file": "types.h", - "line": 84, - "lineto": 84, + "file": "git2/types.h", + "line": 87, + "lineto": 87, "block": "unsigned int version\ngit_odb * odb\nint (*)(void **, size_t *, git_otype *, git_odb_backend *, const git_oid *) read\nint (*)(git_oid *, void **, size_t *, git_otype *, git_odb_backend *, const git_oid *, size_t) read_prefix\nint (*)(size_t *, git_otype *, git_odb_backend *, const git_oid *) read_header\nint (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_otype) write\nint (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_otype) writestream\nint (*)(git_odb_stream **, size_t *, git_otype *, git_odb_backend *, const git_oid *) readstream\nint (*)(git_odb_backend *, const git_oid *) exists\nint (*)(git_oid *, git_odb_backend *, const git_oid *, size_t) exists_prefix\nint (*)(git_odb_backend *) refresh\nint (*)(git_odb_backend *, git_odb_foreach_cb, void *) foreach\nint (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *) writepack\nint (*)(git_odb_backend *, const git_oid *) freshen\nvoid (*)(git_odb_backend *) free", "tdef": "typedef", "description": " A custom backend in an ODB ", @@ -33098,6 +36042,7 @@ "git_odb_add_alternate", "git_odb_add_backend", "git_odb_backend_loose", + "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", "git_odb_get_backend", @@ -33116,7 +36061,7 @@ ], "type": "struct", "value": "git_odb_expand_id", - "file": "odb.h", + "file": "git2/odb.h", "line": 180, "lineto": 195, "block": "git_oid id\nunsigned short length\ngit_otype type", @@ -33154,12 +36099,13 @@ "decl": "git_odb_object", "type": "struct", "value": "git_odb_object", - "file": "types.h", - "line": 87, - "lineto": 87, + "file": "git2/types.h", + "line": 90, + "lineto": 90, "tdef": "typedef", "description": " An object read from the ODB ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -33181,10 +36127,10 @@ "decl": "git_odb_stream", "type": "struct", "value": "git_odb_stream", - "file": "types.h", - "line": 90, - "lineto": 90, - "block": "git_odb_backend * backend\nunsigned int mode\nvoid * hash_ctx\ngit_off_t declared_size\ngit_off_t received_bytes\nint (*)(git_odb_stream *, char *, size_t) read\nint (*)(git_odb_stream *, const char *, size_t) write\nint (*)(git_odb_stream *, const int *) finalize_write\nvoid (*)(git_odb_stream *) free", + "file": "git2/types.h", + "line": 93, + "lineto": 93, + "block": "git_odb_backend * backend\nunsigned int mode\nvoid * hash_ctx\ngit_off_t declared_size\ngit_off_t received_bytes\nint (*)(git_odb_stream *, char *, size_t) read\nint (*)(git_odb_stream *, const char *, size_t) write\nint (*)(git_odb_stream *, const git_oid *) finalize_write\nvoid (*)(git_odb_stream *) free", "tdef": "typedef", "description": " A stream to read/write from the ODB ", "comments": "", @@ -33225,7 +36171,7 @@ "comments": " Write `len` bytes from `buffer` into the stream." }, { - "type": "int (*)(git_odb_stream *, const int *)", + "type": "int (*)(git_odb_stream *, const git_oid *)", "name": "finalize_write", "comments": " Store the contents of the stream as an object with the id\n specified in `oid`.\n\n This method might not be invoked if:\n - an error occurs earlier with the `write` callback,\n - the object referred to by `oid` already exists in any backend, or\n - the final number of received bytes differs from the size declared\n with `git_odb_open_wstream()`" }, @@ -33257,7 +36203,7 @@ "GIT_STREAM_RW" ], "type": "enum", - "file": "odb_backend.h", + "file": "git2/odb_backend.h", "line": 70, "lineto": 74, "block": "GIT_STREAM_RDONLY\nGIT_STREAM_WRONLY\nGIT_STREAM_RW", @@ -33296,9 +36242,9 @@ "decl": "git_odb_writepack", "type": "struct", "value": "git_odb_writepack", - "file": "types.h", - "line": 93, - "lineto": 93, + "file": "git2/types.h", + "line": 96, + "lineto": 96, "block": "git_odb_backend * backend\nint (*)(git_odb_writepack *, const void *, size_t, git_transfer_progress *) append\nint (*)(git_odb_writepack *, git_transfer_progress *) commit\nvoid (*)(git_odb_writepack *) free", "tdef": "typedef", "description": " A stream to write a packfile to the ODB ", @@ -33341,7 +36287,7 @@ ], "type": "struct", "value": "git_oid", - "file": "oid.h", + "file": "git2/oid.h", "line": 33, "lineto": 36, "block": "unsigned char [20] id", @@ -33403,6 +36349,7 @@ "git_diff_patchid", "git_graph_ahead_behind", "git_graph_descendant_of", + "git_index_reuc_add", "git_index_write_tree", "git_index_write_tree_to", "git_merge_base", @@ -33461,18 +36408,24 @@ "git_reference_name_to_id", "git_reference_set_target", "git_reflog_append", + "git_repository_fetchhead_foreach_cb", "git_repository_hashfile", + "git_repository_mergehead_foreach_cb", "git_repository_set_head_detached", "git_revwalk_hide", "git_revwalk_hide_cb", "git_revwalk_next", "git_revwalk_push", + "git_stash_cb", + "git_stash_save", "git_tag_annotation_create", "git_tag_create", "git_tag_create_frombuffer", "git_tag_create_lightweight", + "git_tag_foreach_cb", "git_tag_lookup", "git_tag_lookup_prefix", + "git_transaction_set_target", "git_tree_create_updated", "git_tree_entry_byid", "git_tree_lookup", @@ -33490,12 +36443,13 @@ "decl": "git_oid_shorten", "type": "struct", "value": "git_oid_shorten", - "file": "oid.h", + "file": "git2/oid.h", "line": 215, "lineto": 215, "tdef": "typedef", "description": " OID Shortener object", "comments": "", + "fields": [], "used": { "returns": [ "git_oid_shorten_new" @@ -33516,7 +36470,7 @@ ], "type": "struct", "value": "git_oidarray", - "file": "oidarray.h", + "file": "git2/oidarray.h", "line": 16, "lineto": 19, "block": "git_oid * ids\nsize_t count", @@ -33561,9 +36515,9 @@ "GIT_OBJ_REF_DELTA" ], "type": "enum", - "file": "types.h", - "line": 67, - "lineto": 78, + "file": "git2/types.h", + "line": 70, + "lineto": 81, "block": "GIT_OBJ_ANY\nGIT_OBJ_BAD\nGIT_OBJ__EXT1\nGIT_OBJ_COMMIT\nGIT_OBJ_TREE\nGIT_OBJ_BLOB\nGIT_OBJ_TAG\nGIT_OBJ__EXT2\nGIT_OBJ_OFS_DELTA\nGIT_OBJ_REF_DELTA", "tdef": "typedef", "description": " Basic type (loose or packed) of any Git object. ", @@ -33664,12 +36618,13 @@ "decl": "git_packbuilder", "type": "struct", "value": "git_packbuilder", - "file": "types.h", - "line": 156, - "lineto": 156, + "file": "git2/types.h", + "line": 159, + "lineto": 159, "tdef": "typedef", "description": " Representation of a git packbuilder ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -33686,6 +36641,7 @@ "git_packbuilder_set_callbacks", "git_packbuilder_set_threads", "git_packbuilder_write", + "git_packbuilder_write_buf", "git_packbuilder_written" ] } @@ -33699,7 +36655,7 @@ "GIT_PACKBUILDER_DELTAFICATION" ], "type": "enum", - "file": "pack.h", + "file": "git2/pack.h", "line": 51, "lineto": 54, "block": "GIT_PACKBUILDER_ADDING_OBJECTS\nGIT_PACKBUILDER_DELTAFICATION", @@ -33732,12 +36688,13 @@ "decl": "git_patch", "type": "struct", "value": "git_patch", - "file": "patch.h", + "file": "git2/patch.h", "line": 29, "lineto": 29, "tdef": "typedef", "description": " The diff patch is used to store all the text diffs for a delta.", - "comments": "

You can easily loop over the content of patches and get information about them.

\n", + "comments": "

You can easily loop over the content of patches and get information about\n them.

\n", + "fields": [], "used": { "returns": [], "needs": [ @@ -33759,18 +36716,107 @@ } } ], + [ + "git_path_fs", + { + "decl": [ + "GIT_PATH_FS_GENERIC", + "GIT_PATH_FS_NTFS", + "GIT_PATH_FS_HFS" + ], + "type": "enum", + "file": "git2/sys/path.h", + "line": 34, + "lineto": 41, + "block": "GIT_PATH_FS_GENERIC\nGIT_PATH_FS_NTFS\nGIT_PATH_FS_HFS", + "tdef": "typedef", + "description": " The kinds of checks to perform according to which filesystem we are trying to\n protect.", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_PATH_FS_GENERIC", + "comments": "

Do both NTFS- and HFS-specific checks

\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_PATH_FS_NTFS", + "comments": "

Do NTFS-specific checks only

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_PATH_FS_HFS", + "comments": "

Do HFS-specific checks only

\n", + "value": 2 + } + ], + "used": { + "returns": [], + "needs": [ + "git_path_is_gitfile" + ] + } + } + ], + [ + "git_path_gitfile", + { + "decl": [ + "GIT_PATH_GITFILE_GITIGNORE", + "GIT_PATH_GITFILE_GITMODULES", + "GIT_PATH_GITFILE_GITATTRIBUTES" + ], + "type": "enum", + "file": "git2/sys/path.h", + "line": 21, + "lineto": 28, + "block": "GIT_PATH_GITFILE_GITIGNORE\nGIT_PATH_GITFILE_GITMODULES\nGIT_PATH_GITFILE_GITATTRIBUTES", + "tdef": "typedef", + "description": " The kinds of git-specific files we know about.", + "comments": "

The order needs to stay the same to not break the gitfiles\n array in path.c

\n", + "fields": [ + { + "type": "int", + "name": "GIT_PATH_GITFILE_GITIGNORE", + "comments": "

Check for the .gitignore file

\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_PATH_GITFILE_GITMODULES", + "comments": "

Check for the .gitmodules file

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_PATH_GITFILE_GITATTRIBUTES", + "comments": "

Check for the .gitattributes file

\n", + "value": 2 + } + ], + "used": { + "returns": [], + "needs": [ + "git_path_is_gitfile" + ] + } + } + ], [ "git_pathspec", { "decl": "git_pathspec", "type": "struct", "value": "git_pathspec", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 20, "lineto": 20, "tdef": "typedef", "description": " Compiled pathspec", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -33804,7 +36850,7 @@ "GIT_PATHSPEC_FAILURES_ONLY" ], "type": "enum", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 30, "lineto": 73, "block": "GIT_PATHSPEC_DEFAULT\nGIT_PATHSPEC_IGNORE_CASE\nGIT_PATHSPEC_USE_CASE\nGIT_PATHSPEC_NO_GLOB\nGIT_PATHSPEC_NO_MATCH_ERROR\nGIT_PATHSPEC_FIND_FAILURES\nGIT_PATHSPEC_FAILURES_ONLY", @@ -33867,12 +36913,13 @@ "decl": "git_pathspec_match_list", "type": "struct", "value": "git_pathspec_match_list", - "file": "pathspec.h", + "file": "git2/pathspec.h", "line": 25, "lineto": 25, "tdef": "typedef", "description": " List of filenames matching a pathspec", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -33903,13 +36950,13 @@ ], "type": "struct", "value": "git_proxy_options", - "file": "proxy.h", + "file": "git2/proxy.h", "line": 42, "lineto": 77, "block": "unsigned int version\ngit_proxy_t type\nconst char * url\ngit_cred_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\nvoid * payload", "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", + "comments": "

Note that not all types may be supported, depending on the platform\n and compilation options.

\n", "fields": [ { "type": "unsigned int", @@ -33934,7 +36981,7 @@ { "type": "git_transport_certificate_check_cb", "name": "certificate_check", - "comments": " If cert verification fails, this will be called to let the\n user make the final decision of whether to allow the\n connection to proceed. Returns 1 to allow the connection, 0\n to disallow it or a negative value to indicate an error." + "comments": " If cert verification fails, this will be called to let the\n user make the final decision of whether to allow the\n connection to proceed. Returns 0 to allow the connection\n or a negative value to indicate an error." }, { "type": "void *", @@ -33961,7 +37008,7 @@ "GIT_PROXY_SPECIFIED" ], "type": "enum", - "file": "proxy.h", + "file": "git2/proxy.h", "line": 18, "lineto": 34, "block": "GIT_PROXY_NONE\nGIT_PROXY_AUTO\nGIT_PROXY_SPECIFIED", @@ -34000,12 +37047,13 @@ "decl": "git_push", "type": "struct", "value": "git_push", - "file": "types.h", + "file": "git2/types.h", "line": 240, "lineto": 240, "tdef": "typedef", "description": " Preparation for a push operation. Can be used to configure what to\n push and the level of parallelism of the packfile builder.", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -34029,9 +37077,9 @@ ], "type": "struct", "value": "git_push_options", - "file": "remote.h", - "line": 615, - "lineto": 642, + "file": "git2/remote.h", + "line": 616, + "lineto": 643, "block": "unsigned int version\nunsigned int pb_parallelism\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", "tdef": "typedef", "description": " Controls the behavior of a git_push object.", @@ -34084,7 +37132,7 @@ ], "type": "struct", "value": "git_push_update", - "file": "remote.h", + "file": "git2/remote.h", "line": 359, "lineto": 376, "block": "char * src_refname\nchar * dst_refname\ngit_oid src\ngit_oid dst", @@ -34127,12 +37175,13 @@ "decl": "git_rebase", "type": "struct", "value": "git_rebase", - "file": "types.h", + "file": "git2/types.h", "line": 191, "lineto": 191, "tdef": "typedef", "description": " Representation of a rebase ", "comments": "", + "fields": [], "used": { "returns": [ "git_rebase_operation_byindex" @@ -34164,13 +37213,13 @@ ], "type": "struct", "value": "git_rebase_operation", - "file": "rebase.h", - "line": 130, - "lineto": 145, + "file": "git2/rebase.h", + "line": 132, + "lineto": 147, "block": "git_rebase_operation_t type\nconst git_oid id\nconst char * exec", "tdef": "typedef", "description": " A rebase operation", - "comments": "

Describes a single instruction/operation to be performed during the rebase.

\n", + "comments": "

Describes a single instruction/operation to be performed during the\n rebase.

\n", "fields": [ { "type": "git_rebase_operation_t", @@ -34210,9 +37259,9 @@ "GIT_REBASE_OPERATION_EXEC" ], "type": "enum", - "file": "rebase.h", - "line": 78, - "lineto": 114, + "file": "git2/rebase.h", + "line": 80, + "lineto": 116, "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`.", @@ -34261,6 +37310,68 @@ } } ], + [ + "git_rebase_options", + { + "decl": [ + "unsigned int version", + "int quiet", + "int inmemory", + "const char * rewrite_notes_ref", + "git_merge_options merge_options", + "git_checkout_options checkout_options" + ], + "type": "struct", + "value": "git_rebase_options", + "file": "git2/rebase.h", + "line": 31, + "lineto": 75, + "block": "unsigned int version\nint quiet\nint inmemory\nconst char * rewrite_notes_ref\ngit_merge_options merge_options\ngit_checkout_options checkout_options", + "tdef": "typedef", + "description": " Rebase options", + "comments": "

Use to tell the rebase machinery how to operate.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "int", + "name": "quiet", + "comments": " Used by `git_rebase_init`, this will instruct other clients working\n on this rebase that you want a quiet rebase experience, which they\n may choose to provide in an application-specific manner. This has no\n effect upon libgit2 directly, but is provided for interoperability\n between Git tools." + }, + { + "type": "int", + "name": "inmemory", + "comments": " Used by `git_rebase_init`, this will begin an in-memory rebase,\n which will allow callers to step through the rebase operations and\n commit the rebased changes, but will not rewind HEAD or update the\n repository to be in a rebasing state. This will not interfere with\n the working directory (if there is one)." + }, + { + "type": "const char *", + "name": "rewrite_notes_ref", + "comments": " Used by `git_rebase_finish`, this is the name of the notes reference\n used to rewrite notes for rebased commits when finishing the rebase;\n if NULL, the contents of the configuration option `notes.rewriteRef`\n is examined, unless the configuration option `notes.rewrite.rebase`\n is set to false. If `notes.rewriteRef` is also NULL, notes will\n not be rewritten." + }, + { + "type": "git_merge_options", + "name": "merge_options", + "comments": " Options to control how trees are merged during `git_rebase_next`." + }, + { + "type": "git_checkout_options", + "name": "checkout_options", + "comments": " Options to control how files are written during `git_rebase_init`,\n `git_rebase_next` and `git_rebase_abort`. Note that a minimum\n strategy of `GIT_CHECKOUT_SAFE` is defaulted in `init` and `next`,\n and a minimum strategy of `GIT_CHECKOUT_FORCE` is defaulted in\n `abort` to match git semantics." + } + ], + "used": { + "returns": [], + "needs": [ + "git_rebase_init", + "git_rebase_init_options", + "git_rebase_open" + ] + } + } + ], [ "git_ref_t", { @@ -34271,7 +37382,7 @@ "GIT_REF_LISTALL" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 194, "lineto": 199, "block": "GIT_REF_INVALID\nGIT_REF_OID\nGIT_REF_SYMBOLIC\nGIT_REF_LISTALL", @@ -34318,12 +37429,13 @@ "decl": "git_refdb", "type": "struct", "value": "git_refdb", - "file": "types.h", - "line": 96, - "lineto": 96, + "file": "git2/types.h", + "line": 99, + "lineto": 99, "tdef": "typedef", "description": " An open refs database handle. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -34346,9 +37458,9 @@ "decl": "git_refdb_backend", "type": "struct", "value": "git_refdb_backend", - "file": "types.h", - "line": 99, - "lineto": 99, + "file": "git2/types.h", + "line": 102, + "lineto": 102, "block": "unsigned int version\nint (*)(int *, git_refdb_backend *, const char *) exists\nint (*)(git_reference **, git_refdb_backend *, const char *) lookup\nint (*)(git_reference_iterator **, struct git_refdb_backend *, const char *) iterator\nint (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *) write\nint (*)(git_reference **, git_refdb_backend *, const char *, const char *, int, const git_signature *, const char *) rename\nint (*)(git_refdb_backend *, const char *, const git_oid *, const char *) del\nint (*)(git_refdb_backend *) compress\nint (*)(git_refdb_backend *, const char *) has_log\nint (*)(git_refdb_backend *, const char *) ensure_log\nvoid (*)(git_refdb_backend *) free\nint (*)(git_reflog **, git_refdb_backend *, const char *) reflog_read\nint (*)(git_refdb_backend *, git_reflog *) reflog_write\nint (*)(git_refdb_backend *, const char *, const char *) reflog_rename\nint (*)(git_refdb_backend *, const char *) reflog_delete\nint (*)(void **, git_refdb_backend *, const char *) lock\nint (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *) unlock", "tdef": "typedef", "description": " A custom backend for refs ", @@ -34456,12 +37568,13 @@ "decl": "git_reference", "type": "struct", "value": "git_reference", - "file": "types.h", - "line": 173, - "lineto": 173, + "file": "git2/types.h", + "line": 176, + "lineto": 176, "tdef": "typedef", "description": " In-memory representation of a reference. ", "comments": "", + "fields": [], "used": { "returns": [ "git_reference__alloc", @@ -34487,6 +37600,7 @@ "git_reference_dup", "git_reference_dwim", "git_reference_foreach", + "git_reference_foreach_cb", "git_reference_foreach_glob", "git_reference_foreach_name", "git_reference_free", @@ -34527,9 +37641,9 @@ "decl": "git_reference_iterator", "type": "struct", "value": "git_reference_iterator", - "file": "types.h", - "line": 176, - "lineto": 176, + "file": "git2/types.h", + "line": 179, + "lineto": 179, "block": "git_refdb * db\nint (*)(git_reference **, git_reference_iterator *) next\nint (*)(const char **, git_reference_iterator *) next_name\nvoid (*)(git_reference_iterator *) free", "tdef": "typedef", "description": " Iterator for references ", @@ -34578,7 +37692,7 @@ "GIT_REF_FORMAT_REFSPEC_SHORTHAND" ], "type": "enum", - "file": "refs.h", + "file": "git2/refs.h", "line": 639, "lineto": 668, "block": "GIT_REF_FORMAT_NORMAL\nGIT_REF_FORMAT_ALLOW_ONELEVEL\nGIT_REF_FORMAT_REFSPEC_PATTERN\nGIT_REF_FORMAT_REFSPEC_SHORTHAND", @@ -34623,19 +37737,22 @@ "decl": "git_reflog", "type": "struct", "value": "git_reflog", - "file": "types.h", - "line": 150, - "lineto": 150, + "file": "git2/types.h", + "line": 153, + "lineto": 153, "tdef": "typedef", "description": " Representation of a reference log ", "comments": "", + "fields": [], "used": { "returns": [ + "git_reflog_entry__alloc", "git_reflog_entry_byindex" ], "needs": [ "git_reflog_append", "git_reflog_drop", + "git_reflog_entry__free", "git_reflog_entry_byindex", "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -34644,7 +37761,8 @@ "git_reflog_entrycount", "git_reflog_free", "git_reflog_read", - "git_reflog_write" + "git_reflog_write", + "git_transaction_set_reflog" ] } } @@ -34655,17 +37773,20 @@ "decl": "git_reflog_entry", "type": "struct", "value": "git_reflog_entry", - "file": "types.h", - "line": 147, - "lineto": 147, + "file": "git2/types.h", + "line": 150, + "lineto": 150, "tdef": "typedef", "description": " Representation of a reference log entry ", "comments": "", + "fields": [], "used": { "returns": [ + "git_reflog_entry__alloc", "git_reflog_entry_byindex" ], "needs": [ + "git_reflog_entry__free", "git_reflog_entry_committer", "git_reflog_entry_id_new", "git_reflog_entry_id_old", @@ -34674,18 +37795,52 @@ } } ], + [ + "git_refspec", + { + "decl": "git_refspec", + "type": "struct", + "value": "git_refspec", + "file": "git2/types.h", + "line": 222, + "lineto": 222, + "tdef": "typedef", + "description": " A refspec specifies the mapping between remote and local reference\n names when fetch or pushing.", + "comments": "", + "fields": [], + "used": { + "returns": [ + "git_remote_get_refspec" + ], + "needs": [ + "git_refspec_direction", + "git_refspec_dst", + "git_refspec_dst_matches", + "git_refspec_force", + "git_refspec_free", + "git_refspec_parse", + "git_refspec_rtransform", + "git_refspec_src", + "git_refspec_src_matches", + "git_refspec_string", + "git_refspec_transform" + ] + } + } + ], [ "git_remote", { "decl": "git_remote", "type": "struct", "value": "git_remote", - "file": "types.h", + "file": "git2/types.h", "line": 228, "lineto": 228, "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).", "comments": "", + "fields": [], "used": { "returns": [ "git_remote_autotag" @@ -34745,7 +37900,7 @@ "GIT_REMOTE_DOWNLOAD_TAGS_ALL" ], "type": "enum", - "file": "remote.h", + "file": "git2/remote.h", "line": 527, "lineto": 545, "block": "GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED\nGIT_REMOTE_DOWNLOAD_TAGS_AUTO\nGIT_REMOTE_DOWNLOAD_TAGS_NONE\nGIT_REMOTE_DOWNLOAD_TAGS_ALL", @@ -34792,30 +37947,16 @@ [ "git_remote_callbacks", { - "decl": [ - "unsigned int version", - "git_transport_message_cb sideband_progress", - "int (*)(git_remote_completion_type, void *) completion", - "git_cred_acquire_cb credentials", - "git_transport_certificate_check_cb certificate_check", - "git_transfer_progress_cb transfer_progress", - "int (*)(const char *, const git_oid *, const git_oid *, void *) update_tips", - "git_packbuilder_progress pack_progress", - "git_push_transfer_progress push_transfer_progress", - "git_push_update_reference_cb push_update_reference", - "git_push_negotiation push_negotiation", - "git_transport_cb transport", - "void * payload" - ], + "decl": "git_remote_callbacks", "type": "struct", "value": "git_remote_callbacks", - "file": "remote.h", - "line": 408, - "lineto": 490, + "file": "git2/types.h", + "line": 244, + "lineto": 244, "block": "unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_type, void *) completion\ngit_cred_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\ngit_transfer_progress_cb transfer_progress\nint (*)(const char *, const git_oid *, const git_oid *, void *) update_tips\ngit_packbuilder_progress pack_progress\ngit_push_transfer_progress push_transfer_progress\ngit_push_update_reference_cb push_update_reference\ngit_push_negotiation push_negotiation\ngit_transport_cb transport\nvoid * payload", - "tdef": 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", + "tdef": "typedef", + "description": "", + "comments": "", "fields": [ { "type": "unsigned int", @@ -34840,7 +37981,7 @@ { "type": "git_transport_certificate_check_cb", "name": "certificate_check", - "comments": " If cert verification fails, this will be called to let the\n user make the final decision of whether to allow the\n connection to proceed. Returns 1 to allow the connection, 0\n to disallow it or a negative value to indicate an error." + "comments": " If cert verification fails, this will be called to let the\n user make the final decision of whether to allow the\n connection to proceed. Returns 0 to allow the connection\n or a negative value to indicate an error." }, { "type": "git_transfer_progress_cb", @@ -34903,7 +38044,7 @@ "GIT_REMOTE_COMPLETION_ERROR" ], "type": "enum", - "file": "remote.h", + "file": "git2/remote.h", "line": 344, "lineto": 348, "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", @@ -34939,21 +38080,15 @@ [ "git_remote_head", { - "decl": [ - "int local", - "git_oid oid", - "git_oid loid", - "char * name", - "char * symref_target" - ], + "decl": "git_remote_head", "type": "struct", "value": "git_remote_head", - "file": "net.h", - "line": 40, - "lineto": 50, + "file": "git2/types.h", + "line": 243, + "lineto": 243, "block": "int local\ngit_oid oid\ngit_oid loid\nchar * name\nchar * symref_target", - "tdef": null, - "description": " Description of a reference advertised by a remote server, given out\n on `ls` calls.", + "tdef": "typedef", + "description": "", "comments": "", "fields": [ { @@ -34997,18 +38132,20 @@ "decl": "git_repository", "type": "struct", "value": "git_repository", - "file": "types.h", - "line": 105, - "lineto": 105, + "file": "git2/types.h", + "line": 108, + "lineto": 108, "tdef": "typedef", "description": " Representation of an existing git repository,\n including all its object contents", "comments": "", + "fields": [], "used": { "returns": [ "git_blob_owner", "git_commit_owner", "git_filter_source_repo", "git_index_owner", + "git_merge_driver_source_repo", "git_object_owner", "git_reference_owner", "git_remote_owner", @@ -35038,6 +38175,9 @@ "git_branch_create_from_annotated", "git_branch_iterator_new", "git_branch_lookup", + "git_branch_remote_name", + "git_branch_upstream_name", + "git_branch_upstream_remote", "git_checkout_head", "git_checkout_index", "git_checkout_tree", @@ -35073,6 +38213,7 @@ "git_ignore_clear_internal_rules", "git_ignore_path_is_ignored", "git_index_write_tree_to", + "git_mailmap_from_repository", "git_mempack_dump", "git_merge", "git_merge_analysis", @@ -35088,6 +38229,7 @@ "git_note_commit_read", "git_note_commit_remove", "git_note_create", + "git_note_default_ref", "git_note_foreach", "git_note_iterator_new", "git_note_read", @@ -35145,6 +38287,7 @@ "git_repository_hashfile", "git_repository_head", "git_repository_head_detached", + "git_repository_head_detached_for_worktree", "git_repository_head_for_worktree", "git_repository_head_unborn", "git_repository_ident", @@ -35200,6 +38343,7 @@ "git_stash_drop", "git_stash_foreach", "git_stash_pop", + "git_stash_save", "git_status_file", "git_status_foreach", "git_status_foreach_ext", @@ -35227,6 +38371,7 @@ "git_tag_list_match", "git_tag_lookup", "git_tag_lookup_prefix", + "git_transaction_new", "git_tree_create_updated", "git_tree_entry_to_object", "git_tree_lookup", @@ -35253,13 +38398,13 @@ "GIT_REPOSITORY_INIT_RELATIVE_GITLINK" ], "type": "enum", - "file": "repository.h", + "file": "git2/repository.h", "line": 232, "lineto": 240, "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:

\n\n
    \n
  • BARE - Create a bare repository with no working directory. * NO_REINIT - Return an GIT_EEXISTS error if the repo_path appears to already be an git repository. * NO_DOTGIT_DIR - Normally a "/.git/" will be appended to the repo path for non-bare repos (if it is not already there), but passing this flag prevents that behavior. * MKDIR - Make the repo_path (and workdir_path) as needed. Init is always willing to create the ".git" directory even without this flag. This flag tells init to create the trailing component of the repo and workdir paths as needed. * MKPATH - Recursively make all components of the repo and workdir paths as necessary. * EXTERNAL_TEMPLATE - libgit2 normally uses internal templates to initialize a new repo. This flags enables external templates, looking the "template_path" from the options if set, or the 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.
  • \n
\n", + "comments": "

These flags configure extra behaviors to git_repository_init_ext.\n In every case, the default behavior is the zero value (i.e. flag is\n not set). Just OR the flag values together for the flags parameter\n when initializing a new repo. Details of individual values are:

\n\n
    \n
  • BARE - Create a bare repository with no working directory.
  • \n
  • NO_REINIT - Return an GIT_EEXISTS error if the repo_path appears to\n already be an git repository.
  • \n
  • NO_DOTGIT_DIR - Normally a "/.git/" will be appended to the repo\n path for non-bare repos (if it is not already there), but\n passing this flag prevents that behavior.
  • \n
  • MKDIR - Make the repo_path (and workdir_path) as needed. Init is\n always willing to create the ".git" directory even without this\n flag. This flag tells init to create the trailing component of\n the repo and workdir paths as needed.
  • \n
  • MKPATH - Recursively make all components of the repo and workdir\n paths as necessary.
  • \n
  • EXTERNAL_TEMPLATE - libgit2 normally uses internal templates to\n initialize a new repo. This flags enables external templates,\n looking the "template_path" from the options if set, or the\n init.templatedir global config if not, or falling back on\n "/usr/share/git-core/templates" if it exists.
  • \n
  • GIT_REPOSITORY_INIT_RELATIVE_GITLINK - If an alternate workdir is\n specified, use relative paths for the gitdir and core.worktree.
  • \n
\n", "fields": [ { "type": "int", @@ -35319,13 +38464,13 @@ "GIT_REPOSITORY_INIT_SHARED_ALL" ], "type": "enum", - "file": "repository.h", + "file": "git2/repository.h", "line": 255, "lineto": 259, "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:

\n\n
    \n
  • SHARED_UMASK - Use permissions configured by umask - the default. * SHARED_GROUP - Use "--shared=group" behavior, chmod'ing the new repo to be group writable and "g+sx" for sticky group assignment. * SHARED_ALL - Use "--shared=all" behavior, adding world readability. * Anything else - Set to custom value.
  • \n
\n", + "comments": "

Set the mode field of the git_repository_init_options structure\n either to the custom mode that you would like, or to one of the\n following modes:

\n\n
    \n
  • SHARED_UMASK - Use permissions configured by umask - the default.
  • \n
  • SHARED_GROUP - Use "--shared=group" behavior, chmod'ing the new repo\n to be group writable and "g+sx" for sticky group assignment.
  • \n
  • SHARED_ALL - Use "--shared=all" behavior, adding world readability.
  • \n
  • Anything else - Set to custom value.
  • \n
\n", "fields": [ { "type": "int", @@ -35367,13 +38512,13 @@ ], "type": "struct", "value": "git_repository_init_options", - "file": "repository.h", + "file": "git2/repository.h", "line": 289, "lineto": 298, "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:

\n\n
    \n
  • flags - Combination of GIT_REPOSITORY_INIT flags above. * mode - Set to one of the standard GIT_REPOSITORY_INIT_SHARED_... constants above, or to a custom value that you would like. * workdir_path - The path to the working dir or NULL for default (i.e. repo_path parent on non-bare repos). IF THIS IS RELATIVE PATH, IT WILL BE EVALUATED RELATIVE TO THE REPO_PATH. If this is not the "natural" working directory, a .git gitlink file will be created here linking to the repo_path. * description - If set, this will be used to initialize the "description" file in the repository, instead of using the template content. * template_path - When GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE is set, this contains the path to use for the template directory. If this is NULL, the config or default directory options will be used instead. * initial_head - The name of the head to point HEAD at. If NULL, then this will be treated as "master" and the HEAD ref will be set to "refs/heads/master". If this begins with "refs/" it will be used verbatim; otherwise "refs/heads/" will be prefixed. * origin_url - If this is non-NULL, then after the rest of the repository initialization is completed, an "origin" remote will be added pointing to this URL.
  • \n
\n", + "comments": "

This contains extra options for git_repository_init_ext that enable\n additional initialization features. The fields are:

\n\n
    \n
  • flags - Combination of GIT_REPOSITORY_INIT flags above.
  • \n
  • mode - Set to one of the standard GIT_REPOSITORY_INIT_SHARED_...\n constants above, or to a custom value that you would like.
  • \n
  • workdir_path - The path to the working dir or NULL for default (i.e.\n repo_path parent on non-bare repos). IF THIS IS RELATIVE PATH,\n IT WILL BE EVALUATED RELATIVE TO THE REPO_PATH. If this is not\n the "natural" working directory, a .git gitlink file will be\n created here linking to the repo_path.
  • \n
  • description - If set, this will be used to initialize the "description"\n file in the repository, instead of using the template content.
  • \n
  • template_path - When GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE is set,\n this contains the path to use for the template directory. If\n this is NULL, the config or default directory options will be\n used instead.
  • \n
  • initial_head - The name of the head to point HEAD at. If NULL, then\n this will be treated as "master" and the HEAD ref will be set\n to "refs/heads/master". If this begins with "refs/" it will be\n used verbatim; otherwise "refs/heads/" will be prefixed.
  • \n
  • origin_url - If this is non-NULL, then after the rest of the\n repository initialization is completed, an "origin" remote\n will be added pointing to this URL.
  • \n
\n", "fields": [ { "type": "unsigned int", @@ -35445,9 +38590,9 @@ "GIT_REPOSITORY_ITEM_WORKTREES" ], "type": "enum", - "file": "repository.h", - "line": 412, - "lineto": 427, + "file": "git2/repository.h", + "line": 414, + "lineto": 429, "block": "GIT_REPOSITORY_ITEM_GITDIR\nGIT_REPOSITORY_ITEM_WORKDIR\nGIT_REPOSITORY_ITEM_COMMONDIR\nGIT_REPOSITORY_ITEM_INDEX\nGIT_REPOSITORY_ITEM_OBJECTS\nGIT_REPOSITORY_ITEM_REFS\nGIT_REPOSITORY_ITEM_PACKED_REFS\nGIT_REPOSITORY_ITEM_REMOTES\nGIT_REPOSITORY_ITEM_CONFIG\nGIT_REPOSITORY_ITEM_INFO\nGIT_REPOSITORY_ITEM_HOOKS\nGIT_REPOSITORY_ITEM_LOGS\nGIT_REPOSITORY_ITEM_MODULES\nGIT_REPOSITORY_ITEM_WORKTREES", "tdef": "typedef", "description": " List of items which belong to the git repository layout", @@ -35557,13 +38702,13 @@ "GIT_REPOSITORY_OPEN_FROM_ENV" ], "type": "enum", - "file": "repository.h", + "file": "git2/repository.h", "line": 126, "lineto": 132, "block": "GIT_REPOSITORY_OPEN_NO_SEARCH\nGIT_REPOSITORY_OPEN_CROSS_FS\nGIT_REPOSITORY_OPEN_BARE\nGIT_REPOSITORY_OPEN_NO_DOTGIT\nGIT_REPOSITORY_OPEN_FROM_ENV", "tdef": "typedef", "description": " Option flags for `git_repository_open_ext`.", - "comments": "
    \n
  • GIT_REPOSITORY_OPEN_NO_SEARCH - Only open the repository if it can be immediately found in the start_path. Do not walk up from the start_path looking at parent directories. * GIT_REPOSITORY_OPEN_CROSS_FS - Unless this flag is set, open will not continue searching across filesystem boundaries (i.e. when st_dev changes from the stat system call). (E.g. Searching in a user's home directory "/home/user/source/" will not return "/.git/" as the found repo if "/" is a different filesystem than "/home".) * GIT_REPOSITORY_OPEN_BARE - Open repository as a bare repo regardless of core.bare config, and defer loading config file for faster setup. Unlike git_repository_open_bare, this can follow gitlinks. * GIT_REPOSITORY_OPEN_NO_DOTGIT - Do not check for a repository by appending /.git to the start_path; only open the repository if start_path itself points to the git directory. * GIT_REPOSITORY_OPEN_FROM_ENV - Find and open a git repository, respecting the environment variables used by the git command-line tools. If set, git_repository_open_ext will ignore the other flags and the ceiling_dirs argument, and will allow a NULL path to use GIT_DIR or search from the current directory. The search for a repository will respect $GIT_CEILING_DIRECTORIES and $GIT_DISCOVERY_ACROSS_FILESYSTEM. The opened repository will respect $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and $GIT_ALTERNATE_OBJECT_DIRECTORIES. In the future, this flag will also cause git_repository_open_ext to respect $GIT_WORK_TREE and $GIT_COMMON_DIR; currently, git_repository_open_ext with this flag will error out if either $GIT_WORK_TREE or $GIT_COMMON_DIR is set.
  • \n
\n", + "comments": "
    \n
  • GIT_REPOSITORY_OPEN_NO_SEARCH - Only open the repository if it can be\nimmediately found in the start_path. Do not walk up from the\nstart_path looking at parent directories.
  • \n
  • GIT_REPOSITORY_OPEN_CROSS_FS - Unless this flag is set, open will not\ncontinue searching across filesystem boundaries (i.e. when st_dev\nchanges from the stat system call). (E.g. Searching in a user's home\ndirectory "/home/user/source/" will not return "/.git/" as the found\nrepo if "/" is a different filesystem than "/home".)
  • \n
  • GIT_REPOSITORY_OPEN_BARE - Open repository as a bare repo regardless\nof core.bare config, and defer loading config file for faster setup.\nUnlike git_repository_open_bare, this can follow gitlinks.
  • \n
  • GIT_REPOSITORY_OPEN_NO_DOTGIT - Do not check for a repository by\nappending /.git to the start_path; only open the repository if\nstart_path itself points to the git directory.
  • \n
  • GIT_REPOSITORY_OPEN_FROM_ENV - Find and open a git repository,\nrespecting the environment variables used by the git command-line\ntools. If set, git_repository_open_ext will ignore the other\nflags and the ceiling_dirs argument, and will allow a NULL path\nto use GIT_DIR or search from the current directory. The search\nfor a repository will respect $GIT_CEILING_DIRECTORIES and\n$GIT_DISCOVERY_ACROSS_FILESYSTEM. The opened repository will\nrespect $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and\n$GIT_ALTERNATE_OBJECT_DIRECTORIES. In the future, this flag will\nalso cause git_repository_open_ext to respect $GIT_WORK_TREE and\n$GIT_COMMON_DIR; currently, git_repository_open_ext with this\nflag will error out if either $GIT_WORK_TREE or $GIT_COMMON_DIR is\nset.
  • \n
\n", "fields": [ { "type": "int", @@ -35620,13 +38765,13 @@ "GIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE" ], "type": "enum", - "file": "repository.h", - "line": 784, - "lineto": 797, + "file": "git2/repository.h", + "line": 786, + "lineto": 799, "block": "GIT_REPOSITORY_STATE_NONE\nGIT_REPOSITORY_STATE_MERGE\nGIT_REPOSITORY_STATE_REVERT\nGIT_REPOSITORY_STATE_REVERT_SEQUENCE\nGIT_REPOSITORY_STATE_CHERRYPICK\nGIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE\nGIT_REPOSITORY_STATE_BISECT\nGIT_REPOSITORY_STATE_REBASE\nGIT_REPOSITORY_STATE_REBASE_INTERACTIVE\nGIT_REPOSITORY_STATE_REBASE_MERGE\nGIT_REPOSITORY_STATE_APPLY_MAILBOX\nGIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE", "tdef": "typedef", "description": " Repository state", - "comments": "

These values represent possible states for the repository to be in, based on the current operation which is ongoing.

\n", + "comments": "

These values represent possible states for the repository to be in,\n based on the current operation which is ongoing.

\n", "fields": [ { "type": "int", @@ -35716,7 +38861,7 @@ "GIT_RESET_HARD" ], "type": "enum", - "file": "reset.h", + "file": "git2/reset.h", "line": 26, "lineto": 30, "block": "GIT_RESET_SOFT\nGIT_RESET_MIXED\nGIT_RESET_HARD", @@ -35763,7 +38908,7 @@ ], "type": "struct", "value": "git_revert_options", - "file": "revert.h", + "file": "git2/revert.h", "line": 26, "lineto": 34, "block": "unsigned int version\nunsigned int mainline\ngit_merge_options merge_opts\ngit_checkout_options checkout_opts", @@ -35810,7 +38955,7 @@ "GIT_REVPARSE_MERGE_BASE" ], "type": "enum", - "file": "revparse.h", + "file": "git2/revparse.h", "line": 71, "lineto": 78, "block": "GIT_REVPARSE_SINGLE\nGIT_REVPARSE_RANGE\nGIT_REVPARSE_MERGE_BASE", @@ -35853,7 +38998,7 @@ ], "type": "struct", "value": "git_revspec", - "file": "revparse.h", + "file": "git2/revparse.h", "line": 83, "lineto": 90, "block": "git_object * from\ngit_object * to\nunsigned int flags", @@ -35891,12 +39036,13 @@ "decl": "git_revwalk", "type": "struct", "value": "git_revwalk", - "file": "types.h", - "line": 114, - "lineto": 114, + "file": "git2/types.h", + "line": 117, + "lineto": 117, "tdef": "typedef", "description": " Representation of an in-progress walk through the commits in a repo ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -35932,9 +39078,9 @@ ], "type": "struct", "value": "git_signature", - "file": "types.h", - "line": 166, - "lineto": 170, + "file": "git2/types.h", + "line": 169, + "lineto": 173, "block": "char * name\nchar * email\ngit_time when", "tdef": "typedef", "description": " An action signature (e.g. for committers, taggers, etc) ", @@ -35967,11 +39113,14 @@ ], "needs": [ "git_commit_amend", + "git_commit_author_with_mailmap", + "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", "git_commit_create_from_callback", "git_commit_create_from_ids", "git_commit_create_v", + "git_mailmap_resolve_signature", "git_note_commit_create", "git_note_commit_remove", "git_note_create", @@ -35985,8 +39134,100 @@ "git_signature_from_buffer", "git_signature_new", "git_signature_now", + "git_stash_save", "git_tag_annotation_create", - "git_tag_create" + "git_tag_create", + "git_transaction_set_symbolic_target", + "git_transaction_set_target" + ] + } + } + ], + [ + "git_smart_service_t", + { + "decl": [ + "GIT_SERVICE_UPLOADPACK_LS", + "GIT_SERVICE_UPLOADPACK", + "GIT_SERVICE_RECEIVEPACK_LS", + "GIT_SERVICE_RECEIVEPACK" + ], + "type": "enum", + "file": "git2/sys/transport.h", + "line": 273, + "lineto": 278, + "block": "GIT_SERVICE_UPLOADPACK_LS\nGIT_SERVICE_UPLOADPACK\nGIT_SERVICE_RECEIVEPACK_LS\nGIT_SERVICE_RECEIVEPACK", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_SERVICE_UPLOADPACK_LS", + "comments": "", + "value": 1 + }, + { + "type": "int", + "name": "GIT_SERVICE_UPLOADPACK", + "comments": "", + "value": 2 + }, + { + "type": "int", + "name": "GIT_SERVICE_RECEIVEPACK_LS", + "comments": "", + "value": 3 + }, + { + "type": "int", + "name": "GIT_SERVICE_RECEIVEPACK", + "comments": "", + "value": 4 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "git_smart_subtransport", + { + "decl": "git_smart_subtransport", + "type": "struct", + "value": "git_smart_subtransport", + "file": "git2/sys/transport.h", + "line": 280, + "lineto": 280, + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "int (*)(git_smart_subtransport_stream **, git_smart_subtransport *, const char *, git_smart_service_t)", + "name": "action", + "comments": "" + }, + { + "type": "int (*)(git_smart_subtransport *)", + "name": "close", + "comments": "" + }, + { + "type": "void (*)(git_smart_subtransport *)", + "name": "free", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_smart_subtransport_cb", + "git_smart_subtransport_git", + "git_smart_subtransport_http", + "git_smart_subtransport_ssh" ] } } @@ -36001,13 +39242,13 @@ ], "type": "struct", "value": "git_smart_subtransport_definition", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 336, "lineto": 349, "block": "git_smart_subtransport_cb callback\nunsigned int rpc\nvoid * param", "tdef": "typedef", "description": " Definition for a \"subtransport\"", - "comments": "

This is used to let the smart protocol code know about the protocol which you are implementing.

\n", + "comments": "

This is used to let the smart protocol code know about the protocol\n which you are implementing.

\n", "fields": [ { "type": "git_smart_subtransport_cb", @@ -36031,6 +39272,46 @@ } } ], + [ + "git_smart_subtransport_stream", + { + "decl": "git_smart_subtransport_stream", + "type": "struct", + "value": "git_smart_subtransport_stream", + "file": "git2/sys/transport.h", + "line": 281, + "lineto": 281, + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "git_smart_subtransport *", + "name": "subtransport", + "comments": "" + }, + { + "type": "int (*)(git_smart_subtransport_stream *, char *, size_t, size_t *)", + "name": "read", + "comments": "" + }, + { + "type": "int (*)(git_smart_subtransport_stream *, const char *, size_t)", + "name": "write", + "comments": "" + }, + { + "type": "void (*)(git_smart_subtransport_stream *)", + "name": "free", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], [ "git_sort_t", { @@ -36041,7 +39322,7 @@ "GIT_SORT_REVERSE" ], "type": "enum", - "file": "revwalk.h", + "file": "git2/revwalk.h", "line": 26, "lineto": 53, "block": "GIT_SORT_NONE\nGIT_SORT_TOPOLOGICAL\nGIT_SORT_TIME\nGIT_SORT_REVERSE", @@ -36052,13 +39333,13 @@ { "type": "int", "name": "GIT_SORT_NONE", - "comments": "

Sort the output with the same default time-order method from git.\n This is the default sorting for new walkers.

\n", + "comments": "

Sort the output with the same default method from git: reverse\n chronological order. This is the default sorting for new walkers.

\n", "value": 0 }, { "type": "int", "name": "GIT_SORT_TOPOLOGICAL", - "comments": "

Sort the repository contents in topological order (parents before\n children); this sorting mode can be combined with time sorting to\n produce git's "time-order".

\n", + "comments": "

Sort the repository contents in topological order (no parents before\n all of its children are shown); this sorting mode can be combined\n with time sorting to produce git's --date-order`.

\n", "value": 1 }, { @@ -36088,9 +39369,9 @@ "GIT_STASH_APPLY_REINSTATE_INDEX" ], "type": "enum", - "file": "stash.h", - "line": 74, - "lineto": 81, + "file": "git2/stash.h", + "line": 75, + "lineto": 82, "block": "GIT_STASH_APPLY_DEFAULT\nGIT_STASH_APPLY_REINSTATE_INDEX", "tdef": "typedef", "description": " Stash application flags. ", @@ -36115,6 +39396,141 @@ } } ], + [ + "git_stash_apply_options", + { + "decl": [ + "unsigned int version", + "git_stash_apply_flags flags", + "git_checkout_options checkout_options", + "git_stash_apply_progress_cb progress_cb", + "void * progress_payload" + ], + "type": "struct", + "value": "git_stash_apply_options", + "file": "git2/stash.h", + "line": 126, + "lineto": 138, + "block": "unsigned int version\ngit_stash_apply_flags flags\ngit_checkout_options checkout_options\ngit_stash_apply_progress_cb progress_cb\nvoid * progress_payload", + "tdef": "typedef", + "description": " Stash application options structure", + "comments": "

Initialize with GIT_STASH_APPLY_OPTIONS_INIT. Alternatively, you can\n use git_stash_apply_init_options.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "git_stash_apply_flags", + "name": "flags", + "comments": " See `git_stash_apply_flags_t`, above. " + }, + { + "type": "git_checkout_options", + "name": "checkout_options", + "comments": " Options to use when writing files to the working directory. " + }, + { + "type": "git_stash_apply_progress_cb", + "name": "progress_cb", + "comments": " Optional callback to notify the consumer of application progress. " + }, + { + "type": "void *", + "name": "progress_payload", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_stash_apply", + "git_stash_apply_init_options", + "git_stash_pop" + ] + } + } + ], + [ + "git_stash_apply_progress_t", + { + "decl": [ + "GIT_STASH_APPLY_PROGRESS_NONE", + "GIT_STASH_APPLY_PROGRESS_LOADING_STASH", + "GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX", + "GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED", + "GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED", + "GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED", + "GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED", + "GIT_STASH_APPLY_PROGRESS_DONE" + ], + "type": "enum", + "file": "git2/stash.h", + "line": 85, + "lineto": 108, + "block": "GIT_STASH_APPLY_PROGRESS_NONE\nGIT_STASH_APPLY_PROGRESS_LOADING_STASH\nGIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX\nGIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED\nGIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED\nGIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED\nGIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED\nGIT_STASH_APPLY_PROGRESS_DONE", + "tdef": "typedef", + "description": " Stash apply progression states ", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_NONE", + "comments": "", + "value": 0 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_LOADING_STASH", + "comments": "

Loading the stashed data from the object database.

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX", + "comments": "

The stored index is being analyzed.

\n", + "value": 2 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED", + "comments": "

The modified files are being analyzed.

\n", + "value": 3 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED", + "comments": "

The untracked and ignored files are being analyzed.

\n", + "value": 4 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED", + "comments": "

The untracked files are being written to disk.

\n", + "value": 5 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED", + "comments": "

The modified files are being written to disk.

\n", + "value": 6 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_DONE", + "comments": "

The stash was applied successfully.

\n", + "value": 7 + } + ], + "used": { + "returns": [], + "needs": [ + "git_stash_apply_progress_cb" + ] + } + } + ], [ "git_stash_flags", { @@ -36125,9 +39541,9 @@ "GIT_STASH_INCLUDE_IGNORED" ], "type": "enum", - "file": "stash.h", - "line": 24, - "lineto": 47, + "file": "git2/stash.h", + "line": 25, + "lineto": 48, "block": "GIT_STASH_DEFAULT\nGIT_STASH_KEEP_INDEX\nGIT_STASH_INCLUDE_UNTRACKED\nGIT_STASH_INCLUDE_IGNORED", "tdef": "typedef", "description": " Stash flags", @@ -36164,18 +39580,61 @@ } } ], + [ + "git_status_entry", + { + "decl": [ + "git_status_t status", + "git_diff_delta * head_to_index", + "git_diff_delta * index_to_workdir" + ], + "type": "struct", + "value": "git_status_entry", + "file": "git2/status.h", + "line": 221, + "lineto": 225, + "block": "git_status_t status\ngit_diff_delta * head_to_index\ngit_diff_delta * index_to_workdir", + "tdef": "typedef", + "description": " A status entry, providing the differences between the file as it exists\n in HEAD and the index, and providing the differences between the index\n and the working directory.", + "comments": "

The status value provides the status flags for this file.

\n\n

The head_to_index value provides detailed information about the\n differences between the file in HEAD and the file in the index.

\n\n

The index_to_workdir value provides detailed information about the\n differences between the file in the index and the file in the\n working directory.

\n", + "fields": [ + { + "type": "git_status_t", + "name": "status", + "comments": "" + }, + { + "type": "git_diff_delta *", + "name": "head_to_index", + "comments": "" + }, + { + "type": "git_diff_delta *", + "name": "index_to_workdir", + "comments": "" + } + ], + "used": { + "returns": [ + "git_status_byindex" + ], + "needs": [] + } + } + ], [ "git_status_list", { "decl": "git_status_list", "type": "struct", "value": "git_status_list", - "file": "types.h", + "file": "git2/types.h", "line": 188, "lineto": 188, "tdef": "typedef", "description": " Representation of a status collection ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -36210,13 +39669,13 @@ "GIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED" ], "type": "enum", - "file": "status.h", - "line": 137, - "lineto": 154, + "file": "git2/status.h", + "line": 139, + "lineto": 156, "block": "GIT_STATUS_OPT_INCLUDE_UNTRACKED\nGIT_STATUS_OPT_INCLUDE_IGNORED\nGIT_STATUS_OPT_INCLUDE_UNMODIFIED\nGIT_STATUS_OPT_EXCLUDE_SUBMODULES\nGIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS\nGIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH\nGIT_STATUS_OPT_RECURSE_IGNORED_DIRS\nGIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX\nGIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR\nGIT_STATUS_OPT_SORT_CASE_SENSITIVELY\nGIT_STATUS_OPT_SORT_CASE_INSENSITIVELY\nGIT_STATUS_OPT_RENAMES_FROM_REWRITES\nGIT_STATUS_OPT_NO_REFRESH\nGIT_STATUS_OPT_UPDATE_INDEX\nGIT_STATUS_OPT_INCLUDE_UNREADABLE\nGIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED", "tdef": "typedef", "description": " Flags to control status callbacks", - "comments": "
    \n
  • GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made on untracked files. These will only be made if the workdir files are included in the status "show" option. - GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files get callbacks. Again, these callbacks will only be made if the workdir files are included in the status "show" option. - GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be made even on unmodified files. - GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that submodules should be skipped. This only applies if there are no pending typechanges to the submodule (either from or to another type). - GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that all files in untracked directories should be included. Normally if an entire directory is new, then just the top-level directory is included (with a trailing slash on the entry name). This flag says to include all of the individual files in the directory instead. - GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path should be treated as a literal path, and not as a pathspec pattern. - GIT_STATUS_OPT_RECURSE_IGNORED_DIRS indicates that the contents of ignored directories should be included in the status. This is like doing 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.
  • \n
\n\n

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.

\n", + "comments": "
    \n
  • GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made\non untracked files. These will only be made if the workdir files are\nincluded in the status "show" option.
  • \n
  • GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files get callbacks.\nAgain, these callbacks will only be made if the workdir files are\nincluded in the status "show" option.
  • \n
  • GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be\nmade even on unmodified files.
  • \n
  • GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that submodules should be\nskipped. This only applies if there are no pending typechanges to\nthe submodule (either from or to another type).
  • \n
  • GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that all files in\nuntracked directories should be included. Normally if an entire\ndirectory is new, then just the top-level directory is included (with\na trailing slash on the entry name). This flag says to include all\nof the individual files in the directory instead.
  • \n
  • GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path\nshould be treated as a literal path, and not as a pathspec pattern.
  • \n
  • GIT_STATUS_OPT_RECURSE_IGNORED_DIRS indicates that the contents of\nignored directories should be included in the status. This is like\ndoing git ls-files -o -i --exclude-standard with core git.
  • \n
  • GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX indicates that rename detection\nshould be processed between the head and the index and enables\nthe GIT_STATUS_INDEX_RENAMED as a possible status flag.
  • \n
  • GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR indicates that rename\ndetection should be run between the index and the working directory\nand enabled GIT_STATUS_WT_RENAMED as a possible status flag.
  • \n
  • GIT_STATUS_OPT_SORT_CASE_SENSITIVELY overrides the native case\nsensitivity for the file system and forces the output to be in\ncase-sensitive order
  • \n
  • GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY overrides the native case\nsensitivity for the file system and forces the output to be in\ncase-insensitive order
  • \n
  • GIT_STATUS_OPT_RENAMES_FROM_REWRITES indicates that rename detection\nshould include rewritten files
  • \n
  • GIT_STATUS_OPT_NO_REFRESH bypasses the default status behavior of\ndoing a "soft" index reload (i.e. reloading the index data if the\nfile on disk has been modified outside libgit2).
  • \n
  • GIT_STATUS_OPT_UPDATE_INDEX tells libgit2 to refresh the stat cache\nin the index for files that are unchanged but have out of date stat\ninformation in the index. It will result in less work being done on\nsubsequent calls to get status. This is mutually exclusive with the\nNO_REFRESH option.
  • \n
\n\n

Calling git_status_foreach() is like calling the extended version\n with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,\n and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled\n together as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.

\n", "fields": [ { "type": "int", @@ -36321,6 +39780,62 @@ } } ], + [ + "git_status_options", + { + "decl": [ + "unsigned int version", + "git_status_show_t show", + "unsigned int flags", + "git_strarray pathspec", + "git_tree * baseline" + ], + "type": "struct", + "value": "git_status_options", + "file": "git2/status.h", + "line": 182, + "lineto": 188, + "block": "unsigned int version\ngit_status_show_t show\nunsigned int flags\ngit_strarray pathspec\ngit_tree * baseline", + "tdef": "typedef", + "description": " Options to control how `git_status_foreach_ext()` will issue callbacks.", + "comments": "

This structure is set so that zeroing it out will give you relatively\n sane defaults.

\n\n

The show value is one of the git_status_show_t constants that\n control which files to scan and in what order.

\n\n

The flags value is an OR'ed combination of the git_status_opt_t\n values above.

\n\n

The pathspec is an array of path patterns to match (using\n fnmatch-style matching), or just an array of paths to match exactly if\n GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH is specified in the flags.

\n\n

The baseline is the tree to be used for comparison to the working directory\n and index; defaults to HEAD.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "git_status_show_t", + "name": "show", + "comments": "" + }, + { + "type": "unsigned int", + "name": "flags", + "comments": "" + }, + { + "type": "git_strarray", + "name": "pathspec", + "comments": "" + }, + { + "type": "git_tree *", + "name": "baseline", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_status_foreach_ext", + "git_status_init_options", + "git_status_list_new" + ] + } + } + ], [ "git_status_show_t", { @@ -36330,13 +39845,13 @@ "GIT_STATUS_SHOW_WORKDIR_ONLY" ], "type": "enum", - "file": "status.h", - "line": 79, - "lineto": 83, + "file": "git2/status.h", + "line": 81, + "lineto": 85, "block": "GIT_STATUS_SHOW_INDEX_AND_WORKDIR\nGIT_STATUS_SHOW_INDEX_ONLY\nGIT_STATUS_SHOW_WORKDIR_ONLY", "tdef": "typedef", "description": " Select the files on which to report status.", - "comments": "

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.

\n\n
    \n
  • GIT_STATUS_SHOW_INDEX_AND_WORKDIR is the default. This roughly matches 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.
  • \n
\n", + "comments": "

With git_status_foreach_ext, this will control which changes get\n callbacks. With git_status_list_new, these will control which\n changes are included in the list.

\n\n
    \n
  • GIT_STATUS_SHOW_INDEX_AND_WORKDIR is the default. This roughly\nmatches git status --porcelain regarding which files are\nincluded and in what order.
  • \n
  • GIT_STATUS_SHOW_INDEX_ONLY only gives status based on HEAD to index\ncomparison, not looking at working directory changes.
  • \n
  • GIT_STATUS_SHOW_WORKDIR_ONLY only gives status based on index to\nworking directory comparison, not comparing the index to the HEAD.
  • \n
\n", "fields": [ { "type": "int", @@ -36383,13 +39898,13 @@ "GIT_STATUS_CONFLICTED" ], "type": "enum", - "file": "status.h", - "line": 32, - "lineto": 50, + "file": "git2/status.h", + "line": 34, + "lineto": 52, "block": "GIT_STATUS_CURRENT\nGIT_STATUS_INDEX_NEW\nGIT_STATUS_INDEX_MODIFIED\nGIT_STATUS_INDEX_DELETED\nGIT_STATUS_INDEX_RENAMED\nGIT_STATUS_INDEX_TYPECHANGE\nGIT_STATUS_WT_NEW\nGIT_STATUS_WT_MODIFIED\nGIT_STATUS_WT_DELETED\nGIT_STATUS_WT_TYPECHANGE\nGIT_STATUS_WT_RENAMED\nGIT_STATUS_WT_UNREADABLE\nGIT_STATUS_IGNORED\nGIT_STATUS_CONFLICTED", "tdef": "typedef", "description": " Status flags for a single file.", - "comments": "

A combination of these values will be returned to indicate the status of a file. Status compares the working directory, the index, and the current HEAD of the repository. The GIT_STATUS_INDEX set of flags represents the status of file in the index relative to the HEAD, and the GIT_STATUS_WT set of flags represent the status of the file in the working directory relative to the index.

\n", + "comments": "

A combination of these values will be returned to indicate the status of\n a file. Status compares the working directory, the index, and the\n current HEAD of the repository. The GIT_STATUS_INDEX set of flags\n represents the status of file in the index relative to the HEAD, and the\n GIT_STATUS_WT set of flags represent the status of the file in the\n working directory relative to the index.

\n", "fields": [ { "type": "int", @@ -36491,7 +40006,7 @@ ], "type": "struct", "value": "git_strarray", - "file": "strarray.h", + "file": "git2/strarray.h", "line": 22, "lineto": 25, "block": "char ** strings\nsize_t count", @@ -36554,13 +40069,13 @@ ], "type": "struct", "value": "git_stream", - "file": "sys/stream.h", + "file": "git2/sys/stream.h", "line": 29, "lineto": 41, "block": "int version\nint encrypted\nint proxy_support\nint (*)(struct git_stream *) connect\nint (*)(git_cert **, struct git_stream *) certificate\nint (*)(struct git_stream *, const git_proxy_options *) set_proxy\nssize_t (*)(struct git_stream *, void *, size_t) read\nssize_t (*)(struct git_stream *, const char *, size_t, int) write\nint (*)(struct git_stream *) close\nvoid (*)(struct git_stream *) free", "tdef": "typedef", "description": " Every stream must have this struct as its first element, so the\n API can talk to it. You'd define your stream as", - "comments": "
 struct my_stream {             git_stream parent;             ...     }\n
\n\n

and fill the functions

\n", + "comments": "
 struct my_stream {\n         git_stream parent;\n         ...\n }\n
\n\n

and fill the functions

\n", "fields": [ { "type": "int", @@ -36616,6 +40131,7 @@ "used": { "returns": [], "needs": [ + "git_stream_cb", "git_stream_register_tls" ] } @@ -36627,12 +40143,13 @@ "decl": "git_submodule", "type": "struct", "value": "git_submodule", - "file": "types.h", + "file": "git2/types.h", "line": 339, "lineto": 339, "tdef": "typedef", "description": " Opaque structure representing a submodule.", "comments": "", + "fields": [], "used": { "returns": [ "git_submodule_fetch_recurse_submodules", @@ -36685,13 +40202,13 @@ "GIT_SUBMODULE_IGNORE_ALL" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 403, "lineto": 410, "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", - "comments": "

These values represent settings for the submodule.$name.ignore configuration value which says how deeply to look at the working directory when getting submodule status.

\n\n

You can override this value in memory on a per-submodule basis with git_submodule_set_ignore() and can write the changed value to disk with git_submodule_save(). If you have overwritten the value, you can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_UNSPECIFIED: use the submodule's configuration - GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an untracked file, will mark the submodule as dirty. Ignored files are still ignored, of course. - GIT_SUBMODULE_IGNORE_UNTRACKED: ignore untracked files; only changes to tracked files, or the index or the HEAD commit will matter. - GIT_SUBMODULE_IGNORE_DIRTY: ignore changes in the working directory, only considering changes if the HEAD of submodule has moved from the value in the superproject. - GIT_SUBMODULE_IGNORE_ALL: never check if the submodule is dirty - GIT_SUBMODULE_IGNORE_DEFAULT: not used except as static initializer when we don't want any particular ignore rule to be specified.
  • \n
\n", + "comments": "

These values represent settings for the submodule.$name.ignore\n configuration value which says how deeply to look at the working\n directory when getting submodule status.

\n\n

You can override this value in memory on a per-submodule basis with\n git_submodule_set_ignore() and can write the changed value to disk\n with git_submodule_save(). If you have overwritten the value, you\n can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_UNSPECIFIED: use the submodule's configuration
  • \n
  • GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an\nuntracked file, will mark the submodule as dirty. Ignored files are\nstill ignored, of course.
  • \n
  • GIT_SUBMODULE_IGNORE_UNTRACKED: ignore untracked files; only changes\nto tracked files, or the index or the HEAD commit will matter.
  • \n
  • GIT_SUBMODULE_IGNORE_DIRTY: ignore changes in the working directory,\nonly considering changes if the HEAD of submodule has moved from the\nvalue in the superproject.
  • \n
  • GIT_SUBMODULE_IGNORE_ALL: never check if the submodule is dirty
  • \n
  • GIT_SUBMODULE_IGNORE_DEFAULT: not used except as static initializer\nwhen we don't want any particular ignore rule to be specified.
  • \n
\n", "fields": [ { "type": "int", @@ -36744,13 +40261,13 @@ "GIT_SUBMODULE_RECURSE_ONDEMAND" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 422, "lineto": 426, "block": "GIT_SUBMODULE_RECURSE_NO\nGIT_SUBMODULE_RECURSE_YES\nGIT_SUBMODULE_RECURSE_ONDEMAND", "tdef": "typedef", "description": " Options for submodule recurse.", - "comments": "

Represent the value of submodule.$name.fetchRecurseSubmodules

\n\n
    \n
  • GIT_SUBMODULE_RECURSE_NO - do no recurse into submodules * GIT_SUBMODULE_RECURSE_YES - recurse into submodules * GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when commit not already in local clone
  • \n
\n", + "comments": "

Represent the value of submodule.$name.fetchRecurseSubmodules

\n\n
    \n
  • GIT_SUBMODULE_RECURSE_NO - do no recurse into submodules
  • \n
  • GIT_SUBMODULE_RECURSE_YES - recurse into submodules
  • \n
  • GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when\n commit not already in local clone
  • \n
\n", "fields": [ { "type": "int", @@ -36801,13 +40318,13 @@ "GIT_SUBMODULE_STATUS_WD_UNTRACKED" ], "type": "enum", - "file": "submodule.h", + "file": "git2/submodule.h", "line": 74, "lineto": 89, "block": "GIT_SUBMODULE_STATUS_IN_HEAD\nGIT_SUBMODULE_STATUS_IN_INDEX\nGIT_SUBMODULE_STATUS_IN_CONFIG\nGIT_SUBMODULE_STATUS_IN_WD\nGIT_SUBMODULE_STATUS_INDEX_ADDED\nGIT_SUBMODULE_STATUS_INDEX_DELETED\nGIT_SUBMODULE_STATUS_INDEX_MODIFIED\nGIT_SUBMODULE_STATUS_WD_UNINITIALIZED\nGIT_SUBMODULE_STATUS_WD_ADDED\nGIT_SUBMODULE_STATUS_WD_DELETED\nGIT_SUBMODULE_STATUS_WD_MODIFIED\nGIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED\nGIT_SUBMODULE_STATUS_WD_WD_MODIFIED\nGIT_SUBMODULE_STATUS_WD_UNTRACKED", "tdef": "typedef", "description": " Return codes for submodule status.", - "comments": "

A combination of these flags will be returned to describe the status of a submodule. Depending on the "ignore" property of the submodule, some of the flags may never be returned because they indicate changes that are supposed to be ignored.

\n\n

Submodule info is contained in 4 places: the HEAD tree, the index, config files (both .git/config and .gitmodules), and the working directory. Any or all of those places might be missing information about the submodule depending on what state the repo is in. We consider all four places to build the combination of status flags.

\n\n

There are four values that are not really status, but give basic info about what sources of submodule data are available. These will be returned even if ignore is set to "ALL".

\n\n
    \n
  • IN_HEAD - superproject head contains submodule * IN_INDEX - superproject index contains submodule * IN_CONFIG - superproject gitmodules has submodule * IN_WD - superproject workdir has submodule
  • \n
\n\n

The following values will be returned so long as ignore is not "ALL".

\n\n
    \n
  • INDEX_ADDED - in index, not in head * INDEX_DELETED - in head, not in index * INDEX_MODIFIED - index and head don't match * WD_UNINITIALIZED - workdir contains empty directory * WD_ADDED - in workdir, not index * WD_DELETED - in index, not workdir * WD_MODIFIED - index and workdir head don't match
  • \n
\n\n

The following can only be returned if ignore is "NONE" or "UNTRACKED".

\n\n
    \n
  • WD_INDEX_MODIFIED - submodule workdir index is dirty * WD_WD_MODIFIED - submodule workdir has modified files
  • \n
\n\n

Lastly, the following will only be returned for ignore "NONE".

\n\n
    \n
  • WD_UNTRACKED - wd contains untracked files
  • \n
\n", + "comments": "

A combination of these flags will be returned to describe the status of a\n submodule. Depending on the "ignore" property of the submodule, some of\n the flags may never be returned because they indicate changes that are\n supposed to be ignored.

\n\n

Submodule info is contained in 4 places: the HEAD tree, the index, config\n files (both .git/config and .gitmodules), and the working directory. Any\n or all of those places might be missing information about the submodule\n depending on what state the repo is in. We consider all four places to\n build the combination of status flags.

\n\n

There are four values that are not really status, but give basic info\n about what sources of submodule data are available. These will be\n returned even if ignore is set to "ALL".

\n\n
    \n
  • IN_HEAD - superproject head contains submodule
  • \n
  • IN_INDEX - superproject index contains submodule
  • \n
  • IN_CONFIG - superproject gitmodules has submodule
  • \n
  • IN_WD - superproject workdir has submodule
  • \n
\n\n

The following values will be returned so long as ignore is not "ALL".

\n\n
    \n
  • INDEX_ADDED - in index, not in head
  • \n
  • INDEX_DELETED - in head, not in index
  • \n
  • INDEX_MODIFIED - index and head don't match
  • \n
  • WD_UNINITIALIZED - workdir contains empty directory
  • \n
  • WD_ADDED - in workdir, not index
  • \n
  • WD_DELETED - in index, not workdir
  • \n
  • WD_MODIFIED - index and workdir head don't match
  • \n
\n\n

The following can only be returned if ignore is "NONE" or "UNTRACKED".

\n\n
    \n
  • WD_INDEX_MODIFIED - submodule workdir index is dirty
  • \n
  • WD_WD_MODIFIED - submodule workdir has modified files
  • \n
\n\n

Lastly, the following will only be returned for ignore "NONE".

\n\n
    \n
  • WD_UNTRACKED - wd contains untracked files
  • \n
\n", "fields": [ { "type": "int", @@ -36911,13 +40428,13 @@ ], "type": "struct", "value": "git_submodule_update_options", - "file": "submodule.h", - "line": 129, - "lineto": 154, + "file": "git2/submodule.h", + "line": 128, + "lineto": 153, "block": "unsigned int version\ngit_checkout_options checkout_opts\ngit_fetch_options fetch_opts\nint allow_fetch", "tdef": "typedef", "description": " Submodule update options structure", - "comments": "

Use the GIT_SUBMODULE_UPDATE_OPTIONS_INIT to get the default settings, like this:

\n\n

git_submodule_update_options opts = GIT_SUBMODULE_UPDATE_OPTIONS_INIT;

\n", + "comments": "

Initialize with GIT_SUBMODULE_UPDATE_OPTIONS_INIT. Alternatively, you can\n use git_submodule_update_init_options.

\n", "fields": [ { "type": "unsigned int", @@ -36960,13 +40477,13 @@ "GIT_SUBMODULE_UPDATE_DEFAULT" ], "type": "enum", - "file": "types.h", + "file": "git2/types.h", "line": 367, "lineto": 374, "block": "GIT_SUBMODULE_UPDATE_CHECKOUT\nGIT_SUBMODULE_UPDATE_REBASE\nGIT_SUBMODULE_UPDATE_MERGE\nGIT_SUBMODULE_UPDATE_NONE\nGIT_SUBMODULE_UPDATE_DEFAULT", "tdef": "typedef", "description": " Submodule update values", - "comments": "

These values represent settings for the submodule.$name.update configuration value which says how to handle git submodule update for this submodule. The value is usually set in the ".gitmodules" file and copied to ".git/config" when the submodule is initialized.

\n\n

You can override this setting on a per-submodule basis with git_submodule_set_update() and write the changed value to disk using git_submodule_save(). If you have overwritten the value, you can revert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_UPDATE_CHECKOUT: the default; when a submodule is updated, checkout the new detached HEAD to the submodule directory. - GIT_SUBMODULE_UPDATE_REBASE: update by rebasing the current checked out branch onto the commit from the superproject. - GIT_SUBMODULE_UPDATE_MERGE: update by merging the commit in the superproject into the current checkout out branch of the submodule. - GIT_SUBMODULE_UPDATE_NONE: do not update this submodule even when the commit in the superproject is updated. - GIT_SUBMODULE_UPDATE_DEFAULT: not used except as static initializer when we don't want any particular update rule to be specified.
  • \n
\n", + "comments": "

These values represent settings for the submodule.$name.update\n configuration value which says how to handle git submodule update for\n this submodule. The value is usually set in the ".gitmodules" file and\n copied to ".git/config" when the submodule is initialized.

\n\n

You can override this setting on a per-submodule basis with\n git_submodule_set_update() and write the changed value to disk using\n git_submodule_save(). If you have overwritten the value, you can\n revert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_UPDATE_CHECKOUT: the default; when a submodule is\nupdated, checkout the new detached HEAD to the submodule directory.
  • \n
  • GIT_SUBMODULE_UPDATE_REBASE: update by rebasing the current checked\nout branch onto the commit from the superproject.
  • \n
  • GIT_SUBMODULE_UPDATE_MERGE: update by merging the commit in the\nsuperproject into the current checkout out branch of the submodule.
  • \n
  • GIT_SUBMODULE_UPDATE_NONE: do not update this submodule even when\nthe commit in the superproject is updated.
  • \n
  • GIT_SUBMODULE_UPDATE_DEFAULT: not used except as static initializer\nwhen we don't want any particular update rule to be specified.
  • \n
\n", "fields": [ { "type": "int", @@ -37015,12 +40532,13 @@ "decl": "git_tag", "type": "struct", "value": "git_tag", - "file": "types.h", - "line": 117, - "lineto": 117, + "file": "git2/types.h", + "line": 120, + "lineto": 120, "tdef": "typedef", "description": " Parsed representation of a tag object. ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -37052,9 +40570,9 @@ ], "type": "struct", "value": "git_time", - "file": "types.h", - "line": 159, - "lineto": 163, + "file": "git2/types.h", + "line": 162, + "lineto": 166, "block": "git_time_t time\nint offset\nchar sign", "tdef": "typedef", "description": " Time in a signature ", @@ -37099,7 +40617,7 @@ "GIT_TRACE_TRACE" ], "type": "enum", - "file": "trace.h", + "file": "git2/trace.h", "line": 26, "lineto": 47, "block": "GIT_TRACE_NONE\nGIT_TRACE_FATAL\nGIT_TRACE_ERROR\nGIT_TRACE_WARN\nGIT_TRACE_INFO\nGIT_TRACE_DEBUG\nGIT_TRACE_TRACE", @@ -37165,16 +40683,25 @@ "decl": "git_transaction", "type": "struct", "value": "git_transaction", - "file": "types.h", - "line": 179, - "lineto": 179, + "file": "git2/types.h", + "line": 182, + "lineto": 182, "tdef": "typedef", "description": " Transactional interface to references ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ - "git_config_lock" + "git_config_lock", + "git_transaction_commit", + "git_transaction_free", + "git_transaction_lock_ref", + "git_transaction_new", + "git_transaction_remove", + "git_transaction_set_reflog", + "git_transaction_set_symbolic_target", + "git_transaction_set_target" ] } } @@ -37193,13 +40720,13 @@ ], "type": "struct", "value": "git_transfer_progress", - "file": "types.h", + "file": "git2/types.h", "line": 257, "lineto": 265, "block": "unsigned int total_objects\nunsigned int indexed_objects\nunsigned int received_objects\nunsigned int local_objects\nunsigned int total_deltas\nunsigned int indexed_deltas\nsize_t received_bytes", "tdef": "typedef", "description": " This is passed as the first argument to the callback to allow the\n user to see the progress.", - "comments": "
    \n
  • total_objects: number of objects in the packfile being downloaded - indexed_objects: received objects that have been hashed - received_objects: objects which have been downloaded - local_objects: locally-available objects that have been injected in order to fix a thin pack. - received-bytes: size of the packfile received up to now
  • \n
\n", + "comments": "
    \n
  • total_objects: number of objects in the packfile being downloaded
  • \n
  • indexed_objects: received objects that have been hashed
  • \n
  • received_objects: objects which have been downloaded
  • \n
  • local_objects: locally-available objects that have been injected\nin order to fix a thin pack.
  • \n
  • received-bytes: size of the packfile received up to now
  • \n
\n", "fields": [ { "type": "unsigned int", @@ -37244,7 +40771,6 @@ "needs": [ "git_indexer_append", "git_indexer_commit", - "git_indexer_new", "git_odb_write_pack", "git_packbuilder_write", "git_transfer_progress_cb" @@ -37258,15 +40784,84 @@ "decl": "git_transport", "type": "struct", "value": "git_transport", - "file": "types.h", + "file": "git2/types.h", "line": 234, "lineto": 234, + "block": "unsigned int version\nint (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *) set_callbacks\nint (*)(git_transport *, const git_strarray *) set_custom_headers\nint (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int) connect\nint (*)(const git_remote_head ***, size_t *, git_transport *) ls\nint (*)(git_transport *, git_push *, const git_remote_callbacks *) push\nint (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t) negotiate_fetch\nint (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *) download_pack\nint (*)(git_transport *) is_connected\nint (*)(git_transport *, int *) read_flags\nvoid (*)(git_transport *) cancel\nint (*)(git_transport *) close\nvoid (*)(git_transport *) free", "tdef": "typedef", "description": " Interface which represents a transport to communicate with a\n remote.", "comments": "", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "int (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *)", + "name": "set_callbacks", + "comments": "" + }, + { + "type": "int (*)(git_transport *, const git_strarray *)", + "name": "set_custom_headers", + "comments": "" + }, + { + "type": "int (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int)", + "name": "connect", + "comments": "" + }, + { + "type": "int (*)(const git_remote_head ***, size_t *, git_transport *)", + "name": "ls", + "comments": "" + }, + { + "type": "int (*)(git_transport *, git_push *, const git_remote_callbacks *)", + "name": "push", + "comments": "" + }, + { + "type": "int (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t)", + "name": "negotiate_fetch", + "comments": "" + }, + { + "type": "int (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *)", + "name": "download_pack", + "comments": "" + }, + { + "type": "int (*)(git_transport *)", + "name": "is_connected", + "comments": "" + }, + { + "type": "int (*)(git_transport *, int *)", + "name": "read_flags", + "comments": "" + }, + { + "type": "void (*)(git_transport *)", + "name": "cancel", + "comments": "" + }, + { + "type": "int (*)(git_transport *)", + "name": "close", + "comments": "" + }, + { + "type": "void (*)(git_transport *)", + "name": "free", + "comments": "" + } + ], "used": { "returns": [], "needs": [ + "git_smart_subtransport_cb", "git_smart_subtransport_git", "git_smart_subtransport_http", "git_smart_subtransport_ssh", @@ -37292,7 +40887,7 @@ "GIT_TRANSPORTFLAGS_NONE" ], "type": "enum", - "file": "sys/transport.h", + "file": "git2/sys/transport.h", "line": 31, "lineto": 33, "block": "GIT_TRANSPORTFLAGS_NONE", @@ -37319,12 +40914,13 @@ "decl": "git_tree", "type": "struct", "value": "git_tree", - "file": "types.h", - "line": 129, - "lineto": 129, + "file": "git2/types.h", + "line": 132, + "lineto": 132, "tdef": "typedef", "description": " Representation of a tree object. ", "comments": "", + "fields": [], "used": { "returns": [ "git_tree_entry_byid", @@ -37389,12 +40985,13 @@ "decl": "git_tree_entry", "type": "struct", "value": "git_tree_entry", - "file": "types.h", - "line": 126, - "lineto": 126, + "file": "git2/types.h", + "line": 129, + "lineto": 129, "tdef": "typedef", "description": " Representation of each one of the entries in a tree object. ", "comments": "", + "fields": [], "used": { "returns": [ "git_tree_entry_byid", @@ -37431,7 +41028,7 @@ ], "type": "struct", "value": "git_tree_update", - "file": "tree.h", + "file": "git2/tree.h", "line": 448, "lineto": 457, "block": "git_tree_update_t action\ngit_oid id\ngit_filemode_t filemode\nconst char * path", @@ -37476,7 +41073,7 @@ "GIT_TREE_UPDATE_REMOVE" ], "type": "enum", - "file": "tree.h", + "file": "git2/tree.h", "line": 438, "lineto": 443, "block": "GIT_TREE_UPDATE_UPSERT\nGIT_TREE_UPDATE_REMOVE", @@ -37509,12 +41106,13 @@ "decl": "git_treebuilder", "type": "struct", "value": "git_treebuilder", - "file": "types.h", - "line": 132, - "lineto": 132, + "file": "git2/types.h", + "line": 135, + "lineto": 135, "tdef": "typedef", "description": " Constructor for in-memory trees ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -37540,7 +41138,7 @@ "GIT_TREEWALK_POST" ], "type": "enum", - "file": "tree.h", + "file": "git2/tree.h", "line": 398, "lineto": 401, "block": "GIT_TREEWALK_PRE\nGIT_TREEWALK_POST", @@ -37575,12 +41173,13 @@ "decl": "git_worktree", "type": "struct", "value": "git_worktree", - "file": "types.h", - "line": 108, - "lineto": 108, + "file": "git2/types.h", + "line": 111, + "lineto": 111, "tdef": "typedef", "description": " Representation of a working tree ", "comments": "", + "fields": [], "used": { "returns": [], "needs": [ @@ -37592,7 +41191,9 @@ "git_worktree_is_prunable", "git_worktree_lock", "git_worktree_lookup", + "git_worktree_name", "git_worktree_open_from_repository", + "git_worktree_path", "git_worktree_prune", "git_worktree_prune_init_options", "git_worktree_unlock", @@ -37601,6 +41202,87 @@ } } ], + [ + "git_worktree_add_options", + { + "decl": [ + "unsigned int version", + "int lock", + "git_reference * ref" + ], + "type": "struct", + "value": "git_worktree_add_options", + "file": "git2/worktree.h", + "line": 84, + "lineto": 89, + "block": "unsigned int version\nint lock\ngit_reference * ref", + "tdef": "typedef", + "description": " Worktree add options structure", + "comments": "

Initialize with GIT_WORKTREE_ADD_OPTIONS_INIT. Alternatively, you can\n use git_worktree_add_init_options.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "int", + "name": "lock", + "comments": " lock newly created worktree " + }, + { + "type": "git_reference *", + "name": "ref", + "comments": " reference to use for the new worktree HEAD " + } + ], + "used": { + "returns": [], + "needs": [ + "git_worktree_add", + "git_worktree_add_init_options" + ] + } + } + ], + [ + "git_worktree_prune_options", + { + "decl": [ + "unsigned int version", + "uint32_t flags" + ], + "type": "struct", + "value": "git_worktree_prune_options", + "file": "git2/worktree.h", + "line": 198, + "lineto": 202, + "block": "unsigned int version\nuint32_t flags", + "tdef": "typedef", + "description": " Worktree prune options structure", + "comments": "

Initialize with GIT_WORKTREE_PRUNE_OPTIONS_INIT. Alternatively, you can\n use git_worktree_prune_init_options.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "uint32_t", + "name": "flags", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_worktree_is_prunable", + "git_worktree_prune", + "git_worktree_prune_init_options" + ] + } + } + ], [ "git_worktree_prune_t", { @@ -37610,9 +41292,9 @@ "GIT_WORKTREE_PRUNE_WORKING_TREE" ], "type": "enum", - "file": "worktree.h", - "line": 155, - "lineto": 162, + "file": "git2/worktree.h", + "line": 182, + "lineto": 189, "block": "GIT_WORKTREE_PRUNE_VALID\nGIT_WORKTREE_PRUNE_LOCKED\nGIT_WORKTREE_PRUNE_WORKING_TREE", "tdef": "typedef", "description": " Flags which can be passed to git_worktree_prune to alter its\n behavior.", @@ -37649,12 +41331,29 @@ "decl": "git_writestream", "type": "struct", "value": "git_writestream", - "file": "types.h", - "line": 429, - "lineto": 429, + "file": "git2/types.h", + "line": 428, + "lineto": 428, "tdef": "typedef", "description": " A type to write in a streaming fashion, for example, for filters. ", "comments": "", + "fields": [ + { + "type": "int (*)(git_writestream *, const char *, size_t)", + "name": "write", + "comments": "" + }, + { + "type": "int (*)(git_writestream *)", + "name": "close", + "comments": "" + }, + { + "type": "void (*)(git_writestream *)", + "name": "free", + "comments": "" + } + ], "used": { "returns": [], "needs": [ @@ -37662,13 +41361,48 @@ "git_blob_create_fromstream_commit", "git_filter_list_stream_blob", "git_filter_list_stream_data", - "git_filter_list_stream_file" + "git_filter_list_stream_file", + "git_filter_stream_fn" ] } } + ], + [ + "imaxdiv_t", + { + "decl": [ + "intmax_t quot", + "intmax_t rem" + ], + "type": "struct", + "value": "imaxdiv_t", + "file": "git2/inttypes.h", + "line": 51, + "lineto": 54, + "block": "intmax_t quot\nintmax_t rem", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "intmax_t", + "name": "quot", + "comments": "" + }, + { + "type": "intmax_t", + "name": "rem", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [] + } + } ] ], - "prefix": "include/git2", + "prefix": "include", "groups": [ [ "annotated", @@ -37678,7 +41412,8 @@ "git_annotated_commit_from_ref", "git_annotated_commit_from_revspec", "git_annotated_commit_id", - "git_annotated_commit_lookup" + "git_annotated_commit_lookup", + "git_annotated_commit_ref" ] ], [ @@ -37738,14 +41473,18 @@ "git_branch_move", "git_branch_name", "git_branch_next", + "git_branch_remote_name", "git_branch_set_upstream", - "git_branch_upstream" + "git_branch_upstream", + "git_branch_upstream_name", + "git_branch_upstream_remote" ] ], [ "buf", [ "git_buf_contains_nul", + "git_buf_dispose", "git_buf_free", "git_buf_grow", "git_buf_is_binary", @@ -37781,8 +41520,10 @@ [ "git_commit_amend", "git_commit_author", + "git_commit_author_with_mailmap", "git_commit_body", "git_commit_committer", + "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", "git_commit_create_from_callback", @@ -37883,6 +41624,8 @@ [ "git_describe_commit", "git_describe_format", + "git_describe_init_format_options", + "git_describe_init_options", "git_describe_result_free", "git_describe_workdir" ] @@ -37995,6 +41738,12 @@ "git_ignore_path_is_ignored" ] ], + [ + "imaxdiv", + [ + "imaxdiv" + ] + ], [ "index", [ @@ -38021,6 +41770,10 @@ "git_index_get_byindex", "git_index_get_bypath", "git_index_has_conflicts", + "git_index_name_add", + "git_index_name_clear", + "git_index_name_entrycount", + "git_index_name_get_byindex", "git_index_new", "git_index_open", "git_index_owner", @@ -38031,6 +41784,13 @@ "git_index_remove_all", "git_index_remove_bypath", "git_index_remove_directory", + "git_index_reuc_add", + "git_index_reuc_clear", + "git_index_reuc_entrycount", + "git_index_reuc_find", + "git_index_reuc_get_byindex", + "git_index_reuc_get_bypath", + "git_index_reuc_remove", "git_index_set_caps", "git_index_set_version", "git_index_update_all", @@ -38047,6 +41807,7 @@ "git_indexer_commit", "git_indexer_free", "git_indexer_hash", + "git_indexer_init_options", "git_indexer_new" ] ], @@ -38060,6 +41821,18 @@ "git_libgit2_version" ] ], + [ + "mailmap", + [ + "git_mailmap_add_entry", + "git_mailmap_free", + "git_mailmap_from_buffer", + "git_mailmap_from_repository", + "git_mailmap_new", + "git_mailmap_resolve", + "git_mailmap_resolve_signature" + ] + ], [ "mempack", [ @@ -38079,6 +41852,14 @@ "git_merge_bases", "git_merge_bases_many", "git_merge_commits", + "git_merge_driver_lookup", + "git_merge_driver_register", + "git_merge_driver_source_ancestor", + "git_merge_driver_source_file_options", + "git_merge_driver_source_ours", + "git_merge_driver_source_repo", + "git_merge_driver_source_theirs", + "git_merge_driver_unregister", "git_merge_file", "git_merge_file_from_index", "git_merge_file_init_input", @@ -38106,6 +41887,7 @@ "git_note_commit_remove", "git_note_committer", "git_note_create", + "git_note_default_ref", "git_note_foreach", "git_note_free", "git_note_id", @@ -38143,6 +41925,7 @@ "git_odb_add_backend", "git_odb_add_disk_alternate", "git_odb_backend_loose", + "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", "git_odb_exists", @@ -38229,6 +42012,7 @@ "git_packbuilder_set_callbacks", "git_packbuilder_set_threads", "git_packbuilder_write", + "git_packbuilder_write_buf", "git_packbuilder_written" ] ], @@ -38251,6 +42035,12 @@ "git_patch_to_buf" ] ], + [ + "path", + [ + "git_path_is_gitfile" + ] + ], [ "pathspec", [ @@ -38364,6 +42154,8 @@ "git_reflog_append", "git_reflog_delete", "git_reflog_drop", + "git_reflog_entry__alloc", + "git_reflog_entry__free", "git_reflog_entry_byindex", "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -38383,6 +42175,8 @@ "git_refspec_dst", "git_refspec_dst_matches", "git_refspec_force", + "git_refspec_free", + "git_refspec_parse", "git_refspec_rtransform", "git_refspec_src", "git_refspec_src_matches", @@ -38450,6 +42244,7 @@ "git_repository_hashfile", "git_repository_head", "git_repository_head_detached", + "git_repository_head_detached_for_worktree", "git_repository_head_for_worktree", "git_repository_head_unborn", "git_repository_ident", @@ -38565,7 +42360,8 @@ "git_stash_apply_init_options", "git_stash_drop", "git_stash_foreach", - "git_stash_pop" + "git_stash_pop", + "git_stash_save" ] ], [ @@ -38583,6 +42379,12 @@ "git_status_should_ignore" ] ], + [ + "stdalloc", + [ + "git_stdalloc_init_allocator" + ] + ], [ "strarray", [ @@ -38671,6 +42473,19 @@ "git_trace_set" ] ], + [ + "transaction", + [ + "git_transaction_commit", + "git_transaction_free", + "git_transaction_lock_ref", + "git_transaction_new", + "git_transaction_remove", + "git_transaction_set_reflog", + "git_transaction_set_symbolic_target", + "git_transaction_set_target" + ] + ], [ "transport", [ @@ -38729,6 +42544,12 @@ "git_treebuilder_write_with_buffer" ] ], + [ + "win32", + [ + "git_win32_crtdbg_init_allocator" + ] + ], [ "worktree", [ @@ -38740,7 +42561,9 @@ "git_worktree_list", "git_worktree_lock", "git_worktree_lookup", + "git_worktree_name", "git_worktree_open_from_repository", + "git_worktree_path", "git_worktree_prune", "git_worktree_prune_init_options", "git_worktree_unlock", @@ -38761,6 +42584,10 @@ "cat-file.c", "ex/HEAD/cat-file.html" ], + [ + "checkout.c", + "ex/HEAD/checkout.html" + ], [ "common.c", "ex/HEAD/common.html" @@ -38789,6 +42616,10 @@ "log.c", "ex/HEAD/log.html" ], + [ + "ls-files.c", + "ex/HEAD/ls-files.html" + ], [ "merge.c", "ex/HEAD/merge.html" diff --git a/vendor/libgit2 b/vendor/libgit2 index 1aae32d20..0a271d605 160000 --- a/vendor/libgit2 +++ b/vendor/libgit2 @@ -1 +1 @@ -Subproject commit 1aae32d20abc736ca1818aedd34dd945b6508f72 +Subproject commit 0a271d60550c7e14d2c883a57cec58b7f4c454a2 From 5964ef12a59718880d40613383f4c3e88d714287 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 28 Jan 2019 10:07:17 -0700 Subject: [PATCH 015/145] Get v0.28.0 compiling with new features - Added git_index_name_entry - Added git_index_reuc_entry - Added git_mailmap - Added git_path_is_gitfile --- generate/input/descriptor.json | 264 ++++++++++++++++-- generate/input/libgit2-supplement.json | 76 ++--- generate/scripts/generateNativeCode.js | 3 + generate/scripts/helpers.js | 1 + generate/scripts/utils.js | 1 + .../filters/array_type_to_plain_type.js | 3 + generate/templates/filters/is_array_type.js | 3 + .../templates/filters/to_size_of_array.js | 3 + generate/templates/manual/clone/clone.cc | 6 +- .../manual/commit/extract_signature.cc | 14 +- generate/templates/manual/filter_list/load.cc | 6 +- .../manual/patches/convenient_patches.cc | 6 +- generate/templates/manual/remote/ls.cc | 4 +- .../templates/manual/revwalk/fast_walk.cc | 4 +- .../manual/revwalk/file_history_walk.cc | 4 +- .../templates/manual/src/filter_registry.cc | 12 +- generate/templates/partials/async_function.cc | 12 +- .../templates/partials/convert_from_v8.cc | 4 +- generate/templates/partials/convert_to_v8.cc | 76 ++++- generate/templates/partials/fields.cc | 22 +- generate/templates/partials/sync_function.cc | 6 +- generate/templates/templates/binding.gyp | 7 - vendor/libgit2.gyp | 26 +- 23 files changed, 448 insertions(+), 115 deletions(-) create mode 100644 generate/templates/filters/array_type_to_plain_type.js create mode 100644 generate/templates/filters/is_array_type.js create mode 100644 generate/templates/filters/to_size_of_array.js diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 096d4df9b..dc55e7587 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -75,6 +75,9 @@ }, "types": { + "allocator": { + "ignore": true + }, "annotated_commit": { "selfFreeing": true, "functions": { @@ -378,6 +381,7 @@ ] }, "buf": { + "freeFunctionName": "git_buf_dispose", "functions": { "git_buf_free": { "ignore": true @@ -820,6 +824,9 @@ "isReturn": true, "ownedByThis": true } + }, + "return": { + "isErrorCode": true } }, "git_config_lookup_map_value": { @@ -911,8 +918,14 @@ "ignore": true }, "cred": { + "needsForwardDeclaration": false, "selfFreeing": true, "cType": "git_cred", + "fields": { + "free": { + "ignore": true + } + }, "functions": { "git_cred_default_new": { "isAsync": false @@ -1401,6 +1414,9 @@ "../include/filter_registry.h" ] }, + "giterr": { + "ignore": true + }, "graph": { "functions": { "git_graph_ahead_behind": { @@ -1454,6 +1470,12 @@ } } }, + "imaxdiv": { + "ignore": true + }, + "imaxdiv_t": { + "ignore": true + }, "index": { "selfFreeing": true, "ownerFn": { @@ -1667,12 +1689,6 @@ "isErrorCode": true } }, - "git_index_reuc_get_byindex": { - "ignore": true - }, - "git_index_reuc_get_bypath": { - "ignore": true - }, "git_index_update_all": { "args": { "pathspec": { @@ -1722,9 +1738,164 @@ "hasConstructor": true, "ignoreInit": true }, + "index_name_entry": { + "functions": { + "git_index_name_add": { + "cppFunctionName": "Add", + "jsFunctionName": "add", + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_index_name_clear": { + "cppFunctionName": "Clear", + "jsFunctionName": "clear", + "isAsync": true + }, + "git_index_name_entrycount": { + "cppFunctionName": "Entrycount", + "jsFunctionName": "entryCount" + }, + "git_index_name_get_byindex": { + "cppFunctionName": "GetByIndex", + "jsFunctionName": "getByIndex", + "isPrototypeMethod": false + } + }, + "cDependencies": [ + "git2/sys/index.h" + ] + }, + "index_reuc_entry": { + "functions": { + "git_index_reuc_add": { + "cppFunctionName": "Add", + "jsFunctionName": "add", + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_index_reuc_clear": { + "cppFunctionName": "Clear", + "jsFunctionName": "clear", + "isAsync": true + }, + "git_index_reuc_entrycount": { + "cppFunctionName": "Entrycount", + "jsFunctionName": "entryCount" + }, + "git_index_reuc_find": { + "args": { + "at_pos": { + "isReturn": true, + "shouldAlloc": true + } + }, + "cppFunctionName": "Find", + "jsFunctionName": "find", + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_index_reuc_get_byindex": { + "cppFunctionName": "GetByIndex", + "jsFunctionName": "getByIndex", + "isPrototypeMethod": false + }, + "git_index_reuc_get_bypath": { + "cppFunctionName": "GetByPath", + "jsFunctionName": "getByPath", + "isPrototypeMethod": false + }, + "git_index_reuc_remove": { + "cppFunctionName": "Remove", + "jsFunctionName": "remove", + "isAsync": true, + "return": { + "isErrorCode": true + } + } + }, + "cDependencies": [ + "git2/sys/index.h" + ] + }, "indexer": { "ignore": true }, + "indexer_options": { + "ignore": true + }, + "LIBSSH2_SESSION": { + "ignore": true + }, + "LIBSSH2_USERAUTH_KBDINT_PROMPT": { + "ignore": true + }, + "LIBSSH2_USERAUTH_KBDINT_RESPONSE": { + "ignore": true + }, + "_LIBSSH2_SESSION": { + "ignore": true + }, + "_LIBSSH2_USERAUTH_KBDINT_PROMPT": { + "ignore": true + }, + "_LIBSSH2_USERAUTH_KBDINT_RESPONSE": { + "ignore": true + }, + "mailmap": { + "selfFreeing": true, + "freeFunctionName": "git_mailmap_free", + "functions": { + "git_mailmap_add_entry": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_mailmap_free": { + "ignore": true + }, + "git_mailmap_from_buffer": { + "return": { + "isErrorCode": true + } + }, + "git_mailmap_from_repository": { + "args": { + "out": { + "ownedBy": ["repo"] + } + }, + "return": { + "isErrorCode": true + } + }, + "git_mailmap_resolve": { + "args": { + "real_name": { + "isReturn": true + }, + "real_email": { + "isReturn": true + } + }, + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_mailmap_resolve_signature": { + "return": { + "isErrorCode": true + } + } + } + }, "mempack": { "ignore": true }, @@ -1933,15 +2104,6 @@ "git_odb_add_disk_alternate": { "ignore": true }, - "git_odb_backend_loose": { - "ignore": true - }, - "git_odb_backend_one_pack": { - "ignore": true - }, - "git_odb_backend_pack": { - "ignore": true - }, "git_odb_exists": { "ignore": true, "isAsync": true, @@ -2292,6 +2454,11 @@ } } }, + "path": { + "cDependencies": [ + "git2/sys/path.h" + ] + }, "pathspec": { "selfFreeing": true, "dependencies": [ @@ -2779,6 +2946,7 @@ }, "git_remote_get_refspec": { "return": { + "selfFreeing": false, "ownedByThis": true } }, @@ -3112,9 +3280,15 @@ } } }, + "smart_subtransport": { + "ignore": true + }, "smart_subtransport_definition": { "ignore": true }, + "smart_subtransport_stream": { + "ignore": true + }, "stash": { "functions": { "git_stash_apply": { @@ -3157,6 +3331,9 @@ } } }, + "stdalloc": { + "ignore": true + }, "status": { "cDependencies": [ "git2/sys/diff.h" @@ -3560,6 +3737,47 @@ "transport": { "cType": "git_transport", "needsForwardDeclaration": false, + "fields": { + "cancel": { + "ignore": true + }, + "close": { + "ignore": true + }, + "connect": { + "ignore": true + }, + "download_pack": { + "ignore": true + }, + "free": { + "ignore": true + }, + "is_connected": { + "ignore": true + }, + "ls": { + "ignore": true + }, + "negotiate_fetch": { + "ignore": true + }, + "push": { + "ignore": true + }, + "read_flags": { + "ignore": true + }, + "set_callbacks": { + "ignore": true + }, + "set_custom_headers": { + "ignore": true + }, + "version": { + "ignore": true + } + }, "functions": { "git_transport_dummy": { "ignore": true @@ -3722,6 +3940,9 @@ } } }, + "win32": { + "ignore": true + }, "worktree": { "selfFreeing": true, "cType": "git_worktree", @@ -3761,7 +3982,18 @@ }, "writestream": { "cType": "git_writestream", - "needsForwardDeclaration": false + "needsForwardDeclaration": false, + "fields": { + "close": { + "ignore": true + }, + "free": { + "ignore": true + }, + "write": { + "ignore": true + } + } } } } diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 3697a3485..cc073582b 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -86,30 +86,6 @@ }, "new" : { "functions": { - "git_branch_remote_name": { - "type": "function", - "file": "branch.h", - "args": [ - { - "name": "out", - "type": "git_buf *" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "canonical_branch_name", - "type": "const char *" - } - ], - "isAsync": true, - "return": { - "type": "int", - "isErrorCode": true - }, - "group": "branch" - }, "git_clone": { "isManual": true, "cFile": "generate/templates/manual/clone/clone.cc", @@ -376,6 +352,27 @@ "git_filter_source_flags" ] ], + [ + "index_name_entry", + [ + "git_index_name_add", + "git_index_name_clear", + "git_index_name_entrycount", + "git_index_name_get_byindex" + ] + ], + [ + "index_reuc_entry", + [ + "git_index_reuc_add", + "git_index_reuc_clear", + "git_index_reuc_entrycount", + "git_index_reuc_find", + "git_index_reuc_get_byindex", + "git_index_reuc_get_bypath", + "git_index_reuc_remove" + ] + ], [ "merge_file_result", [ @@ -1035,11 +1032,27 @@ "git_diff_stats_free" ] }, + "index": { + "functions": [ + "git_index_name_add", + "git_index_name_clear", + "git_index_name_entrycount", + "git_index_name_get_byindex", + "git_index_reuc_add", + "git_index_reuc_clear", + "git_index_reuc_entrycount", + "git_index_reuc_find", + "git_index_reuc_get_byindex", + "git_index_reuc_get_bypath", + "git_index_reuc_remove" + ] + }, "merge": { "functions": [ "git_merge_driver_lookup", "git_merge_driver_register", "git_merge_driver_source_ancestor", + "git_merge_driver_source_file_options", "git_merge_driver_source_ours", "git_merge_driver_source_repo", "git_merge_driver_source_theirs", @@ -1059,6 +1072,10 @@ }, "odb": { "functions": [ + "git_odb_backend_loose", + "git_odb_backend_malloc", + "git_odb_backend_one_pack", + "git_odb_backend_pack", "git_odb_object_data", "git_odb_object_dup", "git_odb_object_free", @@ -1090,6 +1107,8 @@ }, "reflog": { "functions": [ + "git_reflog_entry__alloc", + "git_reflog_entry__free", "git_reflog_entry_committer", "git_reflog_entry_id_new", "git_reflog_entry_id_old", @@ -1117,12 +1136,5 @@ ] } }, - "groups": { - "branch": [ - "git_branch_remote_name" - ], - "stash": [ - "git_stash_save" - ] - } + "groups": {} } diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 95e0ab875..3ba5f6b02 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -50,11 +50,13 @@ module.exports = function generateNativeCode() { var filters = { and: require("../templates/filters/and"), argsInfo: require("../templates/filters/args_info"), + arrayTypeToPlainType: require("../templates/filters/array_type_to_plain_type"), cppToV8: require("../templates/filters/cpp_to_v8"), defaultValue: require("../templates/filters/default_value"), fieldsInfo: require("../templates/filters/fields_info"), hasReturnType: require("../templates/filters/has_return_type"), hasReturnValue: require("../templates/filters/has_return_value"), + isArrayType: require("../templates/filters/is_array_type"), isDoublePointer: require("../templates/filters/is_double_pointer"), isFixedLengthString: require("../templates/filters/is_fixed_length_string"), isOid: require("../templates/filters/is_oid"), @@ -70,6 +72,7 @@ module.exports = function generateNativeCode() { subtract: require("../templates/filters/subtract"), titleCase: require("../templates/filters/title_case"), toBool: require('../templates/filters/to_bool'), + toSizeOfArray: require("../templates/filters/to_size_of_array"), unPointer: require("../templates/filters/un_pointer"), setUnsigned: require("../templates/filters/unsigned"), upper: require("../templates/filters/upper") diff --git a/generate/scripts/helpers.js b/generate/scripts/helpers.js index b9a67dc06..f8e02f807 100644 --- a/generate/scripts/helpers.js +++ b/generate/scripts/helpers.js @@ -40,6 +40,7 @@ var Helpers = { .replace("struct", "") .replace(utils.doublePointerRegex, "") .replace(utils.pointerRegex, "") + .replace(utils.arrayTypeRegex, "") .trim(); }, diff --git a/generate/scripts/utils.js b/generate/scripts/utils.js index e618a954a..078ccf41e 100644 --- a/generate/scripts/utils.js +++ b/generate/scripts/utils.js @@ -9,6 +9,7 @@ const path = require("path"); var local = path.join.bind(null, __dirname, "../"); var util = { + arrayTypeRegex: /\s\[\d+\]\s*/, pointerRegex: /\s*\*\s*/, doublePointerRegex: /\s*\*\*\s*/, diff --git a/generate/templates/filters/array_type_to_plain_type.js b/generate/templates/filters/array_type_to_plain_type.js new file mode 100644 index 000000000..55f283350 --- /dev/null +++ b/generate/templates/filters/array_type_to_plain_type.js @@ -0,0 +1,3 @@ +module.exports = function(cType) { + return /(.*)\s\[\d+\]\s*/.exec(cType)[1]; +}; diff --git a/generate/templates/filters/is_array_type.js b/generate/templates/filters/is_array_type.js new file mode 100644 index 000000000..d633d9e40 --- /dev/null +++ b/generate/templates/filters/is_array_type.js @@ -0,0 +1,3 @@ +module.exports = function(cType) { + return /\s\[\d+\]\s*/.test(cType); +}; diff --git a/generate/templates/filters/to_size_of_array.js b/generate/templates/filters/to_size_of_array.js new file mode 100644 index 000000000..b56e9315f --- /dev/null +++ b/generate/templates/filters/to_size_of_array.js @@ -0,0 +1,3 @@ +module.exports = function(cType) { + return /\s\[(\d+)\]\s*/.exec(cType)[1]; +}; diff --git a/generate/templates/manual/clone/clone.cc b/generate/templates/manual/clone/clone.cc index 7ddcd559b..144be221d 100644 --- a/generate/templates/manual/clone/clone.cc +++ b/generate/templates/manual/clone/clone.cc @@ -91,7 +91,7 @@ NAN_METHOD(GitClone::Clone) { } void GitClone::CloneWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster( @@ -113,8 +113,8 @@ void GitClone::CloneWorker::Execute() { baton->error_code = result; - if (result != GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (result != GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } } } diff --git a/generate/templates/manual/commit/extract_signature.cc b/generate/templates/manual/commit/extract_signature.cc index 911a31eef..c17749539 100644 --- a/generate/templates/manual/commit/extract_signature.cc +++ b/generate/templates/manual/commit/extract_signature.cc @@ -37,8 +37,8 @@ NAN_METHOD(GitCommit::ExtractSignature) if (git_oid_fromstr(baton->commit_id, (const char *)strdup(*oidString)) != GIT_OK) { free(baton->commit_id); - if (giterr_last()) { - return Nan::ThrowError(giterr_last()->message); + if (git_error_last()) { + return Nan::ThrowError(git_error_last()->message); } else { return Nan::ThrowError("Unknown Error"); } @@ -73,7 +73,7 @@ NAN_METHOD(GitCommit::ExtractSignature) void GitCommit::ExtractSignatureWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster( @@ -89,8 +89,8 @@ void GitCommit::ExtractSignatureWorker::Execute() (const char *)baton->field ); - if (baton->error_code != GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (baton->error_code != GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } } } @@ -145,8 +145,8 @@ void GitCommit::ExtractSignatureWorker::HandleOKCallback() callback->Call(0, NULL, async_resource); } - git_buf_free(&baton->signature); - git_buf_free(&baton->signed_data); + git_buf_dispose(&baton->signature); + git_buf_dispose(&baton->signed_data); if (baton->field != NULL) { free((void *)baton->field); diff --git a/generate/templates/manual/filter_list/load.cc b/generate/templates/manual/filter_list/load.cc index 1e7788e65..6075fd59c 100644 --- a/generate/templates/manual/filter_list/load.cc +++ b/generate/templates/manual/filter_list/load.cc @@ -108,7 +108,7 @@ NAN_METHOD(GitFilterList::Load) { } void GitFilterList::LoadWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster( @@ -119,8 +119,8 @@ void GitFilterList::LoadWorker::Execute() { baton->error_code = result; - if (result != GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (result != GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } } } diff --git a/generate/templates/manual/patches/convenient_patches.cc b/generate/templates/manual/patches/convenient_patches.cc index c7facba4e..cc108a8ae 100644 --- a/generate/templates/manual/patches/convenient_patches.cc +++ b/generate/templates/manual/patches/convenient_patches.cc @@ -26,7 +26,7 @@ NAN_METHOD(GitPatch::ConvenientFromDiff) { } void GitPatch::ConvenientFromDiffWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster(true, baton->diff); @@ -50,8 +50,8 @@ void GitPatch::ConvenientFromDiffWorker::Execute() { baton->error_code = result; - if (giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } delete baton->out; diff --git a/generate/templates/manual/remote/ls.cc b/generate/templates/manual/remote/ls.cc index 605447b10..f81728256 100644 --- a/generate/templates/manual/remote/ls.cc +++ b/generate/templates/manual/remote/ls.cc @@ -20,7 +20,7 @@ NAN_METHOD(GitRemote::ReferenceList) void GitRemote::ReferenceListWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster( @@ -37,7 +37,7 @@ void GitRemote::ReferenceListWorker::Execute() ); if (baton->error_code != GIT_OK) { - baton->error = git_error_dup(giterr_last()); + baton->error = git_error_dup(git_error_last()); delete baton->out; baton->out = NULL; return; diff --git a/generate/templates/manual/revwalk/fast_walk.cc b/generate/templates/manual/revwalk/fast_walk.cc index 8969bcb0f..fbf5c09b5 100644 --- a/generate/templates/manual/revwalk/fast_walk.cc +++ b/generate/templates/manual/revwalk/fast_walk.cc @@ -30,7 +30,7 @@ void GitRevwalk::FastWalkWorker::Execute() for (int i = 0; i < baton->max_count; i++) { git_oid *nextCommit = (git_oid *)malloc(sizeof(git_oid)); - giterr_clear(); + git_error_clear(); baton->error_code = git_revwalk_next(nextCommit, baton->walk); if (baton->error_code != GIT_OK) @@ -40,7 +40,7 @@ void GitRevwalk::FastWalkWorker::Execute() free(nextCommit); if (baton->error_code != GIT_ITEROVER) { - baton->error = git_error_dup(giterr_last()); + baton->error = git_error_dup(git_error_last()); while(!baton->out->empty()) { diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index 557cb38bc..c70b6856c 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -35,7 +35,7 @@ void GitRevwalk::FileHistoryWalkWorker::Execute() { git_repository *repo = git_revwalk_repository(baton->walk); git_oid *nextOid = (git_oid *)malloc(sizeof(git_oid)); - giterr_clear(); + git_error_clear(); for ( unsigned int i = 0; i < baton->max_count && (baton->error_code = git_revwalk_next(nextOid, baton->walk)) == GIT_OK; @@ -233,7 +233,7 @@ void GitRevwalk::FileHistoryWalkWorker::Execute() if (baton->error_code != GIT_OK) { if (baton->error_code != GIT_ITEROVER) { - baton->error = git_error_dup(giterr_last()); + baton->error = git_error_dup(git_error_last()); while(!baton->out->empty()) { diff --git a/generate/templates/manual/src/filter_registry.cc b/generate/templates/manual/src/filter_registry.cc index d2d2db933..410255289 100644 --- a/generate/templates/manual/src/filter_registry.cc +++ b/generate/templates/manual/src/filter_registry.cc @@ -77,15 +77,15 @@ NAN_METHOD(GitFilterRegistry::GitFilterRegister) { } void GitFilterRegistry::RegisterWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster(/*asyncAction: */true, baton->filter_name, baton->filter); int result = git_filter_register(baton->filter_name, baton->filter, baton->filter_priority); baton->error_code = result; - if (result != GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (result != GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } } } @@ -163,15 +163,15 @@ NAN_METHOD(GitFilterRegistry::GitFilterUnregister) { } void GitFilterRegistry::UnregisterWorker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster(/*asyncAction: */true, baton->filter_name); int result = git_filter_unregister(baton->filter_name); baton->error_code = result; - if (result != GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (result != GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } } } diff --git a/generate/templates/partials/async_function.cc b/generate/templates/partials/async_function.cc index c4cdb115d..2fe854bec 100644 --- a/generate/templates/partials/async_function.cc +++ b/generate/templates/partials/async_function.cc @@ -79,7 +79,7 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { } void {{ cppClassName }}::{{ cppFunctionName }}Worker::Execute() { - giterr_clear(); + git_error_clear(); { LockMaster lockMaster( @@ -107,15 +107,15 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::Execute() { {%if return.isResultOrError %} baton->error_code = result; - if (result < GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (result < GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } {%elsif return.isErrorCode %} baton->error_code = result; - if (result != GIT_OK && giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); + if (result != GIT_OK && git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); } {%elsif not return.cType == 'void' %} @@ -283,7 +283,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { {%if arg.cppClassName == "GitBuf" %} {%if cppFunctionName == "Set" %} {%else%} - git_buf_free(baton->{{ arg.name }}); + git_buf_dispose(baton->{{ arg.name }}); free((void *)baton->{{ arg.name }}); {%endif%} {%endif%} diff --git a/generate/templates/partials/convert_from_v8.cc b/generate/templates/partials/convert_from_v8.cc index 7153b2a9a..c1486d5a6 100644 --- a/generate/templates/partials/convert_from_v8.cc +++ b/generate/templates/partials/convert_from_v8.cc @@ -75,8 +75,8 @@ if (git_oid_fromstr(oidOut, (const char *) strdup(*oidString)) != GIT_OK) { free(oidOut); - if (giterr_last()) { - return Nan::ThrowError(giterr_last()->message); + if (git_error_last()) { + return Nan::ThrowError(git_error_last()->message); } else { return Nan::ThrowError("Unknown Error"); } diff --git a/generate/templates/partials/convert_to_v8.cc b/generate/templates/partials/convert_to_v8.cc index 908f99018..85b220db9 100644 --- a/generate/templates/partials/convert_to_v8.cc +++ b/generate/templates/partials/convert_to_v8.cc @@ -18,8 +18,19 @@ {% endif %} {% elsif cppClassName|isV8Value %} - - {% if isCppClassIntType %} + {% if cType|isArrayType %} + v8::Local tmpArray = Nan::New({{ cType|toSizeOfArray }}); + for (unsigned int i = 0; i < {{ cType|toSizeOfArray }}; i++) { + v8::Local element; + {% if isCppClassIntType %} + element = Nan::New<{{ cppClassName }}>(({{ parsedClassName }}){{= parsedName =}}[i]); + {% else %} + element = Nan::New<{{ cppClassName }}>({% if needsDereference %}*{% endif %}{{= parsedName =}}[i]); + {% endif %} + Nan::Set(tmpArray, Nan::New(i), element); + } + to = tmpArray; + {% elsif isCppClassIntType %} to = Nan::New<{{ cppClassName }}>(({{ parsedClassName }}){{= parsedName =}}); {% else %} to = Nan::New<{{ cppClassName }}>({% if needsDereference %}*{% endif %}{{= parsedName =}}); @@ -53,6 +64,66 @@ to = Nan::Null(); } {% endif %} +{% elsif cType|isArrayType %} + v8::Local tmpArray = Nan::New({{ cType|toSizeOfArray }}); + for (unsigned int i = 0; i < {{ cType|toSizeOfArray }}; i++) { + v8::Local element; + {{ cType|arrayTypeToPlainType }} *rawElement = &{{= parsedName =}}[i]; + + {% if copy %} + if (rawElement != NULL) { + rawElement = {{ copy }}(rawElement); + } + {% endif %} + + if (rawElement != NULL) { + {% if hasOwner %} + v8::Local owners = Nan::New(0); + {% if ownedBy %} + {% if isAsync %} + {% each ownedBy as owner %} + Nan::Set(owners, Nan::New(owners->Length()), this->GetFromPersistent("{{= owner =}}")->ToObject()); + {% endeach %} + {% else %} + {% each ownedByIndices as ownedByIndex %} + Nan::Set(owners, Nan::New(owners->Length()), info[{{= ownedByIndex =}}]->ToObject()); + {% endeach %} + {% endif %} + {% endif %} + {%if isAsync %} + {% elsif ownedByThis %} + Nan::Set(owners, owners->Length(), info.This()); + {% endif %} + {% if ownerFn | toBool %} + Nan::Set( + owners, + Nan::New(owners->Length()), + {{= ownerFn.singletonCppClassName =}}::New( + {{= ownerFn.name =}}(rawElement), + true + )->ToObject() + ); + {% endif %} + {% endif %} + {% if cppClassName == 'Wrapper' %} + element = {{ cppClassName }}::New(rawElement); + {% else %} + element = {{ cppClassName }}::New( + rawElement, + {{ selfFreeing|toBool }} + {% if hasOwner %} + , owners + {% endif %} + ); + {% endif %} + } + else { + element = Nan::Null(); + } + + Nan::Set(tmpArray, Nan::New(i), element); + } + to = tmpArray; {% else %} {% if copy %} if ({{= parsedName =}} != NULL) { @@ -89,7 +160,6 @@ ); {% endif %} {% endif %} - // {{= cppClassName }} {{= parsedName }} {% if cppClassName == 'Wrapper' %} to = {{ cppClassName }}::New({{= parsedName =}}); {% else %} diff --git a/generate/templates/partials/fields.cc b/generate/templates/partials/fields.cc index 9d6e6e39d..437975084 100644 --- a/generate/templates/partials/fields.cc +++ b/generate/templates/partials/fields.cc @@ -1,21 +1,24 @@ {% each fields|fieldsInfo as field %} {% if not field.ignore %} + // start field block NAN_METHOD({{ cppClassName }}::{{ field.cppFunctionName }}) { v8::Local to; {% if field | isFixedLengthString %} char* {{ field.name }} = (char *)Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info.This())->GetValue()->{{ field.name }}; {% else %} - {{ field.cType }} - {% if not field.cppClassName|isV8Value %} - {% if not field.cType|isPointer %} - * + {% if field.cType|isArrayType %} + {{ field.cType|arrayTypeToPlainType }} *{{ field.name }} = + {% else %} + {{ field.cType }} + {% if not field.cppClassName|isV8Value %} + {% if not field.cType|isPointer %}*{% endif %} {% endif %} - {% endif %} - {{ field.name }} = - {% if not field.cppClassName|isV8Value %} - {% if not field.cType|isPointer %} - & + {{ field.name }} = + {% if not field.cppClassName|isV8Value %} + {% if field.cType|isArrayType %}{% elsif not field.cType|isPointer %} + & + {% endif %} {% endif %} {% endif %} Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info.This())->GetValue()->{{ field.name }}; @@ -24,5 +27,6 @@ {% partial convertToV8 field %} info.GetReturnValue().Set(to); } + // end field block {% endif %} {% endeach %} diff --git a/generate/templates/partials/sync_function.cc b/generate/templates/partials/sync_function.cc index 5f1306dae..3bda175b6 100644 --- a/generate/templates/partials/sync_function.cc +++ b/generate/templates/partials/sync_function.cc @@ -31,7 +31,7 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { if (Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info.This())->GetValue() != NULL) { {%endif%} - giterr_clear(); + git_error_clear(); { // lock master scope start LockMaster lockMaster( @@ -79,8 +79,8 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { {%endif%} {%endeach%} - if (giterr_last()) { - return Nan::ThrowError(giterr_last()->message); + if (git_error_last()) { + return Nan::ThrowError(git_error_last()->message); } else { return Nan::ThrowError("Unknown Error"); } diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index dc0e203e7..e6f1141cb 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -160,13 +160,6 @@ ] } ], - [ - "OS=='linux' or OS=='mac' or OS.endswith('bsd')", { - "libraries": [ - " Date: Mon, 28 Jan 2019 10:08:11 -0700 Subject: [PATCH 016/145] Fix documentation and uses of certificateCheck since it works correctly certificateCheck used to require passing 1 to ignore certificate failures. Now we need to pass 0 to inform libgit2 that the certificate was deemed valid. --- examples/clone.js | 2 +- examples/cloneFromGithubWith2Factor.js | 2 +- examples/pull.js | 2 +- guides/cloning/README.md | 2 +- guides/cloning/gh-two-factor/README.md | 4 +-- guides/cloning/gh-two-factor/index.js | 2 +- guides/cloning/index.js | 2 +- guides/cloning/ssh-with-agent/README.md | 4 +-- guides/cloning/ssh-with-agent/index.js | 2 +- test/tests/clone.js | 28 +++++------------ test/tests/remote.js | 40 +++++++------------------ test/tests/repository.js | 4 +-- 12 files changed, 29 insertions(+), 65 deletions(-) diff --git a/examples/clone.js b/examples/clone.js index 2b9937949..459713d94 100644 --- a/examples/clone.js +++ b/examples/clone.js @@ -14,7 +14,7 @@ fse.remove(path).then(function() { certificateCheck: function() { // github will fail cert check on some OSX machines // this overrides that check - return 1; + return 0; } } } diff --git a/examples/cloneFromGithubWith2Factor.js b/examples/cloneFromGithubWith2Factor.js index 35b08432e..62e0df807 100644 --- a/examples/cloneFromGithubWith2Factor.js +++ b/examples/cloneFromGithubWith2Factor.js @@ -20,7 +20,7 @@ var opts = { return nodegit.Cred.userpassPlaintextNew(token, "x-oauth-basic"); }, certificateCheck: function() { - return 1; + return 0; } } } diff --git a/examples/pull.js b/examples/pull.js index 7f5fc9af0..fe2d83411 100644 --- a/examples/pull.js +++ b/examples/pull.js @@ -16,7 +16,7 @@ nodegit.Repository.open(path.resolve(__dirname, repoDir)) return nodegit.Cred.sshKeyFromAgent(userName); }, certificateCheck: function() { - return 1; + return 0; } } }); diff --git a/guides/cloning/README.md b/guides/cloning/README.md index 2b1fa508a..8b8390f23 100644 --- a/guides/cloning/README.md +++ b/guides/cloning/README.md @@ -85,7 +85,7 @@ to passthrough the certificate check. ``` javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; } + certificateCheck: function() { return 0; } } }; ``` diff --git a/guides/cloning/gh-two-factor/README.md b/guides/cloning/gh-two-factor/README.md index a3b8bbb3f..a6d24d40d 100644 --- a/guides/cloning/gh-two-factor/README.md +++ b/guides/cloning/gh-two-factor/README.md @@ -101,7 +101,7 @@ to passthrough the certificate check. ``` javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; } + certificateCheck: function() { return 0; } } }; ``` @@ -119,7 +119,7 @@ The `fetchOpts` object now looks like this: ``` javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; }, + certificateCheck: function() { return 0; }, credentials: function() { return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic"); } diff --git a/guides/cloning/gh-two-factor/index.js b/guides/cloning/gh-two-factor/index.js index d723e52cc..1f34c5756 100644 --- a/guides/cloning/gh-two-factor/index.js +++ b/guides/cloning/gh-two-factor/index.js @@ -22,7 +22,7 @@ var cloneOptions = {}; // with libgit2 being able to verify certificates from GitHub. cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; }, + certificateCheck: function() { return 0; }, credentials: function() { return NodeGit.Cred.userpassPlaintextNew(GITHUB_TOKEN, "x-oauth-basic"); } diff --git a/guides/cloning/index.js b/guides/cloning/index.js index f6b7c7a37..ec455fbd7 100644 --- a/guides/cloning/index.js +++ b/guides/cloning/index.js @@ -18,7 +18,7 @@ var cloneOptions = {}; // with libgit2 being able to verify certificates from GitHub. cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; } + certificateCheck: function() { return 0; } } }; diff --git a/guides/cloning/ssh-with-agent/README.md b/guides/cloning/ssh-with-agent/README.md index b2cfbe8ce..46a72b823 100644 --- a/guides/cloning/ssh-with-agent/README.md +++ b/guides/cloning/ssh-with-agent/README.md @@ -83,7 +83,7 @@ to passthrough the certificate check. ``` javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; } + certificateCheck: function() { return 0; } } }; ``` @@ -102,7 +102,7 @@ The `fetchOpts` object now looks like this: ``` javascript cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; }, + certificateCheck: function() { return 0; }, credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); } diff --git a/guides/cloning/ssh-with-agent/index.js b/guides/cloning/ssh-with-agent/index.js index f3926392c..b8f5a3aac 100644 --- a/guides/cloning/ssh-with-agent/index.js +++ b/guides/cloning/ssh-with-agent/index.js @@ -17,7 +17,7 @@ var cloneOptions = {}; // with libgit2 being able to verify certificates from GitHub. cloneOptions.fetchOpts = { callbacks: { - certificateCheck: function() { return 1; }, + certificateCheck: function() { return 0; }, // Credentials are passed two arguments, url and username. We forward the // `userName` argument to the `sshKeyFromAgent` function to validate diff --git a/test/tests/clone.js b/test/tests/clone.js index 03a03ade9..e86663e1c 100644 --- a/test/tests/clone.js +++ b/test/tests/clone.js @@ -43,9 +43,7 @@ describe("Clone", function() { var opts = { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } } }; @@ -202,9 +200,7 @@ describe("Clone", function() { var opts = { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } } }; @@ -221,9 +217,7 @@ describe("Clone", function() { var opts = { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - }, + certificateCheck: () => 0, credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); } @@ -243,9 +237,7 @@ describe("Clone", function() { var opts = { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - }, + certificateCheck: () => 0, credentials: function(url, userName) { return NodeGit.Cred.sshKeyNew( userName, @@ -269,9 +261,7 @@ describe("Clone", function() { var opts = { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - }, + certificateCheck: () => 0, credentials: function(url, userName) { return NodeGit.Cred.sshKeyNew( userName, @@ -296,9 +286,7 @@ describe("Clone", function() { var opts = { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } } }; @@ -328,9 +316,7 @@ describe("Clone", function() { return Clone(url, clonePath, { fetchOpts: { callbacks: { - certificateCheck: function() { - return 1; - }, + certificateCheck: () => 0, credentials: function() { if (firstPass) { firstPass = false; diff --git a/test/tests/remote.js b/test/tests/remote.js index ff6004c66..27611dd15 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -120,9 +120,7 @@ describe("Remote", function() { return repo.getRemote("origin") .then(function(remote) { remoteCallbacks = { - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 }; return remote.connect(NodeGit.Enums.DIRECTION.FETCH, remoteCallbacks) @@ -201,9 +199,7 @@ describe("Remote", function() { credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); }, - certificateCheck: function() { - return 1; - }, + certificateCheck: () => 0, transferProgress: function() { wasCalled = true; @@ -222,9 +218,7 @@ describe("Remote", function() { it("can get the default branch of a remote", function() { var remoteCallbacks = { - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 }; var remote = this.remote; @@ -242,9 +236,7 @@ describe("Remote", function() { credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }); }); @@ -261,9 +253,7 @@ describe("Remote", function() { "" ); }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }; @@ -288,9 +278,7 @@ describe("Remote", function() { return NodeGit.Cred.sshKeyFromAgent(userName); } }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }; @@ -323,9 +311,7 @@ describe("Remote", function() { credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }); }); @@ -350,9 +336,7 @@ describe("Remote", function() { }); return test; }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }; return remote.push(refs, options); @@ -384,9 +368,7 @@ describe("Remote", function() { .then(Promise.reject.bind(Promise)); return test; }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }; return remote.push(refs, options); @@ -426,9 +408,7 @@ describe("Remote", function() { return Promise.reject(); } }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 } }; return remote.push(refs, options); diff --git a/test/tests/repository.js b/test/tests/repository.js index e960629ac..9427a8f9c 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -185,9 +185,7 @@ describe("Repository", function() { credentials: function(url, userName) { return NodeGit.Cred.sshKeyFromAgent(userName); }, - certificateCheck: function() { - return 1; - } + certificateCheck: () => 0 }) .then(function() { return repo.fetchheadForeach(function(refname, remoteUrl, oid, isMerge) { From a373d92cc05722341451bedd3b5eeb0d2dbf0973 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 28 Jan 2019 13:31:51 -0700 Subject: [PATCH 017/145] Convert Buf.prototype.set and Buf.prototype.grow to sync methods --- generate/input/descriptor.json | 4 +-- test/tests/filter.js | 54 ++++++++++++---------------------- 2 files changed, 20 insertions(+), 38 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index dc55e7587..ae8e0b1c4 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -401,7 +401,7 @@ "jsClassName": "Number", "isErrorCode": true }, - "isAsync": true + "isAsync": false }, "git_buf_set": { "cppFunctionName": "Set", @@ -422,7 +422,7 @@ "jsClassName": "Number", "isErrorCode": true }, - "isAsync": true + "isAsync": false } }, "dependencies": [ diff --git a/test/tests/filter.js b/test/tests/filter.js index 3a57acbef..ef1efc5c0 100644 --- a/test/tests/filter.js +++ b/test/tests/filter.js @@ -476,10 +476,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.PASSTHROUGH; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.PASSTHROUGH; }, check: function() { return NodeGit.Error.CODE.OK; @@ -522,10 +520,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return NodeGit.Error.CODE.OK; @@ -568,10 +564,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(largeBuffer, largeBufferSize) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(largeBuffer, largeBufferSize); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return NodeGit.Error.CODE.OK; @@ -626,10 +620,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return NodeGit.Error.CODE.OK; @@ -668,10 +660,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return src.path() === "README.md" ? @@ -725,10 +715,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return src.path() === "README.md" ? @@ -956,10 +944,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return NodeGit.Error.CODE.OK; @@ -999,10 +985,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return NodeGit.Error.CODE.OK; @@ -1044,10 +1028,8 @@ describe("Filter", function() { return Registry.register(filterName, { apply: function(to, from, source) { - return to.set(tempBuffer, length) - .then(function() { - return NodeGit.Error.CODE.OK; - }); + to.set(tempBuffer, length); + return NodeGit.Error.CODE.OK; }, check: function(src, attr) { return NodeGit.Error.CODE.OK; From a918cad8cc29c54ec073f867b2d35c8304753266 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 28 Jan 2019 13:32:07 -0700 Subject: [PATCH 018/145] Expose git_commit_signing_cb in rebase options --- generate/input/callbacks.json | 206 ++++++++++++++----------- generate/input/libgit2-supplement.json | 8 + lib/buf.js | 11 ++ lib/rebase.js | 48 +++--- test/tests/rebase.js | 191 +++++++++++++++++++++++ 5 files changed, 355 insertions(+), 109 deletions(-) create mode 100644 lib/buf.js diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index a94faa030..535ca08b7 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -118,6 +118,32 @@ "error": -1 } }, + "git_commit_signing_cb": { + "args": [ + { + "name": "signature", + "cType": "git_buf *" + }, + { + "name": "signature_field", + "cType": "git_buf *" + }, + { + "name": "commit_content", + "cType": "const char *" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": -30, + "success": 0, + "error": -1 + } + }, "git_config_foreach_cb": { "args": [ { @@ -311,101 +337,101 @@ "error": -1 } }, - "git_filter_apply_fn": { - "args": [ - { - "name": "self", - "cType": "git_filter *" - }, - { - "name": "payload", - "cType": "void **" - }, - { - "name": "to", - "cType": "git_buf *" - }, - { - "name": "from", - "cType": "const git_buf *" - }, - { - "name": "src", - "cType": "const git_filter_source *" - } - ], - "return": { - "type": "int", - "noResults": -30, - "success": 0, - "error": -1 - } - }, - "git_filter_check_fn": { - "args": [ - { - "name": "self", - "cType": "git_filter *" - }, - { + "git_filter_apply_fn": { + "args": [ + { + "name": "self", + "cType": "git_filter *" + }, + { + "name": "payload", + "cType": "void **" + }, + { + "name": "to", + "cType": "git_buf *" + }, + { + "name": "from", + "cType": "const git_buf *" + }, + { + "name": "src", + "cType": "const git_filter_source *" + } + ], + "return": { + "type": "int", + "noResults": -30, + "success": 0, + "error": -1 + } + }, + "git_filter_check_fn": { + "args": [ + { + "name": "self", + "cType": "git_filter *" + }, + { "name": "payload", "cType": "void **" - }, - { + }, + { "name": "src", "cType": "const git_filter_source *" - }, - { - "name": "attr_values", - "cType": "const char **" - } - ], - "return": { - "type": "int", - "noResults": -30, - "success": 0, - "error": -1 - } - }, - "git_filter_cleanup_fn": { - "args": [ - { - "name": "self", - "cType": "git_filter *" - }, - { - "name": "payload", - "cType": "void *" - } - ], - "return": { - "type": "void" - } - }, - "git_filter_init_fn": { - "args": [ - { - "name": "self", - "cType": "git_filter *" - } - ], - "return": { - "type": "int", + }, + { + "name": "attr_values", + "cType": "const char **" + } + ], + "return": { + "type": "int", + "noResults": -30, + "success": 0, + "error": -1 + } + }, + "git_filter_cleanup_fn": { + "args": [ + { + "name": "self", + "cType": "git_filter *" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "void" + } + }, + "git_filter_init_fn": { + "args": [ + { + "name": "self", + "cType": "git_filter *" + } + ], + "return": { + "type": "int", "noResults": 0, - "success": 0, - "error": -1 - } - }, - "git_filter_shutdown_fn": { - "args": [ - { - "name": "self", - "cType": "git_filter *" - } - ], - "return": { - "type": "void" - } + "success": 0, + "error": -1 + } + }, + "git_filter_shutdown_fn": { + "args": [ + { + "name": "self", + "cType": "git_filter *" + } + ], + "return": { + "type": "void" + } }, "git_index_matched_path_cb": { "args": [ diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index cc073582b..07b2b770e 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -777,6 +777,14 @@ { "type": "git_merge_options", "name": "merge_options" + }, + { + "type": "git_commit_signing_cb", + "name": "signing_cb" + }, + { + "type": "void *", + "name": "payload" } ], "used": { diff --git a/lib/buf.js b/lib/buf.js new file mode 100644 index 000000000..28f34c2a3 --- /dev/null +++ b/lib/buf.js @@ -0,0 +1,11 @@ +const { Buf } = require("../"); + +/** + * Sets the content of a GitBuf to a string. + * @param {string} The utf8 value to set in the buffer. + * The string will be null terminated. + */ +Buf.prototype.setString = function(content) { + const buf = Buffer.from(content + "\0", "utf8"); + this.set(buf, buf.length); +}; diff --git a/lib/rebase.js b/lib/rebase.js index 28882ea6c..0d9521760 100644 --- a/lib/rebase.js +++ b/lib/rebase.js @@ -7,21 +7,6 @@ var _init = Rebase.init; var _open = Rebase.open; var _abort = Rebase.prototype.abort; var _commit = Rebase.prototype.commit; -/** - * Initializes a rebase - * @async - * @param {Repository} repo The repository to perform the rebase - * @param {AnnotatedCommit} branch The terminal commit to rebase, or NULL to - * rebase the current branch - * @param {AnnotatedCommit} upstream The commit to begin rebasing from, or NULL - * to rebase all reachable commits - * @param {AnnotatedCommit} onto The branch to rebase onto, or NULL to rebase - * onto the given upstream - * @param {RebaseOptions} options Options to specify how rebase is performed, - * or NULL - * @param {Function} callback - * @return {Remote} - */ function defaultRebaseOptions(options, checkoutStrategy) { var checkoutOptions; @@ -61,12 +46,38 @@ function defaultRebaseOptions(options, checkoutStrategy) { return options; } +// Save options on the rebase object. If we don't do this, +// the options may be cleaned up and cause a segfault +// when Rebase.prototype.commit is called. +const lockOptionsOnRebase = (options) => (rebase) => { + Object.defineProperty(rebase, "options", { + value: options, + writable: false + }); + return rebase; +}; + +/** + * Initializes a rebase + * @async + * @param {Repository} repo The repository to perform the rebase + * @param {AnnotatedCommit} branch The terminal commit to rebase, or NULL to + * rebase the current branch + * @param {AnnotatedCommit} upstream The commit to begin rebasing from, or NULL + * to rebase all reachable commits + * @param {AnnotatedCommit} onto The branch to rebase onto, or NULL to rebase + * onto the given upstream + * @param {RebaseOptions} options Options to specify how rebase is performed, + * or NULL + * @return {Remote} + */ Rebase.init = function(repository, branch, upstream, onto, options) { options = defaultRebaseOptions( options, NodeGit.Checkout.STRATEGY.FORCE ); - return _init(repository, branch, upstream, onto, options); + return _init(repository, branch, upstream, onto, options) + .then(lockOptionsOnRebase(options)); }; /** @@ -75,7 +86,6 @@ Rebase.init = function(repository, branch, upstream, onto, options) { * @async * @param {Repository} repo The repository that has a rebase in-progress * @param {RebaseOptions} options Options to specify how rebase is performed - * @param {Function} callback * @return {Remote} */ Rebase.open = function(repository, options) { @@ -83,7 +93,8 @@ Rebase.open = function(repository, options) { options, NodeGit.Checkout.STRATEGY.SAFE ); - return _open(repository, options); + return _open(repository, options) + .then(lockOptionsOnRebase(options)); }; Rebase.prototype.commit = function(author, committer, encoding, message) { @@ -93,4 +104,3 @@ Rebase.prototype.commit = function(author, committer, encoding, message) { Rebase.prototype.abort = function() { return _abort.call(this); }; - diff --git a/test/tests/rebase.js b/test/tests/rebase.js index ae9aab1d1..f852a8651 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -3,6 +3,8 @@ var path = require("path"); var local = path.join.bind(path, __dirname); var fse = require("fs-extra"); +var garbageCollect = require("../utils/garbage_collect.js"); + describe("Rebase", function() { var NodeGit = require("../../"); var Checkout = NodeGit.Checkout; @@ -1534,4 +1536,193 @@ describe("Rebase", function() { "b3c355bb606ec7da87174dfa1a0b0c0e3dc97bc0"); }); }); + + it("can sign commits during the rebase", function() { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; + + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; + + var ourSignature = NodeGit.Signature.create + ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create + ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; + + return fse.writeFile(path.join(repository.workdir(), baseFileName), + baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function() { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + + return repository.createCommit("HEAD", ourSignature, + ourSignature, "initial commit", oid, []); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository.getCommit(commitOid).then(function(commit) { + ourCommit = commit; + }).then(function() { + return repository.createBranch(ourBranchName, commitOid) + .then(function(branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function(branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), + theirFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit(theirBranch.name(), theirSignature, + theirSignature, "they made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return removeFileFromIndex(repository, theirFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function() { + return fse.writeFile(path.join(repository.workdir(), ourFileName), + ourFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + + return repository.createCommit(ourBranch.name(), ourSignature, + ourSignature, "we made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + + return removeFileFromIndex(repository, ourFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function() { + return repository.checkoutBranch(ourBranchName); + }) + .then(function() { + return Promise.all([ + repository.getReference(ourBranchName), + repository.getReference(theirBranchName) + ]); + }) + .then(function(refs) { + assert.equal(refs.length, 2); + + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + ]); + }) + .then(function(annotatedCommits) { + assert.equal(annotatedCommits.length, 2); + + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; + + assert.equal(ourAnnotatedCommit.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, + theirAnnotatedCommit, null, { + signingCb: (signatureBuf, signatureFieldBuf, commitContent) => { + signatureBuf.setString("A moose was here."); + signatureFieldBuf.setString("moose-sig"); + return 0; + } + }); + }) + .then(function(newRebase) { + rebase = newRebase; + + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); + + return rebase.next(); + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), + NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); + + return rebase.commit(null, ourSignature); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed"); + + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); + + return rebase.finish(ourSignature, {}); + }) + .then(function(result) { + assert.equal(result, 0); + + return repository.getBranchCommit(ourBranchName); + }) + .then(function(commit) { + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), + "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed"); + + return Promise.all([ + commit.parent(0), + NodeGit.Commit.extractSignature( + repository, + "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed", + "moose-sig" + ) + ]); + }) + .then(function([parent, { signature }]) { + // verify that we are on top of "their commit" + assert.equal(parent.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + assert.equal(signature, "A moose was here."); + }); + }); }); From 2d2a29d60983fe6bcac2164044364bc80e8f57eb Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Mon, 28 Jan 2019 11:22:24 -0700 Subject: [PATCH 019/145] Add async method to Commit for amending with signature --- lib/commit.js | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/lib/commit.js b/lib/commit.js index 232d771b0..cf0918c0c 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -1,4 +1,5 @@ var events = require("events"); +var fp = require("lodash/fp"); var NodeGit = require("../"); var Commit = NodeGit.Commit; var LookupWrapper = NodeGit.Utils.lookupWrapper; @@ -50,6 +51,135 @@ Commit.prototype.amend = function ( }); }; +/** + * Amend a commit with the given signature + * @async + * @param {String} update_ref + * @param {Signature} author + * @param {Signature} committer + * @param {String} message_encoding + * @param {String} message + * @param {Tree|Oid} tree + * @param {String} signature_field + * @param {Function} onSignature + * @return {Oid} +*/ +Commit.prototype.amendWithSignature = function( + updateRef, + author, + committer, + message_encoding, + message, + tree, + signature_field, + onSignature +) { + var repo = this.repo; + var parentOids = this.parents(); + var _this = this; + var promises = []; + + if (tree instanceof NodeGit.Oid) { + promises.push(repo.getTree(tree)); + } else { + promises.push(Promise.resolve(tree)); + } + + parentOids.forEach(function (parentOid) { + promises.push(repo.getCommit(parentOid)); + }); + + var treeObject; + var parents; + var commitContent; + var commitOid; + var commit; + + var createCommitPromise = Promise.all(promises) + .then(function(results) { + treeObject = results[0]; + + parents = []; + for (var i = 0; i < parentOids.length; i++) { + parents.push(results[i+1]); + } + + return _this.getTree(); + }) + .then(function(commitTreeResult) { + var commitTree = commitTreeResult; + + var truthyArgs = fp.omitBy( + fp.isNil, + { + author, + committer, + message_encoding, + message, + tree: treeObject + } + ); + + var commitFields = { + author: _this.author(), + committer: _this.committer(), + message_encoding: _this.messageEncoding(), + message: _this.message(), + tree: commitTree + }; + + var { + author: resolvedAuthor, + committer: resolvedCommitter, + message_encoding: resolvedMessageEncoding, + message: resolvedMessage, + tree: resolvedTree + } = fp.assign( + truthyArgs, + commitFields + ); + + return Commit.createBuffer( + repo, + resolvedAuthor, + resolvedCommitter, + resolvedMessageEncoding, + resolvedMessage, + resolvedTree, + parents.length, + parents + ); + }) + .then(function(commitContentResult) { + commitContent = commitContentResult + "\n"; + return onSignature(commitContent); + }) + .then(function(signature) { + return Commit.createWithSignature( + repo, + commitContent, + signature, + signature_field + ); + }); + + if (!updateRef) { + return createCommitPromise; + } + + return createCommitPromise.then(function(commitOidResult) { + commitOid = commitOidResult; + return repo.getCommit(commitOid); + }).then(function(commitResult) { + commit = commitResult; + return repo.getReference(updateRef); + }).then(function(ref) { + return ref.setTarget(commitOid, `commit (amend): ${commit.summary()}`); + }).then(function() { + return commitOid; + }); +}; + /** * Retrieve the commit time as a Date object. * @return {Date} From 61a20de5d8ff4b1ac459ae873bef774bc52bd701 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Mon, 28 Jan 2019 11:23:48 -0700 Subject: [PATCH 020/145] Added test for Commit#amendWithSignature --- test/tests/commit.js | 69 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/test/tests/commit.js b/test/tests/commit.js index 395b0eebe..b340eb748 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -450,6 +450,73 @@ describe("Commit", function() { }); }); + + it("can amend commit with signature", function() { + const signature = "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + + "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + + "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + + "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + + "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + + "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + + "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + + "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + + "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + + "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + + "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + + "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + + "ekgUBx+BX6nJOw==\n" + + "=4Hy5\n" + + "-----END PGP SIGNATURE-----"; + + function onSignature(dataToSign) { + return new Promise(function (resolve) { + return resolve(signature); + }); + } + + var repo; + var oid; + var commit; + var message; + var parents; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return repo.getHeadCommit(); + }) + .then(function(headCommit) { + message = headCommit.message().trim(); + parents = headCommit.parents(); + + return headCommit.amendWithSignature( + null, + null, + null, + null, + null, + null, + "gpgsig", + onSignature + ); + }) + .then(function(oidResult) { + oid = oidResult; + return NodeGit.Commit.lookup(repo, oid); + }) + .then(function(commitResult) { + commit = commitResult; + return commit.getSignature("gpgsig"); + }) + .then(function(signatureInfo) { + assert.equal(signatureInfo.signature, signature); + assert.equal(commit.message().trim(), message); + assert.deepEqual(commit.parents(), parents); + }); + }); + it("has an owner", function() { var owner = this.commit.owner(); assert.ok(owner instanceof Repository); @@ -887,7 +954,7 @@ describe("Commit", function() { assert.equal(signature, signatureInfo.signature); return reinitialize(test); }, function(reason) { - return reinitialize(test) + return reinitialize(test); .then(function() { return Promise.reject(reason); }); From 5963f09014a799dde19832054af82c7f3b18266a Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Mon, 28 Jan 2019 14:29:40 -0700 Subject: [PATCH 021/145] Fix linter + PR feedback --- lib/commit.js | 27 +++++++++++---------------- test/tests/commit.js | 2 +- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/lib/commit.js b/lib/commit.js index cf0918c0c..734cfc781 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -54,13 +54,13 @@ Commit.prototype.amend = function ( /** * Amend a commit with the given signature * @async - * @param {String} update_ref + * @param {String} updateRef * @param {Signature} author * @param {Signature} committer - * @param {String} message_encoding + * @param {String} messageEncoding * @param {String} message * @param {Tree|Oid} tree - * @param {String} signature_field + * @param {String} signatureField * @param {Function} onSignature * @return {Oid} */ @@ -68,10 +68,10 @@ Commit.prototype.amendWithSignature = function( updateRef, author, committer, - message_encoding, + messageEncoding, message, tree, - signature_field, + signatureField, onSignature ) { var repo = this.repo; @@ -97,13 +97,8 @@ Commit.prototype.amendWithSignature = function( var createCommitPromise = Promise.all(promises) .then(function(results) { - treeObject = results[0]; - - parents = []; - for (var i = 0; i < parentOids.length; i++) { - parents.push(results[i+1]); - } - + treeObject = fp.head(results); + parents = fp.tail(results); return _this.getTree(); }) .then(function(commitTreeResult) { @@ -114,7 +109,7 @@ Commit.prototype.amendWithSignature = function( { author, committer, - message_encoding, + messageEncoding, message, tree: treeObject } @@ -123,7 +118,7 @@ Commit.prototype.amendWithSignature = function( var commitFields = { author: _this.author(), committer: _this.committer(), - message_encoding: _this.messageEncoding(), + messageEncoding: _this.messageEncoding(), message: _this.message(), tree: commitTree }; @@ -131,7 +126,7 @@ Commit.prototype.amendWithSignature = function( var { author: resolvedAuthor, committer: resolvedCommitter, - message_encoding: resolvedMessageEncoding, + messageEncoding: resolvedMessageEncoding, message: resolvedMessage, tree: resolvedTree } = fp.assign( @@ -159,7 +154,7 @@ Commit.prototype.amendWithSignature = function( repo, commitContent, signature, - signature_field + signatureField ); }); diff --git a/test/tests/commit.js b/test/tests/commit.js index b340eb748..9bb0e4b2d 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -954,7 +954,7 @@ describe("Commit", function() { assert.equal(signature, signatureInfo.signature); return reinitialize(test); }, function(reason) { - return reinitialize(test); + return reinitialize(test) .then(function() { return Promise.reject(reason); }); From f41c963b14edd40271d775116e9f7897ad41fb10 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 29 Jan 2019 08:16:15 -0700 Subject: [PATCH 022/145] Fix several test pollution issues in stash test suite. --- test/tests/stash.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/tests/stash.js b/test/tests/stash.js index 5a65a9a16..6d1a20c04 100644 --- a/test/tests/stash.js +++ b/test/tests/stash.js @@ -57,7 +57,10 @@ describe("Stash", function() { .then(function() { assert.equal(stashes.length, 1); assert.equal(stashes[0].index, 0); - assert.equal(stashes[0].message, "On master: " + stashMessage); + const expectedMessage = !stashMessage ? + "WIP on master: 32789a7 Fixes EJS not being installed via NPM" : + "On master: " + stashMessage; + assert.equal(stashes[0].message, expectedMessage); assert.equal(stashes[0].oid.toString(), stashOid.toString()); return Stash.drop(repo, 0); @@ -82,11 +85,11 @@ describe("Stash", function() { } it("can save and drop a stash", function() { - saveDropStash(this.repository, "stash test"); + return saveDropStash(this.repository, "stash test"); }); it("can save a stash with no message and drop it", function() { - saveDropStash(this.repository, null); + return saveDropStash(this.repository, null); }); it("can save and pop a stash", function() { @@ -198,8 +201,8 @@ describe("Stash", function() { return Stash.drop(repo, 0); }) .catch(function(reason) { - if (reason.message !== "Reference 'refs/stash' not found") { - Promise.reject(); + if (reason.message !== "reference 'refs/stash' not found") { + throw reason; } }); }); From ef83aa300d73e1bfb8b62449fbfdbe76ee7bbe7d Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 29 Jan 2019 10:16:54 -0700 Subject: [PATCH 023/145] Add some comments for clarification on ownership --- generate/templates/partials/convert_to_v8.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generate/templates/partials/convert_to_v8.cc b/generate/templates/partials/convert_to_v8.cc index 85b220db9..95e38a377 100644 --- a/generate/templates/partials/convert_to_v8.cc +++ b/generate/templates/partials/convert_to_v8.cc @@ -82,6 +82,7 @@ {% if ownedBy %} {% if isAsync %} {% each ownedBy as owner %} + {%-- If the owner of this object is "this" in an async method, it will be stored in the persistent handle by name. --%} Nan::Set(owners, Nan::New(owners->Length()), this->GetFromPersistent("{{= owner =}}")->ToObject()); {% endeach %} {% else %} @@ -92,6 +93,7 @@ {% endif %} {%if isAsync %} {% elsif ownedByThis %} + {%-- If the owner of this object is "this", it will be retrievable from the info object in a sync method. --%} Nan::Set(owners, owners->Length(), info.This()); {% endif %} {% if ownerFn | toBool %} @@ -137,6 +139,7 @@ {% if ownedBy %} {% if isAsync %} {% each ownedBy as owner %} + {%-- If the owner of this object is "this" in an async method, it will be stored in the persistent handle by name. --%} Nan::Set(owners, Nan::New(owners->Length()), this->GetFromPersistent("{{= owner =}}")->ToObject()); {% endeach %} {% else %} @@ -147,6 +150,7 @@ {% endif %} {%if isAsync %} {% elsif ownedByThis %} + {%-- If the owner of this object is "this", it will be retrievable from the info object in a sync method. --%} Nan::Set(owners, owners->Length(), info.This()); {% endif %} {% if ownerFn | toBool %} From 05fd1455c455f2e70fe00adb9d90ba484964d226 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 29 Jan 2019 10:56:41 -0700 Subject: [PATCH 024/145] Combine array/single convertToV8 blocks --- generate/scripts/generateNativeCode.js | 1 + .../templates/filters/as_element_pointer.js | 7 ++ generate/templates/partials/convert_to_v8.cc | 84 +++---------------- 3 files changed, 20 insertions(+), 72 deletions(-) create mode 100644 generate/templates/filters/as_element_pointer.js diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 3ba5f6b02..47a832419 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -51,6 +51,7 @@ module.exports = function generateNativeCode() { and: require("../templates/filters/and"), argsInfo: require("../templates/filters/args_info"), arrayTypeToPlainType: require("../templates/filters/array_type_to_plain_type"), + asElementPointer: require("../templates/filters/as_element_pointer"), cppToV8: require("../templates/filters/cpp_to_v8"), defaultValue: require("../templates/filters/default_value"), fieldsInfo: require("../templates/filters/fields_info"), diff --git a/generate/templates/filters/as_element_pointer.js b/generate/templates/filters/as_element_pointer.js new file mode 100644 index 000000000..8b34eed17 --- /dev/null +++ b/generate/templates/filters/as_element_pointer.js @@ -0,0 +1,7 @@ +const isArrayType = require("./is_array_type"); + +module.exports = function(cType, parsedName) { + return isArrayType(cType) ? + "&" + parsedName + "[i]" : + parsedName; +}; diff --git a/generate/templates/partials/convert_to_v8.cc b/generate/templates/partials/convert_to_v8.cc index 95e38a377..f3adc3c9b 100644 --- a/generate/templates/partials/convert_to_v8.cc +++ b/generate/templates/partials/convert_to_v8.cc @@ -64,76 +64,12 @@ to = Nan::Null(); } {% endif %} -{% elsif cType|isArrayType %} - v8::Local tmpArray = Nan::New({{ cType|toSizeOfArray }}); - for (unsigned int i = 0; i < {{ cType|toSizeOfArray }}; i++) { - v8::Local element; - {{ cType|arrayTypeToPlainType }} *rawElement = &{{= parsedName =}}[i]; - - {% if copy %} - if (rawElement != NULL) { - rawElement = {{ copy }}(rawElement); - } - {% endif %} - - if (rawElement != NULL) { - {% if hasOwner %} - v8::Local owners = Nan::New(0); - {% if ownedBy %} - {% if isAsync %} - {% each ownedBy as owner %} - {%-- If the owner of this object is "this" in an async method, it will be stored in the persistent handle by name. --%} - Nan::Set(owners, Nan::New(owners->Length()), this->GetFromPersistent("{{= owner =}}")->ToObject()); - {% endeach %} - {% else %} - {% each ownedByIndices as ownedByIndex %} - Nan::Set(owners, Nan::New(owners->Length()), info[{{= ownedByIndex =}}]->ToObject()); - {% endeach %} - {% endif %} - {% endif %} - {%if isAsync %} - {% elsif ownedByThis %} - {%-- If the owner of this object is "this", it will be retrievable from the info object in a sync method. --%} - Nan::Set(owners, owners->Length(), info.This()); - {% endif %} - {% if ownerFn | toBool %} - Nan::Set( - owners, - Nan::New(owners->Length()), - {{= ownerFn.singletonCppClassName =}}::New( - {{= ownerFn.name =}}(rawElement), - true - )->ToObject() - ); - {% endif %} - {% endif %} - {% if cppClassName == 'Wrapper' %} - element = {{ cppClassName }}::New(rawElement); - {% else %} - element = {{ cppClassName }}::New( - rawElement, - {{ selfFreeing|toBool }} - {% if hasOwner %} - , owners - {% endif %} - ); - {% endif %} - } - else { - element = Nan::Null(); - } - - Nan::Set(tmpArray, Nan::New(i), element); - } - to = tmpArray; {% else %} - {% if copy %} - if ({{= parsedName =}} != NULL) { - {{= parsedName =}} = ({{ cType|replace '**' '*' }} {% if not cType|isPointer %}*{% endif %}){{ copy }}({{= parsedName =}}); - } + {% if cType|isArrayType %} + v8::Local tmpArray = Nan::New({{ cType|toSizeOfArray }}); + for (unsigned int i = 0; i < {{ cType|toSizeOfArray }}; i++) { {% endif %} - - if ({{= parsedName =}} != NULL) { + if ({{ cType|asElementPointer parsedName }} != NULL) { {% if hasOwner %} v8::Local owners = Nan::New(0); {% if ownedBy %} @@ -158,17 +94,17 @@ owners, Nan::New(owners->Length()), {{= ownerFn.singletonCppClassName =}}::New( - {{= ownerFn.name =}}({{= parsedName =}}), + {{= ownerFn.name =}}({{ cType|asElementPointer parsedName }}), true )->ToObject() ); {% endif %} {% endif %} {% if cppClassName == 'Wrapper' %} - to = {{ cppClassName }}::New({{= parsedName =}}); + to = {{ cppClassName }}::New({{ cType|asElementPointer parsedName }}); {% else %} to = {{ cppClassName }}::New( - {{= parsedName =}}, + {{ cType|asElementPointer parsedName }}, {{ selfFreeing|toBool }} {% if hasOwner %} , owners @@ -179,6 +115,10 @@ else { to = Nan::Null(); } - + {% if cType|isArrayType %} + Nan::Set(tmpArray, Nan::New(i), to); + } + to = tmpArray; + {% endif %} {% endif %} // end convert_to_v8 block From 6fd42e2244d34e9e9c7320252365750a17f4a2f4 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Tue, 29 Jan 2019 14:26:16 -0700 Subject: [PATCH 025/145] Fix order of `fp.assign` args --- lib/commit.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commit.js b/lib/commit.js index 734cfc781..fe8802299 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -130,8 +130,8 @@ Commit.prototype.amendWithSignature = function( message: resolvedMessage, tree: resolvedTree } = fp.assign( - truthyArgs, - commitFields + commitFields, + truthyArgs ); return Commit.createBuffer( From 94313ea4447217e4c0283cd731f1e8b5ef2f8ec3 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Tue, 29 Jan 2019 14:43:02 -0700 Subject: [PATCH 026/145] Do not append an additional newline to `amend` commit buffers --- lib/commit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commit.js b/lib/commit.js index fe8802299..fe32b5e31 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -146,7 +146,7 @@ Commit.prototype.amendWithSignature = function( ); }) .then(function(commitContentResult) { - commitContent = commitContentResult + "\n"; + commitContent = commitContentResult; return onSignature(commitContent); }) .then(function(signature) { From b0c33bf51b88d00697b101d1f3677f5f72cf8881 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Tue, 29 Jan 2019 14:45:35 -0700 Subject: [PATCH 027/145] Update tests --- test/tests/commit.js | 92 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 2 deletions(-) diff --git a/test/tests/commit.js b/test/tests/commit.js index 9bb0e4b2d..522017bc7 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -488,7 +488,7 @@ describe("Commit", function() { return repo.getHeadCommit(); }) .then(function(headCommit) { - message = headCommit.message().trim(); + message = headCommit.message(); parents = headCommit.parents(); return headCommit.amendWithSignature( @@ -512,11 +512,99 @@ describe("Commit", function() { }) .then(function(signatureInfo) { assert.equal(signatureInfo.signature, signature); - assert.equal(commit.message().trim(), message); + assert.equal(commit.message(), message); assert.deepEqual(commit.parents(), parents); }); }); + it("amending with signature respects overridden arguments", function() { + const signature = "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + + "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + + "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + + "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + + "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + + "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + + "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + + "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + + "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + + "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + + "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + + "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + + "ekgUBx+BX6nJOw==\n" + + "=4Hy5\n" + + "-----END PGP SIGNATURE-----"; + + function onSignature(dataToSign) { + return new Promise(function (resolve) { + return resolve(signature); + }); + } + + var repo; + var oid; + var commit; + var message; + var parents; + var commitTree; + + var author = NodeGit.Signature.create( + "Scooby Doo", + "scoob@mystery.com", + 123456789, + 60 + ); + var committer = NodeGit.Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + var tree = Oid.fromString("f4661419a6fbbe865f78644fec722c023ce4b65f"); + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return repo.getHeadCommit(); + }) + .then(function(headCommit) { + message = headCommit.message(); + parents = headCommit.parents(); + + return headCommit.amendWithSignature( + null, + author, + committer, + null, + null, + tree, + "gpgsig", + onSignature + ); + }) + .then(function(oidResult) { + oid = oidResult; + return NodeGit.Commit.lookup(repo, oid); + }) + .then(function(commitResult) { + commit = commitResult; + return commit.getTree(); + }) + .then(function(commitTreeResult) { + commitTree = commitTreeResult; + return commit.getSignature("gpgsig"); + }) + .then(function(signatureInfo) { + assert.equal(signatureInfo.signature, signature); + assert.equal(commit.message(), message); + assert.deepEqual(commit.parents(), parents); + assert.deepEqual(commitTree.id(), tree); + assert.deepEqual(commit.author(), author); + assert.deepEqual(commit.committer(), committer); + }); + }); + it("has an owner", function() { var owner = this.commit.owner(); assert.ok(owner instanceof Repository); From b6498b0a2f69d2ac9ed78d48b521f4c0c2b1b637 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 09:39:25 -0700 Subject: [PATCH 028/145] Pad commit buffer with newline only if it does not already end with newline --- lib/commit.js | 3 +++ lib/repository.js | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/commit.js b/lib/commit.js index fe32b5e31..02b3679d5 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -147,6 +147,9 @@ Commit.prototype.amendWithSignature = function( }) .then(function(commitContentResult) { commitContent = commitContentResult; + if (!commitContent.endsWith("\n")) { + commitContent += "\n"; + } return onSignature(commitContent); }) .then(function(signature) { diff --git a/lib/repository.js b/lib/repository.js index 1962d894d..d036486d4 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -698,7 +698,10 @@ Repository.prototype.createCommitWithSignature = function( parents ); }).then(function(commit_contentResult) { - commit_content = commit_contentResult + "\n"; + commit_content = commit_contentResult; + if (!commit_content.endsWith("\n")) { + commit_content += "\n"; + } return onSignature(commit_content); }).then(function(signature) { return Commit.createWithSignature( From 47107ae69aac8e9519c3d894fb3acd81f731b33c Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 16:01:45 -0700 Subject: [PATCH 029/145] Expose `Tag.createFromBuffer` function --- generate/input/descriptor.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index ae8e0b1c4..d23255fde 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -3597,7 +3597,16 @@ "isAsync": true }, "git_tag_create_frombuffer": { - "ignore": true + "jsFunctionName": "createFromBuffer", + "args": { + "oid": { + "isReturn": true + } + }, + "return": { + "isErrorCode": true + }, + "isAsync": true }, "git_tag_create_lightweight": { "args": { From cd0bc3b3a7dc65424c90151b57a60e629efdc662 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 16:05:04 -0700 Subject: [PATCH 030/145] Expose `sign` field on Time --- generate/input/descriptor.json | 5 ----- generate/templates/partials/convert_to_v8.cc | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index d23255fde..de5eebf74 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -3707,11 +3707,6 @@ "dependencies": [ "git2/sys/time.h" ], - "fields": { - "sign": { - "ignore": true - } - }, "functions": { "git_time_sign": { "ignore": true diff --git a/generate/templates/partials/convert_to_v8.cc b/generate/templates/partials/convert_to_v8.cc index f3adc3c9b..1227932a6 100644 --- a/generate/templates/partials/convert_to_v8.cc +++ b/generate/templates/partials/convert_to_v8.cc @@ -5,6 +5,9 @@ to = Nan::New({{= parsedName =}}, {{ size }}).ToLocalChecked(); {% elsif cType == 'char **' %} to = Nan::New(*{{= parsedName =}}).ToLocalChecked(); + {% elsif cType == 'char' %} + char convertToNullTerminated[2] = { {{= parsedName =}}, '\0' }; + to = Nan::New(convertToNullTerminated).ToLocalChecked(); {% else %} to = Nan::New({{= parsedName =}}).ToLocalChecked(); {% endif %} From ef3d9c7e9a6f279c3dbf050efcd22b4c78cccee9 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 16:06:18 -0700 Subject: [PATCH 031/145] Extend `Signature.toString` to optionally include timestamps --- lib/signature.js | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/lib/signature.js b/lib/signature.js index 7fc8e274d..4dfe84a36 100644 --- a/lib/signature.js +++ b/lib/signature.js @@ -1,11 +1,38 @@ var NodeGit = require("../"); var Signature = NodeGit.Signature; +const toPaddedDoubleDigitString = (number) => { + if (number < 10) { + return `0${number}`; + } + + return `${number}`; +}; + /** * Standard string representation of an author. - * - * @return {string} Representation of the author. + * @param {Boolean} withTime Whether or not to include timestamp + * @return {String} Representation of the author. */ -Signature.prototype.toString = function() { - return this.name().toString() + " <" + this.email().toString() + ">"; +Signature.prototype.toString = function(withTime) { + const name = this.name().toString(); + const email = this.email().toString(); + + let stringifiedSignature = `${name} <${email}>`; + + if (!withTime) { + return stringifiedSignature; + } + + const when = this.when(); + const offset = when.offset(); + const offsetMagnitude = Math.abs(offset); + const time = when.time(); + + const sign = (offset < 0 || when.sign() === "-") ? "-" : "+"; + const hours = toPaddedDoubleDigitString(Math.floor(offsetMagnitude / 60)); + const minutes = toPaddedDoubleDigitString(offsetMagnitude % 60); + + stringifiedSignature += ` ${time} ${sign}${hours}${minutes}`; + return stringifiedSignature; }; From d9cdc8a25ba83145283c888862575ae195a52f6c Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 16:07:40 -0700 Subject: [PATCH 032/145] Add a `Tag.createBuffer` function --- lib/tag.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/tag.js b/lib/tag.js index bf8ddff49..67027c005 100644 --- a/lib/tag.js +++ b/lib/tag.js @@ -10,3 +10,31 @@ var Tag = NodeGit.Tag; * @return {Tag} */ Tag.lookup = LookupWrapper(Tag); + +/** + * @async + * @param {Repository} repo + * @param {String} tagName + * @param {Oid} target + * @param {Signature} tagger + * @return {String} + */ +Tag.createBuffer = function(repo, tagName, target, tagger, message) { + return NodeGit.Object.lookup(repo, target, NodeGit.Object.TYPE.ANY) + .then((object) => { + if (!NodeGit.Object.typeisloose(object.type())) { + throw new Error("Object must be a loose type"); + } + + const id = object.id().toString(); + const objectType = NodeGit.Object.type2String(object.type()); + const lines = [ + `object ${id}`, + `type ${objectType}`, + `tag ${tagName}`, + `tagger ${tagger.toString(true)}\n`, + `${message}${message.endsWith("\n") ? "" : "\n"}` + ]; + return lines.join("\n"); + }); +}; From c28d9f19ba506a099c606a0f0d27eb9567168f53 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 16:08:04 -0700 Subject: [PATCH 033/145] Add `Tag.createWithSignature` and `Tag.extractSignature` --- lib/tag.js | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 81 insertions(+), 6 deletions(-) diff --git a/lib/tag.js b/lib/tag.js index 67027c005..b94872160 100644 --- a/lib/tag.js +++ b/lib/tag.js @@ -2,13 +2,23 @@ var NodeGit = require("../"); var LookupWrapper = NodeGit.Utils.lookupWrapper; var Tag = NodeGit.Tag; +const signatureRegexesBySignatureType = { + gpgsig: [ + /-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/gm, + /-----BEGIN PGP MESSAGE-----[\s\S]+?-----END PGP MESSAGE-----/gm, + ], + x509: [ + /-----BEGIN SIGNED MESSAGE-----[\s\S]+?-----END SIGNED MESSAGE-----/gm, + ] +}; + /** -* Retrieves the tag pointed to by the oid -* @async -* @param {Repository} repo The repo that the tag lives in -* @param {String|Oid|Tag} id The tag to lookup -* @return {Tag} -*/ + * Retrieves the tag pointed to by the oid + * @async + * @param {Repository} repo The repo that the tag lives in + * @param {String|Oid|Tag} id The tag to lookup + * @return {Tag} + */ Tag.lookup = LookupWrapper(Tag); /** @@ -38,3 +48,68 @@ Tag.createBuffer = function(repo, tagName, target, tagger, message) { return lines.join("\n"); }); }; + +/** + * @async + * @param {Repository} repo + * @param {String} tagName + * @param {Oid} target + * @param {Signature} tagger + * @param {String} message + * @param {Number} force + * @param {Function} signingCallback Takes a string and returns a string + * representing the signed message + * @return {Oid} + */ +Tag.createWithSignature = function( + repo, + tagName, + target, + tagger, + message, + force, + signingCallback +) { + let tagBuffer; + return Tag.createBuffer(repo, tagName, target, tagger, message) + .then((tagBufferResult) => { + tagBuffer = tagBufferResult; + return signingCallback(tagBuffer); + }) + .then((tagSignature) => { + const normalizedEnding = tagSignature.endsWith("\n") ? "" : "\n"; + const signedTagString = tagBuffer + tagSignature + normalizedEnding; + return Tag.createFromBuffer(repo, signedTagString, force); + }); +}; + +/** + * Retrieves the signature of an annotated tag + * @async + * @param {String} signatureType + * @return {String|null} + */ +Tag.prototype.extractSignature = function(signatureType = "gpgsig") { + const id = this.id(); + const repo = this.repo; + const signatureRegexes = signatureRegexesBySignatureType[signatureType]; + if (!signatureRegexes) { + throw new Error("Unsupported signature type"); + } + + return repo.odb().then((odb) => { + return odb.read(id); + }).then((odbObject) => { + const odbData = odbObject.toString(); + + for (const regex of signatureRegexes) { + const matchResult = regex.exec(odbData); + + if (matchResult !== null) { + return matchResult[0]; + } + } + + return null; + }); +}; From cb6338e24f231533bf722cc111b79768a905d157 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 30 Jan 2019 18:21:11 -0700 Subject: [PATCH 034/145] Add tests --- test/tests/signature.js | 25 +++++ test/tests/tag.js | 223 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 248 insertions(+) diff --git a/test/tests/signature.js b/test/tests/signature.js index bf5f99ef7..9a6b2119b 100644 --- a/test/tests/signature.js +++ b/test/tests/signature.js @@ -104,4 +104,29 @@ describe("Signature", function() { // the self-freeing time should get freed assert.equal(startSelfFreeingCount, endSelfFreeingCount); }); + + it("toString does not provide a timestamp by default", function () { + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + + assert.equal(signature.toString(), "Shaggy Rogers "); + }); + + it("toString provides the correct timestamp when requested", function() { + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + + assert.equal( + signature.toString(true), + "Shaggy Rogers 987654321 +0130" + ); + }); }); diff --git a/test/tests/tag.js b/test/tests/tag.js index 8d2c48f20..c43a618a1 100644 --- a/test/tests/tag.js +++ b/test/tests/tag.js @@ -207,6 +207,229 @@ describe("Tag", function() { }); }); + it("can create a Tag buffer", function() { + const targetOid = Oid.fromString(commitPointedTo); + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + const message = "I'm a teapot"; + + return Tag.createBuffer(repository, name, targetOid, signature, message) + .then((tagBuffer) => { + const lines = tagBuffer.split("\n"); + assert.equal(7, lines.length); + assert.equal(lines[0], `object ${commitPointedTo}`); + assert.equal(lines[1], "type commit"); + assert.equal(lines[2], `tag ${name}`); + assert.equal( + lines[3], + "tagger Shaggy Rogers 987654321 +0130" + ); + assert.equal(lines[4], ""); + assert.equal(lines[5], message); + assert.equal(lines[6], ""); + }); + }); + + it("can create a Tag from a Tag buffer", function() { + const targetOid = Oid.fromString(commitPointedTo); + const otherTargetOid = Oid.fromString(commitPointedTo2); + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + const message = "I'm a teapot"; + + let odb; + let buffer; + let otherBuffer; + + return repository.odb() + .then((odbResult) => { + odb = odbResult; + return Tag.createBuffer( + repository, + name, + targetOid, + signature, + message + ); + }) + .then((bufferResult) => { + buffer = bufferResult; + return Tag.createBuffer( + repository, + name, + otherTargetOid, + signature, + message + ); + }) + .then((bufferResult) => { + otherBuffer = bufferResult; + return Tag.createFromBuffer(repository, buffer, 1); + }) + .then((oid) => { + return odb.read(oid); + }) + .then((object) => { + const lines = object.toString().split("\n"); + assert(object.type(), Obj.TYPE.TAG); + assert.equal(7, lines.length); + assert.equal(lines[0], `object ${commitPointedTo}`); + assert.equal(lines[1], "type commit"); + assert.equal(lines[2], `tag ${name}`); + assert.equal( + lines[3], + "tagger Shaggy Rogers 987654321 +0130" + ); + assert.equal(lines[4], ""); + assert.equal(lines[5], message); + assert.equal(lines[6], ""); + }) + .then(() => { + // overwriting is okay + return Tag.createFromBuffer(repository, otherBuffer, 1); + }) + .then(() => { + // overwriting is not okay + return Tag.createFromBuffer(repository, buffer, 0); + }) + .then(() => { + return Promise.reject( + new Error("should not be able to create the '" + name + "' tag twice") + ); + }, + () => { + return Promise.resolve(); + }); + }); + + it("can create a tag with a signature and extract the signature", function() { + const targetOid = Oid.fromString(commitPointedTo); + const otherTargetOid = Oid.fromString(commitPointedTo2); + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + const signatureLines = [ + "-----BEGIN PGP SIGNATURE-----", + "iQIzBAABCAAdFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxR4JUACgkQURjJKedO", + "fEN+8A//cXmkRmhzQMdTEdrxty7tVKQ7lVhL7r7e+cB84hO7WrDn8549c7/Puflu", + "idanWfyoAEMSNWDgY84lx/t3I3YYKXsLDPT93HiMhCXmPVZcfLxlARRL1rrNZV4q", + "L9hhqb9bFrRNBn6YebhygeLXLHlDKEZzx8W9jnDLU8Px8UTkwdQIDnPDfT7UOPPU", + "MYDgP3OwWwoG8dUlZXaHjtFz29wPlJo177MwdLYwn4zpEIysoY1ev5IKWD+LPW4g", + "vdQnaK1x3dozmG8YLUZw5iW7ap9DpahbAGQgdy1z1ypiNUjNuhaP8zkG1ci6X88N", + "6MIoQ+YqfowRJJTIr1lzssxsRI1syjfS6smnI4ZNE6S+6mIKN96ES2OZF+rn4xnD", + "PofR9Qh2gPq++ULriPE/cX7ZkZ0/ZDZGDfIGvricB8JEJhISZn/VMX/KScJs+rFq", + "KWN5Au6Uc2pEqeq5OP4y2k0QUmKQT9sh9OepnPmfqF8hG6wI8nM67jT/FEOcpr0v", + "qoN2NRXrcq3iZAp07AGq9IdpYhBcEW7MFmOcNt+Zb8SbTMp6DawnREg9xzz1SIkZ", + "Cdp1XoJ6mkVvzBB4T/Esp7j1VztinTX2PpX7C1CE5LC76UfCiEjEWOmWrVuPuA5a", + "oRrJvgPJg8gpVj04r2m8nvUK1gwhxg9ZB+SK+nd3OAd0dnbJwTE=", + "=dW3g", + "-----END PGP SIGNATURE-----" + ]; + const message = "I'm a teapot"; + const signingCallback = (message) => { + return signatureLines.join("\n"); + }; + + let odb; + let oid; + let object; + + return repository.odb() + .then((odbResult) => { + odb = odbResult; + + return Tag.createWithSignature( + repository, + name, + targetOid, + signature, + message, + 1, + signingCallback + ); + }) + .then((oidResult) => { + oid = oidResult; + return odb.read(oid); + }) + .then((objectResult) => { + object = objectResult; + const lines = object.toString().split("\n"); + assert(object.type(), Obj.TYPE.TAG); + assert.equal(signatureLines.length + 7, lines.length); + assert.equal(lines[0], `object ${commitPointedTo}`); + assert.equal(lines[1], "type commit"); + assert.equal(lines[2], `tag ${name}`); + assert.equal( + lines[3], + "tagger Shaggy Rogers 987654321 +0130" + ); + assert.equal(lines[4], ""); + assert.equal(lines[5], message); + for (let i = 6; i < 6 + signatureLines.length; i++) { + assert.equal(lines[i], signatureLines[i - 6]); + } + assert.equal(lines[6 + signatureLines.length], ""); + + return Tag.lookup(repository, oid); + }) + .then((tag) => { + return tag.extractSignature(); + }) + .then((tagSignature) => { + assert.equal(tagSignature, signatureLines.join("\n")); + }) + .then(() => { + // overwriting is okay + return Tag.createWithSignature( + repository, + name, + targetOid, + signature, + message, + 1, + signingCallback + ); + }) + .then(() => { + // overwriting is not okay + return Tag.createWithSignature( + repository, + name, + otherTargetOid, + signature, + message, + 0, + signingCallback + ); + }) + .then(() => { + return Promise.reject( + new Error("should not be able to create the '" + name + "' tag twice") + ); + }, + () => { + return Promise.resolve(); + }); + }); + it("can create a new signed tag with Tag.annotationCreate", function() { var oid = Oid.fromString(commitPointedTo); var name = "created-signed-tag-annotationCreate"; From 0f752759ebd5660675d2f00465d18d202d9826d2 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Wed, 30 Jan 2019 23:29:42 -0700 Subject: [PATCH 035/145] Bump to v0.25.0-alpha.1 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35d8d9e71..cc41c98f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # Change Log +## v0.25.0-alpha.1 [(2019-01-30)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.1) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.24.0...v0.25.0-alpha.1) + +#### Summary of changes +- Bump Libgit2 to preview of v0.28.0 +- Add signing support for commits and annotated tags +- Updated Signature.prototype.toString to optionally include timestamps +- [BREAKING] Converted Buf.prototype.set and Buf.prototype.grow from async to sync +- Added complete support for libgit2 types: + - git_index_name_entry + - git_index_reuc_entry + - git_mailmap +- Exposed git_path_is_gitfile +- Exposed git_tag_create_frombuffer + +#### Merged PRs into NodeGit +- [adds support for gpg commit signing (fixes #1018) #1448](https://github.com/nodegit/nodegit/pull/1448) +- [Add `updateRef` parameter to Repository#createCommitWithSignature #1610](https://github.com/nodegit/nodegit/pull/1610) +- [Documentation fixes. #1611](https://github.com/nodegit/nodegit/pull/1611) +- [Add Commit#amendWithSignature #1616](https://github.com/nodegit/nodegit/pull/1616) +- [Bump libgit2 to a preview of v0.28 #1615](https://github.com/nodegit/nodegit/pull/1615) +- [Fix issues with Commit#amendWithSignature #1617](https://github.com/nodegit/nodegit/pull/1617) +- [Marked Repository.createBlobFromBuffer as async #1614](https://github.com/nodegit/nodegit/pull/1614) +- [Add functionality for creating Tags with signatures and extracting signatures from Tags #1618](https://github.com/nodegit/nodegit/pull/1618) + + ## v0.24.0 [(2019-01-16)](https://github.com/nodegit/nodegit/releases/tag/v0.24.0) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.23.0...v0.24.0) diff --git a/package-lock.json b/package-lock.json index 7f93cb65c..74f11e59e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.24.0", + "version": "0.25.0-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8fc88751b..c2ff8ba0c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.24.0", + "version": "0.25.0-alpha.1", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 8083f33c9e4659d1122cecdab19fa0b3f8625532 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Fri, 1 Feb 2019 12:40:27 -0700 Subject: [PATCH 036/145] Add a `rebaseOptions` parameter to `Repository.prototype.continueRebase` --- lib/repository.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 77ba9d116..91422df97 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -455,13 +455,16 @@ Repository.prototype.checkoutRef = function(reference, opts) { * promise, finish() will be called when the * promise resolves. This callback will be * provided a detailed overview of the rebase + * @param {RebaseOptions} rebaseOptions Options to initialize the rebase object + * with * @return {Oid|Index} A commit id for a succesful merge or an index for a * rebase with conflicts */ Repository.prototype.continueRebase = function( signature, beforeNextFn, - beforeFinishFn + beforeFinishFn, + rebaseOptions ) { var repo = this; @@ -474,7 +477,7 @@ Repository.prototype.continueRebase = function( throw index; } - return NodeGit.Rebase.open(repo); + return NodeGit.Rebase.open(repo, rebaseOptions); }) .then(function(_rebase) { rebase = _rebase; @@ -1505,6 +1508,8 @@ Repository.prototype.isReverting = function() { * promise, finish() will be called when the * promise resolves. This callback will be * provided a detailed overview of the rebase + * @param {RebaseOptions} rebaseOptions Options to initialize the rebase object + * with * @return {Oid|Index} A commit id for a succesful merge or an index for a * rebase with conflicts */ From 74e7c1e89ab21801ca6ee13443ef813c05e04b93 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Fri, 1 Feb 2019 12:44:28 -0700 Subject: [PATCH 037/145] Only swallow EAPPLIED errors in `Repository.prototype.continueRebase` One example of a meaningful exception occurring in `continueRebase` is for the signing callback to throw because of an invalid key passphrase. In such chases, errors should not be swallowed. In #1348, EAPPLIED was mentioned specifically as en error that we would like to swallow. --- lib/repository.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/repository.js b/lib/repository.js index 91422df97..3636c9a6e 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -482,11 +482,17 @@ Repository.prototype.continueRebase = function( .then(function(_rebase) { rebase = _rebase; return rebase.commit(null, signature) - .catch(function() { + .catch(function(e) { // Ignore all errors to prevent // this routine from choking now // that we made rebase.commit // asynchronous + const errorno = fp.get(["errorno"], e); + if (errorno === NodeGit.Error.CODE.EAPPLIED) { + return; + } + + throw e; }); }) .then(function() { From 6640afad4371b3aeadee5d03cda689d5c6e2085c Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Fri, 1 Feb 2019 14:32:12 -0700 Subject: [PATCH 038/145] Bump to v0.25.0-alpha.2 --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc41c98f2..d6817348b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## v0.25.0-alpha.2 [(2019-02-01)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.2) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.1...v0.25.0-alpha.2) + +#### Summary of changes +- Added RebaseOptions to repository.prototype.rebaseContinue + +#### Merged PRs into NodeGit +- [Breaking: Repository.prototype.continueRebase enhancements #1619](https://github.com/nodegit/nodegit/pull/1619) + + ## v0.25.0-alpha.1 [(2019-01-30)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.1) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.24.0...v0.25.0-alpha.1) diff --git a/package-lock.json b/package-lock.json index 74f11e59e..a488d2837 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.1", + "version": "0.25.0-alpha.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c2ff8ba0c..a169540bd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.1", + "version": "0.25.0-alpha.2", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 874e6530532edee61b699d57411bad33b7568b28 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 4 Feb 2019 17:19:55 -0700 Subject: [PATCH 039/145] Use same API for signingCb in all places that can be crypto signed Any place where we implement a callback pattern for signing commits/tags follows the same API: `type SigningCB = (content: string) => { code: number, field?: string, signedData?: string };` --- lib/commit.js | 108 +++++++---- lib/rebase.js | 25 ++- lib/repository.js | 95 +++++---- lib/tag.js | 30 ++- test/tests/commit.js | 447 +++++++++++++++++++++++++++++++++---------- test/tests/rebase.js | 361 +++++++++++++++++++++++++++++++++- test/tests/tag.js | 230 ++++++++++++++++++---- 7 files changed, 1071 insertions(+), 225 deletions(-) diff --git a/lib/commit.js b/lib/commit.js index 02b3679d5..701b944e0 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -60,8 +60,7 @@ Commit.prototype.amend = function ( * @param {String} messageEncoding * @param {String} message * @param {Tree|Oid} tree - * @param {String} signatureField - * @param {Function} onSignature + * @param {Function} onSignature Callback to be called with string to be signed * @return {Oid} */ Commit.prototype.amendWithSignature = function( @@ -71,13 +70,12 @@ Commit.prototype.amendWithSignature = function( messageEncoding, message, tree, - signatureField, onSignature ) { - var repo = this.repo; - var parentOids = this.parents(); - var _this = this; - var promises = []; + let repo = this.repo; + let parentOids = this.parents(); + let _this = this; + let promises = []; if (tree instanceof NodeGit.Oid) { promises.push(repo.getTree(tree)); @@ -89,22 +87,27 @@ Commit.prototype.amendWithSignature = function( promises.push(repo.getCommit(parentOid)); }); - var treeObject; - var parents; - var commitContent; - var commitOid; - var commit; - - var createCommitPromise = Promise.all(promises) + let treeObject; + let parents; + let commitContent; + let commit; + let skippedSigning; + let resolvedAuthor; + let resolvedCommitter; + let resolvedMessageEncoding; + let resolvedMessage; + let resolvedTree; + + let createCommitPromise = Promise.all(promises) .then(function(results) { treeObject = fp.head(results); parents = fp.tail(results); return _this.getTree(); }) .then(function(commitTreeResult) { - var commitTree = commitTreeResult; + let commitTree = commitTreeResult; - var truthyArgs = fp.omitBy( + let truthyArgs = fp.omitBy( fp.isNil, { author, @@ -115,7 +118,7 @@ Commit.prototype.amendWithSignature = function( } ); - var commitFields = { + let commitFields = { author: _this.author(), committer: _this.committer(), messageEncoding: _this.messageEncoding(), @@ -123,7 +126,7 @@ Commit.prototype.amendWithSignature = function( tree: commitTree }; - var { + ({ author: resolvedAuthor, committer: resolvedCommitter, messageEncoding: resolvedMessageEncoding, @@ -132,7 +135,7 @@ Commit.prototype.amendWithSignature = function( } = fp.assign( commitFields, truthyArgs - ); + )); return Commit.createBuffer( repo, @@ -152,30 +155,61 @@ Commit.prototype.amendWithSignature = function( } return onSignature(commitContent); }) - .then(function(signature) { - return Commit.createWithSignature( - repo, - commitContent, - signature, - signatureField - ); + .then(function({ code, field, signedData }) { + switch (code) { + case NodeGit.Error.CODE.OK: + return Commit.createWithSignature( + repo, + commitContent, + signedData, + field + ); + case NodeGit.Error.CODE.PASSTHROUGH: + skippedSigning = true; + return Commit.create( + repo, + updateRef, + resolvedAuthor, + resolvedCommitter, + resolvedMessageEncoding, + resolvedMessage, + resolvedTree, + parents.length, + parents + ); + default: { + const error = new Error( + `Commit.amendWithSignature threw with error code ${code}` + ); + error.errno = code; + throw error; + } + } }); if (!updateRef) { return createCommitPromise; } - return createCommitPromise.then(function(commitOidResult) { - commitOid = commitOidResult; - return repo.getCommit(commitOid); - }).then(function(commitResult) { - commit = commitResult; - return repo.getReference(updateRef); - }).then(function(ref) { - return ref.setTarget(commitOid, `commit (amend): ${commit.summary()}`); - }).then(function() { - return commitOid; - }); + return createCommitPromise + .then(function(commitOid) { + if (skippedSigning) { + return commitOid; + } + + return repo.getCommit(commitOid) + .then(function(commitResult) { + commit = commitResult; + return repo.getReference(updateRef); + }).then(function(ref) { + return ref.setTarget( + commitOid, + `commit (amend): ${commit.summary()}` + ); + }).then(function() { + return commitOid; + }); + }); }; /** diff --git a/lib/rebase.js b/lib/rebase.js index 0d9521760..e55f0ddde 100644 --- a/lib/rebase.js +++ b/lib/rebase.js @@ -9,8 +9,8 @@ var _abort = Rebase.prototype.abort; var _commit = Rebase.prototype.commit; function defaultRebaseOptions(options, checkoutStrategy) { - var checkoutOptions; - var mergeOptions; + let checkoutOptions; + let mergeOptions; if (options) { options = shallowClone(options); @@ -19,6 +19,27 @@ function defaultRebaseOptions(options, checkoutStrategy) { delete options.checkoutOptions; delete options.mergeOptions; + if (options.signingCb) { + let signingCb = options.signingCb; + options.signingCb = function ( + signatureBuf, + signatureFieldBuf, + commitContent + ) { + return Promise.resolve(signingCb(commitContent)) + .then(function({ code, field, signedData }) { + if (code === NodeGit.Error.CODE.OK) { + signatureBuf.setString(signedData); + if (field) { + signatureFieldBuf.setString(field); + } + } + + return code; + }); + }; + } + options = normalizeOptions(options, NodeGit.RebaseOptions); } else { options = normalizeOptions({}, NodeGit.RebaseOptions); diff --git a/lib/repository.js b/lib/repository.js index 3636c9a6e..ea3b7fb65 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -658,25 +658,24 @@ Repository.prototype.createCommitBuffer = function( * @param {String} message * @param {Tree|Oid|String} Tree * @param {Array} parents - * @param {String} signature_field typically "gpgsig" * @param {Function} onSignature Callback to be called with string to be signed * @return {Oid} The oid of the commit */ Repository.prototype.createCommitWithSignature = function( - updateRef, - author, - committer, - message, - tree, - parents, - signature_field, - onSignature) { + updateRef, + author, + committer, + message, + tree, + parents, + onSignature +) { var repo = this; var promises = []; - var commit_content; - var commit_oid; + var commitContent; var commit; + var skippedSigning; parents = parents || []; @@ -707,35 +706,65 @@ Repository.prototype.createCommitWithSignature = function( parents.length, parents ); - }).then(function(commit_contentResult) { - commit_content = commit_contentResult; - if (!commit_content.endsWith("\n")) { - commit_content += "\n"; + }).then(function(commitContentResult) { + commitContent = commitContentResult; + if (!commitContent.endsWith("\n")) { + commitContent += "\n"; + } + return onSignature(commitContent); + }).then(function({ code, field, signedData }) { + switch (code) { + case NodeGit.Error.CODE.OK: + return Commit.createWithSignature( + repo, + commitContent, + signedData, + field + ); + case NodeGit.Error.CODE.PASSTHROUGH: + skippedSigning = true; + return Commit.create( + repo, + updateRef, + author, + committer, + null /* use default message encoding */, + message, + tree, + parents.length, + parents + ); + default: { + const error = new Error( + "Repository.prototype.createCommitWithSignature " + + `threw with error code ${code}` + ); + error.errno = code; + throw error; + } } - return onSignature(commit_content); - }).then(function(signature) { - return Commit.createWithSignature( - repo, - commit_content, - signature, - signature_field); }); if (!updateRef) { return createCommitPromise; } - return createCommitPromise.then(function(commit_oidResult) { - commit_oid = commit_oidResult; - return repo.getCommit(commit_oid); - }).then(function(commitResult) { - commit = commitResult; - return repo.getReference(updateRef); - }).then(function(ref) { - return ref.setTarget(commit_oid, getReflogMessageForCommit(commit)); - }).then(function() { - return commit_oid; - }); + return createCommitPromise + .then(function(commitOid) { + if (skippedSigning) { + return commitOid; + } + + return repo.getCommit(commitOid) + .then(function(commitResult) { + commit = commitResult; + return repo.getReference(updateRef); + }).then(function(ref) { + return ref.setTarget(commitOid, getReflogMessageForCommit(commit)); + }).then(function() { + return commitOid; + }); + }); }; /** diff --git a/lib/tag.js b/lib/tag.js index b94872160..a1183bc85 100644 --- a/lib/tag.js +++ b/lib/tag.js @@ -76,10 +76,30 @@ Tag.createWithSignature = function( tagBuffer = tagBufferResult; return signingCallback(tagBuffer); }) - .then((tagSignature) => { - const normalizedEnding = tagSignature.endsWith("\n") ? "" : "\n"; - const signedTagString = tagBuffer + tagSignature + normalizedEnding; - return Tag.createFromBuffer(repo, signedTagString, force); + .then(({ code, signedData }) => { + switch (code) { + case NodeGit.Error.CODE.OK: { + const normalizedEnding = signedData.endsWith("\n") ? "" : "\n"; + const signedTagString = tagBuffer + signedData + normalizedEnding; + return Tag.createFromBuffer(repo, signedTagString, force); + } + case NodeGit.Error.CODE.PASSTHROUGH: + return Tag.create( + repo, + tagName, + target, + tagger, + message, + force + ); + default: { + const error = new Error( + `Tag.createWithSignature threw with error code ${code}` + ); + error.errno = code; + throw error; + } + } }); }; @@ -110,6 +130,6 @@ Tag.prototype.extractSignature = function(signatureType = "gpgsig") { } } - return null; + throw new Error("this tag is not signed"); }); }; diff --git a/test/tests/commit.js b/test/tests/commit.js index 522017bc7..6f212d6a4 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -450,45 +450,45 @@ describe("Commit", function() { }); }); - - it("can amend commit with signature", function() { - const signature = "-----BEGIN PGP SIGNATURE-----\n" + - "\n" + - "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + - "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + - "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + - "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + - "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + - "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + - "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + - "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + - "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + - "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + - "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + - "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + - "ekgUBx+BX6nJOw==\n" + - "=4Hy5\n" + - "-----END PGP SIGNATURE-----"; - - function onSignature(dataToSign) { - return new Promise(function (resolve) { - return resolve(signature); + describe("amendWithSignature", function() { + it("can amend with signature", function() { + const signedData = "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + + "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + + "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + + "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + + "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + + "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + + "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + + "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + + "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + + "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + + "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + + "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + + "ekgUBx+BX6nJOw==\n" + + "=4Hy5\n" + + "-----END PGP SIGNATURE-----"; + + const onSignature = () => ({ + code: NodeGit.Error.CODE.OK, + field: "gpgsig", + signedData }); - } - var repo; - var oid; - var commit; - var message; - var parents; + var repo; + var oid; + var commit; + var message; + var parents; - return NodeGit.Repository.open(reposPath) + return NodeGit.Repository.open(reposPath) .then(function(repoResult) { repo = repoResult; return repo.getHeadCommit(); }) .then(function(headCommit) { - message = headCommit.message(); + message = headCommit.message() + "\n"; parents = headCommit.parents(); return headCommit.amendWithSignature( @@ -498,7 +498,6 @@ describe("Commit", function() { null, null, null, - "gpgsig", onSignature ); }) @@ -511,65 +510,65 @@ describe("Commit", function() { return commit.getSignature("gpgsig"); }) .then(function(signatureInfo) { - assert.equal(signatureInfo.signature, signature); + assert.equal(signatureInfo.signature, signedData); assert.equal(commit.message(), message); assert.deepEqual(commit.parents(), parents); }); - }); + }); - it("amending with signature respects overridden arguments", function() { - const signature = "-----BEGIN PGP SIGNATURE-----\n" + - "\n" + - "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + - "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + - "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + - "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + - "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + - "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + - "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + - "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + - "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + - "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + - "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + - "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + - "ekgUBx+BX6nJOw==\n" + - "=4Hy5\n" + - "-----END PGP SIGNATURE-----"; - - function onSignature(dataToSign) { - return new Promise(function (resolve) { - return resolve(signature); + it("will respects overridden arguments", function() { + const signedData = "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQJHBAEBCAAxFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxPKUYTHHN0ZXZla0Bh\n" + + "eG9zb2Z0LmNvbQAKCRBRGMkp5058Q3vcD/0Uf6P68g98Kbvsgjg/aidM1ujruXaw\n" + + "X5WSsCAw+wWGICOj0n+KBnmQruI4HSFz3zykEshuOpcBv1X/+huwDeB/hBqonCU8\n" + + "QdexCdWR70YbT1bufesUwV9v1qwE4WOmFxWXgwh55K0wDRkc0u2aLcwrJkIEEVfs\n" + + "HqZyFzU4kwbGekY/m7d1DsBhWyKEGW9/25WMYmjWOWOiaFjeBaHLlxiEM8KGnMLH\n" + + "wx37NuFuaABgi23AAcBGdeWy04TEuU4S51+bHM3RotrZ2cryW2lEbkkXodhIJcq0\n" + + "RgrStCbvR0ehnOPdYSiRbxK8JNLZuNjHlK2g7wVi+C83vwMQuhU4H6OlYHGVr664\n" + + "4YzL83FdIo7wiMOFd2OOMLlCfHgTun60FvjCs4WHjrwH1fQl287FRPLa/4olBSQP\n" + + "yUXJaZdxm4cB4L/1pmbb/J/XUiOio3MpaN3GFm2hZloUlag1uPDBtCxTl5odvj4a\n" + + "GOmTBWznXxF/zrKnQVSvv+EccNxYFc0VVjAxGgNqPzIxDAKtw1lE5pbBkFpFpNHz\n" + + "StmwZkP9QIJY4hJYQfM+pzHLe8xjexL+Kh/TrYXgY1m/4vJe0HJSsnRnaR8Yfqhh\n" + + "LReqo94VHRYXR0rZQv4py0D9TrWaI8xHLve6ewhLPNRzyaI9fNrinbcPYZZOWnRi\n" + + "ekgUBx+BX6nJOw==\n" + + "=4Hy5\n" + + "-----END PGP SIGNATURE-----"; + + const onSignature = () => ({ + code: NodeGit.Error.CODE.OK, + field: "gpgsig", + signedData }); - } - var repo; - var oid; - var commit; - var message; - var parents; - var commitTree; - - var author = NodeGit.Signature.create( - "Scooby Doo", - "scoob@mystery.com", - 123456789, - 60 - ); - var committer = NodeGit.Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 - ); - var tree = Oid.fromString("f4661419a6fbbe865f78644fec722c023ce4b65f"); + var repo; + var oid; + var commit; + var message; + var parents; + var commitTree; + + var author = NodeGit.Signature.create( + "Scooby Doo", + "scoob@mystery.com", + 123456789, + 60 + ); + var committer = NodeGit.Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + var tree = Oid.fromString("f4661419a6fbbe865f78644fec722c023ce4b65f"); - return NodeGit.Repository.open(reposPath) + return NodeGit.Repository.open(reposPath) .then(function(repoResult) { repo = repoResult; return repo.getHeadCommit(); }) .then(function(headCommit) { - message = headCommit.message(); + message = headCommit.message() + "\n"; parents = headCommit.parents(); return headCommit.amendWithSignature( @@ -579,7 +578,6 @@ describe("Commit", function() { null, null, tree, - "gpgsig", onSignature ); }) @@ -596,13 +594,96 @@ describe("Commit", function() { return commit.getSignature("gpgsig"); }) .then(function(signatureInfo) { - assert.equal(signatureInfo.signature, signature); + assert.equal(signatureInfo.signature, signedData); assert.equal(commit.message(), message); assert.deepEqual(commit.parents(), parents); assert.deepEqual(commitTree.id(), tree); assert.deepEqual(commit.author(), author); assert.deepEqual(commit.committer(), committer); }); + }); + + it("can optionally skip signing process", function() { + const onSignature = () => ({ + code: NodeGit.Error.CODE.PASSTHROUGH + }); + + var repo; + var oid; + var commit; + var message; + var parents; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return repo.getHeadCommit(); + }) + .then(function(headCommit) { + message = headCommit.message(); + parents = headCommit.parents(); + + return headCommit.amendWithSignature( + null, + null, + null, + null, + null, + null, + onSignature + ); + }) + .then(function(oidResult) { + oid = oidResult; + return NodeGit.Commit.lookup(repo, oid); + }) + .then(function(commitResult) { + commit = commitResult; + return commit.getSignature("gpgsig") + .then(function() { + assert.fail("Should not have a signature"); + }, function(error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; + }); + }) + .then(function(signatureInfo) { + assert.equal(commit.message(), message); + assert.deepEqual(commit.parents(), parents); + }); + }); + + it("will throw if signing callback returns an error code", function() { + const onSignature = () => ({ + code: NodeGit.Error.CODE.ERROR + }); + + return NodeGit.Repository.open(reposPath) + .then(function(repo) { + return repo.getHeadCommit(); + }) + .then(function(headCommit) { + return headCommit.amendWithSignature( + null, + null, + null, + null, + null, + null, + onSignature + ); + }) + .then(function() { + assert.fail("amendWithSignature should have failed."); + }, function(error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; + }); + }); }); it("has an owner", function() { @@ -946,10 +1027,8 @@ describe("Commit", function() { }); describe("Commit's Signature", function() { - it("Can create a signed commit in a repo", function() { - - var signature = "-----BEGIN PGP SIGNATURE-----\n" + + var signedData = "-----BEGIN PGP SIGNATURE-----\n" + "Version: GnuPG v1.4.12 (Darwin)\n" + "\n" + "iQIcBAABAgAGBQJQ+FMIAAoJEH+LfPdZDSs1e3EQAJMjhqjWF+WkGLHju7pTw2al\n" + @@ -967,11 +1046,11 @@ describe("Commit", function() { "=ozeK\n" + "-----END PGP SIGNATURE-----"; - function onSignature(dataToSign) { - return new Promise(function (resolve) { - return resolve(signature); - }); - } + const onSignature = () => ({ + code: NodeGit.Error.CODE.OK, + field: "gpgsig", + signedData + }); var test = this; var expectedCommitId = "ccb99bb20716ef7c37e92c7b8db029a7af7f747b"; @@ -1028,8 +1107,8 @@ describe("Commit", function() { "message", treeOid, [parent], - "gpgsig", - onSignature); + onSignature + ); }) .then(function(commitId) { assert.equal(expectedCommitId, commitId); @@ -1039,7 +1118,7 @@ describe("Commit", function() { return commit.getSignature("gpgsig"); }) .then(function(signatureInfo) { - assert.equal(signature, signatureInfo.signature); + assert.equal(signedData, signatureInfo.signature); return reinitialize(test); }, function(reason) { return reinitialize(test) @@ -1050,8 +1129,7 @@ describe("Commit", function() { }); it("Can create a signed commit in a repo and update refs", function() { - - var signature = "-----BEGIN PGP SIGNATURE-----\n" + + var signedData = "-----BEGIN PGP SIGNATURE-----\n" + "Version: GnuPG v1.4.12 (Darwin)\n" + "\n" + "iQIcBAABAgAGBQJQ+FMIAAoJEH+LfPdZDSs1e3EQAJMjhqjWF+WkGLHju7pTw2al\n" + @@ -1069,11 +1147,11 @@ describe("Commit", function() { "=ozeK\n" + "-----END PGP SIGNATURE-----"; - function onSignature(dataToSign) { - return new Promise(function (resolve) { - return resolve(signature); - }); - } + const onSignature = () => ({ + code: NodeGit.Error.CODE.OK, + field: "gpgsig", + signedData + }); var test = this; var expectedCommitId = "ccb99bb20716ef7c37e92c7b8db029a7af7f747b"; @@ -1130,7 +1208,6 @@ describe("Commit", function() { "message", treeOid, [parent], - "gpgsig", onSignature); }) .then(function(commitId) { @@ -1141,7 +1218,7 @@ describe("Commit", function() { return commit.getSignature("gpgsig"); }) .then(function(signatureInfo) { - assert.equal(signature, signatureInfo.signature); + assert.equal(signedData, signatureInfo.signature); return repo.getHeadCommit(); }) .then(function(headCommit) { @@ -1244,5 +1321,173 @@ describe("Commit", function() { ); }); }); + + it("Can be optionally skipped to create without signature", function() { + const onSignature = () => ({ + code: NodeGit.Error.CODE.PASSTHROUGH + }); + + var test = this; + var expectedCommitId = "c9bffe040519231d32431c101bca4efc0917f64c"; + var fileName = "newfile.txt"; + var fileContent = "hello world"; + + var repo; + var index; + var treeOid; + var parent; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function() { + return repo.refreshIndex(); + }) + .then(function(indexResult) { + index = indexResult; + }) + .then(function() { + return index.addByPath(fileName); + }) + .then(function() { + return index.write(); + }) + .then(function() { + return index.writeTree(); + }) + .then(function(oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function(head) { + return repo.getCommit(head); + }) + .then(function(parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) + ]); + }) + .then(function(signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommitWithSignature( + null, + author, + committer, + "message", + treeOid, + [parent], + onSignature + ); + }) + .then(function(commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function(commit) { + return commit.getSignature("gpgsig") + .then(function() { + assert.fail("Should not have been able to retrieve gpgsig"); + }, function(error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; + }); + }) + .then(function() { + return reinitialize(test); + }, function(reason) { + return reinitialize(test) + .then(function() { + return Promise.reject(reason); + }); + }); + }); + + it("Will throw if the signing cb returns an error code", function() { + const onSignature = () => ({ + code: NodeGit.Error.CODE.ERROR + }); + + var test = this; + var fileName = "newfile.txt"; + var fileContent = "hello world"; + + var repo; + var index; + var treeOid; + var parent; + + return NodeGit.Repository.open(reposPath) + .then(function(repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function() { + return repo.refreshIndex(); + }) + .then(function(indexResult) { + index = indexResult; + }) + .then(function() { + return index.addByPath(fileName); + }) + .then(function() { + return index.write(); + }) + .then(function() { + return index.writeTree(); + }) + .then(function(oidResult) { + treeOid = oidResult; + return NodeGit.Reference.nameToId(repo, "HEAD"); + }) + .then(function(head) { + return repo.getCommit(head); + }) + .then(function(parentResult) { + parent = parentResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) + ]); + }) + .then(function(signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommitWithSignature( + null, + author, + committer, + "message", + treeOid, + [parent], + onSignature + ); + }) + .then(function() { + assert.fail("createCommitWithSignature should have failed."); + }, function(error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; + }) + .then(function() { + return reinitialize(test); + }, function(reason) { + return reinitialize(test) + .then(function() { + return Promise.reject(reason); + }); + }); + }); }); }); diff --git a/test/tests/rebase.js b/test/tests/rebase.js index f852a8651..839b50582 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -1661,11 +1661,11 @@ describe("Rebase", function() { return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null, { - signingCb: (signatureBuf, signatureFieldBuf, commitContent) => { - signatureBuf.setString("A moose was here."); - signatureFieldBuf.setString("moose-sig"); - return 0; - } + signingCb: (commitContent) => ({ + code: NodeGit.Error.CODE.OK, + field: "moose-sig", + signedData: "A moose was here." + }) }); }) .then(function(newRebase) { @@ -1725,4 +1725,355 @@ describe("Rebase", function() { assert.equal(signature, "A moose was here."); }); }); + + it("can optionally skip signing commits", function() { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; + + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; + + var ourSignature = NodeGit.Signature.create + ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create + ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; + + return fse.writeFile(path.join(repository.workdir(), baseFileName), + baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function() { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + + return repository.createCommit("HEAD", ourSignature, + ourSignature, "initial commit", oid, []); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository.getCommit(commitOid).then(function(commit) { + ourCommit = commit; + }).then(function() { + return repository.createBranch(ourBranchName, commitOid) + .then(function(branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function(branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), + theirFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit(theirBranch.name(), theirSignature, + theirSignature, "they made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return removeFileFromIndex(repository, theirFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function() { + return fse.writeFile(path.join(repository.workdir(), ourFileName), + ourFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + + return repository.createCommit(ourBranch.name(), ourSignature, + ourSignature, "we made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + + return removeFileFromIndex(repository, ourFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function() { + return repository.checkoutBranch(ourBranchName); + }) + .then(function() { + return Promise.all([ + repository.getReference(ourBranchName), + repository.getReference(theirBranchName) + ]); + }) + .then(function(refs) { + assert.equal(refs.length, 2); + + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + ]); + }) + .then(function(annotatedCommits) { + assert.equal(annotatedCommits.length, 2); + + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; + + assert.equal(ourAnnotatedCommit.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, + theirAnnotatedCommit, null, { + signingCb: () => ({ + code: NodeGit.Error.CODE.PASSTHROUGH + }) + }); + }) + .then(function(newRebase) { + rebase = newRebase; + + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); + + return rebase.next(); + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), + NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); + + return rebase.commit(null, ourSignature); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "b937100ee0ea17ef20525306763505a7fe2be29e"); + + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); + + return rebase.finish(ourSignature, {}); + }) + .then(function(result) { + assert.equal(result, 0); + + return repository.getBranchCommit(ourBranchName); + }) + .then(function(commit) { + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), + "b937100ee0ea17ef20525306763505a7fe2be29e"); + + return commit.parent(0); + }) + .then(function(parent) { + // verify that we are on top of "their commit" + assert.equal(parent.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return NodeGit.Commit.extractSignature( + repository, + "b937100ee0ea17ef20525306763505a7fe2be29e", + "moose-sig" + ) + .then(function() { + assert.fail("This commit should not be signed."); + }, function (error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; + }); + }); + }); + + it("will throw if commit signing cb returns an error code", function() { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; + + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; + + var ourSignature = NodeGit.Signature.create + ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create + ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; + + return fse.writeFile(path.join(repository.workdir(), baseFileName), + baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function() { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + + return repository.createCommit("HEAD", ourSignature, + ourSignature, "initial commit", oid, []); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository.getCommit(commitOid).then(function(commit) { + ourCommit = commit; + }).then(function() { + return repository.createBranch(ourBranchName, commitOid) + .then(function(branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function(branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), + theirFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + + return repository.createCommit(theirBranch.name(), theirSignature, + theirSignature, "they made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return removeFileFromIndex(repository, theirFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function() { + return fse.writeFile(path.join(repository.workdir(), ourFileName), + ourFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + + return repository.createCommit(ourBranch.name(), ourSignature, + ourSignature, "we made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + + return removeFileFromIndex(repository, ourFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function() { + return repository.checkoutBranch(ourBranchName); + }) + .then(function() { + return Promise.all([ + repository.getReference(ourBranchName), + repository.getReference(theirBranchName) + ]); + }) + .then(function(refs) { + assert.equal(refs.length, 2); + + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + ]); + }) + .then(function(annotatedCommits) { + assert.equal(annotatedCommits.length, 2); + + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; + + assert.equal(ourAnnotatedCommit.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, + theirAnnotatedCommit, null, { + signingCb: () => ({ + code: NodeGit.Error.CODE.ERROR + }) + }); + }) + .then(function(newRebase) { + rebase = newRebase; + + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); + + return rebase.next(); + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), + NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); + + return rebase.commit(null, ourSignature); + }) + .then(function() { + assert.fail("rebase.commit should have failed"); + }, function(error) { + if (error && error.errno === -1) { + return; + } + throw error; + }); + }); }); diff --git a/test/tests/tag.js b/test/tests/tag.js index c43a618a1..51268b40a 100644 --- a/test/tests/tag.js +++ b/test/tests/tag.js @@ -314,44 +314,150 @@ describe("Tag", function() { }); }); - it("can create a tag with a signature and extract the signature", function() { - const targetOid = Oid.fromString(commitPointedTo); - const otherTargetOid = Oid.fromString(commitPointedTo2); - const name = "created-signed-tag-annotationCreate"; - const repository = this.repository; - const signature = Signature.create( - "Shaggy Rogers", - "shaggy@mystery.com", - 987654321, - 90 + describe("createWithSignature and extractSignature", function() { + it( + "can create a tag with a signature and extract the signature", + function() { + const targetOid = Oid.fromString(commitPointedTo); + const otherTargetOid = Oid.fromString(commitPointedTo2); + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + const signatureLines = [ + "-----BEGIN PGP SIGNATURE-----", + "iQIzBAABCAAdFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxR4JUACgkQURjJKedO", + "fEN+8A//cXmkRmhzQMdTEdrxty7tVKQ7lVhL7r7e+cB84hO7WrDn8549c7/Puflu", + "idanWfyoAEMSNWDgY84lx/t3I3YYKXsLDPT93HiMhCXmPVZcfLxlARRL1rrNZV4q", + "L9hhqb9bFrRNBn6YebhygeLXLHlDKEZzx8W9jnDLU8Px8UTkwdQIDnPDfT7UOPPU", + "MYDgP3OwWwoG8dUlZXaHjtFz29wPlJo177MwdLYwn4zpEIysoY1ev5IKWD+LPW4g", + "vdQnaK1x3dozmG8YLUZw5iW7ap9DpahbAGQgdy1z1ypiNUjNuhaP8zkG1ci6X88N", + "6MIoQ+YqfowRJJTIr1lzssxsRI1syjfS6smnI4ZNE6S+6mIKN96ES2OZF+rn4xnD", + "PofR9Qh2gPq++ULriPE/cX7ZkZ0/ZDZGDfIGvricB8JEJhISZn/VMX/KScJs+rFq", + "KWN5Au6Uc2pEqeq5OP4y2k0QUmKQT9sh9OepnPmfqF8hG6wI8nM67jT/FEOcpr0v", + "qoN2NRXrcq3iZAp07AGq9IdpYhBcEW7MFmOcNt+Zb8SbTMp6DawnREg9xzz1SIkZ", + "Cdp1XoJ6mkVvzBB4T/Esp7j1VztinTX2PpX7C1CE5LC76UfCiEjEWOmWrVuPuA5a", + "oRrJvgPJg8gpVj04r2m8nvUK1gwhxg9ZB+SK+nd3OAd0dnbJwTE=", + "=dW3g", + "-----END PGP SIGNATURE-----" + ]; + const message = "I'm a teapot"; + const signingCallback = (message) => ({ + code: NodeGit.Error.CODE.OK, + signedData: signatureLines.join("\n") + }); + + let odb; + let oid; + let object; + + return repository.odb() + .then((odbResult) => { + odb = odbResult; + + return Tag.createWithSignature( + repository, + name, + targetOid, + signature, + message, + 1, + signingCallback + ); + }) + .then((oidResult) => { + oid = oidResult; + return odb.read(oid); + }) + .then((objectResult) => { + object = objectResult; + const lines = object.toString().split("\n"); + assert(object.type(), Obj.TYPE.TAG); + assert.equal(signatureLines.length + 7, lines.length); + assert.equal(lines[0], `object ${commitPointedTo}`); + assert.equal(lines[1], "type commit"); + assert.equal(lines[2], `tag ${name}`); + assert.equal( + lines[3], + "tagger Shaggy Rogers 987654321 +0130" + ); + assert.equal(lines[4], ""); + assert.equal(lines[5], message); + for (let i = 6; i < 6 + signatureLines.length; i++) { + assert.equal(lines[i], signatureLines[i - 6]); + } + assert.equal(lines[6 + signatureLines.length], ""); + + return Tag.lookup(repository, oid); + }) + .then((tag) => { + return tag.extractSignature(); + }) + .then((tagSignature) => { + assert.equal(tagSignature, signatureLines.join("\n")); + }) + .then(() => { + // overwriting is okay + return Tag.createWithSignature( + repository, + name, + targetOid, + signature, + message, + 1, + signingCallback + ); + }) + .then(() => { + // overwriting is not okay + return Tag.createWithSignature( + repository, + name, + otherTargetOid, + signature, + message, + 0, + signingCallback + ); + }) + .then(() => { + return Promise.reject( + new Error( + "should not be able to create the '" + name + "' tag twice" + ) + ); + }, + () => { + return Promise.resolve(); + }); + } ); - const signatureLines = [ - "-----BEGIN PGP SIGNATURE-----", - "iQIzBAABCAAdFiEEKdxGpJ93wnkLaBKfURjJKedOfEMFAlxR4JUACgkQURjJKedO", - "fEN+8A//cXmkRmhzQMdTEdrxty7tVKQ7lVhL7r7e+cB84hO7WrDn8549c7/Puflu", - "idanWfyoAEMSNWDgY84lx/t3I3YYKXsLDPT93HiMhCXmPVZcfLxlARRL1rrNZV4q", - "L9hhqb9bFrRNBn6YebhygeLXLHlDKEZzx8W9jnDLU8Px8UTkwdQIDnPDfT7UOPPU", - "MYDgP3OwWwoG8dUlZXaHjtFz29wPlJo177MwdLYwn4zpEIysoY1ev5IKWD+LPW4g", - "vdQnaK1x3dozmG8YLUZw5iW7ap9DpahbAGQgdy1z1ypiNUjNuhaP8zkG1ci6X88N", - "6MIoQ+YqfowRJJTIr1lzssxsRI1syjfS6smnI4ZNE6S+6mIKN96ES2OZF+rn4xnD", - "PofR9Qh2gPq++ULriPE/cX7ZkZ0/ZDZGDfIGvricB8JEJhISZn/VMX/KScJs+rFq", - "KWN5Au6Uc2pEqeq5OP4y2k0QUmKQT9sh9OepnPmfqF8hG6wI8nM67jT/FEOcpr0v", - "qoN2NRXrcq3iZAp07AGq9IdpYhBcEW7MFmOcNt+Zb8SbTMp6DawnREg9xzz1SIkZ", - "Cdp1XoJ6mkVvzBB4T/Esp7j1VztinTX2PpX7C1CE5LC76UfCiEjEWOmWrVuPuA5a", - "oRrJvgPJg8gpVj04r2m8nvUK1gwhxg9ZB+SK+nd3OAd0dnbJwTE=", - "=dW3g", - "-----END PGP SIGNATURE-----" - ]; - const message = "I'm a teapot"; - const signingCallback = (message) => { - return signatureLines.join("\n"); - }; - let odb; - let oid; - let object; + it("can optionally skip the signing process", function() { + const targetOid = Oid.fromString(commitPointedTo); + const otherTargetOid = Oid.fromString(commitPointedTo2); + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + const message = "I'm a teapot"; + const signingCallback = () => ({ + code: NodeGit.Error.CODE.PASSTHROUGH + }); - return repository.odb() + let odb; + let oid; + let object; + + return repository.odb() .then((odbResult) => { odb = odbResult; @@ -373,7 +479,7 @@ describe("Tag", function() { object = objectResult; const lines = object.toString().split("\n"); assert(object.type(), Obj.TYPE.TAG); - assert.equal(signatureLines.length + 7, lines.length); + assert.equal(7, lines.length); assert.equal(lines[0], `object ${commitPointedTo}`); assert.equal(lines[1], "type commit"); assert.equal(lines[2], `tag ${name}`); @@ -383,18 +489,21 @@ describe("Tag", function() { ); assert.equal(lines[4], ""); assert.equal(lines[5], message); - for (let i = 6; i < 6 + signatureLines.length; i++) { - assert.equal(lines[i], signatureLines[i - 6]); - } - assert.equal(lines[6 + signatureLines.length], ""); + assert.equal(lines[6], ""); return Tag.lookup(repository, oid); }) .then((tag) => { return tag.extractSignature(); }) - .then((tagSignature) => { - assert.equal(tagSignature, signatureLines.join("\n")); + .then(function() { + assert.fail("Tag should not have been signed."); + }, function(error) { + if (error && error.message === "this tag is not signed") { + return; + } + + throw error; }) .then(() => { // overwriting is okay @@ -428,8 +537,45 @@ describe("Tag", function() { () => { return Promise.resolve(); }); + }); + + it("will throw if signing callback returns an error code", function() { + const targetOid = Oid.fromString(commitPointedTo); + const name = "created-signed-tag-annotationCreate"; + const repository = this.repository; + const signature = Signature.create( + "Shaggy Rogers", + "shaggy@mystery.com", + 987654321, + 90 + ); + const message = "I'm a teapot"; + const signingCallback = () => ({ + code: NodeGit.Error.CODE.ERROR + }); + + + return Tag.createWithSignature( + repository, + name, + targetOid, + signature, + message, + 1, + signingCallback + ) + .then(function() { + assert.fail("Should not have been able to create tag"); + }, function(error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; + }); + }); }); + it("can create a new signed tag with Tag.annotationCreate", function() { var oid = Oid.fromString(commitPointedTo); var name = "created-signed-tag-annotationCreate"; From 4ee0ca9c7c5ca68a6e8893db3f6289354e64d5bd Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 5 Feb 2019 12:53:56 -0700 Subject: [PATCH 040/145] Use enum here for consistency in test --- test/tests/rebase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tests/rebase.js b/test/tests/rebase.js index 839b50582..610721185 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -2070,7 +2070,7 @@ describe("Rebase", function() { .then(function() { assert.fail("rebase.commit should have failed"); }, function(error) { - if (error && error.errno === -1) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { return; } throw error; From 7c11a126d91ee98d572cf1285b9ff220a1a427b1 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 5 Feb 2019 13:53:51 -0700 Subject: [PATCH 041/145] Bump to v0.25.0-alpha.3 --- CHANGELOG.md | 16 ++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d6817348b..9027a79dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## v0.25.0-alpha.3 [(2019-02-05)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.3) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.2...v0.25.0-alpha.3) + +#### Summary of changes +- Enforced consistent use of signing callbacks within the application. Any object that implements the signingCallback + pattern for signing commits or tags should use the exact same callback type and with the same meaning. + `type SigningCallback = (content: string) => {| code: number, field?: string, signedData?: string |};` + If the code is `NodeGit.Error.CODE.OK` or 0, the operation will succeed and _at least_ signedData is expected to be filled out. + If the code is a negative number, except for `NodeGit.Error.CODE.PASSTHROUGH`, the signing operation will fail. + If the code is `NodeGit.Error.CODE.PASSTHROUGH`, the operation will continue without signing the object. + +#### Merged PRs into NodeGit +- [Use same API for signingCb in all places that can be crypto signed #1621](https://github.com/nodegit/nodegit/pull/1621) + + ## v0.25.0-alpha.2 [(2019-02-01)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.2) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.1...v0.25.0-alpha.2) diff --git a/package-lock.json b/package-lock.json index a488d2837..9576fb389 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.2", + "version": "0.25.0-alpha.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a169540bd..f5aef99c2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.2", + "version": "0.25.0-alpha.3", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 0438567022d8fd4299bfc13111b7e1d82e508c55 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 7 Feb 2019 14:40:39 -0700 Subject: [PATCH 042/145] =?UTF-8?q?Make=20`Signature.default`async=20?= =?UTF-8?q?=F0=9F=99=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- generate/input/descriptor.json | 20 ++- generate/templates/partials/sync_function.cc | 12 +- lib/repository.js | 134 ++++++++------ test/tests/checkout.js | 39 ++-- test/tests/repository.js | 34 ++-- test/tests/signature.js | 20 ++- test/tests/stash.js | 176 ++++++++++--------- test/tests/tag.js | 16 +- 8 files changed, 261 insertions(+), 190 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index de5eebf74..e218348ff 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -2269,13 +2269,14 @@ "ignore": true }, "git_oid_fromstr": { - "isAsync": false + "ignore": true }, "git_oid_fromstrn": { "ignore": true }, "git_oid_fromstrp": { - "ignore": true + "isAsync": false, + "jsFunctionName": "fromString" }, "git_oid_nfmt": { "ignore": true @@ -3251,7 +3252,10 @@ "dupFunction": "git_signature_dup", "functions": { "git_signature_default": { - "isAsync": false + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_signature_dup": { "ignore": true @@ -3263,7 +3267,15 @@ "isAsync": false }, "git_signature_now": { - "isAsync": false + "isAsync": false, + "args": { + "sig_out": { + "isReturn": true + } + }, + "return": { + "isErrorCode": true + } } } }, diff --git a/generate/templates/partials/sync_function.cc b/generate/templates/partials/sync_function.cc index 3bda175b6..89bb2e2dc 100644 --- a/generate/templates/partials/sync_function.cc +++ b/generate/templates/partials/sync_function.cc @@ -50,7 +50,7 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { {%endeach%} ); - {%if .|hasReturnValue %} {{ return.cType }} result = {%endif%} + {%if .|hasReturnType %} {{ return.cType }} result = {%endif%} {{ cFunctionName }}( {%each args|argsInfo as arg %} {%if arg.isReturn %} @@ -67,15 +67,15 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { {%endeach%} ); - {%if .|hasReturnValue |and return.isErrorCode %} + {%if .|hasReturnType |and return.isErrorCode %} if (result != GIT_OK) { {%each args|argsInfo as arg %} - {%if arg.shouldAlloc %} - free({{ arg.name }}); - {%elsif arg | isOid %} + {%if arg | isOid %} if (info[{{ arg.jsArg }}]->IsString()) { - free({{ arg.name }}); + free((void *)from_{{ arg.name }}); } + {%elsif arg.shouldAlloc %} + free({{ arg.name }}); {%endif%} {%endeach%} diff --git a/lib/repository.js b/lib/repository.js index ea3b7fb65..48d808ec8 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -466,23 +466,32 @@ Repository.prototype.continueRebase = function( beforeFinishFn, rebaseOptions ) { - var repo = this; + const repo = this; - signature = signature || repo.defaultSignature(); + let rebase; + let promiseChain = Promise.resolve(); - var rebase; - return repo.refreshIndex() - .then(function(index) { + if (!signature) { + promiseChain = promiseChain + .then(() => repo.defaultSignature()) + .then((signatureResult) => { + signature = signatureResult; + }); + } + + return promiseChain + .then(() => repo.refreshIndex()) + .then((index) => { if (index.hasConflicts()) { throw index; } return NodeGit.Rebase.open(repo, rebaseOptions); }) - .then(function(_rebase) { + .then((_rebase) => { rebase = _rebase; return rebase.commit(null, signature) - .catch(function(e) { + .catch((e) => { // Ignore all errors to prevent // this routine from choking now // that we made rebase.commit @@ -495,7 +504,7 @@ Repository.prototype.continueRebase = function( throw e; }); }) - .then(function() { + .then(() => { return performRebase( repo, rebase, @@ -504,7 +513,7 @@ Repository.prototype.continueRebase = function( beforeFinishFn ); }) - .then(function(error) { + .then((error) => { if (error) { throw error; } @@ -866,15 +875,19 @@ Repository.prototype.createRevWalk = function() { * @return {Tag} */ Repository.prototype.createTag = function(oid, name, message, callback) { - var repository = this; - var signature = repository.defaultSignature(); + const repository = this; + let signature = null; - return Commit.lookup(repository, oid) - .then(function(commit) { + return repository.defaultSignature() + .then((signatureResult) => { + signature = signatureResult; + return Commit.lookup(repository, oid); + }) + .then((commit) => { // Final argument is `force` which overwrites any previous tag return Tag.create(repository, name, commit, signature, message, 0); }) - .then(function(tagOid) { + .then((tagOid) => { return repository.getTag(tagOid, callback); }); }; @@ -884,13 +897,16 @@ Repository.prototype.createTag = function(oid, name, message, callback) { * @return {Signature} */ Repository.prototype.defaultSignature = function() { - var result = NodeGit.Signature.default(this); - - if (!result || !result.name()) { - result = NodeGit.Signature.now("unknown", "unknown@example.com"); - } - - return result; + return NodeGit.Signature.default(this) + .then((result) => { + if (!result || !result.name()) { + result = NodeGit.Signature.now("unknown", "unknown@example.com"); + } + return result; + }) + .catch(() => { + return NodeGit.Signature.now("unknown", "unknown@example.com"); + }); }; /** @@ -1558,12 +1574,21 @@ Repository.prototype.rebaseBranches = function( rebaseOptions ) { - var repo = this; - var branchCommit; - var upstreamCommit; - var ontoCommit; - var mergeOptions = (rebaseOptions || {}).mergeOptions; - signature = signature || repo.defaultSignature(); + const repo = this; + let branchCommit; + let upstreamCommit; + let ontoCommit; + let mergeOptions = (rebaseOptions || {}).mergeOptions; + + let promiseChain = Promise.resolve(); + + if (!signature) { + promiseChain = promiseChain + .then(() => repo.defaultSignature()) + .then((signatureResult) => { + signature = signatureResult; + }); + } return Promise.all([ repo.getReference(branch), @@ -1667,21 +1692,30 @@ Repository.prototype.mergeBranches = function( mergeOptions, processMergeMessageCallback ) { - var repo = this; - var fromBranch; - var toBranch; + const repo = this; + let fromBranch; + let toBranch; processMergeMessageCallback = processMergeMessageCallback || function (message) { return message; }; mergePreference = mergePreference || NodeGit.Merge.PREFERENCE.NONE; mergeOptions = normalizeOptions(mergeOptions, NodeGit.MergeOptions); - signature = signature || repo.defaultSignature(); + let promiseChain = Promise.resolve(); - return Promise.all([ - repo.getBranch(to), - repo.getBranch(from) - ]).then(function(objects) { + if (!signature) { + promiseChain = promiseChain + .then(() => repo.defaultSignature()) + .then((signatureResult) => { + signature = signatureResult; + }); + } + + return promiseChain.then(() => Promise.all([ + repo.getBranch(to), + repo.getBranch(from) + ])) + .then((objects) => { toBranch = objects[0]; fromBranch = objects[1]; @@ -1690,12 +1724,12 @@ Repository.prototype.mergeBranches = function( repo.getBranchCommit(fromBranch) ]); }) - .then(function(branchCommits) { + .then((branchCommits) => { var toCommitOid = branchCommits[0].toString(); var fromCommitOid = branchCommits[1].toString(); return NodeGit.Merge.base(repo, toCommitOid, fromCommitOid) - .then(function(baseCommit) { + .then((baseCommit) => { if (baseCommit.toString() == fromCommitOid) { // The commit we're merging to is already in our history. // nothing to do so just return the commit the branch is on @@ -1711,7 +1745,7 @@ Repository.prototype.mergeBranches = function( fromBranch.shorthand(); return branchCommits[1].getTree() - .then(function(tree) { + .then((tree) => { if (toBranch.isHead()) { // Checkout the tree if we're on the branch var opts = { @@ -1721,11 +1755,11 @@ Repository.prototype.mergeBranches = function( return NodeGit.Checkout.tree(repo, tree, opts); } }) - .then(function() { + .then(() => { return toBranch.setTarget( fromCommitOid, message) - .then(function() { + .then(() => { return fromCommitOid; }); }); @@ -1734,10 +1768,10 @@ Repository.prototype.mergeBranches = function( var updateHead; // We have to merge. Lets do it! return NodeGit.Reference.lookup(repo, "HEAD") - .then(function(headRef) { + .then((headRef) => { return headRef.resolve(); }) - .then(function(headRef) { + .then((headRef) => { updateHead = !!headRef && (headRef.name() === toBranch.name()); return NodeGit.Merge.commits( repo, @@ -1746,7 +1780,7 @@ Repository.prototype.mergeBranches = function( mergeOptions ); }) - .then(function(index) { + .then((index) => { // if we have conflicts then throw the index if (index.hasConflicts()) { throw index; @@ -1755,7 +1789,7 @@ Repository.prototype.mergeBranches = function( // No conflicts so just go ahead with the merge return index.writeTreeTo(repo); }) - .then(function(oid) { + .then((oid) => { var mergeDecorator; if (fromBranch.isTag()) { mergeDecorator = "tag"; @@ -1779,7 +1813,7 @@ Repository.prototype.mergeBranches = function( return Promise.all([oid, processMergeMessageCallback(message)]); }) - .then(function([oid, message]) { + .then(([oid, message]) => { return repo.createCommit( toBranch.name(), signature, @@ -1789,25 +1823,25 @@ Repository.prototype.mergeBranches = function( [toCommitOid, fromCommitOid] ); }) - .then(function(commit) { + .then((commit) => { // we've updated the checked out branch, so make sure we update // head so that our index isn't messed up if (updateHead) { return repo.getBranch(to) - .then(function(branch) { + .then((branch) => { return repo.getBranchCommit(branch); }) - .then(function(branchCommit) { + .then((branchCommit) => { return branchCommit.getTree(); }) - .then(function(tree) { + .then((tree) => { var opts = { checkoutStrategy: NodeGit.Checkout.STRATEGY.SAFE | NodeGit.Checkout.STRATEGY.RECREATE_MISSING }; return NodeGit.Checkout.tree(repo, tree, opts); }) - .then(function() { + .then(() => { return commit; }); } diff --git a/test/tests/checkout.js b/test/tests/checkout.js index e3815a35f..e821016da 100644 --- a/test/tests/checkout.js +++ b/test/tests/checkout.js @@ -109,60 +109,63 @@ describe("Checkout", function() { }); it("can checkout an index with conflicts", function() { - var test = this; + const test = this; - var testBranchName = "test"; - var ourCommit; + const testBranchName = "test"; + let ourCommit; + let signature; - return test.repository.getBranchCommit(checkoutBranchName) - .then(function(commit) { + return test.repository.defaultSignature() + .then((signatureResult) => { + signature = signatureResult; + return test.repository.getBranchCommit(checkoutBranchName); + }) + .then((commit) => { ourCommit = commit; return test.repository.createBranch(testBranchName, commit.id()); }) - .then(function() { + .then(() => { return test.repository.checkoutBranch(testBranchName); }) - .then(function(branch) { + .then((branch) => { fse.writeFileSync(packageJsonPath, "\n"); return test.repository.refreshIndex() - .then(function(index) { + .then((index) => { return index.addByPath(packageJsonName) - .then(function() { + .then(() => { return index.write(); }) - .then(function() { + .then(() => { return index.writeTree(); }); }); }) - .then(function(oid) { + .then((oid) => { assert.equal(oid.toString(), "85135ab398976a4d5be6a8704297a45f2b1e7ab2"); - var signature = test.repository.defaultSignature(); - return test.repository.createCommit("refs/heads/" + testBranchName, signature, signature, "we made breaking changes", oid, [ourCommit]); }) - .then(function(commit) { + .then((commit) => { return Promise.all([ test.repository.getBranchCommit(testBranchName), test.repository.getBranchCommit("master") ]); }) - .then(function(commits) { + .then((commits) => { return NodeGit.Merge.commits(test.repository, commits[0], commits[1], null); }) - .then(function(index) { + .then((index) => { assert.ok(index); assert.ok(index.hasConflicts && index.hasConflicts()); return NodeGit.Checkout.index(test.repository, index); }) - .then(function() { + .then(() => { // Verify that the conflict has been written to disk var conflictedContent = fse.readFileSync(packageJsonPath, "utf-8"); @@ -178,7 +181,7 @@ describe("Checkout", function() { return Checkout.head(test.repository, opts); }) - .then(function() { + .then(() => { var finalContent = fse.readFileSync(packageJsonPath, "utf-8"); assert.equal(finalContent, "\n"); }); diff --git a/test/tests/repository.js b/test/tests/repository.js index 9427a8f9c..3cce77889 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -120,9 +120,10 @@ describe("Repository", function() { }); it("can get the default signature", function() { - var sig = this.repository.defaultSignature(); - - assert(sig instanceof Signature); + this.repository.defaultSignature() + .then((sig) => { + assert(sig instanceof Signature); + }); }); it("gets statuses with StatusFile", function() { @@ -263,16 +264,21 @@ describe("Repository", function() { }); it("can commit on head on a empty repo with createCommitOnHead", function() { - var fileName = "my-new-file-that-shouldnt-exist.file"; - var fileContent = "new file from repository test"; - var repo = this.emptyRepo; - var filePath = path.join(repo.workdir(), fileName); - var authSig = repo.defaultSignature(); - var commitSig = repo.defaultSignature(); - var commitMsg = "Doug this has been commited"; - - return fse.writeFile(filePath, fileContent) - .then(function() { + const fileName = "my-new-file-that-shouldnt-exist.file"; + const fileContent = "new file from repository test"; + const repo = this.emptyRepo; + const filePath = path.join(repo.workdir(), fileName); + const commitMsg = "Doug this has been commited"; + let authSig; + let commitSig; + + return repo.defaultSignature() + .then((sig) => { + authSig = sig; + commitSig = sig; + return fse.writeFile(filePath, fileContent); + }) + .then(() => { return repo.createCommitOnHead( [fileName], authSig, @@ -280,7 +286,7 @@ describe("Repository", function() { commitMsg ); }) - .then(function(oidResult) { + .then((oidResult) => { return repo.getHeadCommit() .then(function(commit) { assert.equal( diff --git a/test/tests/signature.js b/test/tests/signature.js index 9a6b2119b..e0387c3d3 100644 --- a/test/tests/signature.js +++ b/test/tests/signature.js @@ -45,37 +45,39 @@ describe("Signature", function() { var savedUserName; var savedUserEmail; - var cleanUp = function() { + var cleanUp = () => { return exec("git config --global user.name \"" + savedUserName + "\"") - .then(function() { + .then(() => { exec("git config --global user.email \"" + savedUserEmail + "\""); }); }; return exec("git config --global user.name") - .then(function(userName) { + .then((userName) => { savedUserName = userName.trim(); return exec("git config --global user.email"); }) - .then(function(userEmail) { + .then((userEmail) => { savedUserEmail = userEmail.trim(); return exec("git config --global --unset user.name"); }) - .then(function() { + .then(() => { return exec("git config --global --unset user.email"); }) - .then(function() { + .then(() => { return Repository.open(reposPath); }) - .then(function(repo) { - var sig = repo.defaultSignature(); + .then((repo) => { + return repo.defaultSignature(); + }) + .then((sig) => { assert.equal(sig.name(), "unknown"); assert.equal(sig.email(), "unknown@example.com"); }) .then(cleanUp) - .catch(function(e) { + .catch((e) => { return cleanUp() .then(function() { return Promise.reject(e); diff --git a/test/tests/stash.js b/test/tests/stash.js index 6d1a20c04..a8720438b 100644 --- a/test/tests/stash.js +++ b/test/tests/stash.js @@ -31,22 +31,23 @@ describe("Stash", function() { }); function saveDropStash(repo, stashMessage) { - var fileName = "README.md"; - var fileContent = "Cha-cha-cha-chaaaaaangessssss"; - var filePath = path.join(repo.workdir(), fileName); - var oldContent; - var stashes = []; - var stashOid; + const fileName = "README.md"; + const fileContent = "Cha-cha-cha-chaaaaaangessssss"; + const filePath = path.join(repo.workdir(), fileName); + let oldContent; + let stashes = []; + let stashOid; return fse.readFile(filePath) - .then(function(content) { + .then((content) => { oldContent = content; return fse.writeFile(filePath, fileContent); }) - .then(function() { - return Stash.save(repo, repo.defaultSignature(), stashMessage, 0); + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, stashMessage, 0); }) - .then(function(oid) { + .then((oid) => { stashOid = oid; var stashCb = function(index, message, oid) { stashes.push({index: index, message: message, oid: oid}); @@ -54,7 +55,7 @@ describe("Stash", function() { return Stash.foreach(repo, stashCb); }) - .then(function() { + .then(() => { assert.equal(stashes.length, 1); assert.equal(stashes[0].index, 0); const expectedMessage = !stashMessage ? @@ -65,20 +66,20 @@ describe("Stash", function() { return Stash.drop(repo, 0); }) - .then(function () { + .then(() => { stashes = []; - var stashCb = function(index, message, oid) { + var stashCb = (index, message, oid) => { stashes.push({index: index, message: message, oid: oid}); }; return Stash.foreach(repo, stashCb); }) - .then(function() { + .then(() => { assert.equal(stashes.length, 0); }) - .catch(function(e) { + .catch((e) => { return fse.writeFile(filePath, oldContent) - .then(function() { + .then(() => { return Promise.reject(e); }); }); @@ -93,78 +94,80 @@ describe("Stash", function() { }); it("can save and pop a stash", function() { - var fileNameA = "README.md"; - var fileNameB = "install.js"; - var oldContentA; - var oldContentB; - var fileContent = "Cha-cha-cha-chaaaaaangessssss"; - var repo = this.repository; - var filePathA = path.join(repo.workdir(), fileNameA); - var filePathB = path.join(repo.workdir(), fileNameB); - var stashMessage = "stash test"; + const fileNameA = "README.md"; + const fileNameB = "install.js"; + let oldContentA; + let oldContentB; + const fileContent = "Cha-cha-cha-chaaaaaangessssss"; + const repo = this.repository; + const filePathA = path.join(repo.workdir(), fileNameA); + const filePathB = path.join(repo.workdir(), fileNameB); + const stashMessage = "stash test"; return fse.readFile(filePathA, "utf-8") - .then(function(content) { + .then((content) => { oldContentA = content; return fse.writeFile(filePathA, fileContent); }) - .then(function() { + .then(() => { return fse.readFile(filePathB, "utf-8"); }) - .then(function(content) { + .then((content) => { oldContentB = content; return fse.writeFile(filePathB, fileContent); }) - .then(function() { - return Stash.save(repo, repo.defaultSignature(), stashMessage, 0); + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, stashMessage, 0); }) - .then(function() { + .then(() => { return fse.readFile(filePathA, "utf-8"); }) - .then(function(content) { + .then((content) => { assert.equal(oldContentA, content); return fse.readFile(filePathB, "utf-8"); }) - .then(function(content) { + .then((content) => { assert.equal(oldContentB, content); return Stash.pop(repo, 0); }) - .then(function() { + .then(() => { return fse.readFile(filePathA, "utf-8"); }) - .then(function(content) { + .then((content) => { assert.equal(fileContent, content); return fse.readFile(filePathB, "utf-8"); }) - .then(function(content) { + .then((content) => { assert.equal(fileContent, content); }); }); it("can save a stash, change files, and fail to pop stash", function() { - var fileName = "README.md"; - var fileContent = "Cha-cha-cha-chaaaaaangessssss"; - var fileContent2 = "Somewhere over the repo, changes were made."; - var repo = this.repository; - var filePath = path.join(repo.workdir(), fileName); - var oldContent; - var stashMessage = "stash test"; + const fileName = "README.md"; + const fileContent = "Cha-cha-cha-chaaaaaangessssss"; + const fileContent2 = "Somewhere over the repo, changes were made."; + const repo = this.repository; + const filePath = path.join(repo.workdir(), fileName); + let oldContent; + const stashMessage = "stash test"; return fse.readFile(filePath) - .then(function(content) { + .then((content) => { oldContent = content; return fse.writeFile(filePath, fileContent); }) - .then(function() { - return Stash.save(repo, repo.defaultSignature(), stashMessage, 0); + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, stashMessage, 0); }) - .then(function() { + .then(() => { return fse.writeFile(filePath, fileContent2); }) - .then(function() { + .then(() => { return Stash.pop(repo, 0); }) - .catch(function(reason) { + .catch((reason) => { if (reason.message !== "1 conflict prevents checkout") { throw reason; } else { @@ -174,33 +177,34 @@ describe("Stash", function() { }); it("can save, apply, then drop the stash", function() { - var fileName = "README.md"; - var fileContent = "Cha-cha-cha-chaaaaaangessssss"; - var repo = this.repository; - var filePath = path.join(repo.workdir(), fileName); - var oldContent; - var stashMessage = "stash test"; + const fileName = "README.md"; + const fileContent = "Cha-cha-cha-chaaaaaangessssss"; + const repo = this.repository; + const filePath = path.join(repo.workdir(), fileName); + let oldContent; + const stashMessage = "stash test"; return fse.readFile(filePath) - .then(function(content) { + .then((content) => { oldContent = content; return fse.writeFile(filePath, fileContent); }) - .then(function() { - return Stash.save(repo, repo.defaultSignature(), stashMessage, 0); + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, stashMessage, 0); }) - .then(function() { + .then(() => { return Stash.apply(repo, 0); }) - .then(function() { + .then(() => { return Stash.drop(repo, 0); - }, function() { + }, () => { throw new Error("Unable to drop stash after apply."); }) - .then(function() { + .then(() => { return Stash.drop(repo, 0); }) - .catch(function(reason) { + .catch((reason) => { if (reason.message !== "reference 'refs/stash' not found") { throw reason; } @@ -208,46 +212,48 @@ describe("Stash", function() { }); it("can save multiple stashes and pop an arbitrary stash", function() { - var fileName = "README.md"; - var fileContentA = "Hi. It's me. I'm the dog. My name is the dog."; - var fileContentB = "Everyone likes me. I'm cute."; - var fileContentC = "I think I will bark at nothing now. Ba. Ba. Baba Baba."; - var repo = this.repository; - var filePath = path.join(repo.workdir(), fileName); - var oldContent; - var stashMessageA = "stash test A"; - var stashMessageB = "stash test B"; - var stashMessageC = "stash test C"; - - function writeAndStash(path, content, message) { + const fileName = "README.md"; + const fileContentA = "Hi. It's me. I'm the dog. My name is the dog."; + const fileContentB = "Everyone likes me. I'm cute."; + const fileContentC = + "I think I will bark at nothing now. Ba. Ba. Baba Baba."; + const repo = this.repository; + const filePath = path.join(repo.workdir(), fileName); + let oldContent; + const stashMessageA = "stash test A"; + const stashMessageB = "stash test B"; + const stashMessageC = "stash test C"; + + const writeAndStash = (path, content, message) => { return fse.writeFile(path, content) - .then(function() { - return Stash.save(repo, repo.defaultSignature(), message, 0); + .then(() => repo.defaultSignature()) + .then((signature) => { + return Stash.save(repo, signature, message, 0); }); - } + }; return fse.readFile(filePath, "utf-8") - .then(function (content) { + .then((content) => { oldContent = content; return writeAndStash(filePath, fileContentA, stashMessageA); }) - .then(function() { + .then(() => { return writeAndStash(filePath, fileContentB, stashMessageB); }) - .then(function() { + .then(() => { return writeAndStash(filePath, fileContentC, stashMessageC); }) - .then(function() { + .then(() => { return fse.readFile(filePath, "utf-8"); }) - .then(function(content) { + .then((content) => { assert.equal(oldContent, content); return Stash.pop(repo, 1); }) - .then(function() { + .then(() => { return fse.readFile(filePath, "utf-8"); }) - .then(function(content) { + .then((content) => { assert.equal(fileContentB, content); }); }); diff --git a/test/tests/tag.js b/test/tests/tag.js index 51268b40a..844fa43be 100644 --- a/test/tests/tag.js +++ b/test/tests/tag.js @@ -159,11 +159,15 @@ describe("Tag", function() { it("can create a new signed tag with Tag.create and delete it", function() { var name = "created-signed-tag-create"; var repository = this.repository; - var signature = Signature.default(repository); + var signature = null; var commit = null; var commit2 = null; - return repository.getCommit(commitPointedTo) + return Signature.default(repository) + .then(function(signatureResult) { + signature = signatureResult; + return repository.getCommit(commitPointedTo); + }) .then(function(theCommit) { commit = theCommit; return repository.getCommit(commitPointedTo2); @@ -580,10 +584,14 @@ describe("Tag", function() { var oid = Oid.fromString(commitPointedTo); var name = "created-signed-tag-annotationCreate"; var repository = this.repository; - var signature = Signature.default(repository); + var signature = null; var odb = null; - return repository.odb() + return Signature.default(repository) + .then(function(signatureResult) { + signature = signatureResult; + return repository.odb(); + }) .then(function(theOdb) { odb = theOdb; }) From edfa9ec6c486ffc374f236e08fab52beee55d783 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 7 Feb 2019 15:06:38 -0700 Subject: [PATCH 043/145] createCommitWithSignature can now handle dangling / non-existent refs --- generate/input/descriptor.json | 10 ++- lib/reference.js | 108 +++++++++++++++++++++++++++++++++ lib/repository.js | 17 +++--- 3 files changed, 127 insertions(+), 8 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index e218348ff..9e6a8a83e 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -3068,7 +3068,15 @@ "ignore": true }, "git_repository_ident": { - "ignore": true + "args": { + "name": { + "isReturn": true + }, + "email": { + "isReturn": true + } + }, + "isAsync": false }, "git_repository_init_init_options": { "ignore": true diff --git a/lib/reference.js b/lib/reference.js index 821ace32f..958693d55 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -63,3 +63,111 @@ Reference.prototype.isValid = function() { Reference.prototype.toString = function() { return this.name(); }; + +const MAX_NESTING_LEVEL = 10; + +const getTerminal = (repo, refName, nesting, prevRef = null) => { + if (nesting > MAX_NESTING_LEVEL) { + return Promise.resolve({ + error: NodeGit.Error.CODE.ENOTFOUND, + out: prevRef + }); + } + + return NodeGit.Reference.lookup(repo, refName) + .then((ref) => { + if (ref.type() === NodeGit.Reference.TYPE.OID) { + return { + error: NodeGit.Error.CODE.OK, + out: ref + }; + } else { + return getTerminal(repo, ref.symbolicTarget(), nesting + 1, ref) + .then(({ error, out }) => { + if (error === NodeGit.Error.CODE.ENOTFOUND && !out) { + return { error, out: ref }; + } else { + return { error, out }; + } + }); + } + }) + .catch((error) => { + return { + error: error.errno, + out: null + }; + }); +}; + +const getSignatureForReflog = (repo) => { + const { email, name } = repo.ident(); + if (email && name) { + return Promise.resolve(NodeGit.Signature.now(name, email)); + } + + return NodeGit.Signature.default(repo) + .catch(() => NodeGit.Signature.now("unknown", "unknown")); +}; + +Reference.updateTerminal = function ( + repo, + refName, + oid, + signature, + logMessage +) { + let signatureToUse; + let promiseChain = Promise.resolve(); + + if (!signature) { + promiseChain = promiseChain + .then(() => getSignatureForReflog(repo)) + .then((sig) => { + signatureToUse = sig; + return Promise.resolve(); + }); + } else { + signatureToUse = signature; + } + + return promiseChain + .then(() => getTerminal(repo, refName, 0)) + .then(({ error, out }) => { + if (error === NodeGit.Error.CODE.ENOTFOUND && out) { + return NodeGit.Reference.create( + repo, + out.symbolicTarget(), + oid, + 0, + logMessage + ); + } else if (error === NodeGit.Error.CODE.ENOTFOUND) { + return NodeGit.Reference.create( + repo, + refName, + oid, + 0, + logMessage + ); + } else { + return NodeGit.Reference.createMatching( + repo, + out.name(), + oid, + 1, + out.target(), + logMessage + ); + } + }) + .then(() => NodeGit.Reflog.read(repo, refName)) + .then((reflog) => { + // We may want some kind of transactional logic for this + // There is a theoretical timing issue that could result in updating + // the wrong reflog + reflog.drop(0, 1); + reflog.append(oid, signatureToUse, logMessage); + return reflog.write(); + }); +}; diff --git a/lib/repository.js b/lib/repository.js index 48d808ec8..7c2326036 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -683,7 +683,6 @@ Repository.prototype.createCommitWithSignature = function( var repo = this; var promises = []; var commitContent; - var commit; var skippedSigning; parents = parents || []; @@ -766,14 +765,18 @@ Repository.prototype.createCommitWithSignature = function( return repo.getCommit(commitOid) .then(function(commitResult) { - commit = commitResult; - return repo.getReference(updateRef); - }).then(function(ref) { - return ref.setTarget(commitOid, getReflogMessageForCommit(commit)); - }).then(function() { + return Reference.updateTerminal( + repo, + updateRef, + commitOid, + committer, + getReflogMessageForCommit(commitResult) + ); + }) + .then(function() { return commitOid; }); - }); + }); }; /** From f8cdcf615f1d1b98bf4043c196c695f845cab23c Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Thu, 7 Feb 2019 12:24:44 -0700 Subject: [PATCH 044/145] Handle new gyp information for electron builds --- generate/templates/templates/binding.gyp | 18 ++++--------- package-lock.json | 25 +++++++++++++++--- package.json | 1 + utils/isBuildingForElectron.js | 32 ++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 17 deletions(-) create mode 100644 utils/isBuildingForElectron.js diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index e6f1141cb..c15a7ec55 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -1,21 +1,13 @@ { - "conditions": [ - ["(OS=='win' and node_root_dir.split('\\\\')[-1].startswith('iojs')) or (OS=='mac' and node_root_dir.split('/')[-1].startswith('iojs'))", { - "variables": { - "is_electron%": "1", - } - }, { - "variables": { - "is_electron%": "0", - } - }] - ], + "variables": { + "is_electron%": " arr[arr.length - 1]; +const sep = process.platform === "win32" ? "\\\\" : "/"; +const [, , nodeRootDir] = process.argv; + +let isElectron = last(nodeRootDir.split(sep)).startsWith("iojs"); + +if (!isElectron) { + try { + // Not ideal, would love it if there were a full featured gyp package to do this operation instead. + const { variables: { built_with_electron } } = JSON5.parse( + fs.readFileSync( + path.resolve(nodeRootDir, "include", "node", "config.gypi"), + "utf8" + ) + ); + + if (built_with_electron) { + isElectron = true; + } + } catch (e) {} +} + +fs.writeFileSync("was_electron", isElectron ? "1" : "0"); +process.stdout.write(isElectron ? "1" : "0"); From c3e58f34e91127cffbe6006c06102f68c0c03588 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 7 Feb 2019 16:09:01 -0700 Subject: [PATCH 045/145] Add test case for updating non-existent refs with createCommitWithSignature --- test/tests/commit.js | 93 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 92 insertions(+), 1 deletion(-) diff --git a/test/tests/commit.js b/test/tests/commit.js index 6f212d6a4..8104624c2 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -17,6 +17,7 @@ describe("Commit", function() { var Oid = NodeGit.Oid; var reposPath = local("../repos/workdir"); + var newRepoPath = local("../repos/new"); var oid = "fce88902e66c72b5b93e75bdb5ae717038b221f6"; function reinitialize(test) { @@ -1128,7 +1129,8 @@ describe("Commit", function() { }); }); - it("Can create a signed commit in a repo and update refs", function() { + it("Can create a signed commit in a repo and update existing ref", + function() { var signedData = "-----BEGIN PGP SIGNATURE-----\n" + "Version: GnuPG v1.4.12 (Darwin)\n" + "\n" + @@ -1235,6 +1237,95 @@ describe("Commit", function() { }); }); + it("Can create a signed commit in bare a repo and update non-existent ref", + function() { + var signedData = "-----BEGIN PGP SIGNATURE-----\n" + + "\n" + + "iQIzBAABCAAdFiEEHYpzGBSIRCy6QrNr0R10kNTwiG8FAlxcuSoACgkQ0R10kNTw\n" + + "iG9sZA//Z6mrX5l//gjtn7Fy3Cg5khasNMZA15JUPzfoSyVkaYM7g/iZrJr4uZmm\n" + + "lrhqxTDP4SUEL6dMOT0fjAudulP19Stv0mUMOoQ9cfvU0DAuFlI1z2Ny9IR+3hJK\n" + + "XpIQCHZAAY9KrGajJvDO+WqukrMwKh2dwaQLgB2+cS7ehBpbW45+l+Bq4hTlULiJ\n" + + "ohZ2SQhqj65knErdbfJ2B7yVlQbfG2vbD6qN4qJOkJpkFRdDhLmGnNjUj+vcmYO2\n" + + "Be5CLyjuhYszzUqys6ix4UHr10KihFk31N17CgA2ZsDSzE3VsMCPlVPV9jWuMceJ\n" + + "0IFsJEXFR4SOlRAq23BxD7aaYao6AF/YBhCQnDiuiQLCJ7WdUAmja6VPyEajAjoX\n" + + "CkdDs1P4N9IeIPvJECn8Df4NEEkzW8sV3i96ryk066m1ZmZWemJ2zdGVbfR+AuFZ\n" + + "7QwgBRidj3thIk0geh9g10+pbRuTzxNXklqxq4DQb3VEXIIJMUcqtN1bUPEPiLyA\n" + + "SU3uJ1THyYznAVZy6aqw+mNq7Lg9gV65LRd0WtNqgneknDZoH3zXyzlcJexjHkRF\n" + + "qt4K6w9TDA2Erda3wE4BM4MCgl1Hc629kH3ROCyWTFuJAEZtNDJPgIc2LTRDhHNd\n" + + "+K937RhWU8lUnI2jJLmKdQDk2dnS1ZepFqA5Ynwza1qDSOgUqVw=\n" + + "=M81P\n" + + "-----END PGP SIGNATURE-----"; + + const onSignature = () => ({ + code: NodeGit.Error.CODE.OK, + field: "gpgsig", + signedData + }); + + var expectedCommitId = "ef11571eb3590007712c7ee3b4a11cd9c6094e30"; + var fileName = "newfile.txt"; + var fileContent = "hello world"; + + var repo; + var index; + var treeOid; + + return NodeGit.Repository.init(newRepoPath, 0) + .then(function(repoResult) { + repo = repoResult; + return fse.writeFile(path.join(repo.workdir(), fileName), fileContent); + }) + .then(function() { + return repo.refreshIndex(); + }) + .then(function(indexResult) { + index = indexResult; + }) + .then(function() { + return index.addByPath(fileName); + }) + .then(function() { + return index.write(); + }) + .then(function() { + return index.writeTree(); + }) + .then(function(oidResult) { + treeOid = oidResult; + return Promise.all([ + NodeGit.Signature.create("Foo Bar", "foo@bar.com", 123456789, 60), + NodeGit.Signature.create("Foo A Bar", "foo@bar.com", 987654321, 90) + ]); + }) + .then(function(signatures) { + var author = signatures[0]; + var committer = signatures[1]; + + return repo.createCommitWithSignature( + "HEAD", + author, + committer, + "message", + treeOid, + [], + onSignature); + }) + .then(function(commitId) { + assert.equal(expectedCommitId, commitId); + return NodeGit.Commit.lookup(repo, commitId); + }) + .then(function(commit) { + return commit.getSignature("gpgsig"); + }) + .then(function(signatureInfo) { + assert.equal(signedData, signatureInfo.signature); + return repo.getHeadCommit(); + }) + .then(function(headCommit) { + assert.equal(expectedCommitId, headCommit.id()); + }); + }); + it("Can create a signed commit raw", function() { var expectedCommitId = "cc1401eaac4e9e77190e98a9353b305f0c6313d8"; From 48bf6fa1ad998d308c29856c6d237eb43245e9fa Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 7 Feb 2019 16:20:39 -0700 Subject: [PATCH 046/145] Add warning comment for reflog critical section --- lib/reference.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/reference.js b/lib/reference.js index 958693d55..2b0e67733 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -163,9 +163,12 @@ Reference.updateTerminal = function ( }) .then(() => NodeGit.Reflog.read(repo, refName)) .then((reflog) => { - // We may want some kind of transactional logic for this - // There is a theoretical timing issue that could result in updating - // the wrong reflog + // Janky, but works. Ideally, we would want to generate the correct reflog + // entry in the first place, rather than drop the most recent entry and + // write the correct one. + // NOTE: There is a theoretical race condition that could happen here. + // We may want to consider some kind of transactional logic to make sure + // that the reflog on disk isn't modified before we can write back. reflog.drop(0, 1); reflog.append(oid, signatureToUse, logMessage); return reflog.write(); From 6e7032b6d28fec4468a66d50c35a59c36a636160 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Fri, 8 Feb 2019 09:56:16 -0700 Subject: [PATCH 047/145] Add documentation and update parameter order --- lib/reference.js | 25 +++++++++++++++++-------- lib/repository.js | 6 ++++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/lib/reference.js b/lib/reference.js index 2b0e67733..6fdc6fa19 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -64,10 +64,8 @@ Reference.prototype.toString = function() { return this.name(); }; -const MAX_NESTING_LEVEL = 10; - -const getTerminal = (repo, refName, nesting, prevRef = null) => { - if (nesting > MAX_NESTING_LEVEL) { +const getTerminal = (repo, refName, depth = 10, prevRef = null) => { + if (depth <= 0) { return Promise.resolve({ error: NodeGit.Error.CODE.ENOTFOUND, out: prevRef @@ -82,7 +80,7 @@ const getTerminal = (repo, refName, nesting, prevRef = null) => { out: ref }; } else { - return getTerminal(repo, ref.symbolicTarget(), nesting + 1, ref) + return getTerminal(repo, ref.symbolicTarget(), depth - 1, ref) .then(({ error, out }) => { if (error === NodeGit.Error.CODE.ENOTFOUND && !out) { return { error, out: ref }; @@ -110,12 +108,23 @@ const getSignatureForReflog = (repo) => { .catch(() => NodeGit.Signature.now("unknown", "unknown")); }; +/** + * Given a reference name, follows symbolic links and updates the direct + * reference to point to a given OID. Updates the reflog with a given message. + * + * @async + * @param {Repository} repo The repo where the reference and objects live + * @param {String} refName The reference name to update + * @param {Oid} oid The target OID that the reference will point to + * @param {String} logMessage The reflog message to be writted + * @param {Signature} signature Optional signature to use for the reflog entry + */ Reference.updateTerminal = function ( repo, refName, oid, - signature, - logMessage + logMessage, + signature ) { let signatureToUse; let promiseChain = Promise.resolve(); @@ -132,7 +141,7 @@ Reference.updateTerminal = function ( } return promiseChain - .then(() => getTerminal(repo, refName, 0)) + .then(() => getTerminal(repo, refName)) .then(({ error, out }) => { if (error === NodeGit.Error.CODE.ENOTFOUND && out) { return NodeGit.Reference.create( diff --git a/lib/repository.js b/lib/repository.js index 7c2326036..c4a0d8b44 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -769,8 +769,8 @@ Repository.prototype.createCommitWithSignature = function( repo, updateRef, commitOid, - committer, - getReflogMessageForCommit(commitResult) + getReflogMessageForCommit(commitResult), + committer ); }) .then(function() { @@ -897,6 +897,8 @@ Repository.prototype.createTag = function(oid, name, message, callback) { /** * Gets the default signature for the default user and now timestamp + * + * @async * @return {Signature} */ Repository.prototype.defaultSignature = function() { From e18a4fd5aa5503dcedd288cf70bb34104edc71fd Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Fri, 8 Feb 2019 10:57:29 -0700 Subject: [PATCH 048/145] Bump to v0.25.0-alpha.4 --- CHANGELOG.md | 18 ++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9027a79dc..ffcc10a37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Change Log +## v0.25.0-alpha.4 [(2019-02-08)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.4) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.3...v0.25.0-alpha.4) + +#### Summary of changes +- Fixed bug where signing the init commit failed due to being unable to update the `HEAD` ref. +- Changed `NodeGit.Signature.default` to async, because it actually ends up reading the config. +- Fixed bug where templates were not reporting errors for synchronous methods. It's a bit of a wide net, but in general, + it is now possible certain sync methods in NodeGit will begin failin that did not fail before. This is the correct + behavior. +- Switched `NodeGit.Oid.fromString`'s internal implementation from `git_oid_fromstr` to `git_oid_fromstrp` +- Fixed builds for Electron 4 +- Added `NodeGit.Reference.updateTerminal` + +#### Merged PRs into NodeGit +- [Fix non-existent / dangling refs cause Repository.prototype.createCommitWithSignature to fail #1624](https://github.com/nodegit/nodegit/pull/1624) +- [Handle new gyp information for electron builds #1623](https://github.com/nodegit/nodegit/pull/1623) + ## v0.25.0-alpha.3 [(2019-02-05)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.3) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.2...v0.25.0-alpha.3) diff --git a/package-lock.json b/package-lock.json index d7ab33817..d5532245a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.3", + "version": "0.25.0-alpha.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 9597da832..ed9caf48d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.3", + "version": "0.25.0-alpha.4", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 4f3d123475ad8ca9868e3801ed5339c2067493a2 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Fri, 8 Feb 2019 16:32:41 -0700 Subject: [PATCH 049/145] This doesn't belong here --- utils/isBuildingForElectron.js | 1 - 1 file changed, 1 deletion(-) diff --git a/utils/isBuildingForElectron.js b/utils/isBuildingForElectron.js index 58d32bd5e..338244487 100644 --- a/utils/isBuildingForElectron.js +++ b/utils/isBuildingForElectron.js @@ -28,5 +28,4 @@ if (!isElectron) { } catch (e) {} } -fs.writeFileSync("was_electron", isElectron ? "1" : "0"); process.stdout.write(isElectron ? "1" : "0"); From 8f78805acfe279bf37292b6fb6ba26d7a9001240 Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Mon, 11 Feb 2019 09:16:10 -0700 Subject: [PATCH 050/145] Fix macOS and Windows Electron 4 builds --- generate/templates/templates/binding.gyp | 4 ++-- vendor/libgit2.gyp | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index c15a7ec55..f67cf2e31 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -94,7 +94,7 @@ [ "OS=='mac'", { "conditions": [ - ["node_root_dir.split('/')[-1].startswith('iojs')", { + ["<(is_electron) == 1", { "include_dirs": [ "vendor/openssl/include" ], @@ -122,7 +122,7 @@ [ "OS=='win'", { "conditions": [ - ["node_root_dir.split('\\\\')[-1].startswith('iojs')", { + ["<(is_electron) == 1", { "include_dirs": ["vendor/openssl/include"], "libraries": [ "<(module_root_dir)/vendor/openssl/lib/libcrypto.lib", diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index fd5f93cd3..0bfc49c45 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -7,6 +7,7 @@ "library%": "static_library", "openssl_enable_asm%": 0, # only supported with the Visual Studio 2012 (VC11) toolchain. "gcc_version%": 0, + "is_electron%": " Date: Mon, 11 Feb 2019 13:12:25 -0700 Subject: [PATCH 051/145] Use path.sep for windows electron detection in node --- utils/isBuildingForElectron.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/isBuildingForElectron.js b/utils/isBuildingForElectron.js index 338244487..295f6ab1f 100644 --- a/utils/isBuildingForElectron.js +++ b/utils/isBuildingForElectron.js @@ -7,10 +7,9 @@ if (process.argv.length < 3) { } const last = arr => arr[arr.length - 1]; -const sep = process.platform === "win32" ? "\\\\" : "/"; const [, , nodeRootDir] = process.argv; -let isElectron = last(nodeRootDir.split(sep)).startsWith("iojs"); +let isElectron = last(nodeRootDir.split(path.sep)).startsWith("iojs"); if (!isElectron) { try { From b3ad6a2a3beb39654f32116ee22e70014397461f Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 11 Feb 2019 13:12:38 -0700 Subject: [PATCH 052/145] Bump to v0.25.0-alpha.5 --- CHANGELOG.md | 10 ++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffcc10a37..cee02161b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## v0.25.0-alpha.5 [(2019-02-11)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.5) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.4...v0.25.0-alpha.5) + +#### Summary of changes +- Fixed builds for Electron 4 for real this time + +#### Merged PRs into NodeGit +- [Fix macOS and Windows Electron 4 builds #1626](https://github.com/nodegit/nodegit/pull/1626) + ## v0.25.0-alpha.4 [(2019-02-08)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.4) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.3...v0.25.0-alpha.4) diff --git a/package-lock.json b/package-lock.json index d5532245a..aa6cc812e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.4", + "version": "0.25.0-alpha.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ed9caf48d..66ff74038 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.4", + "version": "0.25.0-alpha.5", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From f6c80d6f51bd8b978c090b28e46c9c125f54fcf0 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 12 Feb 2019 09:49:46 -0700 Subject: [PATCH 053/145] Allow backport branch to build on appveyor CI --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 34f73e23d..368e911e8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -58,5 +58,6 @@ build: off branches: only: + - /backport\/.*/ - master - v0.3 From f14d3494c4acb9d7a9a1070a54e2359ebf1896bb Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 12 Feb 2019 12:18:12 -0700 Subject: [PATCH 054/145] Bump Libgit2 fork to v0.28.0 --- vendor/libgit2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/libgit2 b/vendor/libgit2 index 0a271d605..c59d5a2e9 160000 --- a/vendor/libgit2 +++ b/vendor/libgit2 @@ -1 +1 @@ -Subproject commit 0a271d60550c7e14d2c883a57cec58b7f4c454a2 +Subproject commit c59d5a2e9332c8256111de4cc8e69d9c2278ee46 From 704395c2a4cc5627482e99a0666fb7424400480f Mon Sep 17 00:00:00 2001 From: Jake Krammer Date: Tue, 12 Feb 2019 16:10:33 -0700 Subject: [PATCH 055/145] Fix "errorno" typo --- lib/repository.js | 12 ++-- test/tests/rebase.js | 154 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 160 insertions(+), 6 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index c4a0d8b44..22f10668f 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -492,12 +492,12 @@ Repository.prototype.continueRebase = function( rebase = _rebase; return rebase.commit(null, signature) .catch((e) => { - // Ignore all errors to prevent - // this routine from choking now - // that we made rebase.commit - // asynchronous - const errorno = fp.get(["errorno"], e); - if (errorno === NodeGit.Error.CODE.EAPPLIED) { + // If the first commit on continueRebase is a + // "patch already applied" error, + // interpret that as an explicit "skip commit" + // and ignore the error. + const errno = fp.get(["errno"], e); + if (errno === NodeGit.Error.CODE.EAPPLIED) { return; } diff --git a/test/tests/rebase.js b/test/tests/rebase.js index 610721185..a801e991a 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -2076,4 +2076,158 @@ describe("Rebase", function() { throw error; }); }); + + it("will not throw on patch already applied errors", function() { + var baseFileName = "baseNewFile.txt"; + var theirFileName = "myFile.txt"; + + var baseFileContent = "How do you feel about Toll Roads?"; + var theirFileContent = "Hello there"; + + var ourSignature = NodeGit.Signature.create + ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create + ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + + var repository = this.repository; + var initialCommit; + var ourBranch; + var theirBranch; + var rebase; + + return fse.writeFile(path.join(repository.workdir(), baseFileName), + baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function() { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + + return repository.createCommit("HEAD", ourSignature, + ourSignature, "initial commit", oid, []); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + + return repository.getCommit(commitOid).then(function(commit) { + initialCommit = commit; + }).then(function() { + return repository.createBranch(ourBranchName, commitOid) + .then(function(branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); + }); + }) + .then(function(branch) { + theirBranch = branch; + return fse.writeFile( + path.join(repository.workdir(), theirFileName), + theirFileContent + ); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "6f14d06b24fa8ea26f511dd8a94a003fd37eadc5"); + + return repository.createCommit(theirBranch.name(), theirSignature, + theirSignature, "they made a commit", oid, [initialCommit]) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "c4cc225184b9c9682cb48294358d9d65f8ec42c7"); + return repository.createCommit(ourBranch.name(), ourSignature, + ourSignature, "we made a commit", oid, [initialCommit]); + }); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "5814ffa17b8a677191d89d5372f1e46d50d976ae"); + + return removeFileFromIndex(repository, theirFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function() { + return repository.checkoutBranch(ourBranchName); + }) + .then(function() { + return Promise.all([ + repository.getReference(ourBranchName), + repository.getReference(theirBranchName) + ]); + }) + .then(function(refs) { + assert.equal(refs.length, 2); + + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + ]); + }) + .then(function(annotatedCommits) { + assert.equal(annotatedCommits.length, 2); + + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; + + assert.equal(ourAnnotatedCommit.id().toString(), + "5814ffa17b8a677191d89d5372f1e46d50d976ae"); + assert.equal(theirAnnotatedCommit.id().toString(), + "c4cc225184b9c9682cb48294358d9d65f8ec42c7"); + + return NodeGit.Rebase.init( + repository, + ourAnnotatedCommit, + theirAnnotatedCommit + ); + }) + .then(function(newRebase) { + rebase = newRebase; + + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); + + return rebase.next(); + }) + .catch(function(error) { + assert.fail(error); + + throw error; + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), + NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), + "5814ffa17b8a677191d89d5372f1e46d50d976ae"); + + return rebase.commit(null, ourSignature); + }) + .then(function() { + assert.fail("Rebase should have failed."); + }, function (error) { + if (error && error.errno === NodeGit.Error.CODE.EAPPLIED) { + return; + } + + assert.fail(error); + + throw error; + }) + .then(function() { + return repository.continueRebase(); + }) + .then(function() { + return rebase.next(); + }) + .catch(function(error) { + assert.equal(error.errno, NodeGit.Error.CODE.ITEROVER); + }); + }); }); From 177a71327aed614e2b3a306dbac3190d5affd415 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Wed, 13 Feb 2019 14:03:35 -0700 Subject: [PATCH 056/145] We should clear the persistent cell in structs when they are destroyed --- generate/templates/templates/struct_content.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generate/templates/templates/struct_content.cc b/generate/templates/templates/struct_content.cc index 9840cfe4f..0c7b9e4f1 100644 --- a/generate/templates/templates/struct_content.cc +++ b/generate/templates/templates/struct_content.cc @@ -67,6 +67,8 @@ using namespace std; this->raw->{{ fields|payloadFor field.name }} = NULL; {% endif %} } + {% elsif field.hasConstructor |or field.isLibgitType %} + this->{{ field.name }}.Reset(); {% endif %} {% endif %} {% endif %} From 3326e1dd839bc182ee1d86614634a6113a0f1a31 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Thu, 14 Feb 2019 08:48:17 -0700 Subject: [PATCH 057/145] Bump to v0.25.0-alpha.6 --- CHANGELOG.md | 17 +++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cee02161b..c70866e50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Change Log +## v0.25.0-alpha.6 [(2019-02-14)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.6) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.5...v0.25.0-alpha.6) + +#### Summary of changes +- Bumped LibGit2 to v0.28.0. +- Fixed problem with continue rebase preventing users from skipping commits +- Fixed leak where struct/option types were leaking libgit2 pointers + +#### Merged PRs into NodeGit +- [We should clear the persistent cell in structs when they are destroyed #1629](https://github.com/nodegit/nodegit/pull/1629) +- [Fix "errorno" typo #1628](https://github.com/nodegit/nodegit/pull/1628) +- [Bump Libgit2 fork to v0.28.0 #1627](https://github.com/nodegit/nodegit/pull/1627) + + ## v0.25.0-alpha.5 [(2019-02-11)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.5) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.4...v0.25.0-alpha.5) @@ -10,6 +25,7 @@ #### Merged PRs into NodeGit - [Fix macOS and Windows Electron 4 builds #1626](https://github.com/nodegit/nodegit/pull/1626) + ## v0.25.0-alpha.4 [(2019-02-08)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.4) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.3...v0.25.0-alpha.4) @@ -28,6 +44,7 @@ - [Fix non-existent / dangling refs cause Repository.prototype.createCommitWithSignature to fail #1624](https://github.com/nodegit/nodegit/pull/1624) - [Handle new gyp information for electron builds #1623](https://github.com/nodegit/nodegit/pull/1623) + ## v0.25.0-alpha.3 [(2019-02-05)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.3) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.2...v0.25.0-alpha.3) diff --git a/package-lock.json b/package-lock.json index aa6cc812e..b30eb273f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.5", + "version": "0.25.0-alpha.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 66ff74038..6b4d3ac15 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.5", + "version": "0.25.0-alpha.6", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 2f099c8573fec4234c6bee5d4e1a82b283e55e39 Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Thu, 14 Feb 2019 13:08:49 -0700 Subject: [PATCH 058/145] Fix regex state causing subsequent runs of Tag.extractSignature to fail --- lib/tag.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tag.js b/lib/tag.js index a1183bc85..4c21f45aa 100644 --- a/lib/tag.js +++ b/lib/tag.js @@ -123,7 +123,7 @@ Tag.prototype.extractSignature = function(signatureType = "gpgsig") { const odbData = odbObject.toString(); for (const regex of signatureRegexes) { - const matchResult = regex.exec(odbData); + const matchResult = odbData.match(regex); if (matchResult !== null) { return matchResult[0]; From b3fd15b0cb069c62f06b26d9ad3b892b94bbe91c Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Thu, 14 Feb 2019 13:31:09 -0700 Subject: [PATCH 059/145] Update LibGit2 docs to v0.28.0 Callbacks added: - git_apply_delta_cb - git_apply_hunk_cb Methods added: - git_annotated_commit_ref - git_apply - git_apply_to_tree - git_merge_analysis - git merge_analysis_for_ref - git_remote_create_with_opts Exposed classes: - git_index_conflict_iterator - git_index_iterator --- generate/input/callbacks.json | 36 + generate/input/descriptor.json | 130 +- generate/input/libgit2-docs.json | 4562 ++++++++++++++---------- generate/input/libgit2-supplement.json | 218 +- lib/remote.js | 6 + 5 files changed, 2966 insertions(+), 1986 deletions(-) diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index 535ca08b7..c37a7c8ee 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -1,4 +1,40 @@ { + "git_apply_delta_cb": { + "args": [ + { + "name": "delta", + "cType": "const git_diff_delta *" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": 1, + "success": 0, + "error": -1 + } + }, + "git_apply_hunk_cb": { + "args": [ + { + "name": "hunk", + "cType": "const git_diff_hunk *" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": 1, + "success": 0, + "error": -1 + } + }, "git_attr_foreach_cb": { "args": [ { diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 9e6a8a83e..6daa52ce1 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -48,7 +48,7 @@ "repository_init_flag": { "removeString": "INIT_" }, - "otype": { + "object": { "JsName": "TYPE", "owner": "Object", "removeString": "OBJ_" @@ -57,7 +57,7 @@ "JsName": "PROXY", "isMask": false }, - "ref": { + "reference": { "owner": "Reference", "JsName": "TYPE" }, @@ -71,6 +71,9 @@ "status": { "JsName": "STATUS", "isMask": false + }, + "stream": { + "ignore": true } }, "types": @@ -111,6 +114,9 @@ } } }, + "apply_options": { + "hasConstructor": true + }, "attr": { "functions": { "git_attr_foreach": { @@ -1734,10 +1740,69 @@ "../include/str_array_converter.h" ] }, + "index_conflict_iterator": { + "selfFreeing": true, + "freeFunctionName": "git_index_conflict_iterator_free", + "functions": { + "git_index_conflict_iterator_free": { + "ignore": true + }, + "git_index_conflict_iterator_new": { + "args": { + "iterator_out": { + "ownedBy": ["index"] + } + } + }, + "git_index_conflict_next": { + "isAsync": false, + "jsFunctionName": "next", + "cppFunctionName": "Next", + "args": { + "ancestor_out": { + "isReturn": true, + "ownedByThis": true + }, + "our_out": { + "isReturn": true, + "ownedByThis": true + }, + "their_out": { + "isReturn": true, + "ownedByThis": true + } + } + } + } + }, "index_entry": { "hasConstructor": true, "ignoreInit": true }, + "index_iterator": { + "selfFreeing": true, + "freeFunctionName": "git_index_iterator_free", + "functions": { + "git_index_iterator_free": { + "ignore": true + }, + "git_index_iterator_new": { + "args": { + "iterator_out": { + "ownedBy": ["index"] + } + } + }, + "git_index_iterator_next": { + "isAsync": false, + "args": { + "out": { + "ownedByThis": true + } + } + } + } + }, "index_name_entry": { "functions": { "git_index_name_add": { @@ -1768,6 +1833,11 @@ ] }, "index_reuc_entry": { + "fields": { + "mode": { + "cType": "uint32_t [3]" + } + }, "functions": { "git_index_reuc_add": { "cppFunctionName": "Add", @@ -1934,7 +2004,51 @@ } }, "git_merge_analysis": { - "ignore": true + "isAsync": true, + "args": { + "analysis_out": { + "isReturn": true + }, + "preference_out": { + "isReturn": true + }, + "their_heads": { + "cType": "const git_annotated_commit **", + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitAnnotatedCommit" + }, + "their_heads_len": { + "cType": "size_t", + "cppClassName": "Number", + "jsClassName": "Number" + } + } + }, + "git_merge_analysis_for_ref": { + "isAsync": true, + "args": { + "analysis_out": { + "isReturn": true + }, + "preference_out": { + "isReturn": true + }, + "their_heads": { + "cType": "const git_annotated_commit **", + "cppClassName": "Array", + "jsClassName": "Array", + "arrayElementCppClassName": "GitAnnotatedCommit" + }, + "their_heads_len": { + "cType": "size_t", + "cppClassName": "Number", + "jsClassName": "Number" + } + }, + "return": { + "isErrorCode": true + } }, "git_merge_base_many": { "ignore": true @@ -2854,6 +2968,13 @@ } } }, + "git_remote_create_with_opts": { + "args": { + "opts": { + "isOptional": true + } + } + }, "git_remote_connect": { "isAsync": true, "return": { @@ -3433,6 +3554,9 @@ "git2/sys/stream.h" ] }, + "stream_registration": { + "ignore": true + }, "submodule": { "selfFreeing": true, "ownerFn": { diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index 82bfd8a1a..90392f122 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -14,6 +14,17 @@ "meta": {}, "lines": 121 }, + { + "file": "git2/apply.h", + "functions": [ + "git_apply_delta_cb", + "git_apply_hunk_cb", + "git_apply_to_tree", + "git_apply" + ], + "meta": {}, + "lines": 125 + }, { "file": "git2/attr.h", "functions": [ @@ -91,14 +102,13 @@ "file": "git2/buffer.h", "functions": [ "git_buf_dispose", - "git_buf_free", "git_buf_grow", "git_buf_set", "git_buf_is_binary", "git_buf_contains_nul" ], "meta": {}, - "lines": 134 + "lines": 122 }, { "file": "git2/checkout.h", @@ -181,7 +191,7 @@ "git_libgit2_opts" ], "meta": {}, - "lines": 393 + "lines": 402 }, { "file": "git2/config.h", @@ -242,6 +252,18 @@ "meta": {}, "lines": 48 }, + { + "file": "git2/deprecated.h", + "functions": [ + "git_buf_free", + "giterr_last", + "giterr_clear", + "giterr_set_str", + "giterr_set_oom" + ], + "meta": {}, + "lines": 148 + }, { "file": "git2/describe.h", "functions": [ @@ -305,13 +327,13 @@ { "file": "git2/errors.h", "functions": [ - "giterr_last", - "giterr_clear", - "giterr_set_str", - "giterr_set_oom" + "git_error_last", + "git_error_clear", + "git_error_set_str", + "git_error_set_oom" ], "meta": {}, - "lines": 156 + "lines": 157 }, { "file": "git2/filter.h", @@ -385,6 +407,9 @@ "git_index_add", "git_index_entry_stage", "git_index_entry_is_conflict", + "git_index_iterator_new", + "git_index_iterator_next", + "git_index_iterator_free", "git_index_add_bypath", "git_index_add_frombuffer", "git_index_remove_bypath", @@ -403,7 +428,7 @@ "git_index_conflict_iterator_free" ], "meta": {}, - "lines": 806 + "lines": 829 }, { "file": "git2/indexer.h", @@ -447,6 +472,7 @@ "git_merge_file_init_options", "git_merge_init_options", "git_merge_analysis", + "git_merge_analysis_for_ref", "git_merge_base", "git_merge_bases", "git_merge_base_many", @@ -460,7 +486,7 @@ "git_merge" ], "meta": {}, - "lines": 587 + "lines": 606 }, { "file": "git2/message.h", @@ -805,6 +831,8 @@ "file": "git2/remote.h", "functions": [ "git_remote_create", + "git_remote_create_init_options", + "git_remote_create_with_opts", "git_remote_create_with_fetchspec", "git_remote_create_anonymous", "git_remote_create_detached", @@ -851,7 +879,7 @@ "git_remote_default_branch" ], "meta": {}, - "lines": 852 + "lines": 926 }, { "file": "git2/repository.h", @@ -904,7 +932,7 @@ "git_repository_set_ident" ], "meta": {}, - "lines": 864 + "lines": 877 }, { "file": "git2/reset.h", @@ -1255,11 +1283,12 @@ { "file": "git2/sys/stream.h", "functions": [ + "git_stream_register", "git_stream_cb", "git_stream_register_tls" ], "meta": {}, - "lines": 54 + "lines": 130 }, { "file": "git2/sys/time.h", @@ -1289,7 +1318,7 @@ "git_smart_subtransport_ssh" ], "meta": {}, - "lines": 389 + "lines": 435 }, { "file": "git2/tag.h", @@ -1414,7 +1443,7 @@ "git_transport_certificate_check_cb" ], "meta": {}, - "lines": 438 + "lines": 442 }, { "file": "git2/worktree.h", @@ -1601,12 +1630,12 @@ "group": "annotated", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_annotated_commit_id-1" + "ex/v0.28.0/checkout.html#git_annotated_commit_id-1" ], "merge.c": [ - "ex/HEAD/merge.html#git_annotated_commit_id-1", - "ex/HEAD/merge.html#git_annotated_commit_id-2", - "ex/HEAD/merge.html#git_annotated_commit_id-3" + "ex/v0.28.0/merge.html#git_annotated_commit_id-1", + "ex/v0.28.0/merge.html#git_annotated_commit_id-2", + "ex/v0.28.0/merge.html#git_annotated_commit_id-3" ] } }, @@ -1633,8 +1662,8 @@ "group": "annotated", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_annotated_commit_ref-2", - "ex/HEAD/checkout.html#git_annotated_commit_ref-3" + "ex/v0.28.0/checkout.html#git_annotated_commit_ref-2", + "ex/v0.28.0/checkout.html#git_annotated_commit_ref-3" ] } }, @@ -1661,10 +1690,89 @@ "group": "annotated", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_annotated_commit_free-4" + "ex/v0.28.0/checkout.html#git_annotated_commit_free-4" ] } }, + "git_apply_to_tree": { + "type": "function", + "file": "git2/apply.h", + "line": 85, + "lineto": 90, + "args": [ + { + "name": "out", + "type": "git_index **", + "comment": "the postimage of the application" + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository to apply" + }, + { + "name": "preimage", + "type": "git_tree *", + "comment": "the tree to apply the diff to" + }, + { + "name": "diff", + "type": "git_diff *", + "comment": "the diff to apply" + }, + { + "name": "options", + "type": "const git_apply_options *", + "comment": "the options for the apply (or null for defaults)" + } + ], + "argline": "git_index **out, git_repository *repo, git_tree *preimage, git_diff *diff, const git_apply_options *options", + "sig": "git_index **::git_repository *::git_tree *::git_diff *::const git_apply_options *", + "return": { + "type": "int", + "comment": null + }, + "description": "

Apply a git_diff to a git_tree, and return the resulting image\n as an index.

\n", + "comments": "", + "group": "apply" + }, + "git_apply": { + "type": "function", + "file": "git2/apply.h", + "line": 121, + "lineto": 125, + "args": [ + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository to apply to" + }, + { + "name": "diff", + "type": "git_diff *", + "comment": "the diff to apply" + }, + { + "name": "location", + "type": "git_apply_location_t", + "comment": "the location to apply (workdir, index or both)" + }, + { + "name": "options", + "type": "const git_apply_options *", + "comment": "the options for the apply (or null for defaults)" + } + ], + "argline": "git_repository *repo, git_diff *diff, git_apply_location_t location, const git_apply_options *options", + "sig": "git_repository *::git_diff *::git_apply_location_t::const git_apply_options *", + "return": { + "type": "int", + "comment": null + }, + "description": "

Apply a git_diff to the given repository, making changes directly\n in the working directory, the index, or both.

\n", + "comments": "", + "group": "apply" + }, "git_attr_value": { "type": "function", "file": "git2/attr.h", @@ -1696,36 +1804,36 @@ { "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." + "comment": null }, { "name": "repo", "type": "git_repository *", - "comment": "The repository containing the path." + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "A combination of GIT_ATTR_CHECK... flags." + "type": "int", + "comment": null }, { "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)." + "comment": null }, { "name": "name", "type": "const char *", - "comment": "The name of the attribute to look up." + "comment": null } ], - "argline": "const char **value_out, git_repository *repo, uint32_t flags, const char *path, const char *name", - "sig": "const char **::git_repository *::uint32_t::const char *::const char *", + "argline": "const char **value_out, git_repository *repo, int flags, const char *path, const char *name", + "sig": "const char **::git_repository *::int::const char *::const char *", "return": { "type": "int", "comment": null }, - "description": "

Look up the value of one git attribute for path.

\n", + "description": "", "comments": "", "group": "attr" }, @@ -1738,42 +1846,42 @@ { "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)." + "comment": null }, { "name": "repo", "type": "git_repository *", - "comment": "The repository containing the path." + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "A combination of GIT_ATTR_CHECK... flags." + "type": "int", + "comment": null }, { "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)." + "comment": null }, { "name": "num_attr", "type": "size_t", - "comment": "The number of attributes being looked up" + "comment": null }, { "name": "names", "type": "const char **", - "comment": "An array of num_attr strings containing attribute names." + "comment": null } ], - "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 **", + "argline": "const char **values_out, git_repository *repo, int flags, const char *path, size_t num_attr, const char **names", + "sig": "const char **::git_repository *::int::const char *::size_t::const char **", "return": { "type": "int", "comment": null }, - "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\n look up in a single call. This is somewhat more efficient than\n calling git_attr_get() multiple times.

\n\n

For example, you might write:

\n\n
 const char *attrs[] = { "crlf", "diff", "foo" };\n const char **values[3];\n git_attr_get_many(values, repo, 0, "my/fun/file.c", 3, attrs);\n
\n\n

Then you could loop through the 3 values to get the settings for\n the three attributes you asked about.

\n", + "description": "", + "comments": "", "group": "attr" }, "git_attr_foreach": { @@ -1785,36 +1893,36 @@ { "name": "repo", "type": "git_repository *", - "comment": "The repository containing the path." + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "A combination of GIT_ATTR_CHECK... flags." + "type": "int", + "comment": null }, { "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)." + "comment": null }, { "name": "callback", "type": "git_attr_foreach_cb", - "comment": "Function to invoke on each attribute name and value.\n See git_attr_foreach_cb." + "comment": null }, { "name": "payload", "type": "void *", - "comment": "Passed on as extra parameter to callback function." + "comment": null } ], - "argline": "git_repository *repo, uint32_t flags, const char *path, git_attr_foreach_cb callback, void *payload", - "sig": "git_repository *::uint32_t::const char *::git_attr_foreach_cb::void *", + "argline": "git_repository *repo, int flags, const char *path, git_attr_foreach_cb callback, void *payload", + "sig": "git_repository *::int::const char *::git_attr_foreach_cb::void *", "return": { "type": "int", - "comment": " 0 on success, non-zero callback return value, or error code" + "comment": null }, - "description": "

Loop over all the git attributes for a path.

\n", + "description": "", "comments": "", "group": "attr" }, @@ -1904,20 +2012,14 @@ "file": "git2/blame.h", "line": 154, "lineto": 154, - "args": [ - { - "name": "blame", - "type": "git_blame *", - "comment": null - } - ], - "argline": "git_blame *blame", - "sig": "git_blame *", + "args": [], + "argline": "", + "sig": "", "return": { - "type": "uint32_t", + "type": "int", "comment": null }, - "description": "

Gets the number of hunks that exist in the blame structure.

\n", + "description": "", "comments": "", "group": "blame" }, @@ -1930,21 +2032,21 @@ { "name": "blame", "type": "git_blame *", - "comment": "the blame structure to query" + "comment": null }, { "name": "index", - "type": "uint32_t", - "comment": "index of the hunk to retrieve" + "type": "int", + "comment": null } ], - "argline": "git_blame *blame, uint32_t index", - "sig": "git_blame *::uint32_t", + "argline": "git_blame *blame, int index", + "sig": "git_blame *::int", "return": { "type": "const git_blame_hunk *", - "comment": " the hunk at the given index, or NULL on error" + "comment": null }, - "description": "

Gets the blame hunk at the given index.

\n", + "description": "", "comments": "", "group": "blame" }, @@ -1976,7 +2078,7 @@ "group": "blame", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blame_get_hunk_byline-1" + "ex/v0.28.0/blame.html#git_blame_get_hunk_byline-1" ] } }, @@ -2011,14 +2113,14 @@ "sig": "git_blame **::git_repository *::const char *::git_blame_options *", "return": { "type": "int", - "comment": " 0 on success, or an error code. (use giterr_last for information\n about the error.)" + "comment": " 0 on success, or an error code. (use git_error_last for information\n about the error.)" }, "description": "

Get the blame for a single file.

\n", "comments": "", "group": "blame", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blame_file-2" + "ex/v0.28.0/blame.html#git_blame_file-2" ] } }, @@ -2053,7 +2155,7 @@ "sig": "git_blame **::git_blame *::const char *::size_t", "return": { "type": "int", - "comment": " 0 on success, or an error code. (use giterr_last for information\n about the error)" + "comment": " 0 on success, or an error code. (use git_error_last for information\n about the error)" }, "description": "

Get blame data for a file that has been modified in memory. The reference\n parameter is a pre-calculated blame for the in-odb history of the file. This\n means that once a file blame is completed (which can be expensive), updating\n the buffer blame is very fast.

\n", "comments": "

Lines that differ between the buffer and the committed version are marked as\n having a zero OID for their final_commit_id.

\n", @@ -2082,7 +2184,7 @@ "group": "blame", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blame_free-3" + "ex/v0.28.0/blame.html#git_blame_free-3" ] } }, @@ -2119,10 +2221,10 @@ "group": "blob", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blob_lookup-4" + "ex/v0.28.0/blame.html#git_blob_lookup-4" ], "general.c": [ - "ex/HEAD/general.html#git_blob_lookup-1" + "ex/v0.28.0/general.html#git_blob_lookup-1" ] } }, @@ -2186,10 +2288,10 @@ "group": "blob", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blob_free-5" + "ex/v0.28.0/blame.html#git_blob_free-5" ], "general.c": [ - "ex/HEAD/general.html#git_blob_free-2" + "ex/v0.28.0/general.html#git_blob_free-2" ] } }, @@ -2260,13 +2362,13 @@ "group": "blob", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blob_rawcontent-6" + "ex/v0.28.0/blame.html#git_blob_rawcontent-6" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_blob_rawcontent-1" + "ex/v0.28.0/cat-file.html#git_blob_rawcontent-1" ], "general.c": [ - "ex/HEAD/general.html#git_blob_rawcontent-3" + "ex/v0.28.0/general.html#git_blob_rawcontent-3" ] } }, @@ -2293,14 +2395,14 @@ "group": "blob", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_blob_rawsize-7" + "ex/v0.28.0/blame.html#git_blob_rawsize-7" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_blob_rawsize-2" + "ex/v0.28.0/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/v0.28.0/general.html#git_blob_rawsize-4", + "ex/v0.28.0/general.html#git_blob_rawsize-5" ] } }, @@ -2844,7 +2946,7 @@ "group": "branch", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_branch_name-4" + "ex/v0.28.0/merge.html#git_branch_name-4" ] } }, @@ -3065,43 +3167,21 @@ "group": "buf", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_buf_dispose-1" + "ex/v0.28.0/diff.html#git_buf_dispose-1" ], "remote.c": [ - "ex/HEAD/remote.html#git_buf_dispose-1" + "ex/v0.28.0/remote.html#git_buf_dispose-1" ], "tag.c": [ - "ex/HEAD/tag.html#git_buf_dispose-1" + "ex/v0.28.0/tag.html#git_buf_dispose-1" ] } }, - "git_buf_free": { - "type": "function", - "file": "git2/buffer.h", - "line": 84, - "lineto": 84, - "args": [ - { - "name": "buffer", - "type": "git_buf *", - "comment": null - } - ], - "argline": "git_buf *buffer", - "sig": "git_buf *", - "return": { - "type": "void", - "comment": null - }, - "description": "", - "comments": "", - "group": "buf" - }, "git_buf_grow": { "type": "function", "file": "git2/buffer.h", - "line": 107, - "lineto": 107, + "line": 95, + "lineto": 95, "args": [ { "name": "buffer", @@ -3127,8 +3207,8 @@ "git_buf_set": { "type": "function", "file": "git2/buffer.h", - "line": 117, - "lineto": 118, + "line": 105, + "lineto": 106, "args": [ { "name": "buffer", @@ -3159,8 +3239,8 @@ "git_buf_is_binary": { "type": "function", "file": "git2/buffer.h", - "line": 126, - "lineto": 126, + "line": 114, + "lineto": 114, "args": [ { "name": "buf", @@ -3181,8 +3261,8 @@ "git_buf_contains_nul": { "type": "function", "file": "git2/buffer.h", - "line": 134, - "lineto": 134, + "line": 122, + "lineto": 122, "args": [ { "name": "buf", @@ -3248,7 +3328,7 @@ "sig": "git_repository *::const git_checkout_options *", "return": { "type": "int", - "comment": " 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non\n existing branch, non-zero value returned by `notify_cb`, or\n other error code \n<\n 0 (use giterr_last for error details)" + "comment": " 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non\n existing branch, non-zero value returned by `notify_cb`, or\n other error code \n<\n 0 (use git_error_last for error details)" }, "description": "

Updates files in the index and the working tree to match the content of\n the commit pointed at by HEAD.

\n", "comments": "

Note that this is not the correct mechanism used to switch branches;\n do not change your HEAD and then call this method, that would leave\n you with checkout conflicts since your working directory would then\n appear to be dirty. Instead, checkout the target of the branch and\n then update HEAD using git_repository_set_head to point to the\n branch you checked out.

\n", @@ -3280,7 +3360,7 @@ "sig": "git_repository *::git_index *::const git_checkout_options *", "return": { "type": "int", - "comment": " 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use giterr_last for error details)" + "comment": " 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use git_error_last for error details)" }, "description": "

Updates files in the working tree to match the content of the index.

\n", "comments": "", @@ -3312,17 +3392,17 @@ "sig": "git_repository *::const git_object *::const git_checkout_options *", "return": { "type": "int", - "comment": " 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use giterr_last for error details)" + "comment": " 0 on success, non-zero return value from `notify_cb`, or error\n code \n<\n 0 (use git_error_last for error details)" }, "description": "

Updates files in the index and working tree to match the content of the\n tree pointed at by the treeish.

\n", "comments": "", "group": "checkout", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_checkout_tree-5" + "ex/v0.28.0/checkout.html#git_checkout_tree-5" ], "merge.c": [ - "ex/HEAD/merge.html#git_checkout_tree-5" + "ex/v0.28.0/merge.html#git_checkout_tree-5" ] } }, @@ -3490,7 +3570,7 @@ "sig": "git_repository **::const char *::const char *::const git_clone_options *", "return": { "type": "int", - "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `giterr_last` for a detailed error message)" + "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `git_error_last` for a detailed error message)" }, "description": "

Clone a remote repository.

\n", "comments": "

By default this creates its repository and initial remote to match\n git's defaults. You can use the options in the callback to\n customize how these are created.

\n", @@ -3529,18 +3609,18 @@ "group": "commit", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_commit_lookup-6" + "ex/v0.28.0/checkout.html#git_commit_lookup-6" ], "general.c": [ - "ex/HEAD/general.html#git_commit_lookup-6", - "ex/HEAD/general.html#git_commit_lookup-7", - "ex/HEAD/general.html#git_commit_lookup-8" + "ex/v0.28.0/general.html#git_commit_lookup-6", + "ex/v0.28.0/general.html#git_commit_lookup-7", + "ex/v0.28.0/general.html#git_commit_lookup-8" ], "log.c": [ - "ex/HEAD/log.html#git_commit_lookup-1" + "ex/v0.28.0/log.html#git_commit_lookup-1" ], "merge.c": [ - "ex/HEAD/merge.html#git_commit_lookup-6" + "ex/v0.28.0/merge.html#git_commit_lookup-6" ] } }, @@ -3604,20 +3684,20 @@ "group": "commit", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_commit_free-7" + "ex/v0.28.0/checkout.html#git_commit_free-7" ], "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/v0.28.0/general.html#git_commit_free-9", + "ex/v0.28.0/general.html#git_commit_free-10", + "ex/v0.28.0/general.html#git_commit_free-11", + "ex/v0.28.0/general.html#git_commit_free-12", + "ex/v0.28.0/general.html#git_commit_free-13" ], "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/v0.28.0/log.html#git_commit_free-2", + "ex/v0.28.0/log.html#git_commit_free-3", + "ex/v0.28.0/log.html#git_commit_free-4", + "ex/v0.28.0/log.html#git_commit_free-5" ] } }, @@ -3644,10 +3724,10 @@ "group": "commit", "examples": { "general.c": [ - "ex/HEAD/general.html#git_commit_id-14" + "ex/v0.28.0/general.html#git_commit_id-14" ], "log.c": [ - "ex/HEAD/log.html#git_commit_id-6" + "ex/v0.28.0/log.html#git_commit_id-6" ] } }, @@ -3674,8 +3754,8 @@ "group": "commit", "examples": { "log.c": [ - "ex/HEAD/log.html#git_commit_owner-7", - "ex/HEAD/log.html#git_commit_owner-8" + "ex/v0.28.0/log.html#git_commit_owner-7", + "ex/v0.28.0/log.html#git_commit_owner-8" ] } }, @@ -3724,21 +3804,21 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_message-3", - "ex/HEAD/cat-file.html#git_commit_message-4" + "ex/v0.28.0/cat-file.html#git_commit_message-3", + "ex/v0.28.0/cat-file.html#git_commit_message-4" ], "general.c": [ - "ex/HEAD/general.html#git_commit_message-15", - "ex/HEAD/general.html#git_commit_message-16", - "ex/HEAD/general.html#git_commit_message-17" + "ex/v0.28.0/general.html#git_commit_message-15", + "ex/v0.28.0/general.html#git_commit_message-16", + "ex/v0.28.0/general.html#git_commit_message-17" ], "log.c": [ - "ex/HEAD/log.html#git_commit_message-9", - "ex/HEAD/log.html#git_commit_message-10", - "ex/HEAD/log.html#git_commit_message-11" + "ex/v0.28.0/log.html#git_commit_message-9", + "ex/v0.28.0/log.html#git_commit_message-10", + "ex/v0.28.0/log.html#git_commit_message-11" ], "tag.c": [ - "ex/HEAD/tag.html#git_commit_message-2" + "ex/v0.28.0/tag.html#git_commit_message-2" ] } }, @@ -3831,8 +3911,8 @@ "group": "commit", "examples": { "general.c": [ - "ex/HEAD/general.html#git_commit_time-18", - "ex/HEAD/general.html#git_commit_time-19" + "ex/v0.28.0/general.html#git_commit_time-18", + "ex/v0.28.0/general.html#git_commit_time-19" ] } }, @@ -3881,13 +3961,13 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_committer-5" + "ex/v0.28.0/cat-file.html#git_commit_committer-5" ], "general.c": [ - "ex/HEAD/general.html#git_commit_committer-20" + "ex/v0.28.0/general.html#git_commit_committer-20" ], "log.c": [ - "ex/HEAD/log.html#git_commit_committer-12" + "ex/v0.28.0/log.html#git_commit_committer-12" ] } }, @@ -3914,15 +3994,15 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_author-6" + "ex/v0.28.0/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/v0.28.0/general.html#git_commit_author-21", + "ex/v0.28.0/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/v0.28.0/log.html#git_commit_author-13", + "ex/v0.28.0/log.html#git_commit_author-14" ] } }, @@ -4040,11 +4120,11 @@ "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/v0.28.0/log.html#git_commit_tree-15", + "ex/v0.28.0/log.html#git_commit_tree-16", + "ex/v0.28.0/log.html#git_commit_tree-17", + "ex/v0.28.0/log.html#git_commit_tree-18", + "ex/v0.28.0/log.html#git_commit_tree-19" ] } }, @@ -4071,7 +4151,7 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_tree_id-7" + "ex/v0.28.0/cat-file.html#git_commit_tree_id-7" ] } }, @@ -4098,14 +4178,14 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_parentcount-8" + "ex/v0.28.0/cat-file.html#git_commit_parentcount-8" ], "general.c": [ - "ex/HEAD/general.html#git_commit_parentcount-23" + "ex/v0.28.0/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/v0.28.0/log.html#git_commit_parentcount-20", + "ex/v0.28.0/log.html#git_commit_parentcount-21" ] } }, @@ -4142,11 +4222,11 @@ "group": "commit", "examples": { "general.c": [ - "ex/HEAD/general.html#git_commit_parent-24" + "ex/v0.28.0/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/v0.28.0/log.html#git_commit_parent-22", + "ex/v0.28.0/log.html#git_commit_parent-23" ] } }, @@ -4178,10 +4258,10 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_commit_parent_id-9" + "ex/v0.28.0/cat-file.html#git_commit_parent_id-9" ], "log.c": [ - "ex/HEAD/log.html#git_commit_parent_id-24" + "ex/v0.28.0/log.html#git_commit_parent_id-24" ] } }, @@ -4288,7 +4368,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if the id is not for a commit\n or the commit does not have a signature." }, "description": "

Extract the signature from a commit

\n", - "comments": "

If the id is not for a commit, the error class will be\n GITERR_INVALID. If the commit does not have a signature, the\n error class will be GITERR_OBJECT.

\n", + "comments": "

If the id is not for a commit, the error class will be\n GIT_ERROR_INVALID. If the commit does not have a signature, the\n error class will be GIT_ERROR_OBJECT.

\n", "group": "commit" }, "git_commit_create": { @@ -4359,7 +4439,7 @@ "group": "commit", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_commit_create-7" + "ex/v0.28.0/merge.html#git_commit_create-7" ] } }, @@ -4426,10 +4506,10 @@ "group": "commit", "examples": { "general.c": [ - "ex/HEAD/general.html#git_commit_create_v-25" + "ex/v0.28.0/general.html#git_commit_create_v-25" ], "init.c": [ - "ex/HEAD/init.html#git_commit_create_v-1" + "ex/v0.28.0/init.html#git_commit_create_v-1" ] } }, @@ -4624,8 +4704,8 @@ "git_libgit2_version": { "type": "function", "file": "git2/common.h", - "line": 116, - "lineto": 116, + "line": 124, + "lineto": 124, "args": [ { "name": "major", @@ -4656,8 +4736,8 @@ "git_libgit2_features": { "type": "function", "file": "git2/common.h", - "line": 165, - "lineto": 165, + "line": 173, + "lineto": 173, "args": [], "argline": "", "sig": "", @@ -4672,8 +4752,8 @@ "git_libgit2_opts": { "type": "function", "file": "git2/common.h", - "line": 393, - "lineto": 393, + "line": 402, + "lineto": 402, "args": [ { "name": "option", @@ -4688,7 +4768,7 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set or query a library global option

\n", - "comments": "

Available options:

\n\n
* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n    > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n    > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n    > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n    >Set the maximum amount of memory that can be mapped at any time\n    by the library\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n    > Get the search path for a given level of config data.  "level" must\n    > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`,\n    > `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n    > The search path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n    > Set the search path for a level of config data.  The search path\n    > applied to shared attributes and ignore files, too.\n    >\n    > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR.\n    >   Pass NULL to reset to the default (generally based on environment\n    >   variables).  Use magic path `$PATH` to include the old value\n    >   of the path (if you want to prepend or append, for instance).\n    >\n    > - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`,\n    >   `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or\n    >   `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_otype type, size_t size)\n\n    > Set the maximum data size for the given type of object to be\n    > considered eligible for caching in memory.  Setting to value to\n    > zero means that that type of object will not be cached.\n    > Defaults to 0 for GIT_OBJ_BLOB (i.e. won't cache blobs) and 4k\n    > for GIT_OBJ_COMMIT, GIT_OBJ_TREE, and GIT_OBJ_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n    > Set the maximum total data size that will be cached in memory\n    > across all repositories before libgit2 starts evicting objects\n    > from the cache.  This is a soft limit, in that the library might\n    > briefly exceed it, but will start aggressively evicting objects\n    > from cache when that happens.  The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n    > Enable or disable caching completely.\n    >\n    > Because caches are repository-specific, disabling the cache\n    > cannot immediately clear all cached objects, but each cache will\n    > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n    > Get the current bytes in cache and the maximum that would be\n    > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n    > Get the default template path.\n    > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n    > Set the default template path.\n    >\n    > - `path` directory of template.\n\n* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)\n\n    > Set the SSL certificate-authority locations.\n    >\n    > - `file` is the location of a file containing several\n    >   certificates concatenated together.\n    > - `path` is the location of a directory holding several\n    >   certificates, one per file.\n    >\n    > Either parameter may be `NULL`, but not both.\n\n* opts(GIT_OPT_SET_USER_AGENT, const char *user_agent)\n\n    > Set the value of the User-Agent header.  This value will be\n    > appended to "git/1.0", for compatibility with other git clients.\n    >\n    > - `user_agent` is the value that will be delivered as the\n    >   User-Agent header on HTTP requests.\n\n* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)\n\n    > Set the share mode used when opening files on Windows.\n    > For more information, see the documentation for CreateFile.\n    > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE.  This is\n    > ignored and unused on non-Windows platforms.\n\n* opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)\n\n    > Get the share mode used when opening files on Windows.\n\n* opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)\n\n    > Enable strict input validation when creating new objects\n    > to ensure that all inputs to the new objects are valid.  For\n    > example, when this is enabled, the parent(s) and tree inputs\n    > will be validated when creating a new commit.  This defaults\n    > to enabled.\n\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n    > Validate the target of a symbolic ref when creating it.  For\n    > example, `foobar` is not a valid ref, therefore `foobar` is\n    > not a valid target for a symbolic ref by default, whereas\n    > `refs/heads/foobar` is.  Disabling this bypasses validation\n    > so that an arbitrary strings such as `foobar` can be used\n    > for a symbolic ref target.  This defaults to enabled.\n\n* opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)\n\n    > Set the SSL ciphers use for HTTPS connections.\n    >\n    > - `ciphers` is the list of ciphers that are eanbled.\n\n* opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)\n\n    > Enable or disable the use of "offset deltas" when creating packfiles,\n    > and the negotiation of them when talking to a remote server.\n    > Offset deltas store a delta base location as an offset into the\n    > packfile from the current location, which provides a shorter encoding\n    > and thus smaller resultant packfiles.\n    > Packfiles containing offset deltas can still be read.\n    > This defaults to enabled.\n\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n    > Enable synchronized writes of files in the gitdir using `fsync`\n    > (or the platform equivalent) to ensure that new object data\n    > is written to permanent storage, not simply cached.  This\n    > defaults to disabled.\n\n opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)\n\n    > Enable strict verification of object hashsums when reading\n    > objects from disk. This may impact performance due to an\n    > additional checksum calculation on each object. This defaults\n    > to enabled.\n\n opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)\n\n    > Set the memory allocator to a different memory allocator. This\n    > allocator will then be used to make all memory allocations for\n    > libgit2 operations.\n\n opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)\n\n    > Ensure that there are no unsaved changes in the index before\n    > beginning any operation that reloads the index from disk (eg,\n    > checkout).  If there are unsaved changes, the instruction will\n    > fail.  (Using the FORCE flag to checkout will still overwrite\n    > these changes.)\n\n opts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)\n\n    > Get the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote. This can be\n    > used to limit maximum memory usage when fetching from an untrusted\n    > remote.\n\n opts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)\n\n    > Set the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote.\n
\n", + "comments": "

Available options:

\n\n
* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n    > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n    > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n    > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n    >Set the maximum amount of memory that can be mapped at any time\n    by the library\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n    > Get the search path for a given level of config data.  "level" must\n    > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`,\n    > `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n    > The search path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n    > Set the search path for a level of config data.  The search path\n    > applied to shared attributes and ignore files, too.\n    >\n    > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR.\n    >   Pass NULL to reset to the default (generally based on environment\n    >   variables).  Use magic path `$PATH` to include the old value\n    >   of the path (if you want to prepend or append, for instance).\n    >\n    > - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`,\n    >   `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or\n    >   `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_object_t type, size_t size)\n\n    > Set the maximum data size for the given type of object to be\n    > considered eligible for caching in memory.  Setting to value to\n    > zero means that that type of object will not be cached.\n    > Defaults to 0 for GIT_OBJECT_BLOB (i.e. won't cache blobs) and 4k\n    > for GIT_OBJECT_COMMIT, GIT_OBJECT_TREE, and GIT_OBJECT_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n    > Set the maximum total data size that will be cached in memory\n    > across all repositories before libgit2 starts evicting objects\n    > from the cache.  This is a soft limit, in that the library might\n    > briefly exceed it, but will start aggressively evicting objects\n    > from cache when that happens.  The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n    > Enable or disable caching completely.\n    >\n    > Because caches are repository-specific, disabling the cache\n    > cannot immediately clear all cached objects, but each cache will\n    > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n    > Get the current bytes in cache and the maximum that would be\n    > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n    > Get the default template path.\n    > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n    > Set the default template path.\n    >\n    > - `path` directory of template.\n\n* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)\n\n    > Set the SSL certificate-authority locations.\n    >\n    > - `file` is the location of a file containing several\n    >   certificates concatenated together.\n    > - `path` is the location of a directory holding several\n    >   certificates, one per file.\n    >\n    > Either parameter may be `NULL`, but not both.\n\n* opts(GIT_OPT_SET_USER_AGENT, const char *user_agent)\n\n    > Set the value of the User-Agent header.  This value will be\n    > appended to "git/1.0", for compatibility with other git clients.\n    >\n    > - `user_agent` is the value that will be delivered as the\n    >   User-Agent header on HTTP requests.\n\n* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)\n\n    > Set the share mode used when opening files on Windows.\n    > For more information, see the documentation for CreateFile.\n    > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE.  This is\n    > ignored and unused on non-Windows platforms.\n\n* opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)\n\n    > Get the share mode used when opening files on Windows.\n\n* opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)\n\n    > Enable strict input validation when creating new objects\n    > to ensure that all inputs to the new objects are valid.  For\n    > example, when this is enabled, the parent(s) and tree inputs\n    > will be validated when creating a new commit.  This defaults\n    > to enabled.\n\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n    > Validate the target of a symbolic ref when creating it.  For\n    > example, `foobar` is not a valid ref, therefore `foobar` is\n    > not a valid target for a symbolic ref by default, whereas\n    > `refs/heads/foobar` is.  Disabling this bypasses validation\n    > so that an arbitrary strings such as `foobar` can be used\n    > for a symbolic ref target.  This defaults to enabled.\n\n* opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)\n\n    > Set the SSL ciphers use for HTTPS connections.\n    >\n    > - `ciphers` is the list of ciphers that are eanbled.\n\n* opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)\n\n    > Enable or disable the use of "offset deltas" when creating packfiles,\n    > and the negotiation of them when talking to a remote server.\n    > Offset deltas store a delta base location as an offset into the\n    > packfile from the current location, which provides a shorter encoding\n    > and thus smaller resultant packfiles.\n    > Packfiles containing offset deltas can still be read.\n    > This defaults to enabled.\n\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n    > Enable synchronized writes of files in the gitdir using `fsync`\n    > (or the platform equivalent) to ensure that new object data\n    > is written to permanent storage, not simply cached.  This\n    > defaults to disabled.\n\n opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)\n\n    > Enable strict verification of object hashsums when reading\n    > objects from disk. This may impact performance due to an\n    > additional checksum calculation on each object. This defaults\n    > to enabled.\n\n opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)\n\n    > Set the memory allocator to a different memory allocator. This\n    > allocator will then be used to make all memory allocations for\n    > libgit2 operations.  If the given `allocator` is NULL, then the\n    > system default will be restored.\n\n opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)\n\n    > Ensure that there are no unsaved changes in the index before\n    > beginning any operation that reloads the index from disk (eg,\n    > checkout).  If there are unsaved changes, the instruction will\n    > fail.  (Using the FORCE flag to checkout will still overwrite\n    > these changes.)\n\n opts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)\n\n    > Get the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote. This can be\n    > used to limit maximum memory usage when fetching from an untrusted\n    > remote.\n\n opts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)\n\n    > Set the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote.\n
\n", "group": "libgit2" }, "git_config_entry_free": { @@ -4915,7 +4995,7 @@ "group": "config", "examples": { "general.c": [ - "ex/HEAD/general.html#git_config_open_ondisk-26" + "ex/v0.28.0/general.html#git_config_open_ondisk-26" ] } }, @@ -5028,8 +5108,8 @@ "group": "config", "examples": { "general.c": [ - "ex/HEAD/general.html#git_config_free-27", - "ex/HEAD/general.html#git_config_free-28" + "ex/v0.28.0/general.html#git_config_free-27", + "ex/v0.28.0/general.html#git_config_free-28" ] } }, @@ -5073,33 +5153,33 @@ "args": [ { "name": "out", - "type": "int32_t *", - "comment": "pointer to the variable where the value should be stored" + "type": "int *", + "comment": null }, { "name": "cfg", "type": "const git_config *", - "comment": "where to look for the variable" + "comment": null }, { "name": "name", "type": "const char *", - "comment": "the variable's name" + "comment": null } ], - "argline": "int32_t *out, const git_config *cfg, const char *name", - "sig": "int32_t *::const git_config *::const char *", + "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" + "comment": null }, - "description": "

Get the value of an integer config variable.

\n", - "comments": "

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", + "description": "", + "comments": "", "group": "config", "examples": { "general.c": [ - "ex/HEAD/general.html#git_config_get_int32-29", - "ex/HEAD/general.html#git_config_get_int32-30" + "ex/v0.28.0/general.html#git_config_get_int32-29", + "ex/v0.28.0/general.html#git_config_get_int32-30" ] } }, @@ -5111,28 +5191,28 @@ "args": [ { "name": "out", - "type": "int64_t *", - "comment": "pointer to the variable where the value should be stored" + "type": "int *", + "comment": null }, { "name": "cfg", "type": "const git_config *", - "comment": "where to look for the variable" + "comment": null }, { "name": "name", "type": "const char *", - "comment": "the variable's name" + "comment": null } ], - "argline": "int64_t *out, const git_config *cfg, const char *name", - "sig": "int64_t *::const git_config *::const char *", + "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" + "comment": null }, - "description": "

Get the value of a long integer config variable.

\n", - "comments": "

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", + "description": "", + "comments": "", "group": "config" }, "git_config_get_bool": { @@ -5232,8 +5312,8 @@ "group": "config", "examples": { "general.c": [ - "ex/HEAD/general.html#git_config_get_string-31", - "ex/HEAD/general.html#git_config_get_string-32" + "ex/v0.28.0/general.html#git_config_get_string-31", + "ex/v0.28.0/general.html#git_config_get_string-32" ] } }, @@ -5406,26 +5486,26 @@ { "name": "cfg", "type": "git_config *", - "comment": "where to look for the variable" + "comment": null }, { "name": "name", "type": "const char *", - "comment": "the variable's name" + "comment": null }, { "name": "value", - "type": "int32_t", - "comment": "Integer value for the variable" + "type": "int", + "comment": null } ], - "argline": "git_config *cfg, const char *name, int32_t value", - "sig": "git_config *::const char *::int32_t", + "argline": "git_config *cfg, const char *name, int value", + "sig": "git_config *::const char *::int", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": null }, - "description": "

Set the value of an integer config variable in the config file\n with the highest level (usually the local one).

\n", + "description": "", "comments": "", "group": "config" }, @@ -5438,26 +5518,26 @@ { "name": "cfg", "type": "git_config *", - "comment": "where to look for the variable" + "comment": null }, { "name": "name", "type": "const char *", - "comment": "the variable's name" + "comment": null }, { "name": "value", - "type": "int64_t", - "comment": "Long integer value for the variable" + "type": "int", + "comment": null } ], - "argline": "git_config *cfg, const char *name, int64_t value", - "sig": "git_config *::const char *::int64_t", + "argline": "git_config *cfg, const char *name, int value", + "sig": "git_config *::const char *::int", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": null }, - "description": "

Set the value of a long integer config variable in the config file\n with the highest level (usually the local one).

\n", + "description": "", "comments": "", "group": "config" }, @@ -5863,23 +5943,23 @@ "args": [ { "name": "out", - "type": "int32_t *", - "comment": "place to store the result of the parsing" + "type": "int *", + "comment": null }, { "name": "value", "type": "const char *", - "comment": "value to parse" + "comment": null } ], - "argline": "int32_t *out, const char *value", - "sig": "int32_t *::const char *", + "argline": "int *out, const char *value", + "sig": "int *::const char *", "return": { "type": "int", "comment": null }, - "description": "

Parse a string value as an int32.

\n", - "comments": "

An optional value suffix of 'k', 'm', or 'g' will\n cause the value to be multiplied by 1024, 1048576,\n or 1073741824 prior to output.

\n", + "description": "", + "comments": "", "group": "config" }, "git_config_parse_int64": { @@ -5890,23 +5970,23 @@ "args": [ { "name": "out", - "type": "int64_t *", - "comment": "place to store the result of the parsing" + "type": "int *", + "comment": null }, { "name": "value", "type": "const char *", - "comment": "value to parse" + "comment": null } ], - "argline": "int64_t *out, const char *value", - "sig": "int64_t *::const char *", + "argline": "int *out, const char *value", + "sig": "int *::const char *", "return": { "type": "int", "comment": null }, - "description": "

Parse a string value as an int64.

\n", - "comments": "

An optional value suffix of 'k', 'm', or 'g' will\n cause the value to be multiplied by 1024, 1048576,\n or 1073741824 prior to output.

\n", + "description": "", + "comments": "", "group": "config" }, "git_config_parse_path": { @@ -6042,6 +6122,103 @@ "comments": "", "group": "cred" }, + "git_buf_free": { + "type": "function", + "file": "git2/deprecated.h", + "line": 51, + "lineto": 51, + "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.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "group": "buf" + }, + "giterr_last": { + "type": "function", + "file": "git2/deprecated.h", + "line": 112, + "lineto": 112, + "args": [], + "argline": "", + "sig": "", + "return": { + "type": "const git_error *", + "comment": null + }, + "description": "

Return the last git_error object that was generated for the\n current thread. This is an alias of git_error_last and is\n preserved for backward compatibility.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "group": "giterr" + }, + "giterr_clear": { + "type": "function", + "file": "git2/deprecated.h", + "line": 124, + "lineto": 124, + "args": [], + "argline": "", + "sig": "", + "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.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "group": "giterr" + }, + "giterr_set_str": { + "type": "function", + "file": "git2/deprecated.h", + "line": 136, + "lineto": 136, + "args": [ + { + "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 + }, + "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.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "group": "giterr" + }, + "giterr_set_oom": { + "type": "function", + "file": "git2/deprecated.h", + "line": 148, + "lineto": 148, + "args": [], + "argline": "", + "sig": "", + "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.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "group": "giterr" + }, "git_describe_init_options": { "type": "function", "file": "git2/describe.h", @@ -6070,7 +6247,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_init_options-1" + "ex/v0.28.0/describe.html#git_describe_init_options-1" ] } }, @@ -6102,7 +6279,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_init_format_options-2" + "ex/v0.28.0/describe.html#git_describe_init_format_options-2" ] } }, @@ -6139,7 +6316,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_commit-3" + "ex/v0.28.0/describe.html#git_describe_commit-3" ] } }, @@ -6176,7 +6353,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_workdir-4" + "ex/v0.28.0/describe.html#git_describe_workdir-4" ] } }, @@ -6213,7 +6390,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/HEAD/describe.html#git_describe_format-5" + "ex/v0.28.0/describe.html#git_describe_format-5" ] } }, @@ -6316,11 +6493,11 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_free-2" + "ex/v0.28.0/diff.html#git_diff_free-2" ], "log.c": [ - "ex/HEAD/log.html#git_diff_free-25", - "ex/HEAD/log.html#git_diff_free-26" + "ex/v0.28.0/log.html#git_diff_free-25", + "ex/v0.28.0/log.html#git_diff_free-26" ] } }, @@ -6367,11 +6544,11 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_tree_to_tree-3" + "ex/v0.28.0/diff.html#git_diff_tree_to_tree-3" ], "log.c": [ - "ex/HEAD/log.html#git_diff_tree_to_tree-27", - "ex/HEAD/log.html#git_diff_tree_to_tree-28" + "ex/v0.28.0/log.html#git_diff_tree_to_tree-27", + "ex/v0.28.0/log.html#git_diff_tree_to_tree-28" ] } }, @@ -6418,7 +6595,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_tree_to_index-4" + "ex/v0.28.0/diff.html#git_diff_tree_to_index-4" ] } }, @@ -6460,7 +6637,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_index_to_workdir-5" + "ex/v0.28.0/diff.html#git_diff_index_to_workdir-5" ] } }, @@ -6502,7 +6679,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_tree_to_workdir-6" + "ex/v0.28.0/diff.html#git_diff_tree_to_workdir-6" ] } }, @@ -6544,7 +6721,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_tree_to_workdir_with_index-7" + "ex/v0.28.0/diff.html#git_diff_tree_to_workdir_with_index-7" ] } }, @@ -6645,7 +6822,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_find_similar-8" + "ex/v0.28.0/diff.html#git_diff_find_similar-8" ] } }, @@ -6672,7 +6849,7 @@ "group": "diff", "examples": { "log.c": [ - "ex/HEAD/log.html#git_diff_num_deltas-29" + "ex/v0.28.0/log.html#git_diff_num_deltas-29" ] } }, @@ -6859,10 +7036,10 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_print-9" + "ex/v0.28.0/diff.html#git_diff_print-9" ], "log.c": [ - "ex/HEAD/log.html#git_diff_print-30" + "ex/v0.28.0/log.html#git_diff_print-30" ] } }, @@ -7174,7 +7351,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_get_stats-10" + "ex/v0.28.0/diff.html#git_diff_get_stats-10" ] } }, @@ -7282,7 +7459,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_stats_to_buf-11" + "ex/v0.28.0/diff.html#git_diff_stats_to_buf-11" ] } }, @@ -7309,7 +7486,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_diff_stats_free-12" + "ex/v0.28.0/diff.html#git_diff_stats_free-12" ] } }, @@ -7483,11 +7660,11 @@ "comments": "

Calculate a stable patch ID for the given patch by summing the\n hash of the file diffs, ignoring whitespace and line numbers.\n This can be used to derive whether two diffs are the same with\n a high probability.

\n\n

Currently, this function only calculates stable patch IDs, as\n defined in git-patch-id(1), and should in fact generate the\n same IDs as the upstream git project does.

\n", "group": "diff" }, - "giterr_last": { + "git_error_last": { "type": "function", "file": "git2/errors.h", - "line": 122, - "lineto": 122, + "line": 123, + "lineto": 123, "args": [], "argline": "", "sig": "", @@ -7497,28 +7674,28 @@ }, "description": "

Return the last git_error object that was generated for the\n current thread.

\n", "comments": "

The default behaviour of this function is to return NULL if no previous error has occurred.\n However, libgit2's error strings are not cleared aggressively, so a prior\n (unrelated) error may be returned. This can be avoided by only calling\n this function if the prior call to a libgit2 API returned an error.

\n", - "group": "giterr", + "group": "error", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#giterr_last-8", - "ex/HEAD/checkout.html#giterr_last-9", - "ex/HEAD/checkout.html#giterr_last-10", - "ex/HEAD/checkout.html#giterr_last-11" + "ex/v0.28.0/checkout.html#git_error_last-8", + "ex/v0.28.0/checkout.html#git_error_last-9", + "ex/v0.28.0/checkout.html#git_error_last-10", + "ex/v0.28.0/checkout.html#git_error_last-11" ], "general.c": [ - "ex/HEAD/general.html#giterr_last-33" + "ex/v0.28.0/general.html#git_error_last-33" ], "merge.c": [ - "ex/HEAD/merge.html#giterr_last-8", - "ex/HEAD/merge.html#giterr_last-9" + "ex/v0.28.0/merge.html#git_error_last-8", + "ex/v0.28.0/merge.html#git_error_last-9" ] } }, - "giterr_clear": { + "git_error_clear": { "type": "function", "file": "git2/errors.h", - "line": 127, - "lineto": 127, + "line": 128, + "lineto": 128, "args": [], "argline": "", "sig": "", @@ -7528,13 +7705,13 @@ }, "description": "

Clear the last library error that occurred for this thread.

\n", "comments": "", - "group": "giterr" + "group": "error" }, - "giterr_set_str": { + "git_error_set_str": { "type": "function", "file": "git2/errors.h", - "line": 145, - "lineto": 145, + "line": 146, + "lineto": 146, "args": [ { "name": "error_class", @@ -7555,13 +7732,13 @@ }, "description": "

Set the error message string for this thread.

\n", "comments": "

This function is public so that custom ODB backends and the like can\n relay an error message through libgit2. Most regular users of libgit2\n will never need to call this function -- actually, calling it in most\n circumstances (for example, calling from within a callback function)\n will just end up having the value overwritten by libgit2 internals.

\n\n

This error message is stored in thread-local storage and only applies\n to the particular thread that this libgit2 call is made from.

\n", - "group": "giterr" + "group": "error" }, - "giterr_set_oom": { + "git_error_set_oom": { "type": "function", "file": "git2/errors.h", - "line": 156, - "lineto": 156, + "line": 157, + "lineto": 157, "args": [], "argline": "", "sig": "", @@ -7570,8 +7747,8 @@ "comment": null }, "description": "

Set the error message to a special value for memory allocation failure.

\n", - "comments": "

The normal giterr_set_str() function attempts to strdup() the string\n that is passed in. This is not a good idea when the error in question\n is a memory allocation failure. That circumstance has a special setter\n function that sets the error string to a known and statically allocated\n internal value.

\n", - "group": "giterr" + "comments": "

The normal git_error_set_str() function attempts to strdup() the\n string that is passed in. This is not a good idea when the error in\n question is a memory allocation failure. That circumstance has a\n special setter function that sets the error string to a known and\n statically allocated internal value.

\n", + "group": "error" }, "git_filter_list_load": { "type": "function", @@ -7582,42 +7759,42 @@ { "name": "filters", "type": "git_filter_list **", - "comment": "Output newly created git_filter_list (or NULL)" + "comment": null }, { "name": "repo", "type": "git_repository *", - "comment": "Repository object that contains `path`" + "comment": null }, { "name": "blob", "type": "git_blob *", - "comment": "The blob to which the filter will be applied (if known)" + "comment": null }, { "name": "path", "type": "const char *", - "comment": "Relative path of the file to be filtered" + "comment": null }, { "name": "mode", "type": "git_filter_mode_t", - "comment": "Filtering direction (WT->ODB or ODB->WT)" + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Combination of `git_filter_flag_t` flags" + "type": "int", + "comment": null } ], - "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, int flags", + "sig": "git_filter_list **::git_repository *::git_blob *::const char *::git_filter_mode_t::int", "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" + "comment": null }, - "description": "

Load the filter list for a given path.

\n", - "comments": "

This will return 0 (success) but set the output git_filter_list to NULL\n if no filters are requested for the given file.

\n", + "description": "", + "comments": "", "group": "filter" }, "git_filter_list_contains": { @@ -7888,46 +8065,46 @@ "group": "libgit2", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_libgit2_init-8" + "ex/v0.28.0/blame.html#git_libgit2_init-8" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_libgit2_init-10" + "ex/v0.28.0/cat-file.html#git_libgit2_init-10" ], "checkout.c": [ - "ex/HEAD/checkout.html#git_libgit2_init-12" + "ex/v0.28.0/checkout.html#git_libgit2_init-12" ], "describe.c": [ - "ex/HEAD/describe.html#git_libgit2_init-6" + "ex/v0.28.0/describe.html#git_libgit2_init-6" ], "diff.c": [ - "ex/HEAD/diff.html#git_libgit2_init-13" + "ex/v0.28.0/diff.html#git_libgit2_init-13" ], "general.c": [ - "ex/HEAD/general.html#git_libgit2_init-34" + "ex/v0.28.0/general.html#git_libgit2_init-34" ], "init.c": [ - "ex/HEAD/init.html#git_libgit2_init-2" + "ex/v0.28.0/init.html#git_libgit2_init-2" ], "log.c": [ - "ex/HEAD/log.html#git_libgit2_init-31" + "ex/v0.28.0/log.html#git_libgit2_init-31" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_libgit2_init-1" + "ex/v0.28.0/ls-files.html#git_libgit2_init-1" ], "merge.c": [ - "ex/HEAD/merge.html#git_libgit2_init-10" + "ex/v0.28.0/merge.html#git_libgit2_init-10" ], "remote.c": [ - "ex/HEAD/remote.html#git_libgit2_init-2" + "ex/v0.28.0/remote.html#git_libgit2_init-2" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_libgit2_init-1" + "ex/v0.28.0/rev-parse.html#git_libgit2_init-1" ], "status.c": [ - "ex/HEAD/status.html#git_libgit2_init-1" + "ex/v0.28.0/status.html#git_libgit2_init-1" ], "tag.c": [ - "ex/HEAD/tag.html#git_libgit2_init-3" + "ex/v0.28.0/tag.html#git_libgit2_init-3" ] } }, @@ -7948,43 +8125,43 @@ "group": "libgit2", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_libgit2_shutdown-9" + "ex/v0.28.0/blame.html#git_libgit2_shutdown-9" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_libgit2_shutdown-11" + "ex/v0.28.0/cat-file.html#git_libgit2_shutdown-11" ], "checkout.c": [ - "ex/HEAD/checkout.html#git_libgit2_shutdown-13" + "ex/v0.28.0/checkout.html#git_libgit2_shutdown-13" ], "describe.c": [ - "ex/HEAD/describe.html#git_libgit2_shutdown-7" + "ex/v0.28.0/describe.html#git_libgit2_shutdown-7" ], "diff.c": [ - "ex/HEAD/diff.html#git_libgit2_shutdown-14" + "ex/v0.28.0/diff.html#git_libgit2_shutdown-14" ], "init.c": [ - "ex/HEAD/init.html#git_libgit2_shutdown-3" + "ex/v0.28.0/init.html#git_libgit2_shutdown-3" ], "log.c": [ - "ex/HEAD/log.html#git_libgit2_shutdown-32" + "ex/v0.28.0/log.html#git_libgit2_shutdown-32" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_libgit2_shutdown-2" + "ex/v0.28.0/ls-files.html#git_libgit2_shutdown-2" ], "merge.c": [ - "ex/HEAD/merge.html#git_libgit2_shutdown-11" + "ex/v0.28.0/merge.html#git_libgit2_shutdown-11" ], "remote.c": [ - "ex/HEAD/remote.html#git_libgit2_shutdown-3" + "ex/v0.28.0/remote.html#git_libgit2_shutdown-3" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_libgit2_shutdown-2" + "ex/v0.28.0/rev-parse.html#git_libgit2_shutdown-2" ], "status.c": [ - "ex/HEAD/status.html#git_libgit2_shutdown-2" + "ex/v0.28.0/status.html#git_libgit2_shutdown-2" ], "tag.c": [ - "ex/HEAD/tag.html#git_libgit2_shutdown-4" + "ex/v0.28.0/tag.html#git_libgit2_shutdown-4" ] } }, @@ -8146,8 +8323,8 @@ "git_index_open": { "type": "function", "file": "git2/index.h", - "line": 203, - "lineto": 203, + "line": 186, + "lineto": 186, "args": [ { "name": "out", @@ -8173,8 +8350,8 @@ "git_index_new": { "type": "function", "file": "git2/index.h", - "line": 216, - "lineto": 216, + "line": 199, + "lineto": 199, "args": [ { "name": "out", @@ -8195,8 +8372,8 @@ "git_index_free": { "type": "function", "file": "git2/index.h", - "line": 223, - "lineto": 223, + "line": 206, + "lineto": 206, "args": [ { "name": "index", @@ -8215,21 +8392,21 @@ "group": "index", "examples": { "general.c": [ - "ex/HEAD/general.html#git_index_free-35" + "ex/v0.28.0/general.html#git_index_free-35" ], "init.c": [ - "ex/HEAD/init.html#git_index_free-4" + "ex/v0.28.0/init.html#git_index_free-4" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_index_free-3" + "ex/v0.28.0/ls-files.html#git_index_free-3" ] } }, "git_index_owner": { "type": "function", "file": "git2/index.h", - "line": 231, - "lineto": 231, + "line": 214, + "lineto": 214, "args": [ { "name": "index", @@ -8250,8 +8427,8 @@ "git_index_caps": { "type": "function", "file": "git2/index.h", - "line": 239, - "lineto": 239, + "line": 222, + "lineto": 222, "args": [ { "name": "index", @@ -8263,7 +8440,7 @@ "sig": "const git_index *", "return": { "type": "int", - "comment": " A combination of GIT_INDEXCAP values" + "comment": " A combination of GIT_INDEX_CAPABILITY values" }, "description": "

Read index capabilities flags.

\n", "comments": "", @@ -8272,8 +8449,8 @@ "git_index_set_caps": { "type": "function", "file": "git2/index.h", - "line": 252, - "lineto": 252, + "line": 235, + "lineto": 235, "args": [ { "name": "index", @@ -8283,7 +8460,7 @@ { "name": "caps", "type": "int", - "comment": "A combination of GIT_INDEXCAP values" + "comment": "A combination of GIT_INDEX_CAPABILITY values" } ], "argline": "git_index *index, int caps", @@ -8293,14 +8470,14 @@ "comment": " 0 on success, -1 on failure" }, "description": "

Set index capabilities flags.

\n", - "comments": "

If you pass GIT_INDEXCAP_FROM_OWNER for the caps, then the\n capabilities will be read from the config of the owner object,\n looking at core.ignorecase, core.filemode, core.symlinks.

\n", + "comments": "

If you pass GIT_INDEX_CAPABILITY_FROM_OWNER for the caps, then\n capabilities will be read from the config of the owner object,\n looking at core.ignorecase, core.filemode, core.symlinks.

\n", "group": "index" }, "git_index_version": { "type": "function", "file": "git2/index.h", - "line": 264, - "lineto": 264, + "line": 247, + "lineto": 247, "args": [ { "name": "index", @@ -8321,8 +8498,8 @@ "git_index_set_version": { "type": "function", "file": "git2/index.h", - "line": 277, - "lineto": 277, + "line": 260, + "lineto": 260, "args": [ { "name": "index", @@ -8348,8 +8525,8 @@ "git_index_read": { "type": "function", "file": "git2/index.h", - "line": 296, - "lineto": 296, + "line": 279, + "lineto": 279, "args": [ { "name": "index", @@ -8375,8 +8552,8 @@ "git_index_write": { "type": "function", "file": "git2/index.h", - "line": 305, - "lineto": 305, + "line": 288, + "lineto": 288, "args": [ { "name": "index", @@ -8397,8 +8574,8 @@ "git_index_path": { "type": "function", "file": "git2/index.h", - "line": 313, - "lineto": 313, + "line": 296, + "lineto": 296, "args": [ { "name": "index", @@ -8419,8 +8596,8 @@ "git_index_checksum": { "type": "function", "file": "git2/index.h", - "line": 325, - "lineto": 325, + "line": 308, + "lineto": 308, "args": [ { "name": "index", @@ -8441,8 +8618,8 @@ "git_index_read_tree": { "type": "function", "file": "git2/index.h", - "line": 336, - "lineto": 336, + "line": 319, + "lineto": 319, "args": [ { "name": "index", @@ -8468,8 +8645,8 @@ "git_index_write_tree": { "type": "function", "file": "git2/index.h", - "line": 357, - "lineto": 357, + "line": 340, + "lineto": 340, "args": [ { "name": "out", @@ -8493,18 +8670,18 @@ "group": "index", "examples": { "init.c": [ - "ex/HEAD/init.html#git_index_write_tree-5" + "ex/v0.28.0/init.html#git_index_write_tree-5" ], "merge.c": [ - "ex/HEAD/merge.html#git_index_write_tree-12" + "ex/v0.28.0/merge.html#git_index_write_tree-12" ] } }, "git_index_write_tree_to": { "type": "function", "file": "git2/index.h", - "line": 374, - "lineto": 374, + "line": 357, + "lineto": 357, "args": [ { "name": "out", @@ -8535,8 +8712,8 @@ "git_index_entrycount": { "type": "function", "file": "git2/index.h", - "line": 393, - "lineto": 393, + "line": 376, + "lineto": 376, "args": [ { "name": "index", @@ -8555,18 +8732,18 @@ "group": "index", "examples": { "general.c": [ - "ex/HEAD/general.html#git_index_entrycount-36" + "ex/v0.28.0/general.html#git_index_entrycount-36" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_index_entrycount-4" + "ex/v0.28.0/ls-files.html#git_index_entrycount-4" ] } }, "git_index_clear": { "type": "function", "file": "git2/index.h", - "line": 404, - "lineto": 404, + "line": 387, + "lineto": 387, "args": [ { "name": "index", @@ -8587,8 +8764,8 @@ "git_index_get_byindex": { "type": "function", "file": "git2/index.h", - "line": 417, - "lineto": 418, + "line": 400, + "lineto": 401, "args": [ { "name": "index", @@ -8612,18 +8789,18 @@ "group": "index", "examples": { "general.c": [ - "ex/HEAD/general.html#git_index_get_byindex-37" + "ex/v0.28.0/general.html#git_index_get_byindex-37" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_index_get_byindex-5" + "ex/v0.28.0/ls-files.html#git_index_get_byindex-5" ] } }, "git_index_get_bypath": { "type": "function", "file": "git2/index.h", - "line": 432, - "lineto": 433, + "line": 415, + "lineto": 416, "args": [ { "name": "index", @@ -8652,15 +8829,15 @@ "group": "index", "examples": { "ls-files.c": [ - "ex/HEAD/ls-files.html#git_index_get_bypath-6" + "ex/v0.28.0/ls-files.html#git_index_get_bypath-6" ] } }, "git_index_remove": { "type": "function", "file": "git2/index.h", - "line": 443, - "lineto": 443, + "line": 426, + "lineto": 426, "args": [ { "name": "index", @@ -8691,8 +8868,8 @@ "git_index_remove_directory": { "type": "function", "file": "git2/index.h", - "line": 453, - "lineto": 454, + "line": 436, + "lineto": 437, "args": [ { "name": "index", @@ -8723,8 +8900,8 @@ "git_index_add": { "type": "function", "file": "git2/index.h", - "line": 470, - "lineto": 470, + "line": 453, + "lineto": 453, "args": [ { "name": "index", @@ -8750,8 +8927,8 @@ "git_index_entry_stage": { "type": "function", "file": "git2/index.h", - "line": 482, - "lineto": 482, + "line": 465, + "lineto": 465, "args": [ { "name": "entry", @@ -8766,14 +8943,14 @@ "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 \n
\n\n

&\n GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT

\n", + "comments": "

This entry is calculated from the entry's flag attribute like this:

\n\n
(entry->flags \n
\n\n

&\n GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT

\n", "group": "index" }, "git_index_entry_is_conflict": { "type": "function", "file": "git2/index.h", - "line": 491, - "lineto": 491, + "line": 474, + "lineto": 474, "args": [ { "name": "entry", @@ -8791,11 +8968,87 @@ "comments": "", "group": "index" }, + "git_index_iterator_new": { + "type": "function", + "file": "git2/index.h", + "line": 494, + "lineto": 496, + "args": [ + { + "name": "iterator_out", + "type": "git_index_iterator **", + "comment": "The newly created iterator" + }, + { + "name": "index", + "type": "git_index *", + "comment": "The index to iterate" + } + ], + "argline": "git_index_iterator **iterator_out, git_index *index", + "sig": "git_index_iterator **::git_index *", + "return": { + "type": "int", + "comment": null + }, + "description": "

Create an iterator that will return every entry contained in the\n index at the time of creation. Entries are returned in order,\n sorted by path. This iterator is backed by a snapshot that allows\n callers to modify the index while iterating without affecting the\n iterator.

\n", + "comments": "", + "group": "index" + }, + "git_index_iterator_next": { + "type": "function", + "file": "git2/index.h", + "line": 505, + "lineto": 507, + "args": [ + { + "name": "out", + "type": "const git_index_entry **", + "comment": "Pointer to store the index entry in" + }, + { + "name": "iterator", + "type": "git_index_iterator *", + "comment": "The iterator" + } + ], + "argline": "const git_index_entry **out, git_index_iterator *iterator", + "sig": "const git_index_entry **::git_index_iterator *", + "return": { + "type": "int", + "comment": " 0, GIT_ITEROVER on iteration completion or an error code" + }, + "description": "

Return the next index entry in-order from the iterator.

\n", + "comments": "", + "group": "index" + }, + "git_index_iterator_free": { + "type": "function", + "file": "git2/index.h", + "line": 514, + "lineto": 514, + "args": [ + { + "name": "iterator", + "type": "git_index_iterator *", + "comment": "The iterator to free" + } + ], + "argline": "git_index_iterator *iterator", + "sig": "git_index_iterator *", + "return": { + "type": "void", + "comment": null + }, + "description": "

Free the index iterator

\n", + "comments": "", + "group": "index" + }, "git_index_add_bypath": { "type": "function", "file": "git2/index.h", - "line": 522, - "lineto": 522, + "line": 545, + "lineto": 545, "args": [ { "name": "index", @@ -8821,8 +9074,8 @@ "git_index_add_frombuffer": { "type": "function", "file": "git2/index.h", - "line": 551, - "lineto": 554, + "line": 574, + "lineto": 577, "args": [ { "name": "index", @@ -8858,8 +9111,8 @@ "git_index_remove_bypath": { "type": "function", "file": "git2/index.h", - "line": 570, - "lineto": 570, + "line": 593, + "lineto": 593, "args": [ { "name": "index", @@ -8885,8 +9138,8 @@ "git_index_add_all": { "type": "function", "file": "git2/index.h", - "line": 618, - "lineto": 623, + "line": 641, + "lineto": 646, "args": [ { "name": "index", @@ -8927,8 +9180,8 @@ "git_index_remove_all": { "type": "function", "file": "git2/index.h", - "line": 640, - "lineto": 644, + "line": 663, + "lineto": 667, "args": [ { "name": "index", @@ -8964,8 +9217,8 @@ "git_index_update_all": { "type": "function", "file": "git2/index.h", - "line": 669, - "lineto": 673, + "line": 692, + "lineto": 696, "args": [ { "name": "index", @@ -9001,8 +9254,8 @@ "git_index_find": { "type": "function", "file": "git2/index.h", - "line": 684, - "lineto": 684, + "line": 707, + "lineto": 707, "args": [ { "name": "at_pos", @@ -9033,8 +9286,8 @@ "git_index_find_prefix": { "type": "function", "file": "git2/index.h", - "line": 695, - "lineto": 695, + "line": 718, + "lineto": 718, "args": [ { "name": "at_pos", @@ -9065,8 +9318,8 @@ "git_index_conflict_add": { "type": "function", "file": "git2/index.h", - "line": 720, - "lineto": 724, + "line": 743, + "lineto": 747, "args": [ { "name": "index", @@ -9102,8 +9355,8 @@ "git_index_conflict_get": { "type": "function", "file": "git2/index.h", - "line": 740, - "lineto": 745, + "line": 763, + "lineto": 768, "args": [ { "name": "ancestor_out", @@ -9144,8 +9397,8 @@ "git_index_conflict_remove": { "type": "function", "file": "git2/index.h", - "line": 754, - "lineto": 754, + "line": 777, + "lineto": 777, "args": [ { "name": "index", @@ -9171,8 +9424,8 @@ "git_index_conflict_cleanup": { "type": "function", "file": "git2/index.h", - "line": 762, - "lineto": 762, + "line": 785, + "lineto": 785, "args": [ { "name": "index", @@ -9193,8 +9446,8 @@ "git_index_has_conflicts": { "type": "function", "file": "git2/index.h", - "line": 769, - "lineto": 769, + "line": 792, + "lineto": 792, "args": [ { "name": "index", @@ -9213,15 +9466,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_has_conflicts-13" + "ex/v0.28.0/merge.html#git_index_has_conflicts-13" ] } }, "git_index_conflict_iterator_new": { "type": "function", "file": "git2/index.h", - "line": 780, - "lineto": 782, + "line": 803, + "lineto": 805, "args": [ { "name": "iterator_out", @@ -9245,15 +9498,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_iterator_new-14" + "ex/v0.28.0/merge.html#git_index_conflict_iterator_new-14" ] } }, "git_index_conflict_next": { "type": "function", "file": "git2/index.h", - "line": 794, - "lineto": 798, + "line": 817, + "lineto": 821, "args": [ { "name": "ancestor_out", @@ -9287,15 +9540,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_next-15" + "ex/v0.28.0/merge.html#git_index_conflict_next-15" ] } }, "git_index_conflict_iterator_free": { "type": "function", "file": "git2/index.h", - "line": 805, - "lineto": 806, + "line": 828, + "lineto": 829, "args": [ { "name": "iterator", @@ -9314,7 +9567,7 @@ "group": "index", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_index_conflict_iterator_free-16" + "ex/v0.28.0/merge.html#git_index_conflict_iterator_free-16" ] } }, @@ -9865,15 +10118,62 @@ "group": "merge", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_merge_analysis-17" + "ex/v0.28.0/merge.html#git_merge_analysis-17" ] } }, + "git_merge_analysis_for_ref": { + "type": "function", + "file": "git2/merge.h", + "line": 402, + "lineto": 408, + "args": [ + { + "name": "analysis_out", + "type": "git_merge_analysis_t *", + "comment": "analysis enumeration that the result is written into" + }, + { + "name": "preference_out", + "type": "git_merge_preference_t *", + "comment": null + }, + { + "name": "repo", + "type": "git_repository *", + "comment": "the repository to merge" + }, + { + "name": "our_ref", + "type": "git_reference *", + "comment": "the reference to perform the analysis from" + }, + { + "name": "their_heads", + "type": "const git_annotated_commit **", + "comment": "the heads to merge into" + }, + { + "name": "their_heads_len", + "type": "size_t", + "comment": "the number of heads to merge" + } + ], + "argline": "git_merge_analysis_t *analysis_out, git_merge_preference_t *preference_out, git_repository *repo, git_reference *our_ref, const git_annotated_commit **their_heads, size_t their_heads_len", + "sig": "git_merge_analysis_t *::git_merge_preference_t *::git_repository *::git_reference *::const git_annotated_commit **::size_t", + "return": { + "type": "int", + "comment": " 0 on success or error code" + }, + "description": "

Analyzes the given branch(es) and determines the opportunities for\n merging them into a reference.

\n", + "comments": "", + "group": "merge" + }, "git_merge_base": { "type": "function", "file": "git2/merge.h", - "line": 400, - "lineto": 404, + "line": 419, + "lineto": 423, "args": [ { "name": "out", @@ -9907,18 +10207,18 @@ "group": "merge", "examples": { "log.c": [ - "ex/HEAD/log.html#git_merge_base-33" + "ex/v0.28.0/log.html#git_merge_base-33" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_merge_base-3" + "ex/v0.28.0/rev-parse.html#git_merge_base-3" ] } }, "git_merge_bases": { "type": "function", "file": "git2/merge.h", - "line": 415, - "lineto": 419, + "line": 434, + "lineto": 438, "args": [ { "name": "out", @@ -9954,8 +10254,8 @@ "git_merge_base_many": { "type": "function", "file": "git2/merge.h", - "line": 430, - "lineto": 434, + "line": 449, + "lineto": 453, "args": [ { "name": "out", @@ -9991,8 +10291,8 @@ "git_merge_bases_many": { "type": "function", "file": "git2/merge.h", - "line": 445, - "lineto": 449, + "line": 464, + "lineto": 468, "args": [ { "name": "out", @@ -10028,8 +10328,8 @@ "git_merge_base_octopus": { "type": "function", "file": "git2/merge.h", - "line": 460, - "lineto": 464, + "line": 479, + "lineto": 483, "args": [ { "name": "out", @@ -10065,8 +10365,8 @@ "git_merge_file": { "type": "function", "file": "git2/merge.h", - "line": 482, - "lineto": 487, + "line": 501, + "lineto": 506, "args": [ { "name": "out", @@ -10107,8 +10407,8 @@ "git_merge_file_from_index": { "type": "function", "file": "git2/merge.h", - "line": 503, - "lineto": 509, + "line": 522, + "lineto": 528, "args": [ { "name": "out", @@ -10154,8 +10454,8 @@ "git_merge_file_result_free": { "type": "function", "file": "git2/merge.h", - "line": 516, - "lineto": 516, + "line": 535, + "lineto": 535, "args": [ { "name": "result", @@ -10176,8 +10476,8 @@ "git_merge_trees": { "type": "function", "file": "git2/merge.h", - "line": 534, - "lineto": 540, + "line": 553, + "lineto": 559, "args": [ { "name": "out", @@ -10223,8 +10523,8 @@ "git_merge_commits": { "type": "function", "file": "git2/merge.h", - "line": 557, - "lineto": 562, + "line": 576, + "lineto": 581, "args": [ { "name": "out", @@ -10265,8 +10565,8 @@ "git_merge": { "type": "function", "file": "git2/merge.h", - "line": 582, - "lineto": 587, + "line": 601, + "lineto": 606, "args": [ { "name": "repo", @@ -10305,7 +10605,7 @@ "group": "merge", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_merge-18" + "ex/v0.28.0/merge.html#git_merge-18" ] } }, @@ -10987,25 +11287,25 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "the type of the object" } ], - "argline": "git_object **object, git_repository *repo, const git_oid *id, git_otype type", - "sig": "git_object **::git_repository *::const git_oid *::git_otype", + "argline": "git_object **object, git_repository *repo, const git_oid *id, git_object_t type", + "sig": "git_object **::git_repository *::const git_oid *::git_object_t", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "

Lookup a reference to one of the objects in a repository.

\n", - "comments": "

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJ_ANY' may be passed to let\n the method guess the object's type.

\n", + "comments": "

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJECT_ANY' may be passed to let\n the method guess the object's type.

\n", "group": "object", "examples": { "log.c": [ - "ex/HEAD/log.html#git_object_lookup-34" + "ex/v0.28.0/log.html#git_object_lookup-34" ], "merge.c": [ - "ex/HEAD/merge.html#git_object_lookup-19" + "ex/v0.28.0/merge.html#git_object_lookup-19" ] } }, @@ -11037,18 +11337,18 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "the type of the object" } ], - "argline": "git_object **object_out, git_repository *repo, const git_oid *id, size_t len, git_otype type", - "sig": "git_object **::git_repository *::const git_oid *::size_t::git_otype", + "argline": "git_object **object_out, git_repository *repo, const git_oid *id, size_t len, git_object_t type", + "sig": "git_object **::git_repository *::const git_oid *::size_t::git_object_t", "return": { "type": "int", "comment": " 0 or an error code" }, "description": "

Lookup a reference to one of the objects in a repository,\n given a prefix of its identifier (short id).

\n", - "comments": "

The object obtained will be so that its identifier\n matches the first 'len' hexadecimal characters\n (packets of 4 bits) of the given 'id'.\n 'len' must be at least GIT_OID_MINPREFIXLEN, and\n long enough to identify a unique object matching\n the prefix; otherwise the method will fail.

\n\n

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJ_ANY' may be passed to let\n the method guess the object's type.

\n", + "comments": "

The object obtained will be so that its identifier\n matches the first 'len' hexadecimal characters\n (packets of 4 bits) of the given 'id'.\n 'len' must be at least GIT_OID_MINPREFIXLEN, and\n long enough to identify a unique object matching\n the prefix; otherwise the method will fail.

\n\n

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJECT_ANY' may be passed to let\n the method guess the object's type.

\n", "group": "object" }, "git_object_lookup_bypath": { @@ -11074,12 +11374,12 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "type of object desired" } ], - "argline": "git_object **out, const git_object *treeish, const char *path, git_otype type", - "sig": "git_object **::const git_object *::const char *::git_otype", + "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" @@ -11111,27 +11411,27 @@ "group": "object", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_object_id-10", - "ex/HEAD/blame.html#git_object_id-11", - "ex/HEAD/blame.html#git_object_id-12", - "ex/HEAD/blame.html#git_object_id-13" + "ex/v0.28.0/blame.html#git_object_id-10", + "ex/v0.28.0/blame.html#git_object_id-11", + "ex/v0.28.0/blame.html#git_object_id-12", + "ex/v0.28.0/blame.html#git_object_id-13" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_id-12", - "ex/HEAD/cat-file.html#git_object_id-13" + "ex/v0.28.0/cat-file.html#git_object_id-12", + "ex/v0.28.0/cat-file.html#git_object_id-13" ], "log.c": [ - "ex/HEAD/log.html#git_object_id-35", - "ex/HEAD/log.html#git_object_id-36", - "ex/HEAD/log.html#git_object_id-37", - "ex/HEAD/log.html#git_object_id-38" + "ex/v0.28.0/log.html#git_object_id-35", + "ex/v0.28.0/log.html#git_object_id-36", + "ex/v0.28.0/log.html#git_object_id-37", + "ex/v0.28.0/log.html#git_object_id-38" ], "rev-parse.c": [ - "ex/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/HEAD/rev-parse.html#git_object_id-7", - "ex/HEAD/rev-parse.html#git_object_id-8" + "ex/v0.28.0/rev-parse.html#git_object_id-4", + "ex/v0.28.0/rev-parse.html#git_object_id-5", + "ex/v0.28.0/rev-parse.html#git_object_id-6", + "ex/v0.28.0/rev-parse.html#git_object_id-7", + "ex/v0.28.0/rev-parse.html#git_object_id-8" ] } }, @@ -11163,7 +11463,7 @@ "group": "object", "examples": { "tag.c": [ - "ex/HEAD/tag.html#git_object_short_id-5" + "ex/v0.28.0/tag.html#git_object_short_id-5" ] } }, @@ -11182,7 +11482,7 @@ "argline": "const git_object *obj", "sig": "const git_object *", "return": { - "type": "git_otype", + "type": "git_object_t", "comment": " the object's type" }, "description": "

Get the object type of an object

\n", @@ -11190,12 +11490,12 @@ "group": "object", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_type-14", - "ex/HEAD/cat-file.html#git_object_type-15", - "ex/HEAD/cat-file.html#git_object_type-16" + "ex/v0.28.0/cat-file.html#git_object_type-14", + "ex/v0.28.0/cat-file.html#git_object_type-15", + "ex/v0.28.0/cat-file.html#git_object_type-16" ], "tag.c": [ - "ex/HEAD/tag.html#git_object_type-6" + "ex/v0.28.0/tag.html#git_object_type-6" ] } }, @@ -11244,33 +11544,33 @@ "group": "object", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_object_free-14", - "ex/HEAD/blame.html#git_object_free-15", - "ex/HEAD/blame.html#git_object_free-16", - "ex/HEAD/blame.html#git_object_free-17" + "ex/v0.28.0/blame.html#git_object_free-14", + "ex/v0.28.0/blame.html#git_object_free-15", + "ex/v0.28.0/blame.html#git_object_free-16", + "ex/v0.28.0/blame.html#git_object_free-17" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_free-17" + "ex/v0.28.0/cat-file.html#git_object_free-17" ], "general.c": [ - "ex/HEAD/general.html#git_object_free-38" + "ex/v0.28.0/general.html#git_object_free-38" ], "log.c": [ - "ex/HEAD/log.html#git_object_free-39" + "ex/v0.28.0/log.html#git_object_free-39" ], "merge.c": [ - "ex/HEAD/merge.html#git_object_free-20" + "ex/v0.28.0/merge.html#git_object_free-20" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_object_free-9", - "ex/HEAD/rev-parse.html#git_object_free-10", - "ex/HEAD/rev-parse.html#git_object_free-11" + "ex/v0.28.0/rev-parse.html#git_object_free-9", + "ex/v0.28.0/rev-parse.html#git_object_free-10", + "ex/v0.28.0/rev-parse.html#git_object_free-11" ], "tag.c": [ - "ex/HEAD/tag.html#git_object_free-7", - "ex/HEAD/tag.html#git_object_free-8", - "ex/HEAD/tag.html#git_object_free-9", - "ex/HEAD/tag.html#git_object_free-10" + "ex/v0.28.0/tag.html#git_object_free-7", + "ex/v0.28.0/tag.html#git_object_free-8", + "ex/v0.28.0/tag.html#git_object_free-9", + "ex/v0.28.0/tag.html#git_object_free-10" ] } }, @@ -11282,12 +11582,12 @@ "args": [ { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "object type to convert." } ], - "argline": "git_otype type", - "sig": "git_otype", + "argline": "git_object_t type", + "sig": "git_object_t", "return": { "type": "const char *", "comment": " the corresponding string representation." @@ -11297,14 +11597,14 @@ "group": "object", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_object_type2string-18", - "ex/HEAD/cat-file.html#git_object_type2string-19", - "ex/HEAD/cat-file.html#git_object_type2string-20", - "ex/HEAD/cat-file.html#git_object_type2string-21" + "ex/v0.28.0/cat-file.html#git_object_type2string-18", + "ex/v0.28.0/cat-file.html#git_object_type2string-19", + "ex/v0.28.0/cat-file.html#git_object_type2string-20", + "ex/v0.28.0/cat-file.html#git_object_type2string-21" ], "general.c": [ - "ex/HEAD/general.html#git_object_type2string-39", - "ex/HEAD/general.html#git_object_type2string-40" + "ex/v0.28.0/general.html#git_object_type2string-39", + "ex/v0.28.0/general.html#git_object_type2string-40" ] } }, @@ -11323,10 +11623,10 @@ "argline": "const char *str", "sig": "const char *", "return": { - "type": "git_otype", - "comment": " the corresponding git_otype." + "type": "git_object_t", + "comment": " the corresponding git_object_t." }, - "description": "

Convert a string object type representation to it's git_otype.

\n", + "description": "

Convert a string object type representation to it's git_object_t.

\n", "comments": "", "group": "object" }, @@ -11338,17 +11638,17 @@ "args": [ { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "object type to test." } ], - "argline": "git_otype type", - "sig": "git_otype", + "argline": "git_object_t type", + "sig": "git_object_t", "return": { "type": "int", "comment": " true if the type represents a valid loose object type,\n false otherwise." }, - "description": "

Determine if the given git_otype is a valid loose object type.

\n", + "description": "

Determine if the given git_object_t is a valid loose object type.

\n", "comments": "", "group": "object" }, @@ -11360,12 +11660,12 @@ "args": [ { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "object type to get its size" } ], - "argline": "git_otype type", - "sig": "git_otype", + "argline": "git_object_t type", + "sig": "git_object_t", "return": { "type": "size_t", "comment": " size in bytes of the object" @@ -11392,18 +11692,18 @@ }, { "name": "target_type", - "type": "git_otype", - "comment": "The type of the requested object (a GIT_OBJ_ value)" + "type": "git_object_t", + "comment": "The type of the requested object (a GIT_OBJECT_ value)" } ], - "argline": "git_object **peeled, const git_object *object, git_otype target_type", - "sig": "git_object **::const git_object *::git_otype", + "argline": "git_object **peeled, const git_object *object, git_object_t target_type", + "sig": "git_object **::const git_object *::git_object_t", "return": { "type": "int", "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EPEEL, or an error code" }, "description": "

Recursively peel an object until an object of the specified type is met.

\n", - "comments": "

If the query cannot be satisfied due to the object model,\n GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a\n tree).

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object will\n be peeled until the type changes. A tag will be peeled until the\n referenced object is no longer a tag, and a commit will be peeled\n to a tree. Any other object type will return GIT_EINVALIDSPEC.

\n\n

If peeling a tag we discover an object which cannot be peeled to\n the target type due to the object model, GIT_EPEEL will be\n returned.

\n\n

You must free the returned object.

\n", + "comments": "

If the query cannot be satisfied due to the object model,\n GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a\n tree).

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object will\n be peeled until the type changes. A tag will be peeled until the\n referenced object is no longer a tag, and a commit will be peeled\n to a tree. Any other object type will return GIT_EINVALIDSPEC.

\n\n

If peeling a tag we discover an object which cannot be peeled to\n the target type due to the object model, GIT_EPEEL will be\n returned.

\n\n

You must free the returned object.

\n", "group": "object" }, "git_object_dup": { @@ -11532,10 +11832,10 @@ "group": "odb", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_odb_free-22" + "ex/v0.28.0/cat-file.html#git_odb_free-22" ], "general.c": [ - "ex/HEAD/general.html#git_odb_free-41" + "ex/v0.28.0/general.html#git_odb_free-41" ] } }, @@ -11572,10 +11872,10 @@ "group": "odb", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_odb_read-23" + "ex/v0.28.0/cat-file.html#git_odb_read-23" ], "general.c": [ - "ex/HEAD/general.html#git_odb_read-42" + "ex/v0.28.0/general.html#git_odb_read-42" ] } }, @@ -11629,7 +11929,7 @@ }, { "name": "type_out", - "type": "git_otype *", + "type": "git_object_t *", "comment": "pointer where to store the type" }, { @@ -11643,8 +11943,8 @@ "comment": "identity of the object to read." } ], - "argline": "size_t *len_out, git_otype *type_out, git_odb *db, const git_oid *id", - "sig": "size_t *::git_otype *::git_odb *::const git_oid *", + "argline": "size_t *len_out, git_object_t *type_out, git_odb *db, const git_oid *id", + "sig": "size_t *::git_object_t *::git_odb *::const git_oid *", "return": { "type": "int", "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." @@ -11831,12 +12131,12 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "type of the data to store" } ], - "argline": "git_oid *out, git_odb *odb, const void *data, size_t len, git_otype type", - "sig": "git_oid *::git_odb *::const void *::size_t::git_otype", + "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" @@ -11846,7 +12146,7 @@ "group": "odb", "examples": { "general.c": [ - "ex/HEAD/general.html#git_odb_write-43" + "ex/v0.28.0/general.html#git_odb_write-43" ] } }, @@ -11873,12 +12173,12 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "type of the object that will be written" } ], - "argline": "git_odb_stream **out, git_odb *db, git_off_t size, git_otype type", - "sig": "git_odb_stream **::git_odb *::git_off_t::git_otype", + "argline": "git_odb_stream **out, git_odb *db, git_off_t size, git_object_t type", + "sig": "git_odb_stream **::git_odb *::git_off_t::git_object_t", "return": { "type": "int", "comment": " 0 if the stream was created; error code otherwise" @@ -12018,7 +12318,7 @@ }, { "name": "type", - "type": "git_otype *", + "type": "git_object_t *", "comment": "pointer where to store the type of the object" }, { @@ -12032,8 +12332,8 @@ "comment": "oid of the object the stream will read from" } ], - "argline": "git_odb_stream **out, size_t *len, git_otype *type, git_odb *db, const git_oid *oid", - "sig": "git_odb_stream **::size_t *::git_otype *::git_odb *::const git_oid *", + "argline": "git_odb_stream **out, size_t *len, git_object_t *type, git_odb *db, const git_oid *oid", + "sig": "git_odb_stream **::size_t *::git_object_t *::git_odb *::const git_oid *", "return": { "type": "int", "comment": " 0 if the stream was created; error code otherwise" @@ -12102,12 +12402,12 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "of the data to hash" } ], - "argline": "git_oid *out, const void *data, size_t len, git_otype type", - "sig": "git_oid *::const void *::size_t::git_otype", + "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" @@ -12134,12 +12434,12 @@ }, { "name": "type", - "type": "git_otype", + "type": "git_object_t", "comment": "the type of the object that will be hashed" } ], - "argline": "git_oid *out, const char *path, git_otype type", - "sig": "git_oid *::const char *::git_otype", + "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" @@ -12198,10 +12498,10 @@ "group": "odb", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_odb_object_free-24" + "ex/v0.28.0/cat-file.html#git_odb_object_free-24" ], "general.c": [ - "ex/HEAD/general.html#git_odb_object_free-44" + "ex/v0.28.0/general.html#git_odb_object_free-44" ] } }, @@ -12250,7 +12550,7 @@ "group": "odb", "examples": { "general.c": [ - "ex/HEAD/general.html#git_odb_object_data-45" + "ex/v0.28.0/general.html#git_odb_object_data-45" ] } }, @@ -12277,10 +12577,10 @@ "group": "odb", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_odb_object_size-25" + "ex/v0.28.0/cat-file.html#git_odb_object_size-25" ], "general.c": [ - "ex/HEAD/general.html#git_odb_object_size-46" + "ex/v0.28.0/general.html#git_odb_object_size-46" ] } }, @@ -12299,7 +12599,7 @@ "argline": "git_odb_object *object", "sig": "git_odb_object *", "return": { - "type": "git_otype", + "type": "git_object_t", "comment": " the type" }, "description": "

Return the type of an ODB object

\n", @@ -12307,7 +12607,7 @@ "group": "odb", "examples": { "general.c": [ - "ex/HEAD/general.html#git_odb_object_type-47" + "ex/v0.28.0/general.html#git_odb_object_type-47" ] } }, @@ -12558,14 +12858,14 @@ "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" + "ex/v0.28.0/general.html#git_oid_fromstr-48", + "ex/v0.28.0/general.html#git_oid_fromstr-49", + "ex/v0.28.0/general.html#git_oid_fromstr-50", + "ex/v0.28.0/general.html#git_oid_fromstr-51", + "ex/v0.28.0/general.html#git_oid_fromstr-52", + "ex/v0.28.0/general.html#git_oid_fromstr-53", + "ex/v0.28.0/general.html#git_oid_fromstr-54", + "ex/v0.28.0/general.html#git_oid_fromstr-55" ] } }, @@ -12683,19 +12983,19 @@ "group": "oid", "examples": { "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/v0.28.0/general.html#git_oid_fmt-56", + "ex/v0.28.0/general.html#git_oid_fmt-57", + "ex/v0.28.0/general.html#git_oid_fmt-58", + "ex/v0.28.0/general.html#git_oid_fmt-59", + "ex/v0.28.0/general.html#git_oid_fmt-60", + "ex/v0.28.0/general.html#git_oid_fmt-61" ], "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_oid_fmt-1", - "ex/HEAD/network/fetch.html#git_oid_fmt-2" + "ex/v0.28.0/network/fetch.html#git_oid_fmt-1", + "ex/v0.28.0/network/fetch.html#git_oid_fmt-2" ], "network/ls-remote.c": [ - "ex/HEAD/network/ls-remote.html#git_oid_fmt-1" + "ex/v0.28.0/network/ls-remote.html#git_oid_fmt-1" ] } }, @@ -12781,8 +13081,8 @@ "group": "oid", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_oid_tostr_s-21", - "ex/HEAD/merge.html#git_oid_tostr_s-22" + "ex/v0.28.0/merge.html#git_oid_tostr_s-21", + "ex/v0.28.0/merge.html#git_oid_tostr_s-22" ] } }, @@ -12819,25 +13119,25 @@ "group": "oid", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_oid_tostr-18", - "ex/HEAD/blame.html#git_oid_tostr-19" + "ex/v0.28.0/blame.html#git_oid_tostr-18", + "ex/v0.28.0/blame.html#git_oid_tostr-19" ], "cat-file.c": [ - "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/HEAD/cat-file.html#git_oid_tostr-29", - "ex/HEAD/cat-file.html#git_oid_tostr-30" + "ex/v0.28.0/cat-file.html#git_oid_tostr-26", + "ex/v0.28.0/cat-file.html#git_oid_tostr-27", + "ex/v0.28.0/cat-file.html#git_oid_tostr-28", + "ex/v0.28.0/cat-file.html#git_oid_tostr-29", + "ex/v0.28.0/cat-file.html#git_oid_tostr-30" ], "log.c": [ - "ex/HEAD/log.html#git_oid_tostr-40", - "ex/HEAD/log.html#git_oid_tostr-41" + "ex/v0.28.0/log.html#git_oid_tostr-40", + "ex/v0.28.0/log.html#git_oid_tostr-41" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_oid_tostr-12", - "ex/HEAD/rev-parse.html#git_oid_tostr-13", - "ex/HEAD/rev-parse.html#git_oid_tostr-14", - "ex/HEAD/rev-parse.html#git_oid_tostr-15" + "ex/v0.28.0/rev-parse.html#git_oid_tostr-12", + "ex/v0.28.0/rev-parse.html#git_oid_tostr-13", + "ex/v0.28.0/rev-parse.html#git_oid_tostr-14", + "ex/v0.28.0/rev-parse.html#git_oid_tostr-15" ] } }, @@ -12869,9 +13169,9 @@ "group": "oid", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_oid_cpy-20", - "ex/HEAD/blame.html#git_oid_cpy-21", - "ex/HEAD/blame.html#git_oid_cpy-22" + "ex/v0.28.0/blame.html#git_oid_cpy-20", + "ex/v0.28.0/blame.html#git_oid_cpy-21", + "ex/v0.28.0/blame.html#git_oid_cpy-22" ] } }, @@ -13038,10 +13338,10 @@ "group": "oid", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_oid_iszero-23" + "ex/v0.28.0/blame.html#git_oid_iszero-23" ], "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_oid_iszero-3" + "ex/v0.28.0/network/fetch.html#git_oid_iszero-3" ] } }, @@ -13091,7 +13391,7 @@ "comment": " the minimal length to uniquely identify all OIDs\n\t\tadded so far to the set; or an error code (\n<\n0) if an\n\t\terror occurs." }, "description": "

Add a new OID to set of shortened OIDs and calculate\n the minimal length to uniquely identify all the OIDs in\n the set.

\n", - "comments": "

The OID is expected to be a 40-char hexadecimal string.\n The OID is owned by the user and will not be modified\n or freed.

\n\n

For performance reasons, there is a hard-limit of how many\n OIDs can be added to a single set (around ~32000, assuming\n a mostly randomized distribution), which should be enough\n for any kind of program, and keeps the algorithm fast and\n memory-efficient.

\n\n

Attempting to add more than those OIDs will result in a\n GITERR_INVALID error

\n", + "comments": "

The OID is expected to be a 40-char hexadecimal string.\n The OID is owned by the user and will not be modified\n or freed.

\n\n

For performance reasons, there is a hard-limit of how many\n OIDs can be added to a single set (around ~32000, assuming\n a mostly randomized distribution), which should be enough\n for any kind of program, and keeps the algorithm fast and\n memory-efficient.

\n\n

Attempting to add more than those OIDs will result in a\n GIT_ERROR_INVALID error

\n", "group": "oid" }, "git_oid_shorten_free": { @@ -14074,7 +14374,7 @@ "group": "pathspec", "examples": { "log.c": [ - "ex/HEAD/log.html#git_pathspec_new-42" + "ex/v0.28.0/log.html#git_pathspec_new-42" ] } }, @@ -14101,7 +14401,7 @@ "group": "pathspec", "examples": { "log.c": [ - "ex/HEAD/log.html#git_pathspec_free-43" + "ex/v0.28.0/log.html#git_pathspec_free-43" ] } }, @@ -14114,27 +14414,27 @@ { "name": "ps", "type": "const git_pathspec *", - "comment": "The compiled pathspec" + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Combination of git_pathspec_flag_t options to control match" + "type": "int", + "comment": null }, { "name": "path", "type": "const char *", - "comment": "The pathname to attempt to match" + "comment": null } ], - "argline": "const git_pathspec *ps, uint32_t flags, const char *path", - "sig": "const git_pathspec *::uint32_t::const char *", + "argline": "const git_pathspec *ps, int flags, const char *path", + "sig": "const git_pathspec *::int::const char *", "return": { "type": "int", - "comment": " 1 is path matches spec, 0 if it does not" + "comment": null }, - "description": "

Try to match a path against a pathspec

\n", - "comments": "

Unlike most of the other pathspec matching functions, this will not\n fall back on the native case-sensitivity for your platform. You must\n explicitly pass flags to control case sensitivity or else this will\n fall back on being case sensitive.

\n", + "description": "", + "comments": "", "group": "pathspec" }, "git_pathspec_match_workdir": { @@ -14146,32 +14446,32 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": "Output list of matches; pass NULL to just get return value" + "comment": null }, { "name": "repo", "type": "git_repository *", - "comment": "The repository in which to match; bare repo is an error" + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Combination of git_pathspec_flag_t options to control match" + "type": "int", + "comment": null }, { "name": "ps", "type": "git_pathspec *", - "comment": "Pathspec to be matched" + "comment": null } ], - "argline": "git_pathspec_match_list **out, git_repository *repo, uint32_t flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_repository *::uint32_t::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_repository *repo, int flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_repository *::int::git_pathspec *", "return": { "type": "int", - "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag was given" + "comment": null }, - "description": "

Match a pathspec against the working directory of a repository.

\n", - "comments": "

This matches the pathspec against the current files in the working\n directory of the repository. It is an error to invoke this on a bare\n repo. This handles git ignores (i.e. ignored files will not be\n considered to match the pathspec unless the file is tracked in the\n index).

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", + "description": "", + "comments": "", "group": "pathspec" }, "git_pathspec_match_index": { @@ -14183,32 +14483,32 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": "Output list of matches; pass NULL to just get return value" + "comment": null }, { "name": "index", "type": "git_index *", - "comment": "The index to match against" + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Combination of git_pathspec_flag_t options to control match" + "type": "int", + "comment": null }, { "name": "ps", "type": "git_pathspec *", - "comment": "Pathspec to be matched" + "comment": null } ], - "argline": "git_pathspec_match_list **out, git_index *index, uint32_t flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_index *::uint32_t::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_index *index, int flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_index *::int::git_pathspec *", "return": { "type": "int", - "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" + "comment": null }, - "description": "

Match a pathspec against entries in an index.

\n", - "comments": "

This matches the pathspec against the files in the repository index.

\n\n

NOTE: At the moment, the case sensitivity of this match is controlled\n by the current case-sensitivity of the index object itself and the\n USE_CASE and IGNORE_CASE flags will have no effect. This behavior will\n be corrected in a future release.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", + "description": "", + "comments": "", "group": "pathspec" }, "git_pathspec_match_tree": { @@ -14220,36 +14520,36 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": "Output list of matches; pass NULL to just get return value" + "comment": null }, { "name": "tree", "type": "git_tree *", - "comment": "The root-level tree to match against" + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Combination of git_pathspec_flag_t options to control match" + "type": "int", + "comment": null }, { "name": "ps", "type": "git_pathspec *", - "comment": "Pathspec to be matched" + "comment": null } ], - "argline": "git_pathspec_match_list **out, git_tree *tree, uint32_t flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_tree *::uint32_t::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_tree *tree, int flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_tree *::int::git_pathspec *", "return": { "type": "int", - "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" + "comment": null }, - "description": "

Match a pathspec against files in a tree.

\n", - "comments": "

This matches the pathspec against the files in the given tree.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", + "description": "", + "comments": "", "group": "pathspec", "examples": { "log.c": [ - "ex/HEAD/log.html#git_pathspec_match_tree-44" + "ex/v0.28.0/log.html#git_pathspec_match_tree-44" ] } }, @@ -14262,32 +14562,32 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": "Output list of matches; pass NULL to just get return value" + "comment": null }, { "name": "diff", "type": "git_diff *", - "comment": "A generated diff list" + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Combination of git_pathspec_flag_t options to control match" + "type": "int", + "comment": null }, { "name": "ps", "type": "git_pathspec *", - "comment": "Pathspec to be matched" + "comment": null } ], - "argline": "git_pathspec_match_list **out, git_diff *diff, uint32_t flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_diff *::uint32_t::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_diff *diff, int flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_diff *::int::git_pathspec *", "return": { "type": "int", - "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" + "comment": null }, - "description": "

Match a pathspec against files in a diff list.

\n", - "comments": "

This matches the pathspec against the files in the given diff list.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That\n contains the list of all matched filenames (unless you pass the\n GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of\n pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES\n flag). You must call git_pathspec_match_list_free() on this object.

\n", + "description": "", + "comments": "", "group": "pathspec" }, "git_pathspec_match_list_free": { @@ -15285,10 +15585,10 @@ "group": "reference", "examples": { "general.c": [ - "ex/HEAD/general.html#git_reference_lookup-62" + "ex/v0.28.0/general.html#git_reference_lookup-62" ], "merge.c": [ - "ex/HEAD/merge.html#git_reference_lookup-23" + "ex/v0.28.0/merge.html#git_reference_lookup-23" ] } }, @@ -15357,7 +15657,7 @@ "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_dwim-24" + "ex/v0.28.0/merge.html#git_reference_dwim-24" ] } }, @@ -15508,7 +15808,7 @@ "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_create-25" + "ex/v0.28.0/merge.html#git_reference_create-25" ] } }, @@ -15587,7 +15887,7 @@ "group": "reference", "examples": { "general.c": [ - "ex/HEAD/general.html#git_reference_target-63" + "ex/v0.28.0/general.html#git_reference_target-63" ] } }, @@ -15636,10 +15936,10 @@ "group": "reference", "examples": { "general.c": [ - "ex/HEAD/general.html#git_reference_symbolic_target-64" + "ex/v0.28.0/general.html#git_reference_symbolic_target-64" ], "merge.c": [ - "ex/HEAD/merge.html#git_reference_symbolic_target-26" + "ex/v0.28.0/merge.html#git_reference_symbolic_target-26" ] } }, @@ -15658,15 +15958,15 @@ "argline": "const git_reference *ref", "sig": "const git_reference *", "return": { - "type": "git_ref_t", + "type": "git_reference_t", "comment": " the type" }, "description": "

Get the type of a reference.

\n", - "comments": "

Either direct (GIT_REF_OID) or symbolic (GIT_REF_SYMBOLIC)

\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" + "ex/v0.28.0/general.html#git_reference_type-65" ] } }, @@ -15693,7 +15993,7 @@ "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_name-27" + "ex/v0.28.0/merge.html#git_reference_name-27" ] } }, @@ -15821,7 +16121,7 @@ "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_set_target-28" + "ex/v0.28.0/merge.html#git_reference_set_target-28" ] } }, @@ -15944,7 +16244,7 @@ "group": "reference", "examples": { "general.c": [ - "ex/HEAD/general.html#git_reference_list-66" + "ex/v0.28.0/general.html#git_reference_list-66" ] } }, @@ -16062,15 +16362,15 @@ "group": "reference", "examples": { "general.c": [ - "ex/HEAD/general.html#git_reference_free-67" + "ex/v0.28.0/general.html#git_reference_free-67" ], "merge.c": [ - "ex/HEAD/merge.html#git_reference_free-29", - "ex/HEAD/merge.html#git_reference_free-30", - "ex/HEAD/merge.html#git_reference_free-31" + "ex/v0.28.0/merge.html#git_reference_free-29", + "ex/v0.28.0/merge.html#git_reference_free-30", + "ex/v0.28.0/merge.html#git_reference_free-31" ], "status.c": [ - "ex/HEAD/status.html#git_reference_free-3" + "ex/v0.28.0/status.html#git_reference_free-3" ] } }, @@ -16439,7 +16739,7 @@ { "name": "flags", "type": "unsigned int", - "comment": "Flags to constrain name validation rules - see the\n GIT_REF_FORMAT constants above." + "comment": "Flags to constrain name validation rules - see the\n GIT_REFERENCE_FORMAT constants above." } ], "argline": "char *buffer_out, size_t buffer_size, const char *name, unsigned int flags", @@ -16465,27 +16765,27 @@ }, { "name": "ref", - "type": "git_reference *", + "type": "const git_reference *", "comment": "The reference to be processed" }, { "name": "type", - "type": "git_otype", - "comment": "The type of the requested object (GIT_OBJ_COMMIT,\n GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY)." + "type": "git_object_t", + "comment": "The type of the requested object (GIT_OBJECT_COMMIT,\n GIT_OBJECT_TAG, GIT_OBJECT_TREE, GIT_OBJECT_BLOB or GIT_OBJECT_ANY)." } ], - "argline": "git_object **out, git_reference *ref, git_otype type", - "sig": "git_object **::git_reference *::git_otype", + "argline": "git_object **out, const git_reference *ref, git_object_t type", + "sig": "git_object **::const git_reference *::git_object_t", "return": { "type": "int", "comment": " 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code" }, "description": "

Recursively peel reference until object of the specified type is found.

\n", - "comments": "

The retrieved peeled object is owned by the repository\n and should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJ_ANY as the target type, then the object\n will be peeled until a non-tag object is met.

\n", + "comments": "

The retrieved peeled object is owned by the repository\n and should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object\n will be peeled until a non-tag object is met.

\n", "group": "reference", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_reference_peel-32" + "ex/v0.28.0/merge.html#git_reference_peel-32" ] } }, @@ -16534,7 +16834,7 @@ "group": "reference", "examples": { "status.c": [ - "ex/HEAD/status.html#git_reference_shorthand-4" + "ex/v0.28.0/status.html#git_reference_shorthand-4" ] } }, @@ -16858,15 +17158,74 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_create-4" + "ex/v0.28.0/remote.html#git_remote_create-4" ] } }, + "git_remote_create_init_options": { + "type": "function", + "file": "git2/remote.h", + "line": 97, + "lineto": 99, + "args": [ + { + "name": "opts", + "type": "git_remote_create_options *", + "comment": "The `git_remote_create_options` struct to initialize." + }, + { + "name": "version", + "type": "unsigned int", + "comment": "The struct version; pass `GIT_REMOTE_CREATE_OPTIONS_VERSION`." + } + ], + "argline": "git_remote_create_options *opts, unsigned int version", + "sig": "git_remote_create_options *::unsigned int", + "return": { + "type": "int", + "comment": " Zero on success; -1 on failure." + }, + "description": "

Initialize git_remote_create_options structure

\n", + "comments": "

Initializes a git_remote_create_options with default values. Equivalent to\n creating an instance with GIT_REMOTE_CREATE_OPTIONS_INIT.

\n", + "group": "remote" + }, + "git_remote_create_with_opts": { + "type": "function", + "file": "git2/remote.h", + "line": 113, + "lineto": 116, + "args": [ + { + "name": "out", + "type": "git_remote **", + "comment": "the resulting remote" + }, + { + "name": "url", + "type": "const char *", + "comment": "the remote's url" + }, + { + "name": "opts", + "type": "const git_remote_create_options *", + "comment": "the remote creation options" + } + ], + "argline": "git_remote **out, const char *url, const git_remote_create_options *opts", + "sig": "git_remote **::const char *::const git_remote_create_options *", + "return": { + "type": "int", + "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" + }, + "description": "

Create a remote, with options.

\n", + "comments": "

This function allows more fine-grained control over the remote creation.

\n\n

Passing NULL as the opts argument will result in a detached remote.

\n", + "group": "remote" + }, "git_remote_create_with_fetchspec": { "type": "function", "file": "git2/remote.h", - "line": 55, - "lineto": 60, + "line": 129, + "lineto": 134, "args": [ { "name": "out", @@ -16907,8 +17266,8 @@ "git_remote_create_anonymous": { "type": "function", "file": "git2/remote.h", - "line": 73, - "lineto": 76, + "line": 147, + "lineto": 150, "args": [ { "name": "out", @@ -16937,18 +17296,18 @@ "group": "remote", "examples": { "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_remote_create_anonymous-4" + "ex/v0.28.0/network/fetch.html#git_remote_create_anonymous-4" ], "network/ls-remote.c": [ - "ex/HEAD/network/ls-remote.html#git_remote_create_anonymous-2" + "ex/v0.28.0/network/ls-remote.html#git_remote_create_anonymous-2" ] } }, "git_remote_create_detached": { "type": "function", "file": "git2/remote.h", - "line": 92, - "lineto": 94, + "line": 166, + "lineto": 168, "args": [ { "name": "out", @@ -16974,8 +17333,8 @@ "git_remote_lookup": { "type": "function", "file": "git2/remote.h", - "line": 107, - "lineto": 107, + "line": 181, + "lineto": 181, "args": [ { "name": "out", @@ -17004,21 +17363,21 @@ "group": "remote", "examples": { "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_remote_lookup-5" + "ex/v0.28.0/network/fetch.html#git_remote_lookup-5" ], "network/ls-remote.c": [ - "ex/HEAD/network/ls-remote.html#git_remote_lookup-3" + "ex/v0.28.0/network/ls-remote.html#git_remote_lookup-3" ], "remote.c": [ - "ex/HEAD/remote.html#git_remote_lookup-5" + "ex/v0.28.0/remote.html#git_remote_lookup-5" ] } }, "git_remote_dup": { "type": "function", "file": "git2/remote.h", - "line": 119, - "lineto": 119, + "line": 193, + "lineto": 193, "args": [ { "name": "dest", @@ -17044,8 +17403,8 @@ "git_remote_owner": { "type": "function", "file": "git2/remote.h", - "line": 127, - "lineto": 127, + "line": 201, + "lineto": 201, "args": [ { "name": "remote", @@ -17066,8 +17425,8 @@ "git_remote_name": { "type": "function", "file": "git2/remote.h", - "line": 135, - "lineto": 135, + "line": 209, + "lineto": 209, "args": [ { "name": "remote", @@ -17088,8 +17447,8 @@ "git_remote_url": { "type": "function", "file": "git2/remote.h", - "line": 146, - "lineto": 146, + "line": 220, + "lineto": 220, "args": [ { "name": "remote", @@ -17108,15 +17467,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_url-6" + "ex/v0.28.0/remote.html#git_remote_url-6" ] } }, "git_remote_pushurl": { "type": "function", "file": "git2/remote.h", - "line": 157, - "lineto": 157, + "line": 231, + "lineto": 231, "args": [ { "name": "remote", @@ -17135,15 +17494,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_pushurl-7" + "ex/v0.28.0/remote.html#git_remote_pushurl-7" ] } }, "git_remote_set_url": { "type": "function", "file": "git2/remote.h", - "line": 170, - "lineto": 170, + "line": 244, + "lineto": 244, "args": [ { "name": "repo", @@ -17172,15 +17531,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_set_url-8" + "ex/v0.28.0/remote.html#git_remote_set_url-8" ] } }, "git_remote_set_pushurl": { "type": "function", "file": "git2/remote.h", - "line": 183, - "lineto": 183, + "line": 257, + "lineto": 257, "args": [ { "name": "repo", @@ -17209,15 +17568,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_set_pushurl-9" + "ex/v0.28.0/remote.html#git_remote_set_pushurl-9" ] } }, "git_remote_add_fetch": { "type": "function", "file": "git2/remote.h", - "line": 196, - "lineto": 196, + "line": 270, + "lineto": 270, "args": [ { "name": "repo", @@ -17248,8 +17607,8 @@ "git_remote_get_fetch_refspecs": { "type": "function", "file": "git2/remote.h", - "line": 207, - "lineto": 207, + "line": 281, + "lineto": 281, "args": [ { "name": "array", @@ -17275,8 +17634,8 @@ "git_remote_add_push": { "type": "function", "file": "git2/remote.h", - "line": 220, - "lineto": 220, + "line": 294, + "lineto": 294, "args": [ { "name": "repo", @@ -17307,8 +17666,8 @@ "git_remote_get_push_refspecs": { "type": "function", "file": "git2/remote.h", - "line": 231, - "lineto": 231, + "line": 305, + "lineto": 305, "args": [ { "name": "array", @@ -17334,8 +17693,8 @@ "git_remote_refspec_count": { "type": "function", "file": "git2/remote.h", - "line": 239, - "lineto": 239, + "line": 313, + "lineto": 313, "args": [ { "name": "remote", @@ -17356,8 +17715,8 @@ "git_remote_get_refspec": { "type": "function", "file": "git2/remote.h", - "line": 248, - "lineto": 248, + "line": 322, + "lineto": 322, "args": [ { "name": "remote", @@ -17383,8 +17742,8 @@ "git_remote_connect": { "type": "function", "file": "git2/remote.h", - "line": 265, - "lineto": 265, + "line": 339, + "lineto": 339, "args": [ { "name": "remote", @@ -17423,15 +17782,15 @@ "group": "remote", "examples": { "network/ls-remote.c": [ - "ex/HEAD/network/ls-remote.html#git_remote_connect-4" + "ex/v0.28.0/network/ls-remote.html#git_remote_connect-4" ] } }, "git_remote_ls": { "type": "function", "file": "git2/remote.h", - "line": 287, - "lineto": 287, + "line": 361, + "lineto": 361, "args": [ { "name": "out", @@ -17460,15 +17819,15 @@ "group": "remote", "examples": { "network/ls-remote.c": [ - "ex/HEAD/network/ls-remote.html#git_remote_ls-5" + "ex/v0.28.0/network/ls-remote.html#git_remote_ls-5" ] } }, "git_remote_connected": { "type": "function", "file": "git2/remote.h", - "line": 298, - "lineto": 298, + "line": 372, + "lineto": 372, "args": [ { "name": "remote", @@ -17489,8 +17848,8 @@ "git_remote_stop": { "type": "function", "file": "git2/remote.h", - "line": 308, - "lineto": 308, + "line": 382, + "lineto": 382, "args": [ { "name": "remote", @@ -17511,8 +17870,8 @@ "git_remote_disconnect": { "type": "function", "file": "git2/remote.h", - "line": 317, - "lineto": 317, + "line": 391, + "lineto": 391, "args": [ { "name": "remote", @@ -17533,8 +17892,8 @@ "git_remote_free": { "type": "function", "file": "git2/remote.h", - "line": 327, - "lineto": 327, + "line": 401, + "lineto": 401, "args": [ { "name": "remote", @@ -17553,22 +17912,22 @@ "group": "remote", "examples": { "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_remote_free-6", - "ex/HEAD/network/fetch.html#git_remote_free-7" + "ex/v0.28.0/network/fetch.html#git_remote_free-6", + "ex/v0.28.0/network/fetch.html#git_remote_free-7" ], "network/ls-remote.c": [ - "ex/HEAD/network/ls-remote.html#git_remote_free-6" + "ex/v0.28.0/network/ls-remote.html#git_remote_free-6" ], "remote.c": [ - "ex/HEAD/remote.html#git_remote_free-10" + "ex/v0.28.0/remote.html#git_remote_free-10" ] } }, "git_remote_list": { "type": "function", "file": "git2/remote.h", - "line": 338, - "lineto": 338, + "line": 412, + "lineto": 412, "args": [ { "name": "out", @@ -17592,15 +17951,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_list-11" + "ex/v0.28.0/remote.html#git_remote_list-11" ] } }, "git_remote_init_callbacks": { "type": "function", "file": "git2/remote.h", - "line": 503, - "lineto": 505, + "line": 577, + "lineto": 579, "args": [ { "name": "opts", @@ -17626,8 +17985,8 @@ "git_fetch_init_options": { "type": "function", "file": "git2/remote.h", - "line": 608, - "lineto": 610, + "line": 682, + "lineto": 684, "args": [ { "name": "opts", @@ -17653,8 +18012,8 @@ "git_push_init_options": { "type": "function", "file": "git2/remote.h", - "line": 658, - "lineto": 660, + "line": 732, + "lineto": 734, "args": [ { "name": "opts", @@ -17680,8 +18039,8 @@ "git_remote_download": { "type": "function", "file": "git2/remote.h", - "line": 678, - "lineto": 678, + "line": 752, + "lineto": 752, "args": [ { "name": "remote", @@ -17712,8 +18071,8 @@ "git_remote_upload": { "type": "function", "file": "git2/remote.h", - "line": 692, - "lineto": 692, + "line": 766, + "lineto": 766, "args": [ { "name": "remote", @@ -17744,8 +18103,8 @@ "git_remote_update_tips": { "type": "function", "file": "git2/remote.h", - "line": 708, - "lineto": 713, + "line": 782, + "lineto": 787, "args": [ { "name": "remote", @@ -17786,8 +18145,8 @@ "git_remote_fetch": { "type": "function", "file": "git2/remote.h", - "line": 729, - "lineto": 733, + "line": 803, + "lineto": 807, "args": [ { "name": "remote", @@ -17821,15 +18180,15 @@ "group": "remote", "examples": { "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_remote_fetch-8" + "ex/v0.28.0/network/fetch.html#git_remote_fetch-8" ] } }, "git_remote_prune": { "type": "function", "file": "git2/remote.h", - "line": 742, - "lineto": 742, + "line": 816, + "lineto": 816, "args": [ { "name": "remote", @@ -17855,8 +18214,8 @@ "git_remote_push": { "type": "function", "file": "git2/remote.h", - "line": 754, - "lineto": 756, + "line": 828, + "lineto": 830, "args": [ { "name": "remote", @@ -17887,8 +18246,8 @@ "git_remote_stats": { "type": "function", "file": "git2/remote.h", - "line": 761, - "lineto": 761, + "line": 835, + "lineto": 835, "args": [ { "name": "remote", @@ -17907,15 +18266,15 @@ "group": "remote", "examples": { "network/fetch.c": [ - "ex/HEAD/network/fetch.html#git_remote_stats-9" + "ex/v0.28.0/network/fetch.html#git_remote_stats-9" ] } }, "git_remote_autotag": { "type": "function", "file": "git2/remote.h", - "line": 769, - "lineto": 769, + "line": 843, + "lineto": 843, "args": [ { "name": "remote", @@ -17936,8 +18295,8 @@ "git_remote_set_autotag": { "type": "function", "file": "git2/remote.h", - "line": 781, - "lineto": 781, + "line": 855, + "lineto": 855, "args": [ { "name": "repo", @@ -17968,8 +18327,8 @@ "git_remote_prune_refs": { "type": "function", "file": "git2/remote.h", - "line": 788, - "lineto": 788, + "line": 862, + "lineto": 862, "args": [ { "name": "remote", @@ -17990,8 +18349,8 @@ "git_remote_rename": { "type": "function", "file": "git2/remote.h", - "line": 810, - "lineto": 814, + "line": 884, + "lineto": 888, "args": [ { "name": "problems", @@ -18025,15 +18384,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_rename-12" + "ex/v0.28.0/remote.html#git_remote_rename-12" ] } }, "git_remote_is_valid_name": { "type": "function", "file": "git2/remote.h", - "line": 822, - "lineto": 822, + "line": 896, + "lineto": 896, "args": [ { "name": "remote_name", @@ -18054,8 +18413,8 @@ "git_remote_delete": { "type": "function", "file": "git2/remote.h", - "line": 834, - "lineto": 834, + "line": 908, + "lineto": 908, "args": [ { "name": "repo", @@ -18079,15 +18438,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_remote_delete-13" + "ex/v0.28.0/remote.html#git_remote_delete-13" ] } }, "git_remote_default_branch": { "type": "function", "file": "git2/remote.h", - "line": 852, - "lineto": 852, + "line": 926, + "lineto": 926, "args": [ { "name": "out", @@ -18138,10 +18497,10 @@ "group": "repository", "examples": { "general.c": [ - "ex/HEAD/general.html#git_repository_open-68" + "ex/v0.28.0/general.html#git_repository_open-68" ], "remote.c": [ - "ex/HEAD/remote.html#git_repository_open-14" + "ex/v0.28.0/remote.html#git_repository_open-14" ] } }, @@ -18237,15 +18596,15 @@ "group": "repository", "examples": { "remote.c": [ - "ex/HEAD/remote.html#git_repository_discover-15" + "ex/v0.28.0/remote.html#git_repository_discover-15" ] } }, "git_repository_open_ext": { "type": "function", "file": "git2/repository.h", - "line": 152, - "lineto": 156, + "line": 165, + "lineto": 169, "args": [ { "name": "out", @@ -18279,46 +18638,46 @@ "group": "repository", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_repository_open_ext-24" + "ex/v0.28.0/blame.html#git_repository_open_ext-24" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_repository_open_ext-31" + "ex/v0.28.0/cat-file.html#git_repository_open_ext-31" ], "checkout.c": [ - "ex/HEAD/checkout.html#git_repository_open_ext-14" + "ex/v0.28.0/checkout.html#git_repository_open_ext-14" ], "describe.c": [ - "ex/HEAD/describe.html#git_repository_open_ext-8" + "ex/v0.28.0/describe.html#git_repository_open_ext-8" ], "diff.c": [ - "ex/HEAD/diff.html#git_repository_open_ext-15" + "ex/v0.28.0/diff.html#git_repository_open_ext-15" ], "log.c": [ - "ex/HEAD/log.html#git_repository_open_ext-45", - "ex/HEAD/log.html#git_repository_open_ext-46" + "ex/v0.28.0/log.html#git_repository_open_ext-45", + "ex/v0.28.0/log.html#git_repository_open_ext-46" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_repository_open_ext-7" + "ex/v0.28.0/ls-files.html#git_repository_open_ext-7" ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_open_ext-33" + "ex/v0.28.0/merge.html#git_repository_open_ext-33" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_repository_open_ext-16" + "ex/v0.28.0/rev-parse.html#git_repository_open_ext-16" ], "status.c": [ - "ex/HEAD/status.html#git_repository_open_ext-5" + "ex/v0.28.0/status.html#git_repository_open_ext-5" ], "tag.c": [ - "ex/HEAD/tag.html#git_repository_open_ext-11" + "ex/v0.28.0/tag.html#git_repository_open_ext-11" ] } }, "git_repository_open_bare": { "type": "function", "file": "git2/repository.h", - "line": 169, - "lineto": 169, + "line": 182, + "lineto": 182, "args": [ { "name": "out", @@ -18344,8 +18703,8 @@ "git_repository_free": { "type": "function", "file": "git2/repository.h", - "line": 182, - "lineto": 182, + "line": 195, + "lineto": 195, "args": [ { "name": "repo", @@ -18364,51 +18723,51 @@ "group": "repository", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_repository_free-25" + "ex/v0.28.0/blame.html#git_repository_free-25" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_repository_free-32" + "ex/v0.28.0/cat-file.html#git_repository_free-32" ], "checkout.c": [ - "ex/HEAD/checkout.html#git_repository_free-15" + "ex/v0.28.0/checkout.html#git_repository_free-15" ], "describe.c": [ - "ex/HEAD/describe.html#git_repository_free-9" + "ex/v0.28.0/describe.html#git_repository_free-9" ], "diff.c": [ - "ex/HEAD/diff.html#git_repository_free-16" + "ex/v0.28.0/diff.html#git_repository_free-16" ], "general.c": [ - "ex/HEAD/general.html#git_repository_free-69" + "ex/v0.28.0/general.html#git_repository_free-69" ], "init.c": [ - "ex/HEAD/init.html#git_repository_free-6" + "ex/v0.28.0/init.html#git_repository_free-6" ], "log.c": [ - "ex/HEAD/log.html#git_repository_free-47" + "ex/v0.28.0/log.html#git_repository_free-47" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_repository_free-8" + "ex/v0.28.0/ls-files.html#git_repository_free-8" ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_free-34" + "ex/v0.28.0/merge.html#git_repository_free-34" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_repository_free-17" + "ex/v0.28.0/rev-parse.html#git_repository_free-17" ], "status.c": [ - "ex/HEAD/status.html#git_repository_free-6" + "ex/v0.28.0/status.html#git_repository_free-6" ], "tag.c": [ - "ex/HEAD/tag.html#git_repository_free-12" + "ex/v0.28.0/tag.html#git_repository_free-12" ] } }, "git_repository_init": { "type": "function", "file": "git2/repository.h", - "line": 199, - "lineto": 202, + "line": 212, + "lineto": 215, "args": [ { "name": "out", @@ -18437,15 +18796,15 @@ "group": "repository", "examples": { "init.c": [ - "ex/HEAD/init.html#git_repository_init-7" + "ex/v0.28.0/init.html#git_repository_init-7" ] } }, "git_repository_init_init_options": { "type": "function", "file": "git2/repository.h", - "line": 313, - "lineto": 315, + "line": 326, + "lineto": 328, "args": [ { "name": "opts", @@ -18471,8 +18830,8 @@ "git_repository_init_ext": { "type": "function", "file": "git2/repository.h", - "line": 330, - "lineto": 333, + "line": 343, + "lineto": 346, "args": [ { "name": "out", @@ -18501,15 +18860,15 @@ "group": "repository", "examples": { "init.c": [ - "ex/HEAD/init.html#git_repository_init_ext-8" + "ex/v0.28.0/init.html#git_repository_init_ext-8" ] } }, "git_repository_head": { "type": "function", "file": "git2/repository.h", - "line": 348, - "lineto": 348, + "line": 361, + "lineto": 361, "args": [ { "name": "out", @@ -18533,19 +18892,19 @@ "group": "repository", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_repository_head-35", - "ex/HEAD/merge.html#git_repository_head-36" + "ex/v0.28.0/merge.html#git_repository_head-35", + "ex/v0.28.0/merge.html#git_repository_head-36" ], "status.c": [ - "ex/HEAD/status.html#git_repository_head-7" + "ex/v0.28.0/status.html#git_repository_head-7" ] } }, "git_repository_head_for_worktree": { "type": "function", "file": "git2/repository.h", - "line": 358, - "lineto": 359, + "line": 371, + "lineto": 372, "args": [ { "name": "out", @@ -18576,8 +18935,8 @@ "git_repository_head_detached": { "type": "function", "file": "git2/repository.h", - "line": 371, - "lineto": 371, + "line": 384, + "lineto": 384, "args": [ { "name": "repo", @@ -18598,8 +18957,8 @@ "git_repository_head_detached_for_worktree": { "type": "function", "file": "git2/repository.h", - "line": 384, - "lineto": 385, + "line": 397, + "lineto": 398, "args": [ { "name": "repo", @@ -18625,8 +18984,8 @@ "git_repository_head_unborn": { "type": "function", "file": "git2/repository.h", - "line": 397, - "lineto": 397, + "line": 410, + "lineto": 410, "args": [ { "name": "repo", @@ -18647,8 +19006,8 @@ "git_repository_is_empty": { "type": "function", "file": "git2/repository.h", - "line": 409, - "lineto": 409, + "line": 422, + "lineto": 422, "args": [ { "name": "repo", @@ -18669,8 +19028,8 @@ "git_repository_item_path": { "type": "function", "file": "git2/repository.h", - "line": 445, - "lineto": 445, + "line": 458, + "lineto": 458, "args": [ { "name": "out", @@ -18701,8 +19060,8 @@ "git_repository_path": { "type": "function", "file": "git2/repository.h", - "line": 456, - "lineto": 456, + "line": 469, + "lineto": 469, "args": [ { "name": "repo", @@ -18721,18 +19080,18 @@ "group": "repository", "examples": { "init.c": [ - "ex/HEAD/init.html#git_repository_path-9" + "ex/v0.28.0/init.html#git_repository_path-9" ], "status.c": [ - "ex/HEAD/status.html#git_repository_path-8" + "ex/v0.28.0/status.html#git_repository_path-8" ] } }, "git_repository_workdir": { "type": "function", "file": "git2/repository.h", - "line": 467, - "lineto": 467, + "line": 480, + "lineto": 480, "args": [ { "name": "repo", @@ -18751,15 +19110,15 @@ "group": "repository", "examples": { "init.c": [ - "ex/HEAD/init.html#git_repository_workdir-10" + "ex/v0.28.0/init.html#git_repository_workdir-10" ] } }, "git_repository_commondir": { "type": "function", "file": "git2/repository.h", - "line": 478, - "lineto": 478, + "line": 491, + "lineto": 491, "args": [ { "name": "repo", @@ -18780,8 +19139,8 @@ "git_repository_set_workdir": { "type": "function", "file": "git2/repository.h", - "line": 497, - "lineto": 498, + "line": 510, + "lineto": 511, "args": [ { "name": "repo", @@ -18812,8 +19171,8 @@ "git_repository_is_bare": { "type": "function", "file": "git2/repository.h", - "line": 506, - "lineto": 506, + "line": 519, + "lineto": 519, "args": [ { "name": "repo", @@ -18832,15 +19191,15 @@ "group": "repository", "examples": { "status.c": [ - "ex/HEAD/status.html#git_repository_is_bare-9" + "ex/v0.28.0/status.html#git_repository_is_bare-9" ] } }, "git_repository_is_worktree": { "type": "function", "file": "git2/repository.h", - "line": 514, - "lineto": 514, + "line": 527, + "lineto": 527, "args": [ { "name": "repo", @@ -18861,8 +19220,8 @@ "git_repository_config": { "type": "function", "file": "git2/repository.h", - "line": 530, - "lineto": 530, + "line": 543, + "lineto": 543, "args": [ { "name": "out", @@ -18888,8 +19247,8 @@ "git_repository_config_snapshot": { "type": "function", "file": "git2/repository.h", - "line": 546, - "lineto": 546, + "line": 559, + "lineto": 559, "args": [ { "name": "out", @@ -18913,16 +19272,16 @@ "group": "repository", "examples": { "general.c": [ - "ex/HEAD/general.html#git_repository_config_snapshot-70", - "ex/HEAD/general.html#git_repository_config_snapshot-71" + "ex/v0.28.0/general.html#git_repository_config_snapshot-70", + "ex/v0.28.0/general.html#git_repository_config_snapshot-71" ] } }, "git_repository_odb": { "type": "function", "file": "git2/repository.h", - "line": 562, - "lineto": 562, + "line": 575, + "lineto": 575, "args": [ { "name": "out", @@ -18946,18 +19305,18 @@ "group": "repository", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_repository_odb-33" + "ex/v0.28.0/cat-file.html#git_repository_odb-33" ], "general.c": [ - "ex/HEAD/general.html#git_repository_odb-72" + "ex/v0.28.0/general.html#git_repository_odb-72" ] } }, "git_repository_refdb": { "type": "function", "file": "git2/repository.h", - "line": 578, - "lineto": 578, + "line": 591, + "lineto": 591, "args": [ { "name": "out", @@ -18983,8 +19342,8 @@ "git_repository_index": { "type": "function", "file": "git2/repository.h", - "line": 594, - "lineto": 594, + "line": 607, + "lineto": 607, "args": [ { "name": "out", @@ -19008,24 +19367,24 @@ "group": "repository", "examples": { "general.c": [ - "ex/HEAD/general.html#git_repository_index-73" + "ex/v0.28.0/general.html#git_repository_index-73" ], "init.c": [ - "ex/HEAD/init.html#git_repository_index-11" + "ex/v0.28.0/init.html#git_repository_index-11" ], "ls-files.c": [ - "ex/HEAD/ls-files.html#git_repository_index-9" + "ex/v0.28.0/ls-files.html#git_repository_index-9" ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_index-37" + "ex/v0.28.0/merge.html#git_repository_index-37" ] } }, "git_repository_message": { "type": "function", "file": "git2/repository.h", - "line": 612, - "lineto": 612, + "line": 625, + "lineto": 625, "args": [ { "name": "out", @@ -19051,8 +19410,8 @@ "git_repository_message_remove": { "type": "function", "file": "git2/repository.h", - "line": 619, - "lineto": 619, + "line": 632, + "lineto": 632, "args": [ { "name": "repo", @@ -19073,8 +19432,8 @@ "git_repository_state_cleanup": { "type": "function", "file": "git2/repository.h", - "line": 628, - "lineto": 628, + "line": 641, + "lineto": 641, "args": [ { "name": "repo", @@ -19093,15 +19452,15 @@ "group": "repository", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_repository_state_cleanup-38" + "ex/v0.28.0/merge.html#git_repository_state_cleanup-38" ] } }, "git_repository_fetchhead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 647, - "lineto": 650, + "line": 660, + "lineto": 663, "args": [ { "name": "repo", @@ -19132,8 +19491,8 @@ "git_repository_mergehead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 667, - "lineto": 670, + "line": 680, + "lineto": 683, "args": [ { "name": "repo", @@ -19164,8 +19523,8 @@ "git_repository_hashfile": { "type": "function", "file": "git2/repository.h", - "line": 695, - "lineto": 700, + "line": 708, + "lineto": 713, "args": [ { "name": "out", @@ -19184,8 +19543,8 @@ }, { "name": "type", - "type": "git_otype", - "comment": "The object type to hash as (e.g. GIT_OBJ_BLOB)" + "type": "git_object_t", + "comment": "The object type to hash as (e.g. GIT_OBJECT_BLOB)" }, { "name": "as_path", @@ -19193,8 +19552,8 @@ "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." } ], - "argline": "git_oid *out, git_repository *repo, const char *path, git_otype type, const char *as_path", - "sig": "git_oid *::git_repository *::const char *::git_otype::const char *", + "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" @@ -19206,8 +19565,8 @@ "git_repository_set_head": { "type": "function", "file": "git2/repository.h", - "line": 720, - "lineto": 722, + "line": 733, + "lineto": 735, "args": [ { "name": "repo", @@ -19231,15 +19590,15 @@ "group": "repository", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_repository_set_head-16" + "ex/v0.28.0/checkout.html#git_repository_set_head-16" ] } }, "git_repository_set_head_detached": { "type": "function", "file": "git2/repository.h", - "line": 740, - "lineto": 742, + "line": 753, + "lineto": 755, "args": [ { "name": "repo", @@ -19265,8 +19624,8 @@ "git_repository_set_head_detached_from_annotated": { "type": "function", "file": "git2/repository.h", - "line": 756, - "lineto": 758, + "line": 769, + "lineto": 771, "args": [ { "name": "repo", @@ -19290,15 +19649,15 @@ "group": "repository", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_repository_set_head_detached_from_annotated-17" + "ex/v0.28.0/checkout.html#git_repository_set_head_detached_from_annotated-17" ] } }, "git_repository_detach_head": { "type": "function", "file": "git2/repository.h", - "line": 777, - "lineto": 778, + "line": 790, + "lineto": 791, "args": [ { "name": "repo", @@ -19319,8 +19678,8 @@ "git_repository_state": { "type": "function", "file": "git2/repository.h", - "line": 808, - "lineto": 808, + "line": 821, + "lineto": 821, "args": [ { "name": "repo", @@ -19339,18 +19698,18 @@ "group": "repository", "examples": { "checkout.c": [ - "ex/HEAD/checkout.html#git_repository_state-18" + "ex/v0.28.0/checkout.html#git_repository_state-18" ], "merge.c": [ - "ex/HEAD/merge.html#git_repository_state-39" + "ex/v0.28.0/merge.html#git_repository_state-39" ] } }, "git_repository_set_namespace": { "type": "function", "file": "git2/repository.h", - "line": 822, - "lineto": 822, + "line": 835, + "lineto": 835, "args": [ { "name": "repo", @@ -19376,8 +19735,8 @@ "git_repository_get_namespace": { "type": "function", "file": "git2/repository.h", - "line": 830, - "lineto": 830, + "line": 843, + "lineto": 843, "args": [ { "name": "repo", @@ -19398,8 +19757,8 @@ "git_repository_is_shallow": { "type": "function", "file": "git2/repository.h", - "line": 839, - "lineto": 839, + "line": 852, + "lineto": 852, "args": [ { "name": "repo", @@ -19420,8 +19779,8 @@ "git_repository_ident": { "type": "function", "file": "git2/repository.h", - "line": 851, - "lineto": 851, + "line": 864, + "lineto": 864, "args": [ { "name": "name", @@ -19452,8 +19811,8 @@ "git_repository_set_ident": { "type": "function", "file": "git2/repository.h", - "line": 864, - "lineto": 864, + "line": 877, + "lineto": 877, "args": [ { "name": "repo", @@ -19726,22 +20085,22 @@ "group": "revparse", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_revparse_single-26" + "ex/v0.28.0/blame.html#git_revparse_single-26" ], "cat-file.c": [ - "ex/HEAD/cat-file.html#git_revparse_single-34" + "ex/v0.28.0/cat-file.html#git_revparse_single-34" ], "describe.c": [ - "ex/HEAD/describe.html#git_revparse_single-10" + "ex/v0.28.0/describe.html#git_revparse_single-10" ], "log.c": [ - "ex/HEAD/log.html#git_revparse_single-48" + "ex/v0.28.0/log.html#git_revparse_single-48" ], "tag.c": [ - "ex/HEAD/tag.html#git_revparse_single-13", - "ex/HEAD/tag.html#git_revparse_single-14", - "ex/HEAD/tag.html#git_revparse_single-15", - "ex/HEAD/tag.html#git_revparse_single-16" + "ex/v0.28.0/tag.html#git_revparse_single-13", + "ex/v0.28.0/tag.html#git_revparse_single-14", + "ex/v0.28.0/tag.html#git_revparse_single-15", + "ex/v0.28.0/tag.html#git_revparse_single-16" ] } }, @@ -19815,14 +20174,14 @@ "group": "revparse", "examples": { "blame.c": [ - "ex/HEAD/blame.html#git_revparse-27" + "ex/v0.28.0/blame.html#git_revparse-27" ], "log.c": [ - "ex/HEAD/log.html#git_revparse-49" + "ex/v0.28.0/log.html#git_revparse-49" ], "rev-parse.c": [ - "ex/HEAD/rev-parse.html#git_revparse-18", - "ex/HEAD/rev-parse.html#git_revparse-19" + "ex/v0.28.0/rev-parse.html#git_revparse-18", + "ex/v0.28.0/rev-parse.html#git_revparse-19" ] } }, @@ -19854,11 +20213,11 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/HEAD/general.html#git_revwalk_new-74" + "ex/v0.28.0/general.html#git_revwalk_new-74" ], "log.c": [ - "ex/HEAD/log.html#git_revwalk_new-50", - "ex/HEAD/log.html#git_revwalk_new-51" + "ex/v0.28.0/log.html#git_revwalk_new-50", + "ex/v0.28.0/log.html#git_revwalk_new-51" ] } }, @@ -19912,10 +20271,10 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/HEAD/general.html#git_revwalk_push-75" + "ex/v0.28.0/general.html#git_revwalk_push-75" ], "log.c": [ - "ex/HEAD/log.html#git_revwalk_push-52" + "ex/v0.28.0/log.html#git_revwalk_push-52" ] } }, @@ -19969,7 +20328,7 @@ "group": "revwalk", "examples": { "log.c": [ - "ex/HEAD/log.html#git_revwalk_push_head-53" + "ex/v0.28.0/log.html#git_revwalk_push_head-53" ] } }, @@ -20001,7 +20360,7 @@ "group": "revwalk", "examples": { "log.c": [ - "ex/HEAD/log.html#git_revwalk_hide-54" + "ex/v0.28.0/log.html#git_revwalk_hide-54" ] } }, @@ -20136,10 +20495,10 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/HEAD/general.html#git_revwalk_next-76" + "ex/v0.28.0/general.html#git_revwalk_next-76" ], "log.c": [ - "ex/HEAD/log.html#git_revwalk_next-55" + "ex/v0.28.0/log.html#git_revwalk_next-55" ] } }, @@ -20171,11 +20530,11 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/HEAD/general.html#git_revwalk_sorting-77" + "ex/v0.28.0/general.html#git_revwalk_sorting-77" ], "log.c": [ - "ex/HEAD/log.html#git_revwalk_sorting-56", - "ex/HEAD/log.html#git_revwalk_sorting-57" + "ex/v0.28.0/log.html#git_revwalk_sorting-56", + "ex/v0.28.0/log.html#git_revwalk_sorting-57" ] } }, @@ -20251,10 +20610,10 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/HEAD/general.html#git_revwalk_free-78" + "ex/v0.28.0/general.html#git_revwalk_free-78" ], "log.c": [ - "ex/HEAD/log.html#git_revwalk_free-58" + "ex/v0.28.0/log.html#git_revwalk_free-58" ] } }, @@ -20308,7 +20667,7 @@ "type": "int", "comment": null }, - "description": "

Adds a callback function to hide a commit and its parents

\n", + "description": "

Adds, changes or removes a callback function to hide a commit and its parents

\n", "comments": "", "group": "revwalk" }, @@ -20336,12 +20695,12 @@ { "name": "time", "type": "git_time_t", - "comment": "time when the action happened" + "comment": "time (in seconds from epoch) when the action happened" }, { "name": "offset", "type": "int", - "comment": "timezone offset in minutes for the time" + "comment": "timezone offset (in minutes) for the time" } ], "argline": "git_signature **out, const char *name, const char *email, git_time_t time, int offset", @@ -20355,8 +20714,8 @@ "group": "signature", "examples": { "general.c": [ - "ex/HEAD/general.html#git_signature_new-79", - "ex/HEAD/general.html#git_signature_new-80" + "ex/v0.28.0/general.html#git_signature_new-79", + "ex/v0.28.0/general.html#git_signature_new-80" ] } }, @@ -20393,7 +20752,7 @@ "group": "signature", "examples": { "merge.c": [ - "ex/HEAD/merge.html#git_signature_now-40" + "ex/v0.28.0/merge.html#git_signature_now-40" ] } }, @@ -20425,10 +20784,10 @@ "group": "signature", "examples": { "init.c": [ - "ex/HEAD/init.html#git_signature_default-12" + "ex/v0.28.0/init.html#git_signature_default-12" ], "tag.c": [ - "ex/HEAD/tag.html#git_signature_default-17" + "ex/v0.28.0/tag.html#git_signature_default-17" ] } }, @@ -20509,14 +20868,14 @@ "group": "signature", "examples": { "general.c": [ - "ex/HEAD/general.html#git_signature_free-81", - "ex/HEAD/general.html#git_signature_free-82" + "ex/v0.28.0/general.html#git_signature_free-81", + "ex/v0.28.0/general.html#git_signature_free-82" ], "init.c": [ - "ex/HEAD/init.html#git_signature_free-13" + "ex/v0.28.0/init.html#git_signature_free-13" ], "tag.c": [ - "ex/HEAD/tag.html#git_signature_free-18" + "ex/v0.28.0/tag.html#git_signature_free-18" ] } }, @@ -20529,36 +20888,36 @@ { "name": "out", "type": "git_oid *", - "comment": "Object id of the commit containing the stashed state.\n This commit is also the target of the direct reference refs/stash." + "comment": null }, { "name": "repo", "type": "git_repository *", - "comment": "The owning repository." + "comment": null }, { "name": "stasher", "type": "const git_signature *", - "comment": "The identity of the person performing the stashing." + "comment": null }, { "name": "message", "type": "const char *", - "comment": "Optional description along with the stashed state." + "comment": null }, { "name": "flags", - "type": "uint32_t", - "comment": "Flags to control the stashing process. (see GIT_STASH_* above)" + "type": "int", + "comment": null } ], - "argline": "git_oid *out, git_repository *repo, const git_signature *stasher, const char *message, uint32_t flags", - "sig": "git_oid *::git_repository *::const git_signature *::const char *::uint32_t", + "argline": "git_oid *out, git_repository *repo, const git_signature *stasher, const char *message, int flags", + "sig": "git_oid *::git_repository *::const git_signature *::const char *::int", "return": { "type": "int", - "comment": " 0 on success, GIT_ENOTFOUND where there's nothing to stash,\n or error code." + "comment": null }, - "description": "

Save the local modifications to a new stash.

\n", + "description": "", "comments": "", "group": "stash" }, @@ -20772,7 +21131,7 @@ "group": "status", "examples": { "status.c": [ - "ex/HEAD/status.html#git_status_foreach-10" + "ex/v0.28.0/status.html#git_status_foreach-10" ] } }, @@ -20814,7 +21173,7 @@ "group": "status", "examples": { "status.c": [ - "ex/HEAD/status.html#git_status_foreach_ext-11" + "ex/v0.28.0/status.html#git_status_foreach_ext-11" ] } }, @@ -20883,8 +21242,8 @@ "group": "status", "examples": { "status.c": [ - "ex/HEAD/status.html#git_status_list_new-12", - "ex/HEAD/status.html#git_status_list_new-13" + "ex/v0.28.0/status.html#git_status_list_new-12", + "ex/v0.28.0/status.html#git_status_list_new-13" ] } }, @@ -20911,8 +21270,8 @@ "group": "status", "examples": { "status.c": [ - "ex/HEAD/status.html#git_status_list_entrycount-14", - "ex/HEAD/status.html#git_status_list_entrycount-15" + "ex/v0.28.0/status.html#git_status_list_entrycount-14", + "ex/v0.28.0/status.html#git_status_list_entrycount-15" ] } }, @@ -20944,12 +21303,12 @@ "group": "status", "examples": { "status.c": [ - "ex/HEAD/status.html#git_status_byindex-16", - "ex/HEAD/status.html#git_status_byindex-17", - "ex/HEAD/status.html#git_status_byindex-18", - "ex/HEAD/status.html#git_status_byindex-19", - "ex/HEAD/status.html#git_status_byindex-20", - "ex/HEAD/status.html#git_status_byindex-21" + "ex/v0.28.0/status.html#git_status_byindex-16", + "ex/v0.28.0/status.html#git_status_byindex-17", + "ex/v0.28.0/status.html#git_status_byindex-18", + "ex/v0.28.0/status.html#git_status_byindex-19", + "ex/v0.28.0/status.html#git_status_byindex-20", + "ex/v0.28.0/status.html#git_status_byindex-21" ] } }, @@ -20976,7 +21335,7 @@ "group": "status", "examples": { "status.c": [ - "ex/HEAD/status.html#git_status_list_free-22" + "ex/v0.28.0/status.html#git_status_list_free-22" ] } }, @@ -21035,14 +21394,14 @@ "group": "strarray", "examples": { "general.c": [ - "ex/HEAD/general.html#git_strarray_free-83" + "ex/v0.28.0/general.html#git_strarray_free-83" ], "remote.c": [ - "ex/HEAD/remote.html#git_strarray_free-16", - "ex/HEAD/remote.html#git_strarray_free-17" + "ex/v0.28.0/remote.html#git_strarray_free-16", + "ex/v0.28.0/remote.html#git_strarray_free-17" ], "tag.c": [ - "ex/HEAD/tag.html#git_strarray_free-19" + "ex/v0.28.0/tag.html#git_strarray_free-19" ] } }, @@ -21126,7 +21485,7 @@ "sig": "git_submodule *::int::git_submodule_update_options *", "return": { "type": "int", - "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `giterr_last` for a detailed error message)." + "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `git_error_last` for a detailed error message)." }, "description": "

Update a submodule. This will clone a missing submodule and\n checkout the subrepository to the commit specified in the index of\n the containing repository. If the submodule repository doesn't contain\n the target commit (e.g. because fetchRecurseSubmodules isn't set), then\n the submodule is fetched using the fetch options supplied in options.

\n", "comments": "", @@ -21219,7 +21578,7 @@ "group": "submodule", "examples": { "status.c": [ - "ex/HEAD/status.html#git_submodule_foreach-23" + "ex/v0.28.0/status.html#git_submodule_foreach-23" ] } }, @@ -21359,7 +21718,7 @@ "group": "submodule", "examples": { "status.c": [ - "ex/HEAD/status.html#git_submodule_name-24" + "ex/v0.28.0/status.html#git_submodule_name-24" ] } }, @@ -21386,7 +21745,7 @@ "group": "submodule", "examples": { "status.c": [ - "ex/HEAD/status.html#git_submodule_path-25" + "ex/v0.28.0/status.html#git_submodule_path-25" ] } }, @@ -21931,7 +22290,7 @@ "group": "submodule", "examples": { "status.c": [ - "ex/HEAD/status.html#git_submodule_status-26" + "ex/v0.28.0/status.html#git_submodule_status-26" ] } }, @@ -22382,18 +22741,18 @@ }, { "name": "options", - "type": "uint32_t", + "type": "int", "comment": null } ], - "argline": "git_filter_list **out, git_repository *repo, git_filter_mode_t mode, uint32_t options", - "sig": "git_filter_list **::git_repository *::git_filter_mode_t::uint32_t", + "argline": "git_filter_list **out, git_repository *repo, git_filter_mode_t mode, int options", + "sig": "git_filter_list **::git_repository *::git_filter_mode_t::int", "return": { "type": "int", "comment": null }, - "description": "

Create a new empty filter list

\n", - "comments": "

Normally you won't use this because git_filter_list_load will create\n the filter list for you, but you can use this in combination with the\n git_filter_lookup and git_filter_list_push functions to assemble\n your own chains of filters.

\n", + "description": "", + "comments": "", "group": "filter" }, "git_filter_list_push": { @@ -22499,20 +22858,14 @@ "file": "git2/sys/filter.h", "line": 111, "lineto": 111, - "args": [ - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", + "args": [], + "argline": "", + "sig": "", "return": { - "type": "uint16_t", + "type": "int", "comment": null }, - "description": "

Get the file mode of the source file\n If the mode is unknown, this will return 0

\n", + "description": "", "comments": "", "group": "filter" }, @@ -22565,20 +22918,14 @@ "file": "git2/sys/filter.h", "line": 128, "lineto": 128, - "args": [ - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", + "args": [], + "argline": "", + "sig": "", "return": { - "type": "uint32_t", + "type": "int", "comment": null }, - "description": "

Get the combination git_filter_flag_t options to be applied

\n", + "description": "", "comments": "", "group": "filter" }, @@ -23890,26 +24237,53 @@ "comments": "

Clear the submodule cache populated by git_repository_submodule_cache_all.\n If there is no cache, do nothing.

\n\n

The cache incorporates data from the repository's configuration, as well\n as the state of the working tree, the index, and HEAD. So any time any\n of these has changed, the cache might become invalid.

\n", "group": "repository" }, + "git_stream_register": { + "type": "function", + "file": "git2/sys/stream.h", + "line": 98, + "lineto": 99, + "args": [ + { + "name": "type", + "type": "git_stream_t", + "comment": "the type or types of stream to register" + }, + { + "name": "registration", + "type": "git_stream_registration *", + "comment": "the registration data" + } + ], + "argline": "git_stream_t type, git_stream_registration *registration", + "sig": "git_stream_t::git_stream_registration *", + "return": { + "type": "int", + "comment": " 0 or an error code" + }, + "description": "

Register stream constructors for the library to use

\n", + "comments": "

If a registration structure is already set, it will be overwritten.\n Pass NULL in order to deregister the current constructor and return\n to the system defaults.

\n\n

The type parameter may be a bitwise AND of types.

\n", + "group": "stream" + }, "git_stream_register_tls": { "type": "function", "file": "git2/sys/stream.h", - "line": 54, - "lineto": 54, + "line": 130, + "lineto": 130, "args": [ { "name": "ctor", "type": "git_stream_cb", - "comment": "the constructor to use" + "comment": null } ], "argline": "git_stream_cb ctor", "sig": "git_stream_cb", "return": { "type": "int", - "comment": " 0 or an error code" + "comment": null }, - "description": "

Register a TLS stream constructor for the library to use

\n", - "comments": "

If a constructor is already set, it will be overwritten. Pass\n NULL in order to deregister the current constructor.

\n", + "description": "

Register a TLS stream constructor for the library to use. This stream\n will not support HTTP CONNECT proxies. This internally calls\n git_stream_register and is preserved for backward compatibility.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", "group": "stream" }, "git_time_monotonic": { @@ -23931,8 +24305,8 @@ "git_transport_init": { "type": "function", "file": "git2/sys/transport.h", - "line": 119, - "lineto": 121, + "line": 137, + "lineto": 139, "args": [ { "name": "opts", @@ -23958,8 +24332,8 @@ "git_transport_new": { "type": "function", "file": "git2/sys/transport.h", - "line": 133, - "lineto": 133, + "line": 151, + "lineto": 151, "args": [ { "name": "out", @@ -23990,8 +24364,8 @@ "git_transport_ssh_with_paths": { "type": "function", "file": "git2/sys/transport.h", - "line": 149, - "lineto": 149, + "line": 167, + "lineto": 167, "args": [ { "name": "out", @@ -24022,8 +24396,8 @@ "git_transport_register": { "type": "function", "file": "git2/sys/transport.h", - "line": 164, - "lineto": 167, + "line": 182, + "lineto": 185, "args": [ { "name": "prefix", @@ -24054,8 +24428,8 @@ "git_transport_unregister": { "type": "function", "file": "git2/sys/transport.h", - "line": 177, - "lineto": 178, + "line": 198, + "lineto": 199, "args": [ { "name": "prefix", @@ -24070,14 +24444,14 @@ "comment": " 0 or an error code" }, "description": "

Unregister a custom transport definition which was previously registered\n with git_transport_register.

\n", - "comments": "", + "comments": "

The caller is responsible for synchronizing calls to git_transport_register\n and git_transport_unregister with other calls to the library that\n instantiate transports.

\n", "group": "transport" }, "git_transport_dummy": { "type": "function", "file": "git2/sys/transport.h", - "line": 191, - "lineto": 194, + "line": 212, + "lineto": 215, "args": [ { "name": "out", @@ -24108,8 +24482,8 @@ "git_transport_local": { "type": "function", "file": "git2/sys/transport.h", - "line": 204, - "lineto": 207, + "line": 225, + "lineto": 228, "args": [ { "name": "out", @@ -24140,8 +24514,8 @@ "git_transport_smart": { "type": "function", "file": "git2/sys/transport.h", - "line": 217, - "lineto": 220, + "line": 238, + "lineto": 241, "args": [ { "name": "out", @@ -24172,8 +24546,8 @@ "git_transport_smart_certificate_check": { "type": "function", "file": "git2/sys/transport.h", - "line": 231, - "lineto": 231, + "line": 255, + "lineto": 255, "args": [ { "name": "transport", @@ -24200,7 +24574,7 @@ "sig": "git_transport *::git_cert *::int::const char *", "return": { "type": "int", - "comment": " the return value of the callback" + "comment": " the return value of the callback: 0 for no error, GIT_PASSTHROUGH\n to indicate that there is no callback registered (or the callback\n refused to validate the certificate and callers should behave as\n if no callback was set), or \n<\n 0 for an error" }, "description": "

Call the certificate check for this transport.

\n", "comments": "", @@ -24209,8 +24583,8 @@ "git_transport_smart_credentials": { "type": "function", "file": "git2/sys/transport.h", - "line": 242, - "lineto": 242, + "line": 269, + "lineto": 269, "args": [ { "name": "out", @@ -24237,7 +24611,7 @@ "sig": "git_cred **::git_transport *::const char *::int", "return": { "type": "int", - "comment": " the return value of the callback" + "comment": " the return value of the callback: 0 for no error, GIT_PASSTHROUGH\n to indicate that there is no callback registered (or the callback\n refused to provide credentials and callers should behave as if no\n callback was set), or \n<\n 0 for an error" }, "description": "

Call the credentials callback for this transport

\n", "comments": "", @@ -24246,8 +24620,8 @@ "git_transport_smart_proxy_options": { "type": "function", "file": "git2/sys/transport.h", - "line": 252, - "lineto": 252, + "line": 279, + "lineto": 279, "args": [ { "name": "out", @@ -24273,8 +24647,8 @@ "git_smart_subtransport_http": { "type": "function", "file": "git2/sys/transport.h", - "line": 362, - "lineto": 365, + "line": 408, + "lineto": 411, "args": [ { "name": "out", @@ -24298,15 +24672,15 @@ "type": "int", "comment": " 0 or an error code" }, - "description": "

Create an instance of the http subtransport. This subtransport\n also supports https. On Win32, this subtransport may be implemented\n using the WinHTTP library.

\n", - "comments": "", + "description": "

Create an instance of the http subtransport.

\n", + "comments": "

This subtransport also supports https.

\n", "group": "smart" }, "git_smart_subtransport_git": { "type": "function", "file": "git2/sys/transport.h", - "line": 374, - "lineto": 377, + "line": 420, + "lineto": 423, "args": [ { "name": "out", @@ -24337,8 +24711,8 @@ "git_smart_subtransport_ssh": { "type": "function", "file": "git2/sys/transport.h", - "line": 386, - "lineto": 389, + "line": 432, + "lineto": 435, "args": [ { "name": "out", @@ -24399,7 +24773,7 @@ "group": "tag", "examples": { "general.c": [ - "ex/HEAD/general.html#git_tag_lookup-84" + "ex/v0.28.0/general.html#git_tag_lookup-84" ] } }, @@ -24463,7 +24837,7 @@ "group": "tag", "examples": { "general.c": [ - "ex/HEAD/general.html#git_tag_free-85" + "ex/v0.28.0/general.html#git_tag_free-85" ] } }, @@ -24539,7 +24913,7 @@ "group": "tag", "examples": { "general.c": [ - "ex/HEAD/general.html#git_tag_target-86" + "ex/v0.28.0/general.html#git_tag_target-86" ] } }, @@ -24566,7 +24940,7 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_target_id-35" + "ex/v0.28.0/cat-file.html#git_tag_target_id-35" ] } }, @@ -24585,7 +24959,7 @@ "argline": "const git_tag *tag", "sig": "const git_tag *", "return": { - "type": "git_otype", + "type": "git_object_t", "comment": " type of the tagged object" }, "description": "

Get the type of a tag's tagged object

\n", @@ -24593,10 +24967,10 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_target_type-36" + "ex/v0.28.0/cat-file.html#git_tag_target_type-36" ], "general.c": [ - "ex/HEAD/general.html#git_tag_target_type-87" + "ex/v0.28.0/general.html#git_tag_target_type-87" ] } }, @@ -24623,13 +24997,13 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_name-37" + "ex/v0.28.0/cat-file.html#git_tag_name-37" ], "general.c": [ - "ex/HEAD/general.html#git_tag_name-88" + "ex/v0.28.0/general.html#git_tag_name-88" ], "tag.c": [ - "ex/HEAD/tag.html#git_tag_name-20" + "ex/v0.28.0/tag.html#git_tag_name-20" ] } }, @@ -24656,7 +25030,7 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_tagger-38" + "ex/v0.28.0/cat-file.html#git_tag_tagger-38" ] } }, @@ -24683,14 +25057,14 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tag_message-39", - "ex/HEAD/cat-file.html#git_tag_message-40" + "ex/v0.28.0/cat-file.html#git_tag_message-39", + "ex/v0.28.0/cat-file.html#git_tag_message-40" ], "general.c": [ - "ex/HEAD/general.html#git_tag_message-89" + "ex/v0.28.0/general.html#git_tag_message-89" ], "tag.c": [ - "ex/HEAD/tag.html#git_tag_message-21" + "ex/v0.28.0/tag.html#git_tag_message-21" ] } }, @@ -24747,7 +25121,7 @@ "group": "tag", "examples": { "tag.c": [ - "ex/HEAD/tag.html#git_tag_create-22" + "ex/v0.28.0/tag.html#git_tag_create-22" ] } }, @@ -24878,7 +25252,7 @@ "group": "tag", "examples": { "tag.c": [ - "ex/HEAD/tag.html#git_tag_create_lightweight-23" + "ex/v0.28.0/tag.html#git_tag_create_lightweight-23" ] } }, @@ -24910,7 +25284,7 @@ "group": "tag", "examples": { "tag.c": [ - "ex/HEAD/tag.html#git_tag_delete-24" + "ex/v0.28.0/tag.html#git_tag_delete-24" ] } }, @@ -24974,7 +25348,7 @@ "group": "tag", "examples": { "tag.c": [ - "ex/HEAD/tag.html#git_tag_list_match-25" + "ex/v0.28.0/tag.html#git_tag_list_match-25" ] } }, @@ -25685,14 +26059,14 @@ "group": "tree", "examples": { "general.c": [ - "ex/HEAD/general.html#git_tree_lookup-90", - "ex/HEAD/general.html#git_tree_lookup-91" + "ex/v0.28.0/general.html#git_tree_lookup-90", + "ex/v0.28.0/general.html#git_tree_lookup-91" ], "init.c": [ - "ex/HEAD/init.html#git_tree_lookup-14" + "ex/v0.28.0/init.html#git_tree_lookup-14" ], "merge.c": [ - "ex/HEAD/merge.html#git_tree_lookup-41" + "ex/v0.28.0/merge.html#git_tree_lookup-41" ] } }, @@ -25756,22 +26130,22 @@ "group": "tree", "examples": { "diff.c": [ - "ex/HEAD/diff.html#git_tree_free-17", - "ex/HEAD/diff.html#git_tree_free-18" + "ex/v0.28.0/diff.html#git_tree_free-17", + "ex/v0.28.0/diff.html#git_tree_free-18" ], "general.c": [ - "ex/HEAD/general.html#git_tree_free-92", - "ex/HEAD/general.html#git_tree_free-93" + "ex/v0.28.0/general.html#git_tree_free-92", + "ex/v0.28.0/general.html#git_tree_free-93" ], "init.c": [ - "ex/HEAD/init.html#git_tree_free-15" + "ex/v0.28.0/init.html#git_tree_free-15" ], "log.c": [ - "ex/HEAD/log.html#git_tree_free-59", - "ex/HEAD/log.html#git_tree_free-60", - "ex/HEAD/log.html#git_tree_free-61", - "ex/HEAD/log.html#git_tree_free-62", - "ex/HEAD/log.html#git_tree_free-63" + "ex/v0.28.0/log.html#git_tree_free-59", + "ex/v0.28.0/log.html#git_tree_free-60", + "ex/v0.28.0/log.html#git_tree_free-61", + "ex/v0.28.0/log.html#git_tree_free-62", + "ex/v0.28.0/log.html#git_tree_free-63" ] } }, @@ -25842,10 +26216,10 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entrycount-41" + "ex/v0.28.0/cat-file.html#git_tree_entrycount-41" ], "general.c": [ - "ex/HEAD/general.html#git_tree_entrycount-94" + "ex/v0.28.0/general.html#git_tree_entrycount-94" ] } }, @@ -25877,7 +26251,7 @@ "group": "tree", "examples": { "general.c": [ - "ex/HEAD/general.html#git_tree_entry_byname-95" + "ex/v0.28.0/general.html#git_tree_entry_byname-95" ] } }, @@ -25909,10 +26283,10 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_byindex-42" + "ex/v0.28.0/cat-file.html#git_tree_entry_byindex-42" ], "general.c": [ - "ex/HEAD/general.html#git_tree_entry_byindex-96" + "ex/v0.28.0/general.html#git_tree_entry_byindex-96" ] } }, @@ -26047,11 +26421,11 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_name-43" + "ex/v0.28.0/cat-file.html#git_tree_entry_name-43" ], "general.c": [ - "ex/HEAD/general.html#git_tree_entry_name-97", - "ex/HEAD/general.html#git_tree_entry_name-98" + "ex/v0.28.0/general.html#git_tree_entry_name-97", + "ex/v0.28.0/general.html#git_tree_entry_name-98" ] } }, @@ -26078,7 +26452,7 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_id-44" + "ex/v0.28.0/cat-file.html#git_tree_entry_id-44" ] } }, @@ -26097,7 +26471,7 @@ "argline": "const git_tree_entry *entry", "sig": "const git_tree_entry *", "return": { - "type": "git_otype", + "type": "git_object_t", "comment": " the type of the pointed object" }, "description": "

Get the type of the object pointed by the entry

\n", @@ -26105,7 +26479,7 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_type-45" + "ex/v0.28.0/cat-file.html#git_tree_entry_type-45" ] } }, @@ -26132,7 +26506,7 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/HEAD/cat-file.html#git_tree_entry_filemode-46" + "ex/v0.28.0/cat-file.html#git_tree_entry_filemode-46" ] } }, @@ -26218,7 +26592,7 @@ "group": "tree", "examples": { "general.c": [ - "ex/HEAD/general.html#git_tree_entry_to_object-99" + "ex/v0.28.0/general.html#git_tree_entry_to_object-99" ] } }, @@ -27015,6 +27389,58 @@ } }, "callbacks": { + "git_apply_delta_cb": { + "type": "callback", + "file": "git2/apply.h", + "line": 36, + "lineto": 38, + "args": [ + { + "name": "delta", + "type": "const git_diff_delta *", + "comment": "The delta to be applied" + }, + { + "name": "payload", + "type": "void *", + "comment": "User-specified payload" + } + ], + "argline": "const git_diff_delta *delta, void *payload", + "sig": "const git_diff_delta *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "

When applying a patch, callback that will be made per delta (file).

\n", + "comments": "

When the callback:\n - returns \n<\n 0, the apply process will be aborted.\n - returns > 0, the delta will not be applied, but the apply process\n continues\n - returns 0, the delta is applied, and the apply process continues.

\n" + }, + "git_apply_hunk_cb": { + "type": "callback", + "file": "git2/apply.h", + "line": 52, + "lineto": 54, + "args": [ + { + "name": "hunk", + "type": "const git_diff_hunk *", + "comment": "The hunk to be applied" + }, + { + "name": "payload", + "type": "void *", + "comment": "User-specified payload" + } + ], + "argline": "const git_diff_hunk *hunk, void *payload", + "sig": "const git_diff_hunk *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "

When applying a patch, callback that will be made per hunk.

\n", + "comments": "

When the callback:\n - returns \n<\n 0, the apply process will be aborted.\n - returns > 0, the hunk will not be applied, but the apply process\n continues\n - returns 0, the hunk is applied, and the apply process continues.

\n" + }, "git_attr_foreach_cb": { "type": "callback", "file": "git2/attr.h", @@ -27461,8 +27887,8 @@ "git_index_matched_path_cb": { "type": "callback", "file": "git2/index.h", - "line": 146, - "lineto": 147, + "line": 135, + "lineto": 136, "args": [ { "name": "path", @@ -27616,12 +28042,12 @@ }, { "name": "current", - "type": "uint32_t", + "type": "int", "comment": null }, { "name": "total", - "type": "uint32_t", + "type": "int", "comment": null }, { @@ -27630,8 +28056,8 @@ "comment": null } ], - "argline": "int stage, uint32_t current, uint32_t total, void *payload", - "sig": "int::uint32_t::uint32_t::void *", + "argline": "int stage, int current, int total, void *payload", + "sig": "int::int::int::void *", "return": { "type": "int", "comment": null @@ -27694,8 +28120,8 @@ "git_push_transfer_progress": { "type": "callback", "file": "git2/remote.h", - "line": 351, - "lineto": 355, + "line": 425, + "lineto": 429, "args": [ { "name": "current", @@ -27730,8 +28156,8 @@ "git_push_negotiation": { "type": "callback", "file": "git2/remote.h", - "line": 386, - "lineto": 386, + "line": 460, + "lineto": 460, "args": [ { "name": "updates", @@ -27761,8 +28187,8 @@ "git_push_update_reference_cb": { "type": "callback", "file": "git2/remote.h", - "line": 400, - "lineto": 400, + "line": 474, + "lineto": 474, "args": [ { "name": "refname", @@ -27792,8 +28218,8 @@ "git_repository_fetchhead_foreach_cb": { "type": "callback", "file": "git2/repository.h", - "line": 630, - "lineto": 634, + "line": 643, + "lineto": 647, "args": [ { "name": "ref_name", @@ -27833,8 +28259,8 @@ "git_repository_mergehead_foreach_cb": { "type": "callback", "file": "git2/repository.h", - "line": 652, - "lineto": 653, + "line": 665, + "lineto": 666, "args": [ { "name": "oid", @@ -28252,7 +28678,7 @@ }, { "name": "mode_out", - "type": "uint32_t *", + "type": "int *", "comment": null }, { @@ -28271,8 +28697,8 @@ "comment": null } ], - "argline": "git_merge_driver *self, const char **path_out, uint32_t *mode_out, git_buf *merged_out, const char *filter_name, const git_merge_driver_source *src", - "sig": "git_merge_driver *::const char **::uint32_t *::git_buf *::const char *::const git_merge_driver_source *", + "argline": "git_merge_driver *self, const char **path_out, int *mode_out, git_buf *merged_out, const char *filter_name, const git_merge_driver_source *src", + "sig": "git_merge_driver *::const char **::int *::git_buf *::const char *::const git_merge_driver_source *", "return": { "type": "int", "comment": null @@ -28283,8 +28709,8 @@ "git_stream_cb": { "type": "callback", "file": "git2/sys/stream.h", - "line": 43, - "lineto": 43, + "line": 117, + "lineto": 117, "args": [ { "name": "out", @@ -28314,8 +28740,8 @@ "git_smart_subtransport_cb": { "type": "callback", "file": "git2/sys/transport.h", - "line": 325, - "lineto": 328, + "line": 364, + "lineto": 367, "args": [ { "name": "out", @@ -28339,7 +28765,7 @@ "type": "int", "comment": null }, - "description": "", + "description": "

A function which creates a new subtransport for the smart transport

\n", "comments": "" }, "git_tag_foreach_cb": { @@ -28633,8 +29059,8 @@ "git_transfer_progress_cb": { "type": "callback", "file": "git2/types.h", - "line": 274, - "lineto": 274, + "line": 275, + "lineto": 275, "args": [ { "name": "stats", @@ -28659,8 +29085,8 @@ "git_transport_message_cb": { "type": "callback", "file": "git2/types.h", - "line": 284, - "lineto": 284, + "line": 285, + "lineto": 285, "args": [ { "name": "str", @@ -28690,8 +29116,8 @@ "git_transport_certificate_check_cb": { "type": "callback", "file": "git2/types.h", - "line": 334, - "lineto": 334, + "line": 338, + "lineto": 338, "args": [ { "name": "cert", @@ -28718,7 +29144,7 @@ "sig": "git_cert *::int::const char *::void *", "return": { "type": "int", - "comment": null + "comment": " 0 to proceed with the connection, \n<\n 0 to fail the connection\n or > 0 to indicate that the callback refused to act and that\n the existing validity determination should be honored" }, "description": "

Callback for the user's custom certificate checks.

\n", "comments": "" @@ -28929,8 +29355,8 @@ "type": "struct", "value": "git_annotated_commit", "file": "git2/types.h", - "line": 185, - "lineto": 185, + "line": 186, + "lineto": 186, "tdef": "typedef", "description": " Annotated commits, the input to merge and rebase. ", "comments": "", @@ -28948,6 +29374,7 @@ "git_branch_create_from_annotated", "git_merge", "git_merge_analysis", + "git_merge_analysis_for_ref", "git_rebase_init", "git_repository_set_head_detached_from_annotated", "git_reset_from_annotated" @@ -28955,6 +29382,99 @@ } } ], + [ + "git_apply_location_t", + { + "decl": [ + "GIT_APPLY_LOCATION_WORKDIR", + "GIT_APPLY_LOCATION_INDEX", + "GIT_APPLY_LOCATION_BOTH" + ], + "type": "enum", + "file": "git2/apply.h", + "line": 92, + "lineto": 110, + "block": "GIT_APPLY_LOCATION_WORKDIR\nGIT_APPLY_LOCATION_INDEX\nGIT_APPLY_LOCATION_BOTH", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_APPLY_LOCATION_WORKDIR", + "comments": "

Apply the patch to the workdir, leaving the index untouched.\n This is the equivalent of git apply with no location argument.

\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_APPLY_LOCATION_INDEX", + "comments": "

Apply the patch to the index, leaving the working directory\n untouched. This is the equivalent of git apply --cached.

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_APPLY_LOCATION_BOTH", + "comments": "

Apply the patch to both the working directory and the index.\n This is the equivalent of git apply --index.

\n", + "value": 2 + } + ], + "used": { + "returns": [], + "needs": [ + "git_apply" + ] + } + } + ], + [ + "git_apply_options", + { + "decl": [ + "unsigned int version", + "git_apply_delta_cb delta_cb", + "git_apply_hunk_cb hunk_cb", + "void * payload" + ], + "type": "struct", + "value": "git_apply_options", + "file": "git2/apply.h", + "line": 64, + "lineto": 70, + "block": "unsigned int version\ngit_apply_delta_cb delta_cb\ngit_apply_hunk_cb hunk_cb\nvoid * payload", + "tdef": "typedef", + "description": " Apply options structure", + "comments": "

Initialize with GIT_APPLY_OPTIONS_INIT. Alternatively, you can\n use git_apply_init_options.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "git_apply_delta_cb", + "name": "delta_cb", + "comments": "" + }, + { + "type": "git_apply_hunk_cb", + "name": "hunk_cb", + "comments": "" + }, + { + "type": "void *", + "name": "payload", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_apply", + "git_apply_to_tree" + ] + } + } + ], [ "git_attr_t", { @@ -29030,7 +29550,6 @@ "git_blame_free", "git_blame_get_hunk_byindex", "git_blame_get_hunk_byline", - "git_blame_get_hunk_count", "git_blame_init_options" ] } @@ -29190,8 +29709,8 @@ { "decl": [ "unsigned int version", - "uint32_t flags", - "uint16_t min_match_characters", + "int flags", + "int min_match_characters", "git_oid newest_commit", "git_oid oldest_commit", "size_t min_line", @@ -29202,10 +29721,10 @@ "file": "git2/blame.h", "line": 59, "lineto": 88, - "block": "unsigned int version\nuint32_t flags\nuint16_t min_match_characters\ngit_oid newest_commit\ngit_oid oldest_commit\nsize_t min_line\nsize_t max_line", + "block": "unsigned int version\nint flags\nint min_match_characters\ngit_oid newest_commit\ngit_oid oldest_commit\nsize_t min_line\nsize_t max_line", "tdef": "typedef", - "description": " Blame options structure", - "comments": "

Initialize with GIT_BLAME_OPTIONS_INIT. Alternatively, you can\n use git_blame_init_options.

\n", + "description": "", + "comments": "", "fields": [ { "type": "unsigned int", @@ -29213,14 +29732,14 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "flags", - "comments": " A combination of `git_blame_flag_t` " + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "min_match_characters", - "comments": " The lower bound on the number of alphanumeric\n characters that must be detected as moving/copying within a file for it to\n associate those lines with the parent commit. The default value is 20.\n This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*`\n flags are specified." + "comments": "" }, { "type": "git_oid", @@ -29259,8 +29778,8 @@ "type": "struct", "value": "git_blob", "file": "git2/types.h", - "line": 123, - "lineto": 123, + "line": 121, + "lineto": 121, "tdef": "typedef", "description": " In-memory representation of a blob object. ", "comments": "", @@ -29322,8 +29841,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 202, - "lineto": 206, + "line": 203, + "lineto": 207, "block": "GIT_BRANCH_LOCAL\nGIT_BRANCH_REMOTE\nGIT_BRANCH_ALL", "tdef": "typedef", "description": " Basic type of any Git branch. ", @@ -29454,8 +29973,8 @@ "type": "struct", "value": "git_cert", "file": "git2/types.h", - "line": 318, - "lineto": 323, + "line": 319, + "lineto": 324, "block": "git_cert_t cert_type", "tdef": "typedef", "description": " Parent type for `git_cert_hostkey` and `git_cert_x509`.", @@ -29568,8 +30087,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 290, - "lineto": 313, + "line": 291, + "lineto": 314, "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", @@ -30275,8 +30794,8 @@ "type": "struct", "value": "git_commit", "file": "git2/types.h", - "line": 126, - "lineto": 126, + "line": 124, + "lineto": 124, "tdef": "typedef", "description": " Parsed representation of a commit object. ", "comments": "", @@ -30335,8 +30854,8 @@ "type": "struct", "value": "git_config", "file": "git2/types.h", - "line": 144, - "lineto": 144, + "line": 145, + "lineto": 145, "tdef": "typedef", "description": " Memory representation of a set of config files ", "comments": "", @@ -30395,8 +30914,8 @@ "type": "struct", "value": "git_config_backend", "file": "git2/types.h", - "line": 147, - "lineto": 147, + "line": 148, + "lineto": 148, "block": "unsigned int version\nint readonly\nstruct git_config * cfg\nint (*)(struct git_config_backend *, git_config_level_t, const git_repository *) open\nint (*)(struct git_config_backend *, const char *, git_config_entry **) get\nint (*)(struct git_config_backend *, const char *, const char *) set\nint (*)(git_config_backend *, const char *, const char *, const char *) set_multivar\nint (*)(struct git_config_backend *, const char *) del\nint (*)(struct git_config_backend *, const char *, const char *) del_multivar\nint (*)(git_config_iterator **, struct git_config_backend *) iterator\nint (*)(struct git_config_backend **, struct git_config_backend *) snapshot\nint (*)(struct git_config_backend *) lock\nint (*)(struct git_config_backend *, int) unlock\nvoid (*)(struct git_config_backend *) free", "tdef": "typedef", "description": " Interface to access a configuration file ", @@ -30455,17 +30974,17 @@ { "type": "int (*)(struct git_config_backend **, struct git_config_backend *)", "name": "snapshot", - "comments": " Produce a read-only version of this backend " + "comments": "" }, { "type": "int (*)(struct git_config_backend *)", "name": "lock", - "comments": " Lock this backend.\n\n Prevent any writes to the data store backing this\n backend. Any updates must not be visible to any other\n readers." + "comments": "" }, { "type": "int (*)(struct git_config_backend *, int)", "name": "unlock", - "comments": " Unlock the data store backing this backend. If success is\n true, the changes should be committed, otherwise rolled\n back." + "comments": "" }, { "type": "void (*)(struct git_config_backend *)", @@ -30527,7 +31046,7 @@ { "type": "void (*)(struct git_config_entry *)", "name": "free", - "comments": " Free function for this entry " + "comments": "" }, { "type": "void *", @@ -30572,12 +31091,12 @@ { "type": "int (*)(git_config_entry **, git_config_iterator *)", "name": "next", - "comments": " Return the current entry and advance the iterator. The\n memory belongs to the library." + "comments": "" }, { "type": "void (*)(git_config_iterator *)", "name": "free", - "comments": " Free the iterator" + "comments": "" } ], "used": { @@ -31454,6 +31973,10 @@ "git_pathspec_match_list_diff_entry" ], "needs": [ + "git_apply", + "git_apply_delta_cb", + "git_apply_hunk_cb", + "git_apply_to_tree", "git_checkout_notify_cb", "git_diff_binary_cb", "git_diff_blob_to_buffer", @@ -31649,9 +32172,9 @@ { "decl": [ "git_delta_t status", - "uint32_t flags", - "uint16_t similarity", - "uint16_t nfiles", + "int flags", + "int similarity", + "int nfiles", "git_diff_file old_file", "git_diff_file new_file" ], @@ -31660,10 +32183,10 @@ "file": "git2/diff.h", "line": 309, "lineto": 316, - "block": "git_delta_t status\nuint32_t flags\nuint16_t similarity\nuint16_t nfiles\ngit_diff_file old_file\ngit_diff_file new_file", + "block": "git_delta_t status\nint flags\nint similarity\nint nfiles\ngit_diff_file old_file\ngit_diff_file new_file", "tdef": "typedef", - "description": " Description of changes to one entry.", - "comments": "

A delta is a file pair with an old and new revision. The old version\n may be absent if the file was just created and the new version may be\n absent if the file was deleted. A diff is mostly just a list of deltas.

\n\n

When iterating over a diff, this will be passed to most callbacks and\n you can use the contents to understand exactly what has changed.

\n\n

The old_file represents the "from" side of the diff and the new_file\n represents to "to" side of the diff. What those means depend on the\n function that was used to generate the diff and will be documented below.\n You can also use the GIT_DIFF_REVERSE flag to flip it around.

\n\n

Although the two sides of the delta are named "old_file" and "new_file",\n they actually may correspond to entries that represent a file, a symbolic\n link, a submodule commit id, or even a tree (if you are tracking type\n changes or ignored/untracked directories).

\n\n

Under some circumstances, in the name of efficiency, not all fields will\n be filled in, but we generally try to fill in as much as possible. One\n example is that the "flags" field may not have either the BINARY or the\n NOT_BINARY flag set to avoid examining file contents if you do not pass\n in hunk and/or line callbacks to the diff foreach iteration function. It\n will just use the git attributes for those files.

\n\n

The similarity score is zero unless you call git_diff_find_similar()\n which does a similarity analysis of files in the diff. Use that\n function to do rename and copy detection, and to split heavily modified\n files in add/delete pairs. After that call, deltas with a status of\n GIT_DELTA_RENAMED or GIT_DELTA_COPIED will have a similarity score\n between 0 and 100 indicating how similar the old and new sides are.

\n\n

If you ask git_diff_find_similar to find heavily modified files to\n break, but to not actually break the records, then GIT_DELTA_MODIFIED\n records may have a non-zero similarity score if the self-similarity is\n below the split threshold. To display this value like core Git, invert\n the score (a la printf("M%03d", 100 - delta->similarity)).

\n", + "description": "", + "comments": "", "fields": [ { "type": "git_delta_t", @@ -31671,19 +32194,19 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "flags", - "comments": " git_diff_flag_t values " + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "similarity", - "comments": " for RENAMED and COPIED, value 0-100 " + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "nfiles", - "comments": " number of files in this delta " + "comments": "" }, { "type": "git_diff_file", @@ -31703,6 +32226,7 @@ "git_pathspec_match_list_diff_entry" ], "needs": [ + "git_apply_delta_cb", "git_diff_binary_cb", "git_diff_file_cb", "git_diff_hunk_cb", @@ -31721,19 +32245,19 @@ "git_oid id", "const char * path", "git_off_t size", - "uint32_t flags", - "uint16_t mode", - "uint16_t id_abbrev" + "int flags", + "int mode", + "int id_abbrev" ], "type": "struct", "value": "git_diff_file", "file": "git2/diff.h", "line": 260, "lineto": 267, - "block": "git_oid id\nconst char * path\ngit_off_t size\nuint32_t flags\nuint16_t mode\nuint16_t id_abbrev", + "block": "git_oid id\nconst char * path\ngit_off_t size\nint flags\nint mode\nint id_abbrev", "tdef": "typedef", - "description": " Description of one side of a delta.", - "comments": "

Although this is called a "file", it could represent a file, a symbolic\n link, a submodule commit id, or even a tree (although that only if you\n are tracking type changes or ignored/untracked directories).

\n\n

The id is 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.

\n\n

path is the NUL-terminated path to the entry relative to the working\n directory of the repository.

\n\n

size is the size of the entry in bytes.

\n\n

flags is a combination of the git_diff_flag_t types

\n\n

mode is, roughly, the stat() st_mode value for the item. This will\n be restricted to one of the git_filemode_t values.

\n\n

The id_abbrev represents the known length of the id field, when\n converted to a hex string. It is generally GIT_OID_HEXSZ, 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.

\n", + "description": "", + "comments": "", "fields": [ { "type": "git_oid", @@ -31751,17 +32275,17 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "flags", "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "mode", "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "id_abbrev", "comments": "" } @@ -31783,11 +32307,11 @@ { "decl": [ "unsigned int version", - "uint32_t flags", - "uint16_t rename_threshold", - "uint16_t rename_from_rewrite_threshold", - "uint16_t copy_threshold", - "uint16_t break_rewrite_threshold", + "int flags", + "int rename_threshold", + "int rename_from_rewrite_threshold", + "int copy_threshold", + "int break_rewrite_threshold", "size_t rename_limit", "git_diff_similarity_metric * metric" ], @@ -31796,10 +32320,10 @@ "file": "git2/diff.h", "line": 718, "lineto": 772, - "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", + "block": "unsigned int version\nint flags\nint rename_threshold\nint rename_from_rewrite_threshold\nint copy_threshold\nint break_rewrite_threshold\nsize_t rename_limit\ngit_diff_similarity_metric * metric", "tdef": "typedef", - "description": " Control behavior of rename and copy detection", - "comments": "

These options mostly mimic parameters that can be passed to git-diff.

\n", + "description": "", + "comments": "", "fields": [ { "type": "unsigned int", @@ -31807,29 +32331,29 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "flags", - "comments": " Combination of git_diff_find_t values (default GIT_DIFF_FIND_BY_CONFIG).\n NOTE: if you don't explicitly set this, `diff.renames` could be set\n to false, resulting in `git_diff_find_similar` doing nothing." + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "rename_threshold", - "comments": " Threshold above which similar files will be considered renames.\n This is equivalent to the -M option. Defaults to 50." + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "rename_from_rewrite_threshold", - "comments": " Threshold below which similar files will be eligible to be a rename source.\n This is equivalent to the first part of the -B option. Defaults to 50." + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "copy_threshold", - "comments": " Threshold above which similar files will be considered copies.\n This is equivalent to the -C option. Defaults to 50." + "comments": "" }, { - "type": "uint16_t", + "type": "int", "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": "" }, { "type": "size_t", @@ -32257,6 +32781,7 @@ "used": { "returns": [], "needs": [ + "git_apply_hunk_cb", "git_diff_blob_to_buffer", "git_diff_blobs", "git_diff_buffers", @@ -32665,15 +33190,15 @@ { "decl": [ "unsigned int version", - "uint32_t flags", + "int flags", "git_submodule_ignore_t ignore_submodules", "git_strarray pathspec", "git_diff_notify_cb notify_cb", "git_diff_progress_cb progress_cb", "void * payload", - "uint32_t context_lines", - "uint32_t interhunk_lines", - "uint16_t id_abbrev", + "int context_lines", + "int interhunk_lines", + "int id_abbrev", "git_off_t max_size", "const char * old_prefix", "const char * new_prefix" @@ -32683,10 +33208,10 @@ "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", + "block": "unsigned int version\nint flags\ngit_submodule_ignore_t ignore_submodules\ngit_strarray pathspec\ngit_diff_notify_cb notify_cb\ngit_diff_progress_cb progress_cb\nvoid * payload\nint context_lines\nint interhunk_lines\nint id_abbrev\ngit_off_t max_size\nconst char * old_prefix\nconst char * new_prefix", "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\n values. Similarly, passing NULL for the options structure will\n give the defaults. The default values are marked below.

\n", + "description": "", + "comments": "", "fields": [ { "type": "unsigned int", @@ -32694,9 +33219,9 @@ "comments": " version for the struct " }, { - "type": "uint32_t", + "type": "int", "name": "flags", - "comments": " A combination of `git_diff_option_t` values above.\n Defaults to GIT_DIFF_NORMAL" + "comments": "" }, { "type": "git_submodule_ignore_t", @@ -32724,19 +33249,19 @@ "comments": " The payload to pass to the callback functions. " }, { - "type": "uint32_t", + "type": "int", "name": "context_lines", - "comments": " The number of unchanged lines that define the boundary of a hunk\n (and to display before and after). Defaults to 3." + "comments": "" }, { - "type": "uint32_t", + "type": "int", "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." + "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "id_abbrev", - "comments": " The abbreviation length to use when formatting object ids.\n Defaults to the value of 'core.abbrev' from the config, or 7 if unset." + "comments": "" }, { "type": "git_off_t", @@ -33034,8 +33559,8 @@ "type": "struct", "value": "git_error", "file": "git2/errors.h", - "line": 68, - "lineto": 71, + "line": 69, + "lineto": 72, "block": "char * message\nint klass", "tdef": "typedef", "description": " Structure to store extra details of the last error that occurred.", @@ -33054,6 +33579,7 @@ ], "used": { "returns": [ + "git_error_last", "giterr_last" ], "needs": [] @@ -33092,13 +33618,14 @@ "GIT_ITEROVER", "GIT_RETRY", "GIT_EMISMATCH", - "GIT_EINDEXDIRTY" + "GIT_EINDEXDIRTY", + "GIT_EAPPLYFAIL" ], "type": "enum", "file": "git2/errors.h", "line": 21, - "lineto": 60, - "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", + "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", "tdef": "typedef", "description": " Generic return codes ", "comments": "", @@ -33250,7 +33777,7 @@ { "type": "int", "name": "GIT_PASSTHROUGH", - "comments": "

Internal only

\n", + "comments": "

A user-configured callback refused to act

\n", "value": -30 }, { @@ -33276,6 +33803,12 @@ "name": "GIT_EINDEXDIRTY", "comments": "

Unsaved changes in the index would be overwritten

\n", "value": -34 + }, + { + "type": "int", + "name": "GIT_EAPPLYFAIL", + "comments": "

Patch application failed

\n", + "value": -35 } ], "used": { @@ -33288,251 +33821,251 @@ "git_error_t", { "decl": [ - "GITERR_NONE", - "GITERR_NOMEMORY", - "GITERR_OS", - "GITERR_INVALID", - "GITERR_REFERENCE", - "GITERR_ZLIB", - "GITERR_REPOSITORY", - "GITERR_CONFIG", - "GITERR_REGEX", - "GITERR_ODB", - "GITERR_INDEX", - "GITERR_OBJECT", - "GITERR_NET", - "GITERR_TAG", - "GITERR_TREE", - "GITERR_INDEXER", - "GITERR_SSL", - "GITERR_SUBMODULE", - "GITERR_THREAD", - "GITERR_STASH", - "GITERR_CHECKOUT", - "GITERR_FETCHHEAD", - "GITERR_MERGE", - "GITERR_SSH", - "GITERR_FILTER", - "GITERR_REVERT", - "GITERR_CALLBACK", - "GITERR_CHERRYPICK", - "GITERR_DESCRIBE", - "GITERR_REBASE", - "GITERR_FILESYSTEM", - "GITERR_PATCH", - "GITERR_WORKTREE", - "GITERR_SHA1" + "GIT_ERROR_NONE", + "GIT_ERROR_NOMEMORY", + "GIT_ERROR_OS", + "GIT_ERROR_INVALID", + "GIT_ERROR_REFERENCE", + "GIT_ERROR_ZLIB", + "GIT_ERROR_REPOSITORY", + "GIT_ERROR_CONFIG", + "GIT_ERROR_REGEX", + "GIT_ERROR_ODB", + "GIT_ERROR_INDEX", + "GIT_ERROR_OBJECT", + "GIT_ERROR_NET", + "GIT_ERROR_TAG", + "GIT_ERROR_TREE", + "GIT_ERROR_INDEXER", + "GIT_ERROR_SSL", + "GIT_ERROR_SUBMODULE", + "GIT_ERROR_THREAD", + "GIT_ERROR_STASH", + "GIT_ERROR_CHECKOUT", + "GIT_ERROR_FETCHHEAD", + "GIT_ERROR_MERGE", + "GIT_ERROR_SSH", + "GIT_ERROR_FILTER", + "GIT_ERROR_REVERT", + "GIT_ERROR_CALLBACK", + "GIT_ERROR_CHERRYPICK", + "GIT_ERROR_DESCRIBE", + "GIT_ERROR_REBASE", + "GIT_ERROR_FILESYSTEM", + "GIT_ERROR_PATCH", + "GIT_ERROR_WORKTREE", + "GIT_ERROR_SHA1" ], "type": "enum", "file": "git2/errors.h", - "line": 74, - "lineto": 109, - "block": "GITERR_NONE\nGITERR_NOMEMORY\nGITERR_OS\nGITERR_INVALID\nGITERR_REFERENCE\nGITERR_ZLIB\nGITERR_REPOSITORY\nGITERR_CONFIG\nGITERR_REGEX\nGITERR_ODB\nGITERR_INDEX\nGITERR_OBJECT\nGITERR_NET\nGITERR_TAG\nGITERR_TREE\nGITERR_INDEXER\nGITERR_SSL\nGITERR_SUBMODULE\nGITERR_THREAD\nGITERR_STASH\nGITERR_CHECKOUT\nGITERR_FETCHHEAD\nGITERR_MERGE\nGITERR_SSH\nGITERR_FILTER\nGITERR_REVERT\nGITERR_CALLBACK\nGITERR_CHERRYPICK\nGITERR_DESCRIBE\nGITERR_REBASE\nGITERR_FILESYSTEM\nGITERR_PATCH\nGITERR_WORKTREE\nGITERR_SHA1", + "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", "tdef": "typedef", "description": " Error classes ", "comments": "", "fields": [ { "type": "int", - "name": "GITERR_NONE", + "name": "GIT_ERROR_NONE", "comments": "", "value": 0 }, { "type": "int", - "name": "GITERR_NOMEMORY", + "name": "GIT_ERROR_NOMEMORY", "comments": "", "value": 1 }, { "type": "int", - "name": "GITERR_OS", + "name": "GIT_ERROR_OS", "comments": "", "value": 2 }, { "type": "int", - "name": "GITERR_INVALID", + "name": "GIT_ERROR_INVALID", "comments": "", "value": 3 }, { "type": "int", - "name": "GITERR_REFERENCE", + "name": "GIT_ERROR_REFERENCE", "comments": "", "value": 4 }, { "type": "int", - "name": "GITERR_ZLIB", + "name": "GIT_ERROR_ZLIB", "comments": "", "value": 5 }, { "type": "int", - "name": "GITERR_REPOSITORY", + "name": "GIT_ERROR_REPOSITORY", "comments": "", "value": 6 }, { "type": "int", - "name": "GITERR_CONFIG", + "name": "GIT_ERROR_CONFIG", "comments": "", "value": 7 }, { "type": "int", - "name": "GITERR_REGEX", + "name": "GIT_ERROR_REGEX", "comments": "", "value": 8 }, { "type": "int", - "name": "GITERR_ODB", + "name": "GIT_ERROR_ODB", "comments": "", "value": 9 }, { "type": "int", - "name": "GITERR_INDEX", + "name": "GIT_ERROR_INDEX", "comments": "", "value": 10 }, { "type": "int", - "name": "GITERR_OBJECT", + "name": "GIT_ERROR_OBJECT", "comments": "", "value": 11 }, { "type": "int", - "name": "GITERR_NET", + "name": "GIT_ERROR_NET", "comments": "", "value": 12 }, { "type": "int", - "name": "GITERR_TAG", + "name": "GIT_ERROR_TAG", "comments": "", "value": 13 }, { "type": "int", - "name": "GITERR_TREE", + "name": "GIT_ERROR_TREE", "comments": "", "value": 14 }, { "type": "int", - "name": "GITERR_INDEXER", + "name": "GIT_ERROR_INDEXER", "comments": "", "value": 15 }, { "type": "int", - "name": "GITERR_SSL", + "name": "GIT_ERROR_SSL", "comments": "", "value": 16 }, { "type": "int", - "name": "GITERR_SUBMODULE", + "name": "GIT_ERROR_SUBMODULE", "comments": "", "value": 17 }, { "type": "int", - "name": "GITERR_THREAD", + "name": "GIT_ERROR_THREAD", "comments": "", "value": 18 }, { "type": "int", - "name": "GITERR_STASH", + "name": "GIT_ERROR_STASH", "comments": "", "value": 19 }, { "type": "int", - "name": "GITERR_CHECKOUT", + "name": "GIT_ERROR_CHECKOUT", "comments": "", "value": 20 }, { "type": "int", - "name": "GITERR_FETCHHEAD", + "name": "GIT_ERROR_FETCHHEAD", "comments": "", "value": 21 }, { "type": "int", - "name": "GITERR_MERGE", + "name": "GIT_ERROR_MERGE", "comments": "", "value": 22 }, { "type": "int", - "name": "GITERR_SSH", + "name": "GIT_ERROR_SSH", "comments": "", "value": 23 }, { "type": "int", - "name": "GITERR_FILTER", + "name": "GIT_ERROR_FILTER", "comments": "", "value": 24 }, { "type": "int", - "name": "GITERR_REVERT", + "name": "GIT_ERROR_REVERT", "comments": "", "value": 25 }, { "type": "int", - "name": "GITERR_CALLBACK", + "name": "GIT_ERROR_CALLBACK", "comments": "", "value": 26 }, { "type": "int", - "name": "GITERR_CHERRYPICK", + "name": "GIT_ERROR_CHERRYPICK", "comments": "", "value": 27 }, { "type": "int", - "name": "GITERR_DESCRIBE", + "name": "GIT_ERROR_DESCRIBE", "comments": "", "value": 28 }, { "type": "int", - "name": "GITERR_REBASE", + "name": "GIT_ERROR_REBASE", "comments": "", "value": 29 }, { "type": "int", - "name": "GITERR_FILESYSTEM", + "name": "GIT_ERROR_FILESYSTEM", "comments": "", "value": 30 }, { "type": "int", - "name": "GITERR_PATCH", + "name": "GIT_ERROR_PATCH", "comments": "", "value": 31 }, { "type": "int", - "name": "GITERR_WORKTREE", + "name": "GIT_ERROR_WORKTREE", "comments": "", "value": 32 }, { "type": "int", - "name": "GITERR_SHA1", + "name": "GIT_ERROR_SHA1", "comments": "", "value": 33 } @@ -33554,8 +34087,8 @@ ], "type": "enum", "file": "git2/common.h", - "line": 122, - "lineto": 145, + "line": 130, + "lineto": 153, "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", @@ -33607,8 +34140,8 @@ "type": "struct", "value": "git_fetch_options", "file": "git2/remote.h", - "line": 555, - "lineto": 592, + "line": 629, + "lineto": 666, "block": "int version\ngit_remote_callbacks callbacks\ngit_fetch_prune_t prune\nint update_fetchhead\ngit_remote_autotag_option_t download_tags\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", "tdef": "typedef", "description": " Fetch options structure.", @@ -33670,8 +34203,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 507, - "lineto": 520, + "line": 581, + "lineto": 594, "block": "GIT_FETCH_PRUNE_UNSPECIFIED\nGIT_FETCH_PRUNE\nGIT_FETCH_NO_PRUNE", "tdef": "typedef", "description": "", @@ -33715,8 +34248,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 209, - "lineto": 216, + "line": 210, + "lineto": 217, "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. ", @@ -33849,8 +34382,6 @@ "git_filter_list_stream_file", "git_filter_register", "git_filter_shutdown_fn", - "git_filter_source_filemode", - "git_filter_source_flags", "git_filter_source_id", "git_filter_source_mode", "git_filter_source_path", @@ -33999,8 +34530,6 @@ "needs": [ "git_filter_apply_fn", "git_filter_check_fn", - "git_filter_source_filemode", - "git_filter_source_flags", "git_filter_source_id", "git_filter_source_mode", "git_filter_source_path", @@ -34086,125 +34615,6 @@ } } ], - [ - "git_idxentry_extended_flag_t", - { - "decl": [ - "GIT_IDXENTRY_INTENT_TO_ADD", - "GIT_IDXENTRY_SKIP_WORKTREE", - "GIT_IDXENTRY_EXTENDED2", - "GIT_IDXENTRY_EXTENDED_FLAGS", - "GIT_IDXENTRY_UPDATE", - "GIT_IDXENTRY_REMOVE", - "GIT_IDXENTRY_UPTODATE", - "GIT_IDXENTRY_ADDED", - "GIT_IDXENTRY_HASHED", - "GIT_IDXENTRY_UNHASHED", - "GIT_IDXENTRY_WT_REMOVE", - "GIT_IDXENTRY_CONFLICTED", - "GIT_IDXENTRY_UNPACKED", - "GIT_IDXENTRY_NEW_SKIP_WORKTREE" - ], - "type": "enum", - "file": "git2/index.h", - "line": 115, - "lineto": 135, - "block": "GIT_IDXENTRY_INTENT_TO_ADD\nGIT_IDXENTRY_SKIP_WORKTREE\nGIT_IDXENTRY_EXTENDED2\nGIT_IDXENTRY_EXTENDED_FLAGS\nGIT_IDXENTRY_UPDATE\nGIT_IDXENTRY_REMOVE\nGIT_IDXENTRY_UPTODATE\nGIT_IDXENTRY_ADDED\nGIT_IDXENTRY_HASHED\nGIT_IDXENTRY_UNHASHED\nGIT_IDXENTRY_WT_REMOVE\nGIT_IDXENTRY_CONFLICTED\nGIT_IDXENTRY_UNPACKED\nGIT_IDXENTRY_NEW_SKIP_WORKTREE", - "tdef": "typedef", - "description": " Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`", - "comments": "

In memory, the flags_extended fields are divided into two parts: the\n fields that are read from and written to disk, and other fields that\n in-memory only and used by libgit2. Only the flags in\n GIT_IDXENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

Thee first three bitmasks match the three fields in the\n git_index_entry flags_extended value that belong on disk. You\n can use them to interpret the data in the flags_extended.

\n\n

The rest of the bitmasks match the other fields in the git_index_entry\n flags_extended value that are only used in-memory by libgit2.\n You can use them to interpret the data in the flags_extended.

\n", - "fields": [ - { - "type": "int", - "name": "GIT_IDXENTRY_INTENT_TO_ADD", - "comments": "", - "value": 8192 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_SKIP_WORKTREE", - "comments": "", - "value": 16384 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_EXTENDED2", - "comments": "

Reserved for future extension

\n", - "value": 32768 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_EXTENDED_FLAGS", - "comments": "

Reserved for future extension

\n", - "value": 24576 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_UPDATE", - "comments": "

Reserved for future extension

\n", - "value": 1 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_REMOVE", - "comments": "

Reserved for future extension

\n", - "value": 2 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_UPTODATE", - "comments": "

Reserved for future extension

\n", - "value": 4 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_ADDED", - "comments": "

Reserved for future extension

\n", - "value": 8 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_HASHED", - "comments": "

Reserved for future extension

\n", - "value": 16 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_UNHASHED", - "comments": "

Reserved for future extension

\n", - "value": 32 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_WT_REMOVE", - "comments": "

remove in work directory

\n", - "value": 64 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_CONFLICTED", - "comments": "", - "value": 128 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_UNPACKED", - "comments": "", - "value": 256 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_NEW_SKIP_WORKTREE", - "comments": "", - "value": 512 - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_index", { @@ -34212,8 +34622,8 @@ "type": "struct", "value": "git_index", "file": "git2/types.h", - "line": 138, - "lineto": 138, + "line": 136, + "lineto": 136, "tdef": "typedef", "description": " Memory representation of an index file. ", "comments": "", @@ -34230,6 +34640,7 @@ "git_merge_driver_source_theirs" ], "needs": [ + "git_apply_to_tree", "git_checkout_index", "git_cherrypick_commit", "git_diff_index_to_index", @@ -34258,6 +34669,9 @@ "git_index_get_byindex", "git_index_get_bypath", "git_index_has_conflicts", + "git_index_iterator_free", + "git_index_iterator_new", + "git_index_iterator_next", "git_index_name_add", "git_index_name_clear", "git_index_name_entrycount", @@ -34315,8 +34729,8 @@ ], "type": "enum", "file": "git2/index.h", - "line": 150, - "lineto": 155, + "line": 139, + "lineto": 144, "block": "GIT_INDEX_ADD_DEFAULT\nGIT_INDEX_ADD_FORCE\nGIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\nGIT_INDEX_ADD_CHECK_PATHSPEC", "tdef": "typedef", "description": " Flags for APIs that add files matching pathspec ", @@ -34353,6 +34767,55 @@ } } ], + [ + "git_index_capability_t", + { + "decl": [ + "GIT_INDEX_CAPABILITY_IGNORE_CASE", + "GIT_INDEX_CAPABILITY_NO_FILEMODE", + "GIT_INDEX_CAPABILITY_NO_SYMLINKS", + "GIT_INDEX_CAPABILITY_FROM_OWNER" + ], + "type": "enum", + "file": "git2/index.h", + "line": 126, + "lineto": 131, + "block": "GIT_INDEX_CAPABILITY_IGNORE_CASE\nGIT_INDEX_CAPABILITY_NO_FILEMODE\nGIT_INDEX_CAPABILITY_NO_SYMLINKS\nGIT_INDEX_CAPABILITY_FROM_OWNER", + "tdef": "typedef", + "description": " Capabilities of system that affect index actions. ", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_INDEX_CAPABILITY_IGNORE_CASE", + "comments": "", + "value": 1 + }, + { + "type": "int", + "name": "GIT_INDEX_CAPABILITY_NO_FILEMODE", + "comments": "", + "value": 2 + }, + { + "type": "int", + "name": "GIT_INDEX_CAPABILITY_NO_SYMLINKS", + "comments": "", + "value": 4 + }, + { + "type": "int", + "name": "GIT_INDEX_CAPABILITY_FROM_OWNER", + "comments": "", + "value": -1 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], [ "git_index_conflict_iterator", { @@ -34360,8 +34823,8 @@ "type": "struct", "value": "git_index_conflict_iterator", "file": "git2/types.h", - "line": 141, - "lineto": 141, + "line": 142, + "lineto": 142, "tdef": "typedef", "description": " An iterator for conflicts in the index. ", "comments": "", @@ -34382,15 +34845,15 @@ "decl": [ "git_index_time ctime", "git_index_time mtime", - "uint32_t dev", - "uint32_t ino", - "uint32_t mode", - "uint32_t uid", - "uint32_t gid", - "uint32_t file_size", + "int dev", + "int ino", + "int mode", + "int uid", + "int gid", + "int file_size", "git_oid id", - "uint16_t flags", - "uint16_t flags_extended", + "int flags", + "int flags_extended", "const char * path" ], "type": "struct", @@ -34398,10 +34861,10 @@ "file": "git2/index.h", "line": 53, "lineto": 70, - "block": "git_index_time ctime\ngit_index_time mtime\nuint32_t dev\nuint32_t ino\nuint32_t mode\nuint32_t uid\nuint32_t gid\nuint32_t file_size\ngit_oid id\nuint16_t flags\nuint16_t flags_extended\nconst char * path", + "block": "git_index_time ctime\ngit_index_time mtime\nint dev\nint ino\nint mode\nint uid\nint gid\nint file_size\ngit_oid id\nint flags\nint flags_extended\nconst char * path", "tdef": "typedef", - "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.\n The meaning of the fields corresponds to core Git's documentation (in\n "Documentation/technical/index-format.txt").

\n\n

The flags field consists of a number of bit fields which can be\n accessed via the first set of GIT_IDXENTRY_... bitmasks below. These\n flags are all read from and persisted to disk.

\n\n

The flags_extended field also has a number of bit fields which can be\n accessed via the later GIT_IDXENTRY_... bitmasks below. Some of\n these flags are read from and written to disk, but some are set aside\n for in-memory only reference.

\n\n

Note that the time and size fields are truncated to 32 bits. This\n is enough to detect changes, which is enough for the index to\n function as a cache, but it should not be taken as an authoritative\n source for that data.

\n", + "description": "", + "comments": "", "fields": [ { "type": "git_index_time", @@ -34414,32 +34877,32 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "dev", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "ino", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "mode", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "uid", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "gid", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "file_size", "comments": "" }, @@ -34449,12 +34912,12 @@ "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "flags", "comments": "" }, { - "type": "uint16_t", + "type": "int", "name": "flags_extended", "comments": "" }, @@ -34480,11 +34943,119 @@ "git_index_conflict_next", "git_index_entry_is_conflict", "git_index_entry_stage", + "git_index_iterator_next", "git_merge_file_from_index" ] } } ], + [ + "git_index_entry_extended_flag_t", + { + "decl": [ + "GIT_INDEX_ENTRY_INTENT_TO_ADD", + "GIT_INDEX_ENTRY_SKIP_WORKTREE", + "GIT_INDEX_ENTRY_EXTENDED_FLAGS", + "GIT_INDEX_ENTRY_UPTODATE" + ], + "type": "enum", + "file": "git2/index.h", + "line": 116, + "lineto": 123, + "block": "GIT_INDEX_ENTRY_INTENT_TO_ADD\nGIT_INDEX_ENTRY_SKIP_WORKTREE\nGIT_INDEX_ENTRY_EXTENDED_FLAGS\nGIT_INDEX_ENTRY_UPTODATE", + "tdef": "typedef", + "description": " Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`", + "comments": "

In memory, the flags_extended fields are divided into two parts: the\n fields that are read from and written to disk, and other fields that\n in-memory only and used by libgit2. Only the flags in\n GIT_INDEX_ENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

Thee first three bitmasks match the three fields in the\n git_index_entry flags_extended value that belong on disk. You\n can use them to interpret the data in the flags_extended.

\n\n

The rest of the bitmasks match the other fields in the git_index_entry\n flags_extended value that are only used in-memory by libgit2.\n You can use them to interpret the data in the flags_extended.

\n", + "fields": [ + { + "type": "int", + "name": "GIT_INDEX_ENTRY_INTENT_TO_ADD", + "comments": "", + "value": 8192 + }, + { + "type": "int", + "name": "GIT_INDEX_ENTRY_SKIP_WORKTREE", + "comments": "", + "value": 16384 + }, + { + "type": "int", + "name": "GIT_INDEX_ENTRY_EXTENDED_FLAGS", + "comments": "", + "value": 24576 + }, + { + "type": "int", + "name": "GIT_INDEX_ENTRY_UPTODATE", + "comments": "", + "value": 4 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "git_index_entry_flag_t", + { + "decl": [ + "GIT_INDEX_ENTRY_EXTENDED", + "GIT_INDEX_ENTRY_VALID" + ], + "type": "enum", + "file": "git2/index.h", + "line": 87, + "lineto": 90, + "block": "GIT_INDEX_ENTRY_EXTENDED\nGIT_INDEX_ENTRY_VALID", + "tdef": "typedef", + "description": " Flags for index entries", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_INDEX_ENTRY_EXTENDED", + "comments": "", + "value": 16384 + }, + { + "type": "int", + "name": "GIT_INDEX_ENTRY_VALID", + "comments": "", + "value": 32768 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "git_index_iterator", + { + "decl": "git_index_iterator", + "type": "struct", + "value": "git_index_iterator", + "file": "git2/types.h", + "line": 139, + "lineto": 139, + "tdef": "typedef", + "description": " An iterator for entries in the index. ", + "comments": "", + "fields": [], + "used": { + "returns": [], + "needs": [ + "git_index_iterator_free", + "git_index_iterator_new", + "git_index_iterator_next" + ] + } + } + ], [ "git_index_name_entry", { @@ -34531,7 +35102,7 @@ "git_index_reuc_entry", { "decl": [ - "uint32_t [3] mode", + "int [3] mode", "git_oid [3] oid", "char * path" ], @@ -34540,13 +35111,13 @@ "file": "git2/sys/index.h", "line": 30, "lineto": 34, - "block": "uint32_t [3] mode\ngit_oid [3] oid\nchar * path", + "block": "int [3] mode\ngit_oid [3] oid\nchar * path", "tdef": "typedef", - "description": " Representation of a resolve undo entry in the index. ", + "description": "", "comments": "", "fields": [ { - "type": "uint32_t [3]", + "type": "int [3]", "name": "mode", "comments": "" }, @@ -34582,8 +35153,8 @@ ], "type": "enum", "file": "git2/index.h", - "line": 157, - "lineto": 177, + "line": 146, + "lineto": 166, "block": "GIT_INDEX_STAGE_ANY\nGIT_INDEX_STAGE_NORMAL\nGIT_INDEX_STAGE_ANCESTOR\nGIT_INDEX_STAGE_OURS\nGIT_INDEX_STAGE_THEIRS", "tdef": "typedef", "description": "", @@ -34630,26 +35201,26 @@ "git_index_time", { "decl": [ - "int32_t seconds", - "uint32_t nanoseconds" + "int seconds", + "int nanoseconds" ], "type": "struct", "value": "git_index_time", "file": "git2/index.h", "line": 26, "lineto": 30, - "block": "int32_t seconds\nuint32_t nanoseconds", + "block": "int seconds\nint nanoseconds", "tdef": "typedef", - "description": " Time structure used in a git index entry ", + "description": "", "comments": "", "fields": [ { - "type": "int32_t", + "type": "int", "name": "seconds", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "nanoseconds", "comments": "" } @@ -34660,55 +35231,6 @@ } } ], - [ - "git_indexcap_t", - { - "decl": [ - "GIT_INDEXCAP_IGNORE_CASE", - "GIT_INDEXCAP_NO_FILEMODE", - "GIT_INDEXCAP_NO_SYMLINKS", - "GIT_INDEXCAP_FROM_OWNER" - ], - "type": "enum", - "file": "git2/index.h", - "line": 138, - "lineto": 143, - "block": "GIT_INDEXCAP_IGNORE_CASE\nGIT_INDEXCAP_NO_FILEMODE\nGIT_INDEXCAP_NO_SYMLINKS\nGIT_INDEXCAP_FROM_OWNER", - "tdef": "typedef", - "description": " Capabilities of system that affect index actions. ", - "comments": "", - "fields": [ - { - "type": "int", - "name": "GIT_INDEXCAP_IGNORE_CASE", - "comments": "", - "value": 1 - }, - { - "type": "int", - "name": "GIT_INDEXCAP_NO_FILEMODE", - "comments": "", - "value": 2 - }, - { - "type": "int", - "name": "GIT_INDEXCAP_NO_SYMLINKS", - "comments": "", - "value": 4 - }, - { - "type": "int", - "name": "GIT_INDEXCAP_FROM_OWNER", - "comments": "", - "value": -1 - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_indexer", { @@ -34784,41 +35306,6 @@ } } ], - [ - "git_indxentry_flag_t", - { - "decl": [ - "GIT_IDXENTRY_EXTENDED", - "GIT_IDXENTRY_VALID" - ], - "type": "enum", - "file": "git2/index.h", - "line": 86, - "lineto": 89, - "block": "GIT_IDXENTRY_EXTENDED\nGIT_IDXENTRY_VALID", - "tdef": "typedef", - "description": " Flags for index entries", - "comments": "", - "fields": [ - { - "type": "int", - "name": "GIT_IDXENTRY_EXTENDED", - "comments": "", - "value": 16384 - }, - { - "type": "int", - "name": "GIT_IDXENTRY_VALID", - "comments": "", - "value": 32768 - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_iterator", { @@ -34872,8 +35359,8 @@ ], "type": "enum", "file": "git2/common.h", - "line": 173, - "lineto": 201, + "line": 181, + "lineto": 209, "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", "tdef": "typedef", "description": " Global library options", @@ -35055,8 +35542,8 @@ "type": "struct", "value": "git_mailmap", "file": "git2/types.h", - "line": 438, - "lineto": 438, + "line": 442, + "lineto": 442, "tdef": "typedef", "description": " Representation of .mailmap file state. ", "comments": "", @@ -35130,7 +35617,8 @@ "used": { "returns": [], "needs": [ - "git_merge_analysis" + "git_merge_analysis", + "git_merge_analysis_for_ref" ] } } @@ -35698,7 +36186,8 @@ "used": { "returns": [], "needs": [ - "git_merge_analysis" + "git_merge_analysis", + "git_merge_analysis_for_ref" ] } } @@ -35790,8 +36279,8 @@ "type": "struct", "value": "git_note", "file": "git2/types.h", - "line": 156, - "lineto": 156, + "line": 157, + "lineto": 157, "tdef": "typedef", "description": " Representation of a git note ", "comments": "", @@ -35845,17 +36334,24 @@ "type": "struct", "value": "git_object", "file": "git2/types.h", - "line": 114, - "lineto": 114, + "line": 112, + "lineto": 112, "tdef": "typedef", "description": " Representation of a generic object in a repository ", "comments": "", "fields": [], "used": { - "returns": [], + "returns": [ + "git_object_string2type", + "git_object_type", + "git_odb_object_type", + "git_tag_target_type", + "git_tree_entry_type" + ], "needs": [ "git_checkout_tree", "git_describe_commit", + "git_object__size", "git_object_dup", "git_object_free", "git_object_id", @@ -35866,7 +36362,16 @@ "git_object_peel", "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", + "git_odb_write", "git_reference_peel", + "git_repository_hashfile", "git_reset", "git_reset_default", "git_revparse_ext", @@ -35881,6 +36386,105 @@ } } ], + [ + "git_object_t", + { + "decl": [ + "GIT_OBJECT_ANY", + "GIT_OBJECT_INVALID", + "GIT_OBJECT_COMMIT", + "GIT_OBJECT_TREE", + "GIT_OBJECT_BLOB", + "GIT_OBJECT_TAG", + "GIT_OBJECT_OFS_DELTA", + "GIT_OBJECT_REF_DELTA" + ], + "type": "enum", + "file": "git2/types.h", + "line": 70, + "lineto": 79, + "block": "GIT_OBJECT_ANY\nGIT_OBJECT_INVALID\nGIT_OBJECT_COMMIT\nGIT_OBJECT_TREE\nGIT_OBJECT_BLOB\nGIT_OBJECT_TAG\nGIT_OBJECT_OFS_DELTA\nGIT_OBJECT_REF_DELTA", + "tdef": "typedef", + "description": " Basic type (loose or packed) of any Git object. ", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_OBJECT_ANY", + "comments": "

Object can be any of the following

\n", + "value": -2 + }, + { + "type": "int", + "name": "GIT_OBJECT_INVALID", + "comments": "

Object is invalid.

\n", + "value": -1 + }, + { + "type": "int", + "name": "GIT_OBJECT_COMMIT", + "comments": "

A commit object.

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_OBJECT_TREE", + "comments": "

A tree (directory listing) object.

\n", + "value": 2 + }, + { + "type": "int", + "name": "GIT_OBJECT_BLOB", + "comments": "

A file revision object.

\n", + "value": 3 + }, + { + "type": "int", + "name": "GIT_OBJECT_TAG", + "comments": "

An annotated tag object.

\n", + "value": 4 + }, + { + "type": "int", + "name": "GIT_OBJECT_OFS_DELTA", + "comments": "

A delta, base is given by an offset.

\n", + "value": 6 + }, + { + "type": "int", + "name": "GIT_OBJECT_REF_DELTA", + "comments": "

A delta, base is given by object id.

\n", + "value": 7 + } + ], + "used": { + "returns": [ + "git_object_string2type", + "git_object_type", + "git_odb_object_type", + "git_tag_target_type", + "git_tree_entry_type" + ], + "needs": [ + "git_object__size", + "git_object_lookup", + "git_object_lookup_bypath", + "git_object_lookup_prefix", + "git_object_peel", + "git_object_type2string", + "git_object_typeisloose", + "git_odb_hash", + "git_odb_hashfile", + "git_odb_open_rstream", + "git_odb_open_wstream", + "git_odb_read_header", + "git_odb_write", + "git_reference_peel", + "git_repository_hashfile" + ] + } + } + ], [ "git_odb", { @@ -35888,8 +36492,8 @@ "type": "struct", "value": "git_odb", "file": "git2/types.h", - "line": 84, - "lineto": 84, + "line": 82, + "lineto": 82, "tdef": "typedef", "description": " An open object database handle. ", "comments": "", @@ -35950,9 +36554,9 @@ "type": "struct", "value": "git_odb_backend", "file": "git2/types.h", - "line": 87, - "lineto": 87, - "block": "unsigned int version\ngit_odb * odb\nint (*)(void **, size_t *, git_otype *, git_odb_backend *, const git_oid *) read\nint (*)(git_oid *, void **, size_t *, git_otype *, git_odb_backend *, const git_oid *, size_t) read_prefix\nint (*)(size_t *, git_otype *, git_odb_backend *, const git_oid *) read_header\nint (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_otype) write\nint (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_otype) writestream\nint (*)(git_odb_stream **, size_t *, git_otype *, git_odb_backend *, const git_oid *) readstream\nint (*)(git_odb_backend *, const git_oid *) exists\nint (*)(git_oid *, git_odb_backend *, const git_oid *, size_t) exists_prefix\nint (*)(git_odb_backend *) refresh\nint (*)(git_odb_backend *, git_odb_foreach_cb, void *) foreach\nint (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *) writepack\nint (*)(git_odb_backend *, const git_oid *) freshen\nvoid (*)(git_odb_backend *) free", + "line": 85, + "lineto": 85, + "block": "unsigned int version\ngit_odb * odb\nint (*)(void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *) read\nint (*)(git_oid *, void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *, size_t) read_prefix\nint (*)(size_t *, git_object_t *, git_odb_backend *, const git_oid *) read_header\nint (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_object_t) write\nint (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_object_t) writestream\nint (*)(git_odb_stream **, size_t *, git_object_t *, git_odb_backend *, const git_oid *) readstream\nint (*)(git_odb_backend *, const git_oid *) exists\nint (*)(git_oid *, git_odb_backend *, const git_oid *, size_t) exists_prefix\nint (*)(git_odb_backend *) refresh\nint (*)(git_odb_backend *, git_odb_foreach_cb, void *) foreach\nint (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *) writepack\nint (*)(git_odb_backend *, const git_oid *) freshen\nvoid (*)(git_odb_backend *) free", "tdef": "typedef", "description": " A custom backend in an ODB ", "comments": "", @@ -35968,32 +36572,32 @@ "comments": "" }, { - "type": "int (*)(void **, size_t *, git_otype *, git_odb_backend *, const git_oid *)", + "type": "int (*)(void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *)", "name": "read", "comments": "" }, { - "type": "int (*)(git_oid *, void **, size_t *, git_otype *, git_odb_backend *, const git_oid *, size_t)", + "type": "int (*)(git_oid *, void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *, size_t)", "name": "read_prefix", "comments": "" }, { - "type": "int (*)(size_t *, git_otype *, git_odb_backend *, const git_oid *)", + "type": "int (*)(size_t *, git_object_t *, git_odb_backend *, const git_oid *)", "name": "read_header", "comments": "" }, { - "type": "int (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_otype)", + "type": "int (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_object_t)", "name": "write", - "comments": " Write an object into the backend. The id of the object has\n already been calculated and is passed in." + "comments": "" }, { - "type": "int (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_otype)", + "type": "int (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_object_t)", "name": "writestream", "comments": "" }, { - "type": "int (*)(git_odb_stream **, size_t *, git_otype *, git_odb_backend *, const git_oid *)", + "type": "int (*)(git_odb_stream **, size_t *, git_object_t *, git_odb_backend *, const git_oid *)", "name": "readstream", "comments": "" }, @@ -36010,7 +36614,7 @@ { "type": "int (*)(git_odb_backend *)", "name": "refresh", - "comments": " If the backend implements a refreshing mechanism, it should be exposed\n through this endpoint. Each call to `git_odb_refresh()` will invoke it.\n\n However, the backend implementation should try to stay up-to-date as much\n as possible by itself as libgit2 will not automatically invoke\n `git_odb_refresh()`. For instance, a potential strategy for the backend\n implementation to achieve this could be to internally invoke this\n endpoint on failed lookups (ie. `exists()`, `read()`, `read_header()`)." + "comments": "" }, { "type": "int (*)(git_odb_backend *, git_odb_foreach_cb, void *)", @@ -36025,12 +36629,12 @@ { "type": "int (*)(git_odb_backend *, const git_oid *)", "name": "freshen", - "comments": " \"Freshens\" an already existing object, updating its last-used\n time. This occurs when `git_odb_write` was called, but the\n object already existed (and will not be re-written). The\n underlying implementation may want to update last-used timestamps.\n\n If callers implement this, they should return `0` if the object\n exists and was freshened, and non-zero otherwise." + "comments": "" }, { "type": "void (*)(git_odb_backend *)", "name": "free", - "comments": " Frees any resources held by the odb (including the `git_odb_backend`\n itself). An odb backend implementation must provide this function." + "comments": "" } ], "used": { @@ -36057,14 +36661,14 @@ "decl": [ "git_oid id", "unsigned short length", - "git_otype type" + "git_object_t type" ], "type": "struct", "value": "git_odb_expand_id", "file": "git2/odb.h", "line": 180, "lineto": 195, - "block": "git_oid id\nunsigned short length\ngit_otype type", + "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.", "comments": "", @@ -36080,9 +36684,9 @@ "comments": " The length of the object ID (in nibbles, or packets of 4 bits; the\n number of hex characters)" }, { - "type": "git_otype", + "type": "git_object_t", "name": "type", - "comments": " The (optional) type of the object to search for; leave as `0` or set\n to `GIT_OBJ_ANY` to query for any object matching the ID." + "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": { @@ -36100,8 +36704,8 @@ "type": "struct", "value": "git_odb_object", "file": "git2/types.h", - "line": 90, - "lineto": 90, + "line": 88, + "lineto": 88, "tdef": "typedef", "description": " An object read from the ODB ", "comments": "", @@ -36128,8 +36732,8 @@ "type": "struct", "value": "git_odb_stream", "file": "git2/types.h", - "line": 93, - "lineto": 93, + "line": 91, + "lineto": 91, "block": "git_odb_backend * backend\nunsigned int mode\nvoid * hash_ctx\ngit_off_t declared_size\ngit_off_t received_bytes\nint (*)(git_odb_stream *, char *, size_t) read\nint (*)(git_odb_stream *, const char *, size_t) write\nint (*)(git_odb_stream *, const git_oid *) finalize_write\nvoid (*)(git_odb_stream *) free", "tdef": "typedef", "description": " A stream to read/write from the ODB ", @@ -36163,22 +36767,22 @@ { "type": "int (*)(git_odb_stream *, char *, size_t)", "name": "read", - "comments": " Write at most `len` bytes into `buffer` and advance the stream." + "comments": "" }, { "type": "int (*)(git_odb_stream *, const char *, size_t)", "name": "write", - "comments": " Write `len` bytes from `buffer` into the stream." + "comments": "" }, { "type": "int (*)(git_odb_stream *, const git_oid *)", "name": "finalize_write", - "comments": " Store the contents of the stream as an object with the id\n specified in `oid`.\n\n This method might not be invoked if:\n - an error occurs earlier with the `write` callback,\n - the object referred to by `oid` already exists in any backend, or\n - the final number of received bytes differs from the size declared\n with `git_odb_open_wstream()`" + "comments": "" }, { "type": "void (*)(git_odb_stream *)", "name": "free", - "comments": " Free the stream's memory.\n\n This method might be called without a call to `finalize_write` if\n an error occurs or if the object is already present in the ODB." + "comments": "" } ], "used": { @@ -36243,8 +36847,8 @@ "type": "struct", "value": "git_odb_writepack", "file": "git2/types.h", - "line": 96, - "lineto": 96, + "line": 94, + "lineto": 94, "block": "git_odb_backend * backend\nint (*)(git_odb_writepack *, const void *, size_t, git_transfer_progress *) append\nint (*)(git_odb_writepack *, git_transfer_progress *) commit\nvoid (*)(git_odb_writepack *) free", "tdef": "typedef", "description": " A stream to write a packfile to the ODB ", @@ -36499,119 +37103,6 @@ } } ], - [ - "git_otype", - { - "decl": [ - "GIT_OBJ_ANY", - "GIT_OBJ_BAD", - "GIT_OBJ__EXT1", - "GIT_OBJ_COMMIT", - "GIT_OBJ_TREE", - "GIT_OBJ_BLOB", - "GIT_OBJ_TAG", - "GIT_OBJ__EXT2", - "GIT_OBJ_OFS_DELTA", - "GIT_OBJ_REF_DELTA" - ], - "type": "enum", - "file": "git2/types.h", - "line": 70, - "lineto": 81, - "block": "GIT_OBJ_ANY\nGIT_OBJ_BAD\nGIT_OBJ__EXT1\nGIT_OBJ_COMMIT\nGIT_OBJ_TREE\nGIT_OBJ_BLOB\nGIT_OBJ_TAG\nGIT_OBJ__EXT2\nGIT_OBJ_OFS_DELTA\nGIT_OBJ_REF_DELTA", - "tdef": "typedef", - "description": " Basic type (loose or packed) of any Git object. ", - "comments": "", - "fields": [ - { - "type": "int", - "name": "GIT_OBJ_ANY", - "comments": "

Object can be any of the following

\n", - "value": -2 - }, - { - "type": "int", - "name": "GIT_OBJ_BAD", - "comments": "

Object is invalid.

\n", - "value": -1 - }, - { - "type": "int", - "name": "GIT_OBJ__EXT1", - "comments": "

Reserved for future use.

\n", - "value": 0 - }, - { - "type": "int", - "name": "GIT_OBJ_COMMIT", - "comments": "

A commit object.

\n", - "value": 1 - }, - { - "type": "int", - "name": "GIT_OBJ_TREE", - "comments": "

A tree (directory listing) object.

\n", - "value": 2 - }, - { - "type": "int", - "name": "GIT_OBJ_BLOB", - "comments": "

A file revision object.

\n", - "value": 3 - }, - { - "type": "int", - "name": "GIT_OBJ_TAG", - "comments": "

An annotated tag object.

\n", - "value": 4 - }, - { - "type": "int", - "name": "GIT_OBJ__EXT2", - "comments": "

Reserved for future use.

\n", - "value": 5 - }, - { - "type": "int", - "name": "GIT_OBJ_OFS_DELTA", - "comments": "

A delta, base is given by an offset.

\n", - "value": 6 - }, - { - "type": "int", - "name": "GIT_OBJ_REF_DELTA", - "comments": "

A delta, base is given by object id.

\n", - "value": 7 - } - ], - "used": { - "returns": [ - "git_object_string2type", - "git_object_type", - "git_odb_object_type", - "git_tag_target_type", - "git_tree_entry_type" - ], - "needs": [ - "git_object__size", - "git_object_lookup", - "git_object_lookup_bypath", - "git_object_lookup_prefix", - "git_object_peel", - "git_object_type2string", - "git_object_typeisloose", - "git_odb_hash", - "git_odb_hashfile", - "git_odb_open_rstream", - "git_odb_open_wstream", - "git_odb_read_header", - "git_odb_write", - "git_reference_peel", - "git_repository_hashfile" - ] - } - } - ], [ "git_packbuilder", { @@ -36619,8 +37110,8 @@ "type": "struct", "value": "git_packbuilder", "file": "git2/types.h", - "line": 159, - "lineto": 159, + "line": 160, + "lineto": 160, "tdef": "typedef", "description": " Representation of a git packbuilder ", "comments": "", @@ -37048,8 +37539,8 @@ "type": "struct", "value": "git_push", "file": "git2/types.h", - "line": 240, - "lineto": 240, + "line": 241, + "lineto": 241, "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": "", @@ -37078,8 +37569,8 @@ "type": "struct", "value": "git_push_options", "file": "git2/remote.h", - "line": 616, - "lineto": 643, + "line": 690, + "lineto": 717, "block": "unsigned int version\nunsigned int pb_parallelism\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", "tdef": "typedef", "description": " Controls the behavior of a git_push object.", @@ -37133,8 +37624,8 @@ "type": "struct", "value": "git_push_update", "file": "git2/remote.h", - "line": 359, - "lineto": 376, + "line": 433, + "lineto": 450, "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", @@ -37176,8 +37667,8 @@ "type": "struct", "value": "git_rebase", "file": "git2/types.h", - "line": 191, - "lineto": 191, + "line": 192, + "lineto": 192, "tdef": "typedef", "description": " Representation of a rebase ", "comments": "", @@ -37372,57 +37863,6 @@ } } ], - [ - "git_ref_t", - { - "decl": [ - "GIT_REF_INVALID", - "GIT_REF_OID", - "GIT_REF_SYMBOLIC", - "GIT_REF_LISTALL" - ], - "type": "enum", - "file": "git2/types.h", - "line": 194, - "lineto": 199, - "block": "GIT_REF_INVALID\nGIT_REF_OID\nGIT_REF_SYMBOLIC\nGIT_REF_LISTALL", - "tdef": "typedef", - "description": " Basic type of any Git reference. ", - "comments": "", - "fields": [ - { - "type": "int", - "name": "GIT_REF_INVALID", - "comments": "

Invalid reference

\n", - "value": 0 - }, - { - "type": "int", - "name": "GIT_REF_OID", - "comments": "

A reference which points at an object id

\n", - "value": 1 - }, - { - "type": "int", - "name": "GIT_REF_SYMBOLIC", - "comments": "

A reference which points at another reference

\n", - "value": 2 - }, - { - "type": "int", - "name": "GIT_REF_LISTALL", - "comments": "", - "value": 3 - } - ], - "used": { - "returns": [ - "git_reference_type" - ], - "needs": [] - } - } - ], [ "git_refdb", { @@ -37430,8 +37870,8 @@ "type": "struct", "value": "git_refdb", "file": "git2/types.h", - "line": 99, - "lineto": 99, + "line": 97, + "lineto": 97, "tdef": "typedef", "description": " An open refs database handle. ", "comments": "", @@ -37459,8 +37899,8 @@ "type": "struct", "value": "git_refdb_backend", "file": "git2/types.h", - "line": 102, - "lineto": 102, + "line": 100, + "lineto": 100, "block": "unsigned int version\nint (*)(int *, git_refdb_backend *, const char *) exists\nint (*)(git_reference **, git_refdb_backend *, const char *) lookup\nint (*)(git_reference_iterator **, struct git_refdb_backend *, const char *) iterator\nint (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *) write\nint (*)(git_reference **, git_refdb_backend *, const char *, const char *, int, const git_signature *, const char *) rename\nint (*)(git_refdb_backend *, const char *, const git_oid *, const char *) del\nint (*)(git_refdb_backend *) compress\nint (*)(git_refdb_backend *, const char *) has_log\nint (*)(git_refdb_backend *, const char *) ensure_log\nvoid (*)(git_refdb_backend *) free\nint (*)(git_reflog **, git_refdb_backend *, const char *) reflog_read\nint (*)(git_refdb_backend *, git_reflog *) reflog_write\nint (*)(git_refdb_backend *, const char *, const char *) reflog_rename\nint (*)(git_refdb_backend *, const char *) reflog_delete\nint (*)(void **, git_refdb_backend *, const char *) lock\nint (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *) unlock", "tdef": "typedef", "description": " A custom backend for refs ", @@ -37474,17 +37914,17 @@ { "type": "int (*)(int *, git_refdb_backend *, const char *)", "name": "exists", - "comments": " Queries the refdb backend to determine if the given ref_name\n exists. A refdb implementation must provide this function." + "comments": "" }, { "type": "int (*)(git_reference **, git_refdb_backend *, const char *)", "name": "lookup", - "comments": " Queries the refdb backend for a given reference. A refdb\n implementation must provide this function." + "comments": "" }, { "type": "int (*)(git_reference_iterator **, struct git_refdb_backend *, const char *)", "name": "iterator", - "comments": " Allocate an iterator object for the backend.\n\n A refdb implementation must provide this function." + "comments": "" }, { "type": "int (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *)", @@ -37499,57 +37939,57 @@ { "type": "int (*)(git_refdb_backend *, const char *, const git_oid *, const char *)", "name": "del", - "comments": " Deletes the given reference (and if necessary its reflog)\n from the refdb. A refdb implementation must provide this\n function." + "comments": "" }, { "type": "int (*)(git_refdb_backend *)", "name": "compress", - "comments": " Suggests that the given refdb compress or optimize its references.\n This mechanism is implementation specific. (For on-disk reference\n databases, this may pack all loose references.) A refdb\n implementation may provide this function; if it is not provided,\n nothing will be done." + "comments": "" }, { "type": "int (*)(git_refdb_backend *, const char *)", "name": "has_log", - "comments": " Query whether a particular reference has a log (may be empty)" + "comments": "" }, { "type": "int (*)(git_refdb_backend *, const char *)", "name": "ensure_log", - "comments": " Make sure a particular reference will have a reflog which\n will be appended to on writes." + "comments": "" }, { "type": "void (*)(git_refdb_backend *)", "name": "free", - "comments": " Frees any resources held by the refdb (including the `git_refdb_backend`\n itself). A refdb backend implementation must provide this function." + "comments": "" }, { "type": "int (*)(git_reflog **, git_refdb_backend *, const char *)", "name": "reflog_read", - "comments": " Read the reflog for the given reference name." + "comments": "" }, { "type": "int (*)(git_refdb_backend *, git_reflog *)", "name": "reflog_write", - "comments": " Write a reflog to disk." + "comments": "" }, { "type": "int (*)(git_refdb_backend *, const char *, const char *)", "name": "reflog_rename", - "comments": " Rename a reflog" + "comments": "" }, { "type": "int (*)(git_refdb_backend *, const char *)", "name": "reflog_delete", - "comments": " Remove a reflog." + "comments": "" }, { "type": "int (*)(void **, git_refdb_backend *, const char *)", "name": "lock", - "comments": " Lock a reference. The opaque parameter will be passed to the unlock function" + "comments": "" }, { "type": "int (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *)", "name": "unlock", - "comments": " Unlock a reference. Only one of target or symbolic_target\n will be set. success indicates whether to update the\n reference or discard the lock (if it's false)" + "comments": "" } ], "used": { @@ -37569,8 +38009,8 @@ "type": "struct", "value": "git_reference", "file": "git2/types.h", - "line": 176, - "lineto": 176, + "line": 177, + "lineto": 177, "tdef": "typedef", "description": " In-memory representation of a reference. ", "comments": "", @@ -37578,7 +38018,8 @@ "used": { "returns": [ "git_reference__alloc", - "git_reference__alloc_symbolic" + "git_reference__alloc_symbolic", + "git_reference_type" ], "needs": [ "git_annotated_commit_from_ref", @@ -37593,6 +38034,7 @@ "git_branch_next", "git_branch_set_upstream", "git_branch_upstream", + "git_merge_analysis_for_ref", "git_reference_cmp", "git_reference_create", "git_reference_create_matching", @@ -37635,6 +38077,55 @@ } } ], + [ + "git_reference_format_t", + { + "decl": [ + "GIT_REFERENCE_FORMAT_NORMAL", + "GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL", + "GIT_REFERENCE_FORMAT_REFSPEC_PATTERN", + "GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND" + ], + "type": "enum", + "file": "git2/refs.h", + "line": 639, + "lineto": 668, + "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", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_REFERENCE_FORMAT_NORMAL", + "comments": "

No particular normalization.

\n", + "value": 0 + }, + { + "type": "int", + "name": "GIT_REFERENCE_FORMAT_ALLOW_ONELEVEL", + "comments": "

Control whether one-level refnames are accepted\n (i.e., refnames that do not contain multiple /-separated\n components). Those are expected to be written only using\n uppercase letters and underscore (FETCH_HEAD, ...)

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_REFERENCE_FORMAT_REFSPEC_PATTERN", + "comments": "

Interpret the provided name as a reference pattern for a\n refspec (as used with remote repositories). If this option\n is enabled, the name is allowed to contain a single * (\n<star

\n\n
\n

)\n in place of a one full pathname component\n (e.g., foo/\n<star\n/bar but not foo/bar\n<star\n).

\n
\n", + "value": 2 + }, + { + "type": "int", + "name": "GIT_REFERENCE_FORMAT_REFSPEC_SHORTHAND", + "comments": "

Interpret the name as part of a refspec in shorthand form\n so the ONELEVEL naming rules aren't enforced and 'master'\n becomes a valid name.

\n", + "value": 4 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], [ "git_reference_iterator", { @@ -37642,8 +38133,8 @@ "type": "struct", "value": "git_reference_iterator", "file": "git2/types.h", - "line": 179, - "lineto": 179, + "line": 180, + "lineto": 180, "block": "git_refdb * db\nint (*)(git_reference **, git_reference_iterator *) next\nint (*)(const char **, git_reference_iterator *) next_name\nvoid (*)(git_reference_iterator *) free", "tdef": "typedef", "description": " Iterator for references ", @@ -37657,17 +38148,17 @@ { "type": "int (*)(git_reference **, git_reference_iterator *)", "name": "next", - "comments": " Return the current reference and advance the iterator." + "comments": "" }, { "type": "int (*)(const char **, git_reference_iterator *)", "name": "next_name", - "comments": " Return the name of the current reference and advance the iterator" + "comments": "" }, { "type": "void (*)(git_reference_iterator *)", "name": "free", - "comments": " Free the iterator" + "comments": "" } ], "used": { @@ -37683,50 +38174,52 @@ } ], [ - "git_reference_normalize_t", + "git_reference_t", { "decl": [ - "GIT_REF_FORMAT_NORMAL", - "GIT_REF_FORMAT_ALLOW_ONELEVEL", - "GIT_REF_FORMAT_REFSPEC_PATTERN", - "GIT_REF_FORMAT_REFSPEC_SHORTHAND" + "GIT_REFERENCE_INVALID", + "GIT_REFERENCE_DIRECT", + "GIT_REFERENCE_SYMBOLIC", + "GIT_REFERENCE_ALL" ], "type": "enum", - "file": "git2/refs.h", - "line": 639, - "lineto": 668, - "block": "GIT_REF_FORMAT_NORMAL\nGIT_REF_FORMAT_ALLOW_ONELEVEL\nGIT_REF_FORMAT_REFSPEC_PATTERN\nGIT_REF_FORMAT_REFSPEC_SHORTHAND", + "file": "git2/types.h", + "line": 195, + "lineto": 200, + "block": "GIT_REFERENCE_INVALID\nGIT_REFERENCE_DIRECT\nGIT_REFERENCE_SYMBOLIC\nGIT_REFERENCE_ALL", "tdef": "typedef", - "description": " Normalization options for reference lookup", + "description": " Basic type of any Git reference. ", "comments": "", "fields": [ { "type": "int", - "name": "GIT_REF_FORMAT_NORMAL", - "comments": "

No particular normalization.

\n", + "name": "GIT_REFERENCE_INVALID", + "comments": "

Invalid reference

\n", "value": 0 }, { "type": "int", - "name": "GIT_REF_FORMAT_ALLOW_ONELEVEL", - "comments": "

Control whether one-level refnames are accepted\n (i.e., refnames that do not contain multiple /-separated\n components). Those are expected to be written only using\n uppercase letters and underscore (FETCH_HEAD, ...)

\n", + "name": "GIT_REFERENCE_DIRECT", + "comments": "

A reference that points at an object id

\n", "value": 1 }, { "type": "int", - "name": "GIT_REF_FORMAT_REFSPEC_PATTERN", - "comments": "

Interpret the provided name as a reference pattern for a\n refspec (as used with remote repositories). If this option\n is enabled, the name is allowed to contain a single * (\n<star

\n\n
\n

)\n in place of a one full pathname component\n (e.g., foo/\n<star\n/bar but not foo/bar\n<star\n).

\n
\n", + "name": "GIT_REFERENCE_SYMBOLIC", + "comments": "

A reference that points at another reference

\n", "value": 2 }, { "type": "int", - "name": "GIT_REF_FORMAT_REFSPEC_SHORTHAND", - "comments": "

Interpret the name as part of a refspec in shorthand form\n so the ONELEVEL naming rules aren't enforced and 'master'\n becomes a valid name.

\n", - "value": 4 + "name": "GIT_REFERENCE_ALL", + "comments": "", + "value": 3 } ], "used": { - "returns": [], + "returns": [ + "git_reference_type" + ], "needs": [] } } @@ -37738,8 +38231,8 @@ "type": "struct", "value": "git_reflog", "file": "git2/types.h", - "line": 153, - "lineto": 153, + "line": 154, + "lineto": 154, "tdef": "typedef", "description": " Representation of a reference log ", "comments": "", @@ -37774,8 +38267,8 @@ "type": "struct", "value": "git_reflog_entry", "file": "git2/types.h", - "line": 150, - "lineto": 150, + "line": 151, + "lineto": 151, "tdef": "typedef", "description": " Representation of a reference log entry ", "comments": "", @@ -37802,8 +38295,8 @@ "type": "struct", "value": "git_refspec", "file": "git2/types.h", - "line": 222, - "lineto": 222, + "line": 223, + "lineto": 223, "tdef": "typedef", "description": " A refspec specifies the mapping between remote and local reference\n names when fetch or pushing.", "comments": "", @@ -37835,8 +38328,8 @@ "type": "struct", "value": "git_remote", "file": "git2/types.h", - "line": 228, - "lineto": 228, + "line": 229, + "lineto": 229, "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).", "comments": "", @@ -37854,7 +38347,9 @@ "git_remote_create_anonymous", "git_remote_create_cb", "git_remote_create_detached", + "git_remote_create_init_options", "git_remote_create_with_fetchspec", + "git_remote_create_with_opts", "git_remote_default_branch", "git_remote_disconnect", "git_remote_download", @@ -37901,8 +38396,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 527, - "lineto": 545, + "line": 601, + "lineto": 619, "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", @@ -37951,8 +38446,8 @@ "type": "struct", "value": "git_remote_callbacks", "file": "git2/types.h", - "line": 244, - "lineto": 244, + "line": 245, + "lineto": 245, "block": "unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_type, void *) completion\ngit_cred_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\ngit_transfer_progress_cb transfer_progress\nint (*)(const char *, const git_oid *, const git_oid *, void *) update_tips\ngit_packbuilder_progress pack_progress\ngit_push_transfer_progress push_transfer_progress\ngit_push_update_reference_cb push_update_reference\ngit_push_negotiation push_negotiation\ngit_transport_cb transport\nvoid * payload", "tdef": "typedef", "description": "", @@ -37971,7 +38466,7 @@ { "type": "int (*)(git_remote_completion_type, void *)", "name": "completion", - "comments": " Completion is called when different parts of the download\n process are done (currently unused)." + "comments": "" }, { "type": "git_cred_acquire_cb", @@ -37991,7 +38486,7 @@ { "type": "int (*)(const char *, const git_oid *, const git_oid *, void *)", "name": "update_tips", - "comments": " Each time a reference is updated locally, this function\n will be called with information about it." + "comments": "" }, { "type": "git_packbuilder_progress", @@ -38045,8 +38540,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 344, - "lineto": 348, + "line": 418, + "lineto": 422, "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.", @@ -38077,6 +38572,96 @@ } } ], + [ + "git_remote_create_flags", + { + "decl": [ + "GIT_REMOTE_CREATE_SKIP_INSTEADOF", + "GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC" + ], + "type": "enum", + "file": "git2/remote.h", + "line": 47, + "lineto": 53, + "block": "GIT_REMOTE_CREATE_SKIP_INSTEADOF\nGIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC", + "tdef": "typedef", + "description": " Remote creation options flags", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_REMOTE_CREATE_SKIP_INSTEADOF", + "comments": "

Ignore the repository apply.insteadOf configuration

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_REMOTE_CREATE_SKIP_DEFAULT_FETCHSPEC", + "comments": "

Don't build a fetchspec from the name if none is set

\n", + "value": 2 + } + ], + "used": { + "returns": [], + "needs": [] + } + } + ], + [ + "git_remote_create_options", + { + "decl": [ + "unsigned int version", + "git_repository * repository", + "const char * name", + "const char * fetchspec", + "unsigned int flags" + ], + "type": "struct", + "value": "git_remote_create_options", + "file": "git2/remote.h", + "line": 62, + "lineto": 82, + "block": "unsigned int version\ngit_repository * repository\nconst char * name\nconst char * fetchspec\nunsigned int flags", + "tdef": "typedef", + "description": " Remote creation options structure", + "comments": "

Initialize with GIT_REMOTE_CREATE_OPTIONS_INIT. Alternatively, you can\n use git_remote_create_init_options.

\n", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "comments": "" + }, + { + "type": "git_repository *", + "name": "repository", + "comments": " The repository that should own the remote.\n Setting this to NULL results in a detached remote." + }, + { + "type": "const char *", + "name": "name", + "comments": " The remote's name.\n Setting this to NULL results in an in-memory/anonymous remote." + }, + { + "type": "const char *", + "name": "fetchspec", + "comments": " The fetchspec the remote should use. " + }, + { + "type": "unsigned int", + "name": "flags", + "comments": " Additional flags for the remote. See git_remote_create_flags. " + } + ], + "used": { + "returns": [], + "needs": [ + "git_remote_create_init_options", + "git_remote_create_with_opts" + ] + } + } + ], [ "git_remote_head", { @@ -38084,8 +38669,8 @@ "type": "struct", "value": "git_remote_head", "file": "git2/types.h", - "line": 243, - "lineto": 243, + "line": 244, + "lineto": 244, "block": "int local\ngit_oid oid\ngit_oid loid\nchar * name\nchar * symref_target", "tdef": "typedef", "description": "", @@ -38133,8 +38718,8 @@ "type": "struct", "value": "git_repository", "file": "git2/types.h", - "line": 108, - "lineto": 108, + "line": 106, + "lineto": 106, "tdef": "typedef", "description": " Representation of an existing git repository,\n including all its object contents", "comments": "", @@ -38159,6 +38744,8 @@ "git_annotated_commit_from_ref", "git_annotated_commit_from_revspec", "git_annotated_commit_lookup", + "git_apply", + "git_apply_to_tree", "git_attr_add_macro", "git_attr_cache_flush", "git_attr_foreach", @@ -38217,6 +38804,7 @@ "git_mempack_dump", "git_merge", "git_merge_analysis", + "git_merge_analysis_for_ref", "git_merge_base", "git_merge_base_many", "git_merge_base_octopus", @@ -38399,8 +38987,8 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 232, - "lineto": 240, + "line": 245, + "lineto": 253, "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`.", @@ -38465,8 +39053,8 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 255, - "lineto": 259, + "line": 268, + "lineto": 272, "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`.", @@ -38502,8 +39090,8 @@ { "decl": [ "unsigned int version", - "uint32_t flags", - "uint32_t mode", + "int flags", + "int mode", "const char * workdir_path", "const char * description", "const char * template_path", @@ -38513,12 +39101,12 @@ "type": "struct", "value": "git_repository_init_options", "file": "git2/repository.h", - "line": 289, - "lineto": 298, - "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", + "line": 302, + "lineto": 311, + "block": "unsigned int version\nint flags\nint mode\nconst char * workdir_path\nconst char * description\nconst char * template_path\nconst char * initial_head\nconst char * origin_url", "tdef": "typedef", - "description": " Extended options structure for `git_repository_init_ext`.", - "comments": "

This contains extra options for git_repository_init_ext that enable\n additional initialization features. The fields are:

\n\n
    \n
  • flags - Combination of GIT_REPOSITORY_INIT flags above.
  • \n
  • mode - Set to one of the standard GIT_REPOSITORY_INIT_SHARED_...\n constants above, or to a custom value that you would like.
  • \n
  • workdir_path - The path to the working dir or NULL for default (i.e.\n repo_path parent on non-bare repos). IF THIS IS RELATIVE PATH,\n IT WILL BE EVALUATED RELATIVE TO THE REPO_PATH. If this is not\n the "natural" working directory, a .git gitlink file will be\n created here linking to the repo_path.
  • \n
  • description - If set, this will be used to initialize the "description"\n file in the repository, instead of using the template content.
  • \n
  • template_path - When GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE is set,\n this contains the path to use for the template directory. If\n this is NULL, the config or default directory options will be\n used instead.
  • \n
  • initial_head - The name of the head to point HEAD at. If NULL, then\n this will be treated as "master" and the HEAD ref will be set\n to "refs/heads/master". If this begins with "refs/" it will be\n used verbatim; otherwise "refs/heads/" will be prefixed.
  • \n
  • origin_url - If this is non-NULL, then after the rest of the\n repository initialization is completed, an "origin" remote\n will be added pointing to this URL.
  • \n
\n", + "description": "", + "comments": "", "fields": [ { "type": "unsigned int", @@ -38526,12 +39114,12 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "flags", "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "mode", "comments": "" }, @@ -38591,8 +39179,8 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 414, - "lineto": 429, + "line": 427, + "lineto": 442, "block": "GIT_REPOSITORY_ITEM_GITDIR\nGIT_REPOSITORY_ITEM_WORKDIR\nGIT_REPOSITORY_ITEM_COMMONDIR\nGIT_REPOSITORY_ITEM_INDEX\nGIT_REPOSITORY_ITEM_OBJECTS\nGIT_REPOSITORY_ITEM_REFS\nGIT_REPOSITORY_ITEM_PACKED_REFS\nGIT_REPOSITORY_ITEM_REMOTES\nGIT_REPOSITORY_ITEM_CONFIG\nGIT_REPOSITORY_ITEM_INFO\nGIT_REPOSITORY_ITEM_HOOKS\nGIT_REPOSITORY_ITEM_LOGS\nGIT_REPOSITORY_ITEM_MODULES\nGIT_REPOSITORY_ITEM_WORKTREES", "tdef": "typedef", "description": " List of items which belong to the git repository layout", @@ -38703,41 +39291,41 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 126, - "lineto": 132, + "line": 98, + "lineto": 145, "block": "GIT_REPOSITORY_OPEN_NO_SEARCH\nGIT_REPOSITORY_OPEN_CROSS_FS\nGIT_REPOSITORY_OPEN_BARE\nGIT_REPOSITORY_OPEN_NO_DOTGIT\nGIT_REPOSITORY_OPEN_FROM_ENV", "tdef": "typedef", "description": " Option flags for `git_repository_open_ext`.", - "comments": "
    \n
  • GIT_REPOSITORY_OPEN_NO_SEARCH - Only open the repository if it can be\nimmediately found in the start_path. Do not walk up from the\nstart_path looking at parent directories.
  • \n
  • GIT_REPOSITORY_OPEN_CROSS_FS - Unless this flag is set, open will not\ncontinue searching across filesystem boundaries (i.e. when st_dev\nchanges from the stat system call). (E.g. Searching in a user's home\ndirectory "/home/user/source/" will not return "/.git/" as the found\nrepo if "/" is a different filesystem than "/home".)
  • \n
  • GIT_REPOSITORY_OPEN_BARE - Open repository as a bare repo regardless\nof core.bare config, and defer loading config file for faster setup.\nUnlike git_repository_open_bare, this can follow gitlinks.
  • \n
  • GIT_REPOSITORY_OPEN_NO_DOTGIT - Do not check for a repository by\nappending /.git to the start_path; only open the repository if\nstart_path itself points to the git directory.
  • \n
  • GIT_REPOSITORY_OPEN_FROM_ENV - Find and open a git repository,\nrespecting the environment variables used by the git command-line\ntools. If set, git_repository_open_ext will ignore the other\nflags and the ceiling_dirs argument, and will allow a NULL path\nto use GIT_DIR or search from the current directory. The search\nfor a repository will respect $GIT_CEILING_DIRECTORIES and\n$GIT_DISCOVERY_ACROSS_FILESYSTEM. The opened repository will\nrespect $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and\n$GIT_ALTERNATE_OBJECT_DIRECTORIES. In the future, this flag will\nalso cause git_repository_open_ext to respect $GIT_WORK_TREE and\n$GIT_COMMON_DIR; currently, git_repository_open_ext with this\nflag will error out if either $GIT_WORK_TREE or $GIT_COMMON_DIR is\nset.
  • \n
\n", + "comments": "", "fields": [ { "type": "int", "name": "GIT_REPOSITORY_OPEN_NO_SEARCH", - "comments": "", + "comments": "

Only open the repository if it can be immediately found in the\n start_path. Do not walk up from the start_path looking at parent\n directories.

\n", "value": 1 }, { "type": "int", "name": "GIT_REPOSITORY_OPEN_CROSS_FS", - "comments": "", + "comments": "

Unless this flag is set, open will not continue searching across\n filesystem boundaries (i.e. when st_dev changes from the stat\n system call). For example, searching in a user's home directory at\n "/home/user/source/" will not return "/.git/" as the found repo if\n "/" is a different filesystem than "/home".

\n", "value": 2 }, { "type": "int", "name": "GIT_REPOSITORY_OPEN_BARE", - "comments": "", + "comments": "

Open repository as a bare repo regardless of core.bare config, and\n defer loading config file for faster setup.\n Unlike git_repository_open_bare, this can follow gitlinks.

\n", "value": 4 }, { "type": "int", "name": "GIT_REPOSITORY_OPEN_NO_DOTGIT", - "comments": "", + "comments": "

Do not check for a repository by appending /.git to the start_path;\n only open the repository if start_path itself points to the git\n directory.

\n", "value": 8 }, { "type": "int", "name": "GIT_REPOSITORY_OPEN_FROM_ENV", - "comments": "", + "comments": "

Find and open a git repository, respecting the environment variables\n used by the git command-line tools.\n If set, git_repository_open_ext will ignore the other flags and\n the ceiling_dirs argument, and will allow a NULL path to use\n GIT_DIR or search from the current directory.\n The search for a repository will respect $GIT_CEILING_DIRECTORIES and\n $GIT_DISCOVERY_ACROSS_FILESYSTEM. The opened repository will\n respect $GIT_INDEX_FILE, $GIT_NAMESPACE, $GIT_OBJECT_DIRECTORY, and\n $GIT_ALTERNATE_OBJECT_DIRECTORIES.\n In the future, this flag will also cause git_repository_open_ext\n to respect $GIT_WORK_TREE and $GIT_COMMON_DIR; currently,\n git_repository_open_ext with this flag will error out if either\n $GIT_WORK_TREE or $GIT_COMMON_DIR is set.

\n", "value": 16 } ], @@ -38766,8 +39354,8 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 786, - "lineto": 799, + "line": 799, + "lineto": 812, "block": "GIT_REPOSITORY_STATE_NONE\nGIT_REPOSITORY_STATE_MERGE\nGIT_REPOSITORY_STATE_REVERT\nGIT_REPOSITORY_STATE_REVERT_SEQUENCE\nGIT_REPOSITORY_STATE_CHERRYPICK\nGIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE\nGIT_REPOSITORY_STATE_BISECT\nGIT_REPOSITORY_STATE_REBASE\nGIT_REPOSITORY_STATE_REBASE_INTERACTIVE\nGIT_REPOSITORY_STATE_REBASE_MERGE\nGIT_REPOSITORY_STATE_APPLY_MAILBOX\nGIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE", "tdef": "typedef", "description": " Repository state", @@ -39037,8 +39625,8 @@ "type": "struct", "value": "git_revwalk", "file": "git2/types.h", - "line": 117, - "lineto": 117, + "line": 115, + "lineto": 115, "tdef": "typedef", "description": " Representation of an in-progress walk through the commits in a repo ", "comments": "", @@ -39079,8 +39667,8 @@ "type": "struct", "value": "git_signature", "file": "git2/types.h", - "line": 169, - "lineto": 173, + "line": 170, + "lineto": 174, "block": "char * name\nchar * email\ngit_time when", "tdef": "typedef", "description": " An action signature (e.g. for committers, taggers, etc) ", @@ -39154,11 +39742,11 @@ ], "type": "enum", "file": "git2/sys/transport.h", - "line": 273, - "lineto": 278, + "line": 287, + "lineto": 292, "block": "GIT_SERVICE_UPLOADPACK_LS\nGIT_SERVICE_UPLOADPACK\nGIT_SERVICE_RECEIVEPACK_LS\nGIT_SERVICE_RECEIVEPACK", "tdef": "typedef", - "description": "", + "description": " Actions that the smart transport can ask a subtransport to perform ", "comments": "", "fields": [ { @@ -39199,10 +39787,10 @@ "type": "struct", "value": "git_smart_subtransport", "file": "git2/sys/transport.h", - "line": 280, - "lineto": 280, + "line": 294, + "lineto": 294, "tdef": "typedef", - "description": "", + "description": " An implementation of a subtransport which carries data for the\n smart transport", "comments": "", "fields": [ { @@ -39243,12 +39831,12 @@ "type": "struct", "value": "git_smart_subtransport_definition", "file": "git2/sys/transport.h", - "line": 336, - "lineto": 349, + "line": 383, + "lineto": 395, "block": "git_smart_subtransport_cb callback\nunsigned int rpc\nvoid * param", "tdef": "typedef", "description": " Definition for a \"subtransport\"", - "comments": "

This is used to let the smart protocol code know about the protocol\n which you are implementing.

\n", + "comments": "

The smart transport knows how to speak the git protocol, but it has no\n knowledge of how to establish a connection between it and another endpoint,\n or how to move data back and forth. For this, a subtransport interface is\n declared, and the smart transport delegates this work to the subtransports.

\n\n

Three subtransports are provided by libgit2: ssh, git, http(s).

\n\n

Subtransports can either be RPC = 0 (persistent connection) or RPC = 1\n (request/response). The smart transport handles the differences in its own\n logic. The git subtransport is RPC = 0, while http is RPC = 1.

\n", "fields": [ { "type": "git_smart_subtransport_cb", @@ -39263,7 +39851,7 @@ { "type": "void *", "name": "param", - "comments": " Param of the callback" + "comments": " User-specified parameter passed to the callback " } ], "used": { @@ -39279,16 +39867,16 @@ "type": "struct", "value": "git_smart_subtransport_stream", "file": "git2/sys/transport.h", - "line": 281, - "lineto": 281, + "line": 295, + "lineto": 295, "tdef": "typedef", - "description": "", - "comments": "", + "description": " A stream used by the smart transport to read and write data\n from a subtransport.", + "comments": "

This provides a customization point in case you need to\n support some other communication method.

\n", "fields": [ { "type": "git_smart_subtransport *", "name": "subtransport", - "comments": "" + "comments": " The owning subtransport " }, { "type": "int (*)(git_smart_subtransport_stream *, char *, size_t, size_t *)", @@ -39629,8 +40217,8 @@ "type": "struct", "value": "git_status_list", "file": "git2/types.h", - "line": 188, - "lineto": 188, + "line": 189, + "lineto": 189, "tdef": "typedef", "description": " Representation of a status collection ", "comments": "", @@ -40062,8 +40650,7 @@ "int (*)(struct git_stream *) connect", "int (*)(git_cert **, struct git_stream *) certificate", "int (*)(struct git_stream *, const git_proxy_options *) set_proxy", - "ssize_t (*)(struct git_stream *, void *, size_t) read", - "ssize_t (*)(struct git_stream *, const char *, size_t, int) write", + "int ((int *))(struct git_stream *, void *, size_t) ssize_t", "int (*)(struct git_stream *) close", "void (*)(struct git_stream *) free" ], @@ -40072,10 +40659,10 @@ "file": "git2/sys/stream.h", "line": 29, "lineto": 41, - "block": "int version\nint encrypted\nint proxy_support\nint (*)(struct git_stream *) connect\nint (*)(git_cert **, struct git_stream *) certificate\nint (*)(struct git_stream *, const git_proxy_options *) set_proxy\nssize_t (*)(struct git_stream *, void *, size_t) read\nssize_t (*)(struct git_stream *, const char *, size_t, int) write\nint (*)(struct git_stream *) close\nvoid (*)(struct git_stream *) free", + "block": "int version\nint encrypted\nint proxy_support\nint (*)(struct git_stream *) connect\nint (*)(git_cert **, struct git_stream *) certificate\nint (*)(struct git_stream *, const git_proxy_options *) set_proxy\nint ((int *))(struct git_stream *, void *, size_t) ssize_t\nint (*)(struct git_stream *) close\nvoid (*)(struct git_stream *) free", "tdef": "typedef", - "description": " Every stream must have this struct as its first element, so the\n API can talk to it. You'd define your stream as", - "comments": "
 struct my_stream {\n         git_stream parent;\n         ...\n }\n
\n\n

and fill the functions

\n", + "description": "", + "comments": "", "fields": [ { "type": "int", @@ -40108,13 +40695,8 @@ "comments": "" }, { - "type": "ssize_t (*)(struct git_stream *, void *, size_t)", - "name": "read", - "comments": "" - }, - { - "type": "ssize_t (*)(struct git_stream *, const char *, size_t, int)", - "name": "write", + "type": "int ((int *))(struct git_stream *, void *, size_t)", + "name": "ssize_t", "comments": "" }, { @@ -40132,11 +40714,91 @@ "returns": [], "needs": [ "git_stream_cb", + "git_stream_register", "git_stream_register_tls" ] } } ], + [ + "git_stream_registration", + { + "decl": [ + "int version", + "int (*)(git_stream **, const char *, const char *) init", + "int (*)(git_stream **, git_stream *, const char *) wrap" + ], + "type": "struct", + "value": "git_stream_registration", + "file": "git2/sys/stream.h", + "line": 43, + "lineto": 72, + "block": "int version\nint (*)(git_stream **, const char *, const char *) init\nint (*)(git_stream **, git_stream *, const char *) wrap", + "tdef": "typedef", + "description": "", + "comments": "", + "fields": [ + { + "type": "int", + "name": "version", + "comments": " The `version` field should be set to `GIT_STREAM_VERSION`. " + }, + { + "type": "int (*)(git_stream **, const char *, const char *)", + "name": "init", + "comments": "" + }, + { + "type": "int (*)(git_stream **, git_stream *, const char *)", + "name": "wrap", + "comments": "" + } + ], + "used": { + "returns": [], + "needs": [ + "git_stream_register" + ] + } + } + ], + [ + "git_stream_t", + { + "decl": [ + "GIT_STREAM_STANDARD", + "GIT_STREAM_TLS" + ], + "type": "enum", + "file": "git2/sys/stream.h", + "line": 77, + "lineto": 83, + "block": "GIT_STREAM_STANDARD\nGIT_STREAM_TLS", + "tdef": "typedef", + "description": " The type of stream to register.", + "comments": "", + "fields": [ + { + "type": "int", + "name": "GIT_STREAM_STANDARD", + "comments": "

A standard (non-TLS) socket.

\n", + "value": 1 + }, + { + "type": "int", + "name": "GIT_STREAM_TLS", + "comments": "

A TLS-encrypted socket.

\n", + "value": 2 + } + ], + "used": { + "returns": [], + "needs": [ + "git_stream_register" + ] + } + } + ], [ "git_submodule", { @@ -40144,8 +40806,8 @@ "type": "struct", "value": "git_submodule", "file": "git2/types.h", - "line": 339, - "lineto": 339, + "line": 343, + "lineto": 343, "tdef": "typedef", "description": " Opaque structure representing a submodule.", "comments": "", @@ -40203,8 +40865,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 403, - "lineto": 410, + "line": 407, + "lineto": 414, "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", @@ -40262,8 +40924,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 422, - "lineto": 426, + "line": 426, + "lineto": 430, "block": "GIT_SUBMODULE_RECURSE_NO\nGIT_SUBMODULE_RECURSE_YES\nGIT_SUBMODULE_RECURSE_ONDEMAND", "tdef": "typedef", "description": " Options for submodule recurse.", @@ -40444,7 +41106,7 @@ { "type": "git_checkout_options", "name": "checkout_opts", - "comments": " These options are passed to the checkout step. To disable\n checkout, set the `checkout_strategy` to\n `GIT_CHECKOUT_NONE`. Generally you will want the use\n GIT_CHECKOUT_SAFE to update files in the working\n directory. " + "comments": " These options are passed to the checkout step. To disable\n checkout, set the `checkout_strategy` to\n `GIT_CHECKOUT_NONE`. Generally you will want the use\n GIT_CHECKOUT_SAFE to update files in the working\n directory." }, { "type": "git_fetch_options", @@ -40478,8 +41140,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 367, - "lineto": 374, + "line": 371, + "lineto": 378, "block": "GIT_SUBMODULE_UPDATE_CHECKOUT\nGIT_SUBMODULE_UPDATE_REBASE\nGIT_SUBMODULE_UPDATE_MERGE\nGIT_SUBMODULE_UPDATE_NONE\nGIT_SUBMODULE_UPDATE_DEFAULT", "tdef": "typedef", "description": " Submodule update values", @@ -40533,8 +41195,8 @@ "type": "struct", "value": "git_tag", "file": "git2/types.h", - "line": 120, - "lineto": 120, + "line": 118, + "lineto": 118, "tdef": "typedef", "description": " Parsed representation of a tag object. ", "comments": "", @@ -40571,8 +41233,8 @@ "type": "struct", "value": "git_time", "file": "git2/types.h", - "line": 162, - "lineto": 166, + "line": 163, + "lineto": 167, "block": "git_time_t time\nint offset\nchar sign", "tdef": "typedef", "description": " Time in a signature ", @@ -40684,8 +41346,8 @@ "type": "struct", "value": "git_transaction", "file": "git2/types.h", - "line": 182, - "lineto": 182, + "line": 183, + "lineto": 183, "tdef": "typedef", "description": " Transactional interface to references ", "comments": "", @@ -40721,8 +41383,8 @@ "type": "struct", "value": "git_transfer_progress", "file": "git2/types.h", - "line": 257, - "lineto": 265, + "line": 258, + "lineto": 266, "block": "unsigned int total_objects\nunsigned int indexed_objects\nunsigned int received_objects\nunsigned int local_objects\nunsigned int total_deltas\nunsigned int indexed_deltas\nsize_t received_bytes", "tdef": "typedef", "description": " This is passed as the first argument to the callback to allow the\n user to see the progress.", @@ -40785,8 +41447,8 @@ "type": "struct", "value": "git_transport", "file": "git2/types.h", - "line": 234, - "lineto": 234, + "line": 235, + "lineto": 235, "block": "unsigned int version\nint (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *) set_callbacks\nint (*)(git_transport *, const git_strarray *) set_custom_headers\nint (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int) connect\nint (*)(const git_remote_head ***, size_t *, git_transport *) ls\nint (*)(git_transport *, git_push *, const git_remote_callbacks *) push\nint (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t) negotiate_fetch\nint (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *) download_pack\nint (*)(git_transport *) is_connected\nint (*)(git_transport *, int *) read_flags\nvoid (*)(git_transport *) cancel\nint (*)(git_transport *) close\nvoid (*)(git_transport *) free", "tdef": "typedef", "description": " Interface which represents a transport to communicate with a\n remote.", @@ -40795,7 +41457,7 @@ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The struct version " }, { "type": "int (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *)", @@ -40915,8 +41577,8 @@ "type": "struct", "value": "git_tree", "file": "git2/types.h", - "line": 132, - "lineto": 132, + "line": 130, + "lineto": 130, "tdef": "typedef", "description": " Representation of a tree object. ", "comments": "", @@ -40929,6 +41591,7 @@ "git_treebuilder_get" ], "needs": [ + "git_apply_to_tree", "git_commit_amend", "git_commit_create", "git_commit_create_buffer", @@ -40986,8 +41649,8 @@ "type": "struct", "value": "git_tree_entry", "file": "git2/types.h", - "line": 129, - "lineto": 129, + "line": 127, + "lineto": 127, "tdef": "typedef", "description": " Representation of each one of the entries in a tree object. ", "comments": "", @@ -41107,8 +41770,8 @@ "type": "struct", "value": "git_treebuilder", "file": "git2/types.h", - "line": 135, - "lineto": 135, + "line": 133, + "lineto": 133, "tdef": "typedef", "description": " Constructor for in-memory trees ", "comments": "", @@ -41174,8 +41837,8 @@ "type": "struct", "value": "git_worktree", "file": "git2/types.h", - "line": 111, - "lineto": 111, + "line": 109, + "lineto": 109, "tdef": "typedef", "description": " Representation of a working tree ", "comments": "", @@ -41250,17 +41913,17 @@ { "decl": [ "unsigned int version", - "uint32_t flags" + "int flags" ], "type": "struct", "value": "git_worktree_prune_options", "file": "git2/worktree.h", "line": 198, "lineto": 202, - "block": "unsigned int version\nuint32_t flags", + "block": "unsigned int version\nint flags", "tdef": "typedef", - "description": " Worktree prune options structure", - "comments": "

Initialize with GIT_WORKTREE_PRUNE_OPTIONS_INIT. Alternatively, you can\n use git_worktree_prune_init_options.

\n", + "description": "", + "comments": "", "fields": [ { "type": "unsigned int", @@ -41268,7 +41931,7 @@ "comments": "" }, { - "type": "uint32_t", + "type": "int", "name": "flags", "comments": "" } @@ -41332,8 +41995,8 @@ "type": "struct", "value": "git_writestream", "file": "git2/types.h", - "line": 428, - "lineto": 428, + "line": 432, + "lineto": 432, "tdef": "typedef", "description": " A type to write in a streaming fashion, for example, for filters. ", "comments": "", @@ -41416,6 +42079,13 @@ "git_annotated_commit_ref" ] ], + [ + "apply", + [ + "git_apply", + "git_apply_to_tree" + ] + ], [ "attr", [ @@ -41672,6 +42342,15 @@ "git_diff_tree_to_workdir_with_index" ] ], + [ + "error", + [ + "git_error_clear", + "git_error_last", + "git_error_set_oom", + "git_error_set_str" + ] + ], [ "fetch", [ @@ -41770,6 +42449,9 @@ "git_index_get_byindex", "git_index_get_bypath", "git_index_has_conflicts", + "git_index_iterator_free", + "git_index_iterator_new", + "git_index_iterator_next", "git_index_name_add", "git_index_name_clear", "git_index_name_entrycount", @@ -41846,6 +42528,7 @@ [ "git_merge", "git_merge_analysis", + "git_merge_analysis_for_ref", "git_merge_base", "git_merge_base_many", "git_merge_base_octopus", @@ -42195,7 +42878,9 @@ "git_remote_create", "git_remote_create_anonymous", "git_remote_create_detached", + "git_remote_create_init_options", "git_remote_create_with_fetchspec", + "git_remote_create_with_opts", "git_remote_default_branch", "git_remote_delete", "git_remote_disconnect", @@ -42395,6 +43080,7 @@ [ "stream", [ + "git_stream_register", "git_stream_register_tls" ] ], @@ -42574,103 +43260,103 @@ "examples": [ [ "add.c", - "ex/HEAD/add.html" + "ex/v0.28.0/add.html" ], [ "blame.c", - "ex/HEAD/blame.html" + "ex/v0.28.0/blame.html" ], [ "cat-file.c", - "ex/HEAD/cat-file.html" + "ex/v0.28.0/cat-file.html" ], [ "checkout.c", - "ex/HEAD/checkout.html" + "ex/v0.28.0/checkout.html" ], [ "common.c", - "ex/HEAD/common.html" + "ex/v0.28.0/common.html" ], [ "describe.c", - "ex/HEAD/describe.html" + "ex/v0.28.0/describe.html" ], [ "diff.c", - "ex/HEAD/diff.html" + "ex/v0.28.0/diff.html" ], [ "for-each-ref.c", - "ex/HEAD/for-each-ref.html" + "ex/v0.28.0/for-each-ref.html" ], [ "general.c", - "ex/HEAD/general.html" + "ex/v0.28.0/general.html" ], [ "init.c", - "ex/HEAD/init.html" + "ex/v0.28.0/init.html" ], [ "log.c", - "ex/HEAD/log.html" + "ex/v0.28.0/log.html" ], [ "ls-files.c", - "ex/HEAD/ls-files.html" + "ex/v0.28.0/ls-files.html" ], [ "merge.c", - "ex/HEAD/merge.html" + "ex/v0.28.0/merge.html" ], [ "network/clone.c", - "ex/HEAD/network/clone.html" + "ex/v0.28.0/network/clone.html" ], [ "network/common.c", - "ex/HEAD/network/common.html" + "ex/v0.28.0/network/common.html" ], [ "network/fetch.c", - "ex/HEAD/network/fetch.html" + "ex/v0.28.0/network/fetch.html" ], [ "network/git2.c", - "ex/HEAD/network/git2.html" + "ex/v0.28.0/network/git2.html" ], [ "network/index-pack.c", - "ex/HEAD/network/index-pack.html" + "ex/v0.28.0/network/index-pack.html" ], [ "network/ls-remote.c", - "ex/HEAD/network/ls-remote.html" + "ex/v0.28.0/network/ls-remote.html" ], [ "remote.c", - "ex/HEAD/remote.html" + "ex/v0.28.0/remote.html" ], [ "rev-list.c", - "ex/HEAD/rev-list.html" + "ex/v0.28.0/rev-list.html" ], [ "rev-parse.c", - "ex/HEAD/rev-parse.html" + "ex/v0.28.0/rev-parse.html" ], [ "showindex.c", - "ex/HEAD/showindex.html" + "ex/v0.28.0/showindex.html" ], [ "status.c", - "ex/HEAD/status.html" + "ex/v0.28.0/status.html" ], [ "tag.c", - "ex/HEAD/tag.html" + "ex/v0.28.0/tag.html" ] ] } diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 07b2b770e..a93eb06a6 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -86,6 +86,20 @@ }, "new" : { "functions": { + "git_blame_get_hunk_count": { + "type": "function", + "file": "blame.h", + "args": [ + { + "name": "blame", + "type": "git_blame *" + } + ], + "return": { + "type": "int" + }, + "group": "blame" + }, "git_clone": { "isManual": true, "cFile": "generate/templates/manual/clone/clone.cc", @@ -134,6 +148,34 @@ "isPrototypeMethod": false, "group": "filter_list" }, + "git_filter_source_filemode": { + "type": "function", + "file": "filter.h", + "args": [ + { + "name": "src", + "type": "const git_filter_source *" + } + ], + "return": { + "type": "uint16_t" + }, + "group": "filter_source" + }, + "git_filter_source_flags": { + "type": "function", + "file": "filter.h", + "args": [ + { + "name": "src", + "type": "const git_filter_source *" + } + ], + "return": { + "type": "uint32_t" + }, + "group": "filter_source" + }, "git_patch_convenient_from_diff": { "args": [ { @@ -318,7 +360,8 @@ "git_annotated_commit_from_ref", "git_annotated_commit_from_revspec", "git_annotated_commit_id", - "git_annotated_commit_lookup" + "git_annotated_commit_lookup", + "git_annotated_commit_ref" ] ], [ @@ -352,6 +395,22 @@ "git_filter_source_flags" ] ], + [ + "index_conflict_iterator", + [ + "git_index_conflict_iterator_free", + "git_index_conflict_iterator_new", + "git_index_conflict_next" + ] + ], + [ + "index_iterator", + [ + "git_index_iterator_free", + "git_index_iterator_new", + "git_index_iterator_next" + ] + ], [ "index_name_entry", [ @@ -470,51 +529,32 @@ ], "types": [ [ - "git_stash_apply_progress_t", + "git_apply_options", { - "type": "enum", + "type": "sctruct", "fields": [ { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_NONE", - "value": 0 - }, - { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_LOADING_STASH", - "value": 1 - }, - { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX", - "value": 2 - }, - { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED", - "value": 3 - }, - { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED", - "value": 4 + "type": "unsigned int", + "name": "version" }, { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED", - "value": 5 + "type": "git_apply_delta_cb", + "name": "delta_cb" }, { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED", - "value": 6 + "type": "git_apply_hunk_cb", + "name": "hunk_cb" }, { - "type": "int", - "name": "GIT_STASH_APPLY_PROGRESS_DONE", - "value": 7 + "type": "void *", + "name": "payload" } - ] + ], + "used": { + "needs": [ + "git_apply_init_options" + ] + } } ], [ @@ -853,6 +893,39 @@ } } ], + [ + "git_remote_create_options", + { + "type": "struct", + "fields": [ + { + "type": "unsigned int", + "name": "version" + }, + { + "type": "git_repository *", + "name": "repository" + }, + { + "type": "const char *", + "name": "name" + }, + { + "type": "const char *", + "name": "fetchspec" + }, + { + "type": "unsigned int", + "name": "flags" + } + ], + "used": { + "needs": [ + "git_remote_create_init_options" + ] + } + } + ], [ "git_remote_head", { @@ -887,15 +960,51 @@ } ], [ - "git_time_t", - { - "type": "enum" - } - ], - [ - "git_trace_level_t", + "git_stash_apply_progress_t", { - "type": "enum" + "type": "enum", + "fields": [ + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_NONE", + "value": 0 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_LOADING_STASH", + "value": 1 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_INDEX", + "value": 2 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_MODIFIED", + "value": 3 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_ANALYZE_UNTRACKED", + "value": 4 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_CHECKOUT_UNTRACKED", + "value": 5 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_CHECKOUT_MODIFIED", + "value": 6 + }, + { + "type": "int", + "name": "GIT_STASH_APPLY_PROGRESS_DONE", + "value": 7 + } + ] } ], [ @@ -963,6 +1072,18 @@ } } ], + [ + "git_time_t", + { + "type": "enum" + } + ], + [ + "git_trace_level_t", + { + "type": "enum" + } + ], [ "git_worktree_add_options", { @@ -1028,7 +1149,8 @@ "git_annotated_commit_from_ref", "git_annotated_commit_from_revspec", "git_annotated_commit_id", - "git_annotated_commit_lookup" + "git_annotated_commit_lookup", + "git_annotated_commit_ref" ] }, "diff": { @@ -1042,6 +1164,12 @@ }, "index": { "functions": [ + "git_index_conflict_iterator_free", + "git_index_conflict_iterator_new", + "git_index_conflict_next", + "git_index_iterator_free", + "git_index_iterator_new", + "git_index_iterator_next", "git_index_name_add", "git_index_name_clear", "git_index_name_entrycount", diff --git a/lib/remote.js b/lib/remote.js index b7c897957..09db11c1a 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -6,6 +6,7 @@ var shallowClone = NodeGit.Utils.shallowClone; var Remote = NodeGit.Remote; var _connect = Remote.prototype.connect; +var _createWithOpts = Remote.createWithOpts; var _download = Remote.prototype.download; var _fetch = Remote.prototype.fetch; var _push = Remote.prototype.push; @@ -45,6 +46,11 @@ Remote.prototype.connect = function( return _connect.call(this, direction, callbacks, proxyOpts, customHeaders); }; +Remote.createWithOpts = function(url, options) { + return _createWithOpts(url, normalizeOptions( + options, NodeGit.RemoteCreateOptions)); +}; + /** * Connects to a remote * From a4844f6e6dee5db1ab9e63f488bee26ff3636688 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Fri, 15 Feb 2019 09:34:00 -0700 Subject: [PATCH 060/145] Deprecate enums/fields that are missing/deprecated in libgit2 now --- lib/error.js | 16 ++++++++++++ lib/index.js | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/object.js | 10 ++++++++ lib/reference.js | 27 ++++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 lib/error.js diff --git a/lib/error.js b/lib/error.js new file mode 100644 index 000000000..9d1ecacb9 --- /dev/null +++ b/lib/error.js @@ -0,0 +1,16 @@ +var util = require("util"); +var NodeGit = require("../"); + +// Deprecated ----------------------------------------------------------------- + +// In 0.28.0 git_error was majorly refactored to have better naming in libgit2 +// We will continue to support the old enum entries but with a deprecation +// warning as they will go away soon. +Object.keys(NodeGit.Error.CODE).forEach((key) => { + Object.defineProperty(NodeGit.Error.CODE, `GITERR_${key}`, { + get: util.deprecate( + () => NodeGit.Error.CODE[key], + `Use NodeGit.Error.CODE.${key} instead.` + ) + }); +}); diff --git a/lib/index.js b/lib/index.js index cb87784d3..3426b1030 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,3 +1,4 @@ +var util = require("util"); var NodeGit = require("../"); var Index = NodeGit.Index; @@ -32,3 +33,67 @@ Index.prototype.removeAll = function(pathspec, matchedCallback) { Index.prototype.updateAll = function(pathspec, matchedCallback) { return _updateAll.call(this, pathspec || "*", matchedCallback, null); }; + +// Deprecated ----------------------------------------------------------------- + +NodeGit.Index.CAP = {}; +Object.keys(NodeGit.Index.CAPABILITY).forEach((key) => { + Object.defineProperty(NodeGit.Index.CAP, key, { + get: util.deprecate( + () => NodeGit.Index.CAPABILITY[key], + `Use NodeGit.Index.CAPABILITY.${key} instead.` + ) + }); +}); + +NodeGit.Enums.INDXENTRY_FLAG = {}; +Object.defineProperty(NodeGit.Enums.INDXENTRY_FLAG, "IDXENTRY_EXTENDED", { + get: util.deprecate( + () => NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED, + "Use NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED instead." + ) +}); +Object.defineProperty(NodeGit.Enums.INDXENTRY_FLAG, "IDXENTRY_VALID", { + get: util.deprecate( + () => NodeGit.Index.ENTRY_FLAG.ENTRY_VALID, + "Use NodeGit.Index.ENTRY_FLAG.ENTRY_VALID instead." + ) +}); + +NodeGit.Enums.IDXENTRY_EXTENDED_FLAG = {}; +var EXTENDED_FLAGS_MAP = { + IDXENTRY_INTENT_TO_ADD: "ENTRY_INTENT_TO_ADD", + IDXENTRY_SKIP_WORKTREE: "ENTRY_SKIP_WORKTREE", + S: "S", + IDXENTRY_UPTODATE: "ENTRY_UPTODATE" +}; +Object.keys(EXTENDED_FLAGS_MAP).forEach((key) => { + const newKey = EXTENDED_FLAGS_MAP[key]; + Object.defineProperty(NodeGit.Enums.IDXENTRY_EXTENDED_FLAG, key, { + get: util.deprecate( + () => NodeGit.Index.ENTRY_EXTENDED_FLAG[newKey], + `Use NodeGit.Index.ENTRY_EXTENDED_FLAG.${newKey} instead.` + ) + }); +}); + +var DEPRECATED_EXTENDED_FLAGS = { + IDXENTRY_EXTENDED2: 32768, + IDXENTRY_UPDATE: 1, + IDXENTRY_REMOVE: 2, + IDXENTRY_ADDED: 8, + IDXENTRY_HASHED: 16, + IDXENTRY_UNHASHED: 32, + IDXENTRY_WT_REMOVE: 64, + IDXENTRY_CONFLICTED: 128, + IDXENTRY_UNPACKED: 256, + IDXENTRY_NEW_SKIP_WORKTREE: 512, +}; +Object.keys(DEPRECATED_EXTENDED_FLAGS).forEach((key) => { + Object.defineProperty(NodeGit.Enums.IDXENTRY_EXTENDED_FLAG, key, { + get: util.deprecate( + () => DEPRECATED_EXTENDED_FLAGS[key], + "LibGit2 has removed this flag for public usage." + ) + }); +}); diff --git a/lib/object.js b/lib/object.js index 85917987a..8e65660d9 100644 --- a/lib/object.js +++ b/lib/object.js @@ -1,3 +1,4 @@ +var util = require("util"); var NodeGit = require("../"); var Obj = NodeGit.Object; @@ -33,3 +34,12 @@ Obj.prototype.isTag = function() { Obj.prototype.isTree = function() { return this.type() == Obj.TYPE.TREE; }; + +// Deprecated ----------------------------------------------------------------- + +Object.defineProperty(Obj.TYPE, "BAD", { + get: util.deprecate( + () => Obj.TYPE.INVALID, + "Use NodeGit.Object.TYPE.INVALID instead." + ) +}); diff --git a/lib/reference.js b/lib/reference.js index 6fdc6fa19..3d39d0c84 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -1,3 +1,4 @@ +var util = require("util"); var NodeGit = require("../"); var LookupWrapper = NodeGit.Utils.lookupWrapper; @@ -183,3 +184,29 @@ Reference.updateTerminal = function ( return reflog.write(); }); }; + +// Deprecated ----------------------------------------------------------------- + +Object.defineProperty(NodeGit.Reference.TYPE, "OID", { + get: util.deprecate( + () => NodeGit.Reference.TYPE.DIRECT, + "Use NodeGit.Reference.TYPE.DIRECT instead." + ) +}); + +Object.defineProperty(NodeGit.Reference.TYPE, "LISTALL", { + get: util.deprecate( + () => NodeGit.Reference.TYPE.ALL, + "Use NodeGit.Reference.TYPE.ALL instead." + ) +}); + +NodeGit.Reference.NORMALIZE = {}; +Object.keys(NodeGit.Reference.FORMAT).forEach((key) => { + Object.defineProperty(NodeGit.Reference.NORMALIZE, `REF_FORMAT_${key}`, { + get: util.deprecate( + () => NodeGit.Reference.FORMAT[key], + `Use NodeGit.Reference.FORMAT.${key} instead.` + ) + }); +}); From d2e3e14e36800d3b1d12e179a711da4f3a7ac6eb Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Fri, 15 Feb 2019 09:36:06 -0700 Subject: [PATCH 061/145] Fix deprecations in test suite --- lib/reference.js | 4 ++-- test/tests/diff.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/reference.js b/lib/reference.js index 3d39d0c84..af859c3cc 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -30,7 +30,7 @@ Reference.lookup = LookupWrapper(Reference); * @return {Boolean} */ Reference.prototype.isConcrete = function() { - return this.type() == Reference.TYPE.OID; + return this.type() == Reference.TYPE.DIRECT; }; /** @@ -75,7 +75,7 @@ const getTerminal = (repo, refName, depth = 10, prevRef = null) => { return NodeGit.Reference.lookup(repo, refName) .then((ref) => { - if (ref.type() === NodeGit.Reference.TYPE.OID) { + if (ref.type() === NodeGit.Reference.TYPE.DIRECT) { return { error: NodeGit.Error.CODE.OK, out: ref diff --git a/test/tests/diff.js b/test/tests/diff.js index d9dfec7bc..7eb243fc9 100644 --- a/test/tests/diff.js +++ b/test/tests/diff.js @@ -414,7 +414,7 @@ describe("Diff", function() { }) .then(function([headTree, index]) { const diffOptions = new NodeGit.DiffOptions(); - if (index.caps() & Index.CAP.IGNORE_CASE !== 0) { + if (index.caps() & Index.CAPABILITY.IGNORE_CASE !== 0) { diffOptions.flags |= Diff.OPTION.IGNORE_CASE; } From 75e363fd3dd7b3c936287782f2f7f72891d821d4 Mon Sep 17 00:00:00 2001 From: David Russo Date: Tue, 19 Feb 2019 12:59:55 -0500 Subject: [PATCH 062/145] Add support for building on IBM i PASE --- generate/templates/templates/binding.gyp | 17 ++++++++++++++--- utils/isBuildingForIBMi.js | 4 ++++ vendor/libgit2.gyp | 17 ++++++++++++++--- 3 files changed, 32 insertions(+), 6 deletions(-) create mode 100644 utils/isBuildingForIBMi.js diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index f67cf2e31..70e516d13 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -1,6 +1,7 @@ { "variables": { - "is_electron%": " Date: Tue, 19 Feb 2019 15:26:52 -0700 Subject: [PATCH 063/145] Expose more config methods Exposes config methods: - git_config_delete_entry - git_config_delete_multivar - git_config_get_bool - git_config_get_int32 - git_config_get_int64 - git_config_set_multivar - git_config_snapshot Exposes git_config_iterator: - git_config_iterator_new -> ConfigIterator.create - git_config_iterator_glob_new -> ConfigIterator.createGlob - git_config_multivar_iterator_new -> ConfigIterator.createMultivar - git_config_next -> ConfigIterator.prototype.next --- generate/input/descriptor.json | 131 ++++++++++++++++++++----- generate/input/libgit2-supplement.json | 19 ++++ 2 files changed, 128 insertions(+), 22 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 6daa52ce1..18586d626 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -695,10 +695,14 @@ "ignore": true }, "git_config_delete_entry": { - "ignore": true + "return": { + "isErrorCode": true + } }, "git_config_delete_multivar": { - "ignore": true + "return": { + "isErrorCode": true + } }, "git_config_entry_free": { "ignore": true @@ -762,7 +766,14 @@ "ignore": true }, "git_config_get_bool": { - "ignore": true + "args": { + "out": { + "shouldAlloc": true + } + }, + "return": { + "isErrorCode": true + } }, "git_config_get_entry": { "args": { @@ -773,10 +784,26 @@ } }, "git_config_get_int32": { - "ignore": true + "args": { + "out": { + "cType": "int32_t *", + "shouldAlloc": true + } + }, + "return": { + "isErrorCode": true + } }, "git_config_get_int64": { - "ignore": true + "args": { + "out": { + "cType": "int64_t *", + "shouldAlloc": true + } + }, + "return": { + "isErrorCode": true + } }, "git_config_get_mapped": { "ignore": true @@ -814,15 +841,6 @@ "git_config_init_backend": { "ignore": true }, - "git_config_iterator_free": { - "ignore": true - }, - "git_config_iterator_glob_new": { - "ignore": true - }, - "git_config_iterator_new": { - "ignore": true - }, "git_config_lock": { "isAsync": true, "args": { @@ -838,15 +856,9 @@ "git_config_lookup_map_value": { "ignore": true }, - "git_config_multivar_iterator_new": { - "ignore": true - }, "git_config_new": { "ignore": true }, - "git_config_next": { - "ignore": true - }, "git_config_open_default": { "isAsync": true, "return": { @@ -900,6 +912,12 @@ "isErrorCode": true } }, + "git_config_set_multivar": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_config_set_string": { "isAsync": true, "return": { @@ -907,7 +925,14 @@ } }, "git_config_snapshot": { - "ignore": true + "args": { + "out": { + "ownedByThis": true + } + }, + "return": { + "isErrorCode": true + } } }, "dependencies": [ @@ -921,7 +946,69 @@ "selfFreeing": true }, "config_iterator": { - "ignore": true + "selfFreeing": true, + "fields": { + "backend": { + "ignore": true + }, + "flags": { + "ignore": true + }, + "free": { + "ignore": true + }, + "next": { + "ignore": true + } + }, + "functions": { + "git_config_iterator_free": { + "ignore": true + }, + "git_config_iterator_new": { + "args": { + "out": { + "ownedBy": ["cfg"] + } + }, + "return": { + "isErrorCode": true + } + }, + "git_config_iterator_glob_new": { + "jsFunctionName": "createGlob", + "args": { + "out": { + "ownedBy": ["cfg"] + } + }, + "return": { + "isErrorCode": true + } + }, + "git_config_multivar_iterator_new": { + "jsFunctionName": "createMultivar", + "args": { + "out": { + "ownedBy": ["cfg"] + } + }, + "return": { + "isErrorCode": true + } + }, + "git_config_next": { + "jsFunctionName": "next", + "args": { + "entry": { + "ownedByThis": true + } + }, + "return": { + "isErrorCode": true + } + } + } }, "cred": { "needsForwardDeclaration": false, diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index a93eb06a6..30cfc3f1a 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -364,6 +364,16 @@ "git_annotated_commit_ref" ] ], + [ + "config_iterator", + [ + "git_config_iterator_free", + "git_config_iterator_new", + "git_config_iterator_glob_new", + "git_config_multivar_iterator_new", + "git_config_next" + ] + ], [ "diff_stats", [ @@ -1153,6 +1163,15 @@ "git_annotated_commit_ref" ] }, + "config": { + "functions": [ + "git_config_iterator_free", + "git_config_iterator_new", + "git_config_iterator_glob_new", + "git_config_multivar_iterator_new", + "git_config_next" + ] + }, "diff": { "functions": [ "git_diff_stats_files_changed", From 5776100be7891abe7ab68d9ab431aaf1c05ce22f Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 19 Feb 2019 15:32:09 -0700 Subject: [PATCH 064/145] Catch errors and pass them to libgit2 as error codes in rebase signingcb --- lib/rebase.js | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/lib/rebase.js b/lib/rebase.js index e55f0ddde..731f54bd5 100644 --- a/lib/rebase.js +++ b/lib/rebase.js @@ -26,17 +26,32 @@ function defaultRebaseOptions(options, checkoutStrategy) { signatureFieldBuf, commitContent ) { - return Promise.resolve(signingCb(commitContent)) - .then(function({ code, field, signedData }) { - if (code === NodeGit.Error.CODE.OK) { - signatureBuf.setString(signedData); - if (field) { - signatureFieldBuf.setString(field); + try { + const signingCbResult = signingCb(commitContent); + + return Promise.resolve(signingCbResult) + .then(function({ code, field, signedData }) { + if (code === NodeGit.Error.CODE.OK) { + signatureBuf.setString(signedData); + if (field) { + signatureFieldBuf.setString(field); + } } - } - return code; - }); + return code; + }) + .catch(function(error) { + if (error && error.code) { + return error.code; + } + return NodeGit.Error.CODE.ERROR; + }); + } catch (error) { + if (error && error.code) { + return error.code; + } + return NodeGit.Error.CODE.ERROR; + } }; } From f9179219d5db00c32dd152895616349595e6db77 Mon Sep 17 00:00:00 2001 From: David Russo Date: Tue, 19 Feb 2019 17:17:25 -0500 Subject: [PATCH 065/145] Simplify check for IBM i operating system --- generate/templates/templates/binding.gyp | 2 +- utils/isBuildingForIBMi.js | 4 ---- vendor/libgit2.gyp | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) delete mode 100644 utils/isBuildingForIBMi.js diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index 70e516d13..3d2d80a0d 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -1,7 +1,7 @@ { "variables": { "is_electron%": " Date: Wed, 20 Feb 2019 09:33:09 -0700 Subject: [PATCH 066/145] Bump LibGit2 to nodegit-fork/maint/v0.28.1 Includes fix to error handling in for rebase signing_cb --- vendor/libgit2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/libgit2 b/vendor/libgit2 index c59d5a2e9..97e4179a7 160000 --- a/vendor/libgit2 +++ b/vendor/libgit2 @@ -1 +1 @@ -Subproject commit c59d5a2e9332c8256111de4cc8e69d9c2278ee46 +Subproject commit 97e4179a76b935a15589a44662ce54a0ce0f3026 From b944ba8a12a1f3f1305aa0d3973ad7b1e4f94c60 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Wed, 20 Feb 2019 09:44:21 -0700 Subject: [PATCH 067/145] Fix npm high security advisory This only really affected our testing framework though, so shouldn't be of much concern --- package-lock.json | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index b30eb273f..045e7e51b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2583,10 +2583,9 @@ "dev": true }, "handlebars": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", - "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", + "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", "requires": { "async": "^2.5.0", "optimist": "^0.6.1", @@ -2595,19 +2594,17 @@ }, "dependencies": { "async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", - "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", - "dev": true, + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", "requires": { - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, @@ -3881,7 +3878,6 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", - "dev": true, "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" @@ -3890,8 +3886,7 @@ "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" } } }, @@ -5312,7 +5307,6 @@ "version": "3.4.9", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", - "dev": true, "optional": true, "requires": { "commander": "~2.17.1", @@ -5323,14 +5317,12 @@ "version": "2.17.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", - "dev": true, "optional": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, "optional": true } } From cbc29fabf4c81b2f507da13a911f4b04406c5ad1 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Wed, 20 Feb 2019 12:08:43 -0700 Subject: [PATCH 068/145] Bump to v0.25.0-alpha.7 --- CHANGELOG.md | 42 ++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c70866e50..9e58245a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,47 @@ # Change Log +## v0.25.0-alpha.7 [(2019-02-20)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.7) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.6...v0.25.0-alpha.7) + +#### Summary of changes +- Fixed bug where repeated uses of extractSignature would fail because of the use of regex.prototype.match +- Added support for building on IBM i (PASE) machines +- Fixed bug where signingCb in rebases would not return error codes to LibGit2 if the signingCb threw or rejected +- Expoed AnnotatedCommit methods: + - AnnotatedCommit.prototype.ref +- Exposed Apply methods: + - Apply.apply applies a diff to the repository + - Apply.toTree applies a diff to a tree +- Exposed Config methods: + - Config.prototype.deleteEntry + - Config.prototype.deleteMultivar + - Config.prototype.getBool + - Config.prototype.getInt32 + - Config.prototype.getInt64 + - Config.prototype.setMultivar + - Config.prototype.snapshot +- Exposed ConfigIterator with methods: + - ConfigIterator.create + - ConfigIterator.createGlob + - ConfigIterator.createMultivar + - ConfigIterator.prototype.next +- Exposed Merge methods: + - Merge.analysis + - Merge.analysisForRef +- Expose Remote methods: + - Remote.createWithOpts + +#### Merged PRs into NodeGit +- [Fix regex state causing subsequent runs of Tag.extractSignature to fail #1630](https://github.com/nodegit/nodegit/pull/1630) +- [Update LibGit2 docs to v0.28.0 #1631](https://github.com/nodegit/nodegit/pull/1631) +- [Add support for building on IBM i (PASE) #1634](https://github.com/nodegit/nodegit/pull/1634) +- [Expose more config methods #1635](https://github.com/nodegit/nodegit/pull/1635) +- [Catch errors and pass them to libgit2 as error codes in rebase signingcb #1636](https://github.com/nodegit/nodegit/pull/1636) +- [Simplify check for IBM i operating system #1637](https://github.com/nodegit/nodegit/pull/1637) +- [Bump LibGit2 to fork of v0.28.1 #1638](https://github.com/nodegit/nodegit/pull/1638) + + ## v0.25.0-alpha.6 [(2019-02-14)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.6) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.5...v0.25.0-alpha.6) diff --git a/package-lock.json b/package-lock.json index 045e7e51b..d73f90805 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.6", + "version": "0.25.0-alpha.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6b4d3ac15..b58d00c80 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.6", + "version": "0.25.0-alpha.7", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 9ceaf70af2eaef8aad1a0446f15e528b846b37cf Mon Sep 17 00:00:00 2001 From: Steven King Jr Date: Wed, 27 Feb 2019 13:49:32 -0700 Subject: [PATCH 069/145] Add missing `shouldAlloc` declarations for git_merge_analysis* functions --- generate/input/descriptor.json | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 18586d626..f5c436b7e 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -2094,10 +2094,12 @@ "isAsync": true, "args": { "analysis_out": { - "isReturn": true + "isReturn": true, + "shouldAlloc": true }, "preference_out": { - "isReturn": true + "isReturn": true, + "shouldAlloc": true }, "their_heads": { "cType": "const git_annotated_commit **", @@ -2116,10 +2118,12 @@ "isAsync": true, "args": { "analysis_out": { - "isReturn": true + "isReturn": true, + "shouldAlloc": true }, "preference_out": { - "isReturn": true + "isReturn": true, + "shouldAlloc": true }, "their_heads": { "cType": "const git_annotated_commit **", From c187a3de90ff44f6ae4f53fb4d64a3a72fea4577 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Wed, 27 Feb 2019 14:43:49 -0700 Subject: [PATCH 070/145] Bump to v0.25.0-alpha.8 --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e58245a9..b57446911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## v0.25.0-alpha.8 [(2019-02-27)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.8) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.7...v0.25.0-alpha.8) + +#### Summary of changes +- Fixed segfault in NodeGit.Merge.analysis and NodeGit.Merge.analysisForRef + +#### Merged PRs into NodeGit +- [Add missing `shouldAlloc` declarations for git_merge_analysis* functions #1641](https://github.com/nodegit/nodegit/pull/1641) + + ## v0.25.0-alpha.7 [(2019-02-20)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.7) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.6...v0.25.0-alpha.7) diff --git a/package-lock.json b/package-lock.json index d73f90805..f498d4a9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.7", + "version": "0.25.0-alpha.8", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b58d00c80..d6afd5290 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.7", + "version": "0.25.0-alpha.8", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 2e891ce6288d7e838703f2b1d0338ba637764826 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 4 Mar 2019 08:31:48 -0700 Subject: [PATCH 071/145] Add ignorable callback arguments This is especially helpful right now, because certain parameters have difficult garbage collection patterns. At the very least, for cases where a garbage collection pattern has not been fully fleshed out, we can ignore certain callback parameters until we can safely handle their memory. --- generate/input/callbacks.json | 29 ++---- generate/scripts/generateNativeCode.js | 2 + .../templates/filters/callback_args_count.js | 18 ++++ .../templates/filters/callback_args_info.js | 27 +++++ generate/templates/filters/js_args_count.js | 4 +- .../templates/partials/callback_helpers.cc | 35 +++---- .../templates/partials/field_accessors.cc | 98 ++++--------------- 7 files changed, 91 insertions(+), 122 deletions(-) create mode 100644 generate/templates/filters/callback_args_count.js create mode 100644 generate/templates/filters/callback_args_info.js diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index c37a7c8ee..cb9f10079 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -57,24 +57,6 @@ "error": -1 } }, - "git_blob_chunk_cb": { - "args": [ - { - "name": "entry", - "cType": "const git_config_entry *" - }, - { - "name": "payload", - "cType": "void *" - } - ], - "return": { - "type": "int", - "noResults": 1, - "success": 0, - "error": -1 - } - }, "git_checkout_notify_cb": { "args": [ { @@ -326,7 +308,8 @@ "args": [ { "name": "diff_so_far", - "cType": "const git_diff *" + "cType": "const git_diff *", + "ignore": true }, { "name": "delta_to_add", @@ -347,11 +330,13 @@ "success": 0, "error": -1 } - },"git_diff_progress_cb": { + }, + "git_diff_progress_cb": { "args": [ { "name": "diff_so_far", - "cType": "const git_diff *" + "cType": "const git_diff *", + "ignore": true }, { "name": "old_path", @@ -551,7 +536,7 @@ "args": [ { "name": "out", - "cType": "git_repository **", + "cType": "git_remote **", "isReturn": true }, { diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 47a832419..8ba821903 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -52,6 +52,8 @@ module.exports = function generateNativeCode() { argsInfo: require("../templates/filters/args_info"), arrayTypeToPlainType: require("../templates/filters/array_type_to_plain_type"), asElementPointer: require("../templates/filters/as_element_pointer"), + callbackArgsInfo: require("../templates/filters/callback_args_info"), + callbackArgsCount: require("../templates/filters/callback_args_count"), cppToV8: require("../templates/filters/cpp_to_v8"), defaultValue: require("../templates/filters/default_value"), fieldsInfo: require("../templates/filters/fields_info"), diff --git a/generate/templates/filters/callback_args_count.js b/generate/templates/filters/callback_args_count.js new file mode 100644 index 000000000..26c7762ea --- /dev/null +++ b/generate/templates/filters/callback_args_count.js @@ -0,0 +1,18 @@ +module.exports = function(args) { + if (!args) { + return 0; + } + + return args.reduce( + function(count, arg) { + var shouldCount = !arg.isReturn && + !arg.isSelf && + arg.name !== "payload" && + arg.name !== "self" && + !arg.ignore; + + return shouldCount ? count + 1 : count; + }, + 0 + ); +}; diff --git a/generate/templates/filters/callback_args_info.js b/generate/templates/filters/callback_args_info.js new file mode 100644 index 000000000..a7285c0b8 --- /dev/null +++ b/generate/templates/filters/callback_args_info.js @@ -0,0 +1,27 @@ +module.exports = function(args) { + var result = args.reduce( + function(argList, arg) { + var useArg = !arg.isReturn && + !arg.isSelf && + arg.name !== "payload" && + arg.name !== "self" && + !arg.ignore; + + if (!useArg) { + return argList; + } + + arg.firstArg = argList.length === 0; + argList.push(arg); + + return argList; + }, + [] + ); + + if (result.length) { + result[result.length - 1].lastArg = true; + } + + return result; +}; diff --git a/generate/templates/filters/js_args_count.js b/generate/templates/filters/js_args_count.js index 5be437f41..17a56a1c1 100644 --- a/generate/templates/filters/js_args_count.js +++ b/generate/templates/filters/js_args_count.js @@ -5,11 +5,11 @@ module.exports = function(args) { if (!args) { return 0; } - + for(cArg = 0, jsArg = 0; cArg < args.length; cArg++) { var arg = args[cArg]; - if (!arg.isReturn && !arg.isSelf && !arg.isPayload) { + if (!arg.isReturn && !arg.isSelf) { jsArg++; } } diff --git a/generate/templates/partials/callback_helpers.cc b/generate/templates/partials/callback_helpers.cc index 1abfaa991..7a40aed25 100644 --- a/generate/templates/partials/callback_helpers.cc +++ b/generate/templates/partials/callback_helpers.cc @@ -30,32 +30,27 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_async(void {% endif %} {% endeach %} - v8::Local argv[{{ cbFunction.args|jsArgsCount }}] = { - {% each cbFunction.args|argsInfo as arg %} - {% if arg | isPayload %} - {%-- payload is always the last arg --%} - // payload is null because we can use closure scope in javascript - Nan::Undefined() - {% elsif arg.isJsArg %} - {% if arg.isEnum %} - Nan::New((int)baton->{{ arg.name }}), - {% elsif arg.isLibgitType %} - {{ arg.cppClassName }}::New(baton->{{ arg.name }}, false), - {% elsif arg.cType == "size_t" %} - // HACK: NAN should really have an overload for Nan::New to support size_t - Nan::New((unsigned int)baton->{{ arg.name }}), - {% elsif arg.cppClassName == 'String' %} - Nan::New(baton->{{ arg.name }}).ToLocalChecked(), - {% else %} - Nan::New(baton->{{ arg.name }}), - {% endif %} + v8::Local argv[{{ cbFunction.args|callbackArgsCount }}] = { + {% each cbFunction.args|callbackArgsInfo as arg %} + {% if not arg.firstArg %}, {% endif %} + {% if arg.isEnum %} + Nan::New((int)baton->{{ arg.name }}) + {% elsif arg.isLibgitType %} + {{ arg.cppClassName }}::New(baton->{{ arg.name }}, false) + {% elsif arg.cType == "size_t" %} + // HACK: NAN should really have an overload for Nan::New to support size_t + Nan::New((unsigned int)baton->{{ arg.name }}) + {% elsif arg.cppClassName == 'String' %} + Nan::New(baton->{{ arg.name }}).ToLocalChecked() + {% else %} + Nan::New(baton->{{ arg.name }}) {% endif %} {% endeach %} }; Nan::TryCatch tryCatch; // TODO This should take an async_resource, but we will need to figure out how to pipe the correct context into this - Nan::MaybeLocal maybeResult = Nan::Call(*callback, {{ cbFunction.args|jsArgsCount }}, argv); + Nan::MaybeLocal maybeResult = Nan::Call(*callback, {{ cbFunction.args|callbackArgsCount }}, argv); v8::Local result; if (!maybeResult.IsEmpty()) { result = maybeResult.ToLocalChecked(); diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index 6325587d3..222034150 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -179,92 +179,34 @@ return; } - {% each field.args|argsInfo as arg %} - {% if arg.name == "payload" %} - {%-- Do nothing --%} - {% elsif arg.isJsArg %} - {% if arg.cType == "const char *" %} - if (baton->{{ arg.name }} == NULL) { - baton->{{ arg.name }} = ""; - } - {% elsif arg.cppClassName == "String" %} - v8::Local src; - if (baton->{{ arg.name }} == NULL) { - src = Nan::Null(); - } - else { - src = Nan::New(*baton->{{ arg.name }}).ToLocalChecked(); - } - {% endif %} - {% endif %} - {% endeach %} - - {% if field.isSelfReferential %} - {% if field.args|jsArgsCount|subtract 2| setUnsigned == 0 %} - v8::Local *argv = NULL; - {% else %} - v8::Local argv[{{ field.args|jsArgsCount|subtract 2| setUnsigned }}] = { - {% endif %} + {% if field.args|callbackArgsCount == 0 %} + v8::Local *argv = NULL; {% else %} - v8::Local argv[{{ field.args|jsArgsCount }}] = { - {% endif %} - {% each field.args|argsInfo as arg %} - {% if field.isSelfReferential %} - {% if not arg.firstArg %} - {% if field.args|jsArgsCount|subtract 1|or 0 %} - {% if arg.cppClassName == "String" %} - {%-- src is always the last arg --%} - src - {% elsif arg.isJsArg %} - {% if arg.isEnum %} - Nan::New((int)baton->{{ arg.name }}), - {% elsif arg.isLibgitType %} - {{ arg.cppClassName }}::New(baton->{{ arg.name }}, false), - {% elsif arg.cType == "size_t" %} - Nan::New((unsigned int)baton->{{ arg.name }}), - {% elsif arg.name == "payload" %} - {%-- skip, filters should not have a payload --%} - {% else %} - Nan::New(baton->{{ arg.name }}), - {% endif %} - {% endif %} - {% endif %} - {% endif %} - {% else %} - {% if arg.name == "payload" %} - {%-- payload is always the last arg --%} - Nan::New(instance->{{ fields|payloadFor field.name }}) - {% elsif arg.isJsArg %} - {% if arg.isEnum %} - Nan::New((int)baton->{{ arg.name }}), - {% elsif arg.isLibgitType %} - {{ arg.cppClassName }}::New(baton->{{ arg.name }}, false), - {% elsif arg.cType == "size_t" %} - // HACK: NAN should really have an overload for Nan::New to support size_t - Nan::New((unsigned int)baton->{{ arg.name }}), - {% elsif arg.cppClassName == "String" %} - Nan::New(baton->{{ arg.name }}).ToLocalChecked(), - {% else %} - Nan::New(baton->{{ arg.name }}), - {% endif %} + v8::Local argv[{{ field.args|callbackArgsCount }}] = { + {% each field.args|callbackArgsInfo as arg %} + {% if not arg.firstArg %},{% endif %} + {% if arg.isEnum %} + Nan::New((int)baton->{{ arg.name }}) + {% elsif arg.isLibgitType %} + {{ arg.cppClassName }}::New(baton->{{ arg.name }}, false) + {% elsif arg.cType == "size_t" %} + // HACK: NAN should really have an overload for Nan::New to support size_t + Nan::New((unsigned int)baton->{{ arg.name }}) + {% elsif arg.cppClassName == "String" %} + baton->{{ arg.name }} == NULL + ? Nan::EmptyString() + : Nan::New({%if arg.cType | isDoublePointer %}*{% endif %}baton->{{ arg.name }}).ToLocalChecked() + {% else %} + Nan::New(baton->{{ arg.name }}) {% endif %} - {% endif %} - {% endeach %} - {% if not field.isSelfReferential %} - }; - {% elsif field.args|jsArgsCount|subtract 2| setUnsigned > 0 %} + {% endeach %} }; {% endif %} Nan::TryCatch tryCatch; // TODO This should take an async_resource, but we will need to figure out how to pipe the correct context into this - {% if field.isSelfReferential %} - Nan::MaybeLocal maybeResult = Nan::Call(*(instance->{{ field.name }}.GetCallback()), {{ field.args|jsArgsCount|subtract 2| setUnsigned }}, argv); - {% else %} - Nan::MaybeLocal maybeResult = Nan::Call(*(instance->{{ field.name }}.GetCallback()), {{ field.args|jsArgsCount }}, argv); - {% endif %} - + Nan::MaybeLocal maybeResult = Nan::Call(*(instance->{{ field.name }}.GetCallback()), {{ field.args|callbackArgsCount }}, argv); v8::Local result; if (!maybeResult.IsEmpty()) { result = maybeResult.ToLocalChecked(); From dc7e7cd2eb1801c6cd3b7679c0c4feefc906f84b Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 4 Mar 2019 08:35:13 -0700 Subject: [PATCH 072/145] Update FilterSource to have an async `repo` getter We discovered that after the garbage collection PR, that submodules can trigger the filter with a filter_source that has a repo that NodeGit has never seen before. This causes libgit2 to free their repo, and us to free what we thought was our repo. As a temporary stopgap to allow filter writers to user repos, I've converted the repo getter to async, and opened a nodegit owned repo. This should prevent any segfaults when pulling the repo out during a filter operation at a small perf penalty. --- generate/input/libgit2-supplement.json | 22 +++++ .../templates/manual/filter_source/repo.cc | 90 +++++++++++++++++++ test/tests/filter.js | 58 ++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 generate/templates/manual/filter_source/repo.cc diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 30cfc3f1a..7b19afba9 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -176,6 +176,28 @@ }, "group": "filter_source" }, + "git_filter_source_repo": { + "args": [ + { + "name": "out", + "type": "git_repository **" + }, + { + "name": "src", + "type": "const git_filter_source *" + } + ], + "isManual": true, + "cFile": "generate/templates/manual/filter_source/repo.cc", + "isAsync": true, + "isPrototypeMethod": true, + "type": "function", + "group": "filter_source", + "return": { + "type": "int", + "isErrorCode": true + } + }, "git_patch_convenient_from_diff": { "args": [ { diff --git a/generate/templates/manual/filter_source/repo.cc b/generate/templates/manual/filter_source/repo.cc new file mode 100644 index 000000000..cf9c1a833 --- /dev/null +++ b/generate/templates/manual/filter_source/repo.cc @@ -0,0 +1,90 @@ +// NOTE you may need to occasionally rebuild this method by calling the generators +// if major changes are made to the templates / generator. + +// Due to some garbage collection issues related to submodules and git_filters, we need to clone the repository +// pointer before giving it to a user. + +/* + * @param Repository callback + */ +NAN_METHOD(GitFilterSource::Repo) { + if (info.Length() == 0 || !info[0]->IsFunction()) { + return Nan::ThrowError("Callback is required and must be a Function."); + } + + RepoBaton *baton = new RepoBaton; + + baton->error_code = GIT_OK; + baton->error = NULL; + baton->src = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); + + Nan::Callback *callback = new Nan::Callback(v8::Local::Cast(info[0])); + RepoWorker *worker = new RepoWorker(baton, callback); + + worker->SaveToPersistent("src", info.This()); + + AsyncLibgit2QueueWorker(worker); + return; +} + +void GitFilterSource::RepoWorker::Execute() { + git_error_clear(); + + { + LockMaster lockMaster(true, baton->src); + + git_repository *repo = git_filter_source_repo(baton->src); + baton->error_code = git_repository_open(&repo, git_repository_path(repo)); + + if (baton->error_code == GIT_OK) { + baton->out = repo; + } else if (git_error_last() != NULL) { + baton->error = git_error_dup(git_error_last()); + } + } +} + +void GitFilterSource::RepoWorker::HandleOKCallback() { + if (baton->error_code == GIT_OK) { + v8::Local to; + + if (baton->out != NULL) { + to = GitRepository::New(baton->out, true); + } else { + to = Nan::Null(); + } + + v8::Local argv[2] = {Nan::Null(), to}; + callback->Call(2, argv, async_resource); + } else { + if (baton->error) { + v8::Local err; + if (baton->error->message) { + err = Nan::Error(baton->error->message)->ToObject(); + } else { + err = Nan::Error("Method repo has thrown an error.")->ToObject(); + } + err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::New("FilterSource.repo").ToLocalChecked()); + v8::Local argv[1] = {err}; + callback->Call(1, argv, async_resource); + if (baton->error->message) + free((void *)baton->error->message); + free((void *)baton->error); + } else if (baton->error_code < 0) { + v8::Local err = + Nan::Error("Method repo has thrown an error.")->ToObject(); + err->Set(Nan::New("errno").ToLocalChecked(), + Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::New("FilterSource.repo").ToLocalChecked()); + v8::Local argv[1] = {err}; + callback->Call(1, argv, async_resource); + } else { + callback->Call(0, NULL, async_resource); + } + } + + delete baton; +} diff --git a/test/tests/filter.js b/test/tests/filter.js index ef1efc5c0..e31ecd4b5 100644 --- a/test/tests/filter.js +++ b/test/tests/filter.js @@ -1076,4 +1076,62 @@ describe("Filter", function() { }); }); }); + + describe("FilterSource", function() { + var message = "some new fancy filter"; + + before(function() { + var test = this; + return fse.readFile(readmePath, "utf8") + .then((function(content) { + test.originalReadmeContent = content; + })); + }); + + afterEach(function() { + this.timeout(15000); + return fse.writeFile(readmePath, this.originalReadmeContent); + }); + + it("a FilterSource has an async repo getter", function() { + var test = this; + + return Registry.register(filterName, { + apply: function(to, from, source) { + return source.repo() + .then(function() { + return NodeGit.Error.CODE.PASSTHROUGH; + }); + }, + check: function(source) { + return source.repo() + .then(function() { + return NodeGit.Error.CODE.OK; + }); + } + }, 0) + .then(function(result) { + assert.strictEqual(result, NodeGit.Error.CODE.OK); + }) + .then(function() { + var readmeContent = fse.readFileSync( + packageJsonPath, + "utf-8" + ); + assert.notStrictEqual(readmeContent, message); + + return fse.writeFile( + packageJsonPath, + "Changing content to trigger checkout" + ); + }) + .then(function() { + var opts = { + checkoutStrategy: Checkout.STRATEGY.FORCE, + paths: "package.json" + }; + return Checkout.head(test.repository, opts); + }); + }); + }); }); From e749e9063389cae9d98aaebf17660cdf941c7894 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 4 Mar 2019 08:47:16 -0700 Subject: [PATCH 073/145] Use more aggressive garbage collect routine in filter suite --- test/tests/filter.js | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/test/tests/filter.js b/test/tests/filter.js index e31ecd4b5..62aa4e863 100644 --- a/test/tests/filter.js +++ b/test/tests/filter.js @@ -2,6 +2,7 @@ var assert = require("assert"); var fse = require("fs-extra"); var path = require("path"); var local = path.join.bind(path, __dirname); +var garbageCollect = require("../utils/garbage_collect.js"); describe("Filter", function() { var NodeGit = require("../../"); @@ -216,7 +217,7 @@ describe("Filter", function() { }, 0) .then(function(result) { assert.strictEqual(result, NodeGit.Error.CODE.OK); - global.gc(); + garbageCollect(); return fse.writeFile( packageJsonPath, @@ -338,7 +339,8 @@ describe("Filter", function() { return Checkout.head(test.repository, opts); }) .then(function() { - global.gc(); + garbageCollect(); + return Registry.unregister(filterName); }) .then(function(result) { @@ -637,7 +639,7 @@ describe("Filter", function() { ); assert.notStrictEqual(readmeContent, message); fse.writeFileSync(readmePath, "whoa", "utf8"); - global.gc(); + garbageCollect(); var opts = { checkoutStrategy: Checkout.STRATEGY.FORCE, @@ -725,7 +727,7 @@ describe("Filter", function() { cleanup: function() {} }, 0) .then(function(result) { - global.gc(); + garbageCollect(); assert.strictEqual(result, NodeGit.Error.CODE.OK); }) .then(function() { @@ -742,7 +744,7 @@ describe("Filter", function() { ); }) .then(function(oid) { - global.gc(); + garbageCollect(); return test.repository.getHeadCommit(); }) .then(function(commit) { @@ -755,7 +757,7 @@ describe("Filter", function() { postInitializeReadmeContents, "testing commit contents" ); assert.strictEqual(commit.message(), "test commit"); - global.gc(); + garbageCollect(); return commit.getEntry("README.md"); }) @@ -842,7 +844,7 @@ describe("Filter", function() { ); assert.notEqual(packageContent, ""); - global.gc(); + garbageCollect(); return fse.writeFile( packageJsonPath, "Changing content to trigger checkout", @@ -1131,6 +1133,9 @@ describe("Filter", function() { paths: "package.json" }; return Checkout.head(test.repository, opts); + }) + .then(function() { + garbageCollect(); }); }); }); From e1df73650a72decc5244a58cc5c2c1c39aa2142d Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 4 Mar 2019 09:51:46 -0700 Subject: [PATCH 074/145] Output the item that was deprecated when giving deprecation notice --- lib/error.js | 3 ++- lib/index.js | 12 ++++++++---- lib/object.js | 2 +- lib/reference.js | 7 ++++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/error.js b/lib/error.js index 9d1ecacb9..819299681 100644 --- a/lib/error.js +++ b/lib/error.js @@ -10,7 +10,8 @@ Object.keys(NodeGit.Error.CODE).forEach((key) => { Object.defineProperty(NodeGit.Error.CODE, `GITERR_${key}`, { get: util.deprecate( () => NodeGit.Error.CODE[key], - `Use NodeGit.Error.CODE.${key} instead.` + `Use NodeGit.Error.CODE.${key} instead of ` + + `NodeGit.Error.CODE.GETERR_${key}.` ) }); }); diff --git a/lib/index.js b/lib/index.js index 3426b1030..ad37cea78 100644 --- a/lib/index.js +++ b/lib/index.js @@ -41,7 +41,8 @@ Object.keys(NodeGit.Index.CAPABILITY).forEach((key) => { Object.defineProperty(NodeGit.Index.CAP, key, { get: util.deprecate( () => NodeGit.Index.CAPABILITY[key], - `Use NodeGit.Index.CAPABILITY.${key} instead.` + `Use NodeGit.Index.CAPABILITY.${key} instead of ` + + `NodeGit.Index.CAP.${key}.` ) }); }); @@ -50,13 +51,15 @@ NodeGit.Enums.INDXENTRY_FLAG = {}; Object.defineProperty(NodeGit.Enums.INDXENTRY_FLAG, "IDXENTRY_EXTENDED", { get: util.deprecate( () => NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED, - "Use NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED instead." + "Use NodeGit.Index.ENTRY_FLAG.ENTRY_EXTENDED instead of " + + "NodeGit.Enums.INDXENTRY_FLAG.IDXENTRY_EXTENDED." ) }); Object.defineProperty(NodeGit.Enums.INDXENTRY_FLAG, "IDXENTRY_VALID", { get: util.deprecate( () => NodeGit.Index.ENTRY_FLAG.ENTRY_VALID, - "Use NodeGit.Index.ENTRY_FLAG.ENTRY_VALID instead." + "Use NodeGit.Index.ENTRY_FLAG.ENTRY_VALID instead of " + + "NodeGit.Enums.INDXENTRY_FLAG.IDXENTRY_VALID." ) }); @@ -72,7 +75,8 @@ Object.keys(EXTENDED_FLAGS_MAP).forEach((key) => { Object.defineProperty(NodeGit.Enums.IDXENTRY_EXTENDED_FLAG, key, { get: util.deprecate( () => NodeGit.Index.ENTRY_EXTENDED_FLAG[newKey], - `Use NodeGit.Index.ENTRY_EXTENDED_FLAG.${newKey} instead.` + `Use NodeGit.Index.ENTRY_EXTENDED_FLAG.${newKey} instead of ` + + `NodeGit.Enums.IDXENTRY_EXTENDED_FLAG.${key}.` ) }); }); diff --git a/lib/object.js b/lib/object.js index 8e65660d9..680aebd12 100644 --- a/lib/object.js +++ b/lib/object.js @@ -40,6 +40,6 @@ Obj.prototype.isTree = function() { Object.defineProperty(Obj.TYPE, "BAD", { get: util.deprecate( () => Obj.TYPE.INVALID, - "Use NodeGit.Object.TYPE.INVALID instead." + "Use NodeGit.Object.TYPE.INVALID instead of NodeGit.Object.TYPE.BAD." ) }); diff --git a/lib/reference.js b/lib/reference.js index af859c3cc..af3e00621 100644 --- a/lib/reference.js +++ b/lib/reference.js @@ -190,14 +190,14 @@ Reference.updateTerminal = function ( Object.defineProperty(NodeGit.Reference.TYPE, "OID", { get: util.deprecate( () => NodeGit.Reference.TYPE.DIRECT, - "Use NodeGit.Reference.TYPE.DIRECT instead." + "Use NodeGit.Reference.TYPE.DIRECT instead of NodeGit.Reference.TYPE.OID." ) }); Object.defineProperty(NodeGit.Reference.TYPE, "LISTALL", { get: util.deprecate( () => NodeGit.Reference.TYPE.ALL, - "Use NodeGit.Reference.TYPE.ALL instead." + "Use NodeGit.Reference.TYPE.ALL instead of NodeGit.Reference.TYPE.LISTALL." ) }); @@ -206,7 +206,8 @@ Object.keys(NodeGit.Reference.FORMAT).forEach((key) => { Object.defineProperty(NodeGit.Reference.NORMALIZE, `REF_FORMAT_${key}`, { get: util.deprecate( () => NodeGit.Reference.FORMAT[key], - `Use NodeGit.Reference.FORMAT.${key} instead.` + `Use NodeGit.Reference.FORMAT.${key} instead of ` + + `NodeGit.Reference.NORMALIZE.REF_FORMAT_${key}.` ) }); }); From e3c95e14e169c94d139ff27110b06a407354f42d Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Thu, 21 Feb 2019 10:30:22 -0700 Subject: [PATCH 075/145] If npm -v fails, we should assume we're in yarn and do nothing --- lifecycleScripts/preinstall.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lifecycleScripts/preinstall.js b/lifecycleScripts/preinstall.js index 6d481658b..870cf1558 100644 --- a/lifecycleScripts/preinstall.js +++ b/lifecycleScripts/preinstall.js @@ -8,14 +8,22 @@ module.exports = function prepareForBuild() { console.log("[nodegit] Running pre-install script"); return exec("npm -v") - .then(function(npmVersion) { - if (npmVersion.split(".")[0] < 3) { - console.log("[nodegit] npm@2 installed, pre-loading required packages"); - return exec("npm install --ignore-scripts"); - } + .then( + function(npmVersion) { + if (npmVersion.split(".")[0] < 3) { + console.log( + "[nodegit] npm@2 installed, pre-loading required packages" + ); + return exec("npm install --ignore-scripts"); + } - return Promise.resolve(); - }) + return Promise.resolve(); + }, + function() { + // We're installing via yarn, so don't + // care about compability with npm@2 + } + ) .then(function() { if (buildFlags.isGitRepo) { var submodules = require(local("submodules")); From 7851e931a54ca487fb6556ab8713c94ac1719efb Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Mon, 4 Mar 2019 12:38:20 -0700 Subject: [PATCH 076/145] Bump to v0.25.0-alpha.9 --- CHANGELOG.md | 18 ++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b57446911..00c78c1b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Change Log +## v0.25.0-alpha.9 [(2019-03-04)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.9) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.8...v0.25.0-alpha.9) + +#### Summary of changes +- Removed access to the diff_so_far param in git_diff_notify_cb and git_diff_progress_cb +- Changed FilterSource.prototype.repo to async to prevent segfaults on filters that run during Submodule.status +- Clean up deprecation messages to inform users of what was deprecated, not just what users should switch to +- When installing on a machine that has yarn and does not have npm, the preinstall script should succeed now +- ceiling_dirs is now an optional parameter to Repository.discover + +#### Merged PRs into NodeGit +- [Clean up some dangerous memory accesses in callbacks #1642](https://github.com/nodegit/nodegit/pull/1642) +- [Output the item that was deprecated when giving deprecation notice #1643](https://github.com/nodegit/nodegit/pull/1643) +- [Don't fail yarn installs when we can't find npm #1644](https://github.com/nodegit/nodegit/pull/1644) +- [`ceiling_dirs` parameter in `Repository.discover` is optional #1245](https://github.com/nodegit/nodegit/pull/1245) + + ## v0.25.0-alpha.8 [(2019-02-27)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.8) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.7...v0.25.0-alpha.8) diff --git a/package-lock.json b/package-lock.json index f498d4a9e..04dff435c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.8", + "version": "0.25.0-alpha.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d6afd5290..f523fdae1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.8", + "version": "0.25.0-alpha.9", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 6adcf4339fff222fa638bdee98b05be49d6be22f Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 18 Mar 2019 10:56:13 -0700 Subject: [PATCH 077/145] Bump CI to start using Xenial over Trusty Trusty is EOL in April. We will want to phase out trusty support before then --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2b2add2f6..5a80a97e3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ sudo: false -# update to Xenial in April 2019; Trusty will be EOL, Xenial new minimum supported OS version -dist: trusty +dist: xenial branches: only: From 3bace9d1d2303a91cde24a26cfbf0b6c42225634 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 18 Mar 2019 10:57:42 -0700 Subject: [PATCH 078/145] Stop building for node 6 Node 6 is EOL in April 2019 --- .travis.yml | 1 - appveyor.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a80a97e3..682ca1cf9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,6 @@ env: node_js: - "10" - "8" - - "6" os: - linux diff --git a/appveyor.yml b/appveyor.yml index 368e911e8..46fc6a1b5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -28,7 +28,6 @@ environment: # Node.js - nodejs_version: "10" - nodejs_version: "8" - - nodejs_version: "6" matrix: fast_finish: true From a929d38364de3dfe4284b0f83e2fc00dd30d00a7 Mon Sep 17 00:00:00 2001 From: Remy Suen Date: Tue, 9 Apr 2019 20:45:55 -0400 Subject: [PATCH 079/145] Ensures that commits from parent(*) has a repository Commit has functions that requires a reference to a repository to run. Because parent(*) was simply calling out to libgit2's git_commit_parent directly, its repo field was not being set. Creating a wrapper in the Commit class and assigning a repository to the object before returning it will fix this problem. Signed-off-by: Remy Suen --- lib/commit.js | 16 ++++++++++++++++ test/tests/commit.js | 12 ++++++++++++ 2 files changed, 28 insertions(+) diff --git a/lib/commit.js b/lib/commit.js index 701b944e0..033ecdfa1 100644 --- a/lib/commit.js +++ b/lib/commit.js @@ -5,6 +5,7 @@ var Commit = NodeGit.Commit; var LookupWrapper = NodeGit.Utils.lookupWrapper; var _amend = Commit.prototype.amend; +var _parent = Commit.prototype.parent; /** * Retrieves the commit pointed to by the oid @@ -394,6 +395,21 @@ Commit.prototype.history = function() { return event; }; +/** + * Get the specified parent of the commit. + * + * @param {number} the position of the parent, starting from 0 + * @async + * @return {Commit} the parent commit at the specified position + */ +Commit.prototype.parent = function (id) { + var repository = this.repo; + return _parent.call(this, id).then(function(parent) { + parent.repo = repository; + return parent; + }); +}; + /** * Retrieve the commit's parent shas. * diff --git a/test/tests/commit.js b/test/tests/commit.js index 8104624c2..237471923 100644 --- a/test/tests/commit.js +++ b/test/tests/commit.js @@ -128,6 +128,18 @@ describe("Commit", function() { assert.equal(this.commit.timeOffset(), 780); }); + it("can call getTree on a parent commit", function() { + return this.commit.parent(0) + .then(function(parent) { + return parent.getTree(); + }) + .then(function(tree) { + assert.equal( + tree.id().toString(), "327ff68e59f94f0c25d2c62fb0938efa01e8a107" + ); + }); + }); + it("can create a commit", function() { var test = this; var expectedCommitId = "315e77328ef596f3bc065d8ac6dd2c72c09de8a5"; From d023d581cd702b43c83347c5f4e2efc65888b628 Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Wed, 17 Apr 2019 08:58:28 -0700 Subject: [PATCH 080/145] Update openssl conan distributions Looks like the bintray URL format has changed, update to match new format. --- .../static_config/openssl_distributions.json | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/vendor/static_config/openssl_distributions.json b/vendor/static_config/openssl_distributions.json index f00384dd9..d42ecae15 100644 --- a/vendor/static_config/openssl_distributions.json +++ b/vendor/static_config/openssl_distributions.json @@ -1,18 +1,18 @@ { - "macOS-clang-8.1-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/bd3cca94af79c6a2c35b664c43f643582a13a9f2/conan_package.tgz", - "macOS-clang-8.1-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/0197c20e330042c026560da838f5b4c4bf094b8a/conan_package.tgz", - "macOS-clang-9-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/85d674b0f6705cafe6b2edb8689ffbe0f3c2e60b/conan_package.tgz", - "macOS-clang-9-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/227fb0ea22f4797212e72ba94ea89c7b3fbc2a0c/conan_package.tgz", - "win32-vs12-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/39d6fe009a278f733e97b59a4f9536bfc4e8f366/conan_package.tgz", - "win32-vs12-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/d16d8a16b4cef0046922b8d83d567689d36149d0/conan_package.tgz", - "win32-vs14-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/889fd4ea9ba89fd6dc7fa32e2f45bd9804b85481/conan_package.tgz", - "win32-vs14-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/253958a6ce15f1c9325eeea33ffc0a5cfc29212a/conan_package.tgz", - "win32-vs15-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/05f648ec4d066b206769d6314e859fdd97a18f8d/conan_package.tgz", - "win32-vs15-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/a075e3ffc3590d6a920a26b4218b20253dd68d57/conan_package.tgz", - "win64-vs12-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/6bc3be0f39fdc624b24ba9bb00e8af55928d74e7/conan_package.tgz", - "win64-vs12-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/e942631065059eabe964ca471ad35bb453c15b31/conan_package.tgz", - "win64-vs14-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/867ca54360ed234a8bc9a6aa63806599ea29b38e/conan_package.tgz", - "win64-vs14-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/c4aef4edbc33205e0cf9b55bfb116b38c90ec132/conan_package.tgz", - "win64-vs15-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/0bd0c413b56aaec57c0f222a89b4e565a6729027/conan_package.tgz", - "win64-vs15-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/package/fce9be1511a149a4af36b5997f7e611ab83b2f58/conan_package.tgz" -} \ No newline at end of file + "macOS-clang-8.1-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/bd3cca94af79c6a2c35b664c43f643582a13a9f2/0/conan_package.tgz", + "macOS-clang-8.1-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/0197c20e330042c026560da838f5b4c4bf094b8a/0/conan_package.tgz", + "macOS-clang-9-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/85d674b0f6705cafe6b2edb8689ffbe0f3c2e60b/0/conan_package.tgz", + "macOS-clang-9-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/227fb0ea22f4797212e72ba94ea89c7b3fbc2a0c/0/conan_package.tgz", + "win32-vs12-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/39d6fe009a278f733e97b59a4f9536bfc4e8f366/0/conan_package.tgz", + "win32-vs12-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/d16d8a16b4cef0046922b8d83d567689d36149d0/0/conan_package.tgz", + "win32-vs14-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/889fd4ea9ba89fd6dc7fa32e2f45bd9804b85481/0/conan_package.tgz", + "win32-vs14-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/253958a6ce15f1c9325eeea33ffc0a5cfc29212a/0/conan_package.tgz", + "win32-vs15-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/05f648ec4d066b206769d6314e859fdd97a18f8d/0/conan_package.tgz", + "win32-vs15-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/a075e3ffc3590d6a920a26b4218b20253dd68d57/0/conan_package.tgz", + "win64-vs12-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/6bc3be0f39fdc624b24ba9bb00e8af55928d74e7/0/conan_package.tgz", + "win64-vs12-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/e942631065059eabe964ca471ad35bb453c15b31/0/conan_package.tgz", + "win64-vs14-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/867ca54360ed234a8bc9a6aa63806599ea29b38e/0/conan_package.tgz", + "win64-vs14-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/c4aef4edbc33205e0cf9b55bfb116b38c90ec132/0/conan_package.tgz", + "win64-vs15-static-debug": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/0bd0c413b56aaec57c0f222a89b4e565a6729027/0/conan_package.tgz", + "win64-vs15-static-release": "https://dl.bintray.com/conan-community/conan/conan/OpenSSL/1.1.0i/stable/0/package/fce9be1511a149a4af36b5997f7e611ab83b2f58/0/conan_package.tgz" +} From 7548684f193af1b1878c16f98cb464a3c74a016c Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Wed, 17 Apr 2019 09:29:29 -0700 Subject: [PATCH 081/145] Support signing in Repository#mergeBranches --- lib/repository.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 22f10668f..f7ad2de5b 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -1686,6 +1686,7 @@ Repository.prototype.refreshIndex = function(callback) { * @param {Signature} signature * @param {Merge.PREFERENCE} mergePreference * @param {MergeOptions} mergeOptions + * @param {MergeBranchOptions} mergeBranchOptions * @return {Oid|Index} A commit id for a succesful merge or an index for a * merge with conflicts */ @@ -1695,13 +1696,19 @@ Repository.prototype.mergeBranches = function( signature, mergePreference, mergeOptions, - processMergeMessageCallback + mergeBranchOptions ) { const repo = this; let fromBranch; let toBranch; - processMergeMessageCallback = processMergeMessageCallback || + // Support old parameter `processMergeMessageCallback` + const isOldOptionParameter = typeof mergeBranchOptions === "function"; + const processMergeMessageCallback = mergeBranchOptions && + (isOldOptionParameter ? + mergeBranchOptions : + mergeBranchOptions.processMergeMessageCallback) || function (message) { return message; }; + const signingCallback = mergeBranchOptions && mergeBranchOptions.signingCb; mergePreference = mergePreference || NodeGit.Merge.PREFERENCE.NONE; mergeOptions = normalizeOptions(mergeOptions, NodeGit.MergeOptions); @@ -1819,6 +1826,17 @@ Repository.prototype.mergeBranches = function( return Promise.all([oid, processMergeMessageCallback(message)]); }) .then(([oid, message]) => { + if (signingCallback) { + return repo.createCommitWithSignature( + toBranch.name(), + signature, + signature, + message, + oid, + [toCommitOid, fromCommitOid], + signingCallback + ); + } return repo.createCommit( toBranch.name(), signature, From 4259208f653abfc48e4cad8581fbc9f5ee35e196 Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Wed, 17 Apr 2019 15:23:07 -0700 Subject: [PATCH 082/145] Add deprecation warning for Repository#mergeBranches parameter --- lib/repository.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/repository.js b/lib/repository.js index f7ad2de5b..f311900eb 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -1703,6 +1703,10 @@ Repository.prototype.mergeBranches = function( let toBranch; // Support old parameter `processMergeMessageCallback` const isOldOptionParameter = typeof mergeBranchOptions === "function"; + if (isOldOptionParameter) { + console.error("DeprecationWarning: Repository#mergeBranches parameter " + + "processMergeMessageCallback, use MergeBranchOptions"); + } const processMergeMessageCallback = mergeBranchOptions && (isOldOptionParameter ? mergeBranchOptions : From 17aca8c2cb4983288c925dff278d8a9b3e86178e Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Wed, 17 Apr 2019 15:23:42 -0700 Subject: [PATCH 083/145] Don't use newly deprecated parameter in tests --- test/tests/merge.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/tests/merge.js b/test/tests/merge.js index 80bb0589d..00387da82 100644 --- a/test/tests/merge.js +++ b/test/tests/merge.js @@ -646,9 +646,11 @@ describe("Merge", function() { ourSignature, NodeGit.Merge.PREFERENCE.NO_FASTFORWARD, null, - function(message) { - assert(message === "Merge branch 'theirs' into ours"); - return "We manipulated the message, HAH."; + { + processMergeMessageCallback: function(message) { + assert(message === "Merge branch 'theirs' into ours"); + return "We manipulated the message, HAH."; + } } ); }) @@ -803,9 +805,11 @@ describe("Merge", function() { ourSignature, NodeGit.Merge.PREFERENCE.NO_FASTFORWARD, null, - function(message) { - assert(message === "Merge branch 'theirs' into ours"); - return Promise.resolve("We manipulated the message, HAH."); + { + processMergeMessageCallback: function(message) { + assert(message === "Merge branch 'theirs' into ours"); + return Promise.resolve("We manipulated the message, HAH."); + } } ); }) From 99cca732b8e704ab5e768ad42d6eb7b80b141ca5 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 23 Oct 2018 11:28:20 -0700 Subject: [PATCH 084/145] getRemotes should return the remote objects. getRemotes has been renamed to getRemotes and getRemotes is now a method that returns the remotes for a repository --- generate/input/descriptor.json | 10 +- generate/input/libgit2-supplement.json | 28 ++++ .../manual/repository/get_remotes.cc | 134 ++++++++++++++++++ lib/repository.js | 4 +- test/tests/remote.js | 2 +- test/tests/repository.js | 2 +- 6 files changed, 174 insertions(+), 6 deletions(-) create mode 100644 generate/templates/manual/repository/get_remotes.cc diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 2909115b6..e846c62e6 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1504,6 +1504,7 @@ } }, "dependencies": [ + "../include/git_buf_converter.h", "../include/filter_registry.h" ] }, @@ -3241,7 +3242,9 @@ "selfFreeing": true, "isSingleton": true, "dependencies": [ - "git2/sys/repository.h" + "git2/sys/repository.h", + "../include/submodule.h", + "../include/remote.h" ], "functions": { "git_repository_config": { @@ -4220,7 +4223,10 @@ "git_worktree_prune_init_options": { "ignore": true } - } + }, + "dependencies": [ + "../include/git_buf_converter.h" + ] }, "writestream": { "cType": "git_writestream", diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 7b19afba9..a40107397 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -260,6 +260,28 @@ "isErrorCode": true } }, + "git_repository_get_remotes": { + "args": [ + { + "name": "out", + "type": "std::vector *" + }, + { + "name": "repo", + "type": "git_repository *" + } + ], + "type": "function", + "isManual": true, + "cFile": "generate/templates/manual/repository/get_remotes.cc", + "isAsync": true, + "isPrototypeMethod": true, + "group": "repository", + "return": { + "type": "int", + "isErrorCode": true + } + }, "git_reset": { "type": "function", "file": "reset.h", @@ -530,6 +552,12 @@ "git_remote_reference_list" ] ], + [ + "repository", + [ + "git_repository_get_remotes" + ] + ], [ "revwalk", [ diff --git a/generate/templates/manual/repository/get_remotes.cc b/generate/templates/manual/repository/get_remotes.cc new file mode 100644 index 000000000..e16f1131c --- /dev/null +++ b/generate/templates/manual/repository/get_remotes.cc @@ -0,0 +1,134 @@ +NAN_METHOD(GitRepository::GetRemotes) +{ + if (info.Length() == 0 || !info[0]->IsFunction()) { + return Nan::ThrowError("Callback is required and must be a Function."); + } + + GetRemotesBaton* baton = new GetRemotesBaton; + + baton->error_code = GIT_OK; + baton->error = NULL; + baton->out = new std::vector; + baton->repo = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); + + Nan::Callback *callback = new Nan::Callback(Local::Cast(info[0])); + GetRemotesWorker *worker = new GetRemotesWorker(baton, callback); + worker->SaveToPersistent("repo", info.This()); + Nan::AsyncQueueWorker(worker); + return; +} + +void GitRepository::GetRemotesWorker::Execute() +{ + giterr_clear(); + + git_repository *repo; + { + LockMaster lockMaster(true, baton->repo); + baton->error_code = git_repository_open(&repo, git_repository_workdir(baton->repo)); + } + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete baton->out; + baton->out = NULL; + return; + } + + git_strarray remote_names; + baton->error_code = git_remote_list(&remote_names, repo); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete baton->out; + baton->out = NULL; + return; + } + + for (size_t remote_index = 0; remote_index < remote_names.count; ++remote_index) { + git_remote *remote; + baton->error_code = git_remote_lookup(&remote, repo, remote_names.strings[remote_index]); + + // stop execution and return if there is an error + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + + // unwind and return + while (baton->out->size()) { + git_remote *remoteToFree = baton->out->back(); + baton->out->pop_back(); + git_remote_free(remoteToFree); + } + + git_strarray_free(&remote_names); + git_repository_free(repo); + delete baton->out; + baton->out = NULL; + return; + } + + baton->out->push_back(remote); + } +} + +void GitRepository::GetRemotesWorker::HandleOKCallback() +{ + if (baton->out != NULL) + { + unsigned int size = baton->out->size(); + Local result = Nan::New(size); + for (unsigned int i = 0; i < size; i++) { + git_remote *remote = baton->out->at(i); + Nan::Set( + result, + Nan::New(i), + GitRemote::New( + remote, + true, + GitRepository::New(git_remote_owner(remote), true)->ToObject() + ) + ); + } + + delete baton->out; + + Local argv[2] = { + Nan::Null(), + result + }; + callback->Call(2, argv, async_resource); + } + else if (baton->error) + { + Local argv[1] = { + Nan::Error(baton->error->message) + }; + callback->Call(1, argv, async_resource); + if (baton->error->message) + { + free((void *)baton->error->message); + } + + free((void *)baton->error); + } + else if (baton->error_code < 0) + { + Local err = Nan::Error("Repository refreshRemotes has thrown an error.")->ToObject(); + err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshRemotes").ToLocalChecked()); + Local argv[1] = { + err + }; + callback->Call(1, argv, async_resource); + } + else + { + callback->Call(0, NULL, async_resource); + } +} diff --git a/lib/repository.js b/lib/repository.js index f311900eb..0e8427c95 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -1068,7 +1068,7 @@ Repository.prototype.fetchAll = function( var certificateCheck = remoteCallbacks.certificateCheck; var transferProgress = remoteCallbacks.transferProgress; - return repo.getRemotes() + return repo.getRemoteNames() .then(function(remotes) { return remotes.reduce(function(fetchPromise, remote) { var wrappedFetchOptions = shallowClone(fetchOptions); @@ -1328,7 +1328,7 @@ Repository.prototype.getRemote = function(remote, callback) { * @param {Function} Optional callback * @return {Object} Promise object. */ -Repository.prototype.getRemotes = function(callback) { +Repository.prototype.getRemoteNames = function(callback) { return Remote.list(this).then(function(remotes) { if (typeof callback === "function") { callback(null, remotes); diff --git a/test/tests/remote.js b/test/tests/remote.js index 27611dd15..0aa502619 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -19,7 +19,7 @@ describe("Remote", function() { var privateUrl = "git@github.com:nodegit/private"; function removeNonOrigins(repo) { - return repo.getRemotes() + return repo.getRemoteNames() .then(function(remotes) { return remotes.reduce(function(promise, remote) { if (remote !== "origin") { diff --git a/test/tests/repository.js b/test/tests/repository.js index bcdfc2c3f..bce03a6cb 100644 --- a/test/tests/repository.js +++ b/test/tests/repository.js @@ -95,7 +95,7 @@ describe("Repository", function() { }); it("can list remotes", function() { - return this.repository.getRemotes() + return this.repository.getRemoteNames() .then(function(remotes) { assert.equal(remotes.length, 1); assert.equal(remotes[0], "origin"); From adcc5c520aae1a3351d9c463ee0ae7a207e666d1 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Tue, 23 Oct 2018 11:29:50 -0700 Subject: [PATCH 085/145] Move getReferences to C++ --- generate/input/libgit2-supplement.json | 23 +++ .../manual/repository/get_references.cc | 133 ++++++++++++++++++ lib/repository.js | 53 ++----- 3 files changed, 170 insertions(+), 39 deletions(-) create mode 100644 generate/templates/manual/repository/get_references.cc diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index a40107397..f9da58340 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -260,6 +260,28 @@ "isErrorCode": true } }, + "git_repository_get_references": { + "args": [ + { + "name": "out", + "type": "std::vector *" + }, + { + "name": "repo", + "type": "git_repository *" + } + ], + "type": "function", + "isManual": true, + "cFile": "generate/templates/manual/repository/get_references.cc", + "isAsync": true, + "isPrototypeMethod": true, + "group": "repository", + "return": { + "type": "int", + "isErrorCode": true + } + }, "git_repository_get_remotes": { "args": [ { @@ -555,6 +577,7 @@ [ "repository", [ + "git_repository_get_references", "git_repository_get_remotes" ] ], diff --git a/generate/templates/manual/repository/get_references.cc b/generate/templates/manual/repository/get_references.cc new file mode 100644 index 000000000..d0e4fd987 --- /dev/null +++ b/generate/templates/manual/repository/get_references.cc @@ -0,0 +1,133 @@ +NAN_METHOD(GitRepository::GetReferences) +{ + if (info.Length() == 0 || !info[0]->IsFunction()) { + return Nan::ThrowError("Callback is required and must be a Function."); + } + + GetReferencesBaton* baton = new GetReferencesBaton; + + baton->error_code = GIT_OK; + baton->error = NULL; + baton->out = new std::vector; + baton->repo = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); + + Nan::Callback *callback = new Nan::Callback(Local::Cast(info[0])); + GetReferencesWorker *worker = new GetReferencesWorker(baton, callback); + worker->SaveToPersistent("repo", info.This()); + Nan::AsyncQueueWorker(worker); + return; +} + +void GitRepository::GetReferencesWorker::Execute() +{ + giterr_clear(); + + LockMaster lockMaster(true, baton->repo); + git_repository *repo = baton->repo; + + git_strarray reference_names; + baton->error_code = git_reference_list(&reference_names, repo); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete baton->out; + baton->out = NULL; + return; + } + + for (size_t reference_index = 0; reference_index < reference_names.count; ++reference_index) { + git_reference *reference; + baton->error_code = git_reference_lookup(&reference, repo, reference_names.strings[reference_index]); + + // stop execution and return if there is an error + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + + // unwind and return + while (baton->out->size()) { + git_reference *referenceToFree = baton->out->back(); + baton->out->pop_back(); + git_reference_free(referenceToFree); + } + + git_strarray_free(&reference_names); + git_repository_free(repo); + delete baton->out; + baton->out = NULL; + return; + } + + if (git_reference_type(reference) == GIT_REF_SYMBOLIC) { + git_reference *resolved_reference; + int resolve_result = git_reference_resolve(&resolved_reference, reference); + git_reference_free(reference); + + // if we can't resolve the ref, then just ignore it + if (resolve_result == GIT_OK) { + baton->out->push_back(resolved_reference); + } + } else { + baton->out->push_back(reference); + } + } +} + +void GitRepository::GetReferencesWorker::HandleOKCallback() +{ + if (baton->out != NULL) + { + unsigned int size = baton->out->size(); + Local result = Nan::New(size); + for (unsigned int i = 0; i < size; i++) { + git_reference *reference = baton->out->at(i); + Nan::Set( + result, + Nan::New(i), + GitRefs::New( + reference, + true, + GitRepository::New(git_reference_owner(reference), true)->ToObject() + ) + ); + } + + delete baton->out; + + Local argv[2] = { + Nan::Null(), + result + }; + callback->Call(2, argv, async_resource); + } + else if (baton->error) + { + Local argv[1] = { + Nan::Error(baton->error->message) + }; + callback->Call(1, argv, async_resource); + if (baton->error->message) + { + free((void *)baton->error->message); + } + + free((void *)baton->error); + } + else if (baton->error_code < 0) + { + Local err = Nan::Error("Repository getReferences has thrown an error.")->ToObject(); + err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getReferences").ToLocalChecked()); + Local argv[1] = { + err + }; + callback->Call(1, argv, async_resource); + } + else + { + callback->Call(0, NULL, async_resource); + } +} diff --git a/lib/repository.js b/lib/repository.js index 0e8427c95..cdbad7054 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -24,6 +24,7 @@ var TreeBuilder = NodeGit.Treebuilder; var _discover = Repository.discover; var _initExt = Repository.initExt; var _fetchheadForeach = Repository.prototype.fetchheadForeach; +var _getReferences = Repository.prototype.getReferences; var _mergeheadForeach = Repository.prototype.mergeheadForeach; function applySelectedLinesToTarget @@ -349,44 +350,21 @@ Repository.initExt = function(repo_path, opts) { }; -Repository.getReferences = function(repo, type, refNamesOnly, callback) { - return Reference.list(repo).then(function(refList) { - var refFilterPromises = []; - var filteredRefs = []; - - refList.forEach(function(refName) { - refFilterPromises.push(Reference.lookup(repo, refName) - .then(function(ref) { - if (type == Reference.TYPE.LISTALL || ref.type() == type) { - if (refNamesOnly) { - filteredRefs.push(refName); - return; - } - - if (ref.isSymbolic()) { - return ref.resolve().then(function(resolvedRef) { - resolvedRef.repo = repo; - - filteredRefs.push(resolvedRef); - }) - .catch(function() { - // If we can't resolve the ref then just ignore it. - }); - } - else { - filteredRefs.push(ref); - } - } - }) - ); +Repository.getReferences = function(repo, type, refNamesOnly) { + return repo.getReferences().then(function(refList) { + var filteredRefList = refList; + + filteredRefList.filter(function(reference) { + return type == Reference.TYPE.LISTALL || ref.type === type }); - return Promise.all(refFilterPromises).then(function() { - if (typeof callback === "function") { - callback(null, filteredRefs); - } - return filteredRefs; - }, callback); + if (refNamesOnly) { + filteredRefList.map(function(reference) { + return reference.name(); + }); + } + + return filteredRefList; }); }; @@ -1289,9 +1267,6 @@ Repository.prototype.getReferenceNames = function(type, callback) { * @param {Reference.TYPE} type Type of reference to look up * @return {Array} */ -Repository.prototype.getReferences = function(type, callback) { - return Repository.getReferences(this, type, false, callback); -}; /** * Gets a remote from the repo From ac46386ab0c6e56607ccfbba95e40549169604b2 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Wed, 17 Apr 2019 14:07:28 -0700 Subject: [PATCH 086/145] add repository getSubmodules in C++ --- generate/input/libgit2-supplement.json | 23 ++++ .../manual/repository/get_submodules.cc | 115 ++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 generate/templates/manual/repository/get_submodules.cc diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index f9da58340..ca4a3c3f6 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -282,6 +282,28 @@ "isErrorCode": true } }, + "git_repository_get_submodules": { + "args": [ + { + "name": "out", + "type": "std::vector *" + }, + { + "name": "repo", + "type": "git_repository *" + } + ], + "type": "function", + "isManual": true, + "cFile": "generate/templates/manual/repository/get_submodules.cc", + "isAsync": true, + "isPrototypeMethod": true, + "group": "repository", + "return": { + "type": "int", + "isErrorCode": true + } + }, "git_repository_get_remotes": { "args": [ { @@ -578,6 +600,7 @@ "repository", [ "git_repository_get_references", + "git_repository_get_submodules", "git_repository_get_remotes" ] ], diff --git a/generate/templates/manual/repository/get_submodules.cc b/generate/templates/manual/repository/get_submodules.cc new file mode 100644 index 000000000..d51d0a0fd --- /dev/null +++ b/generate/templates/manual/repository/get_submodules.cc @@ -0,0 +1,115 @@ +NAN_METHOD(GitRepository::GetSubmodules) +{ + if (info.Length() == 0 || !info[0]->IsFunction()) { + return Nan::ThrowError("Callback is required and must be a Function."); + } + + GetSubmodulesBaton* baton = new GetSubmodulesBaton; + + baton->error_code = GIT_OK; + baton->error = NULL; + baton->out = new std::vector; + baton->repo = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); + + Nan::Callback *callback = new Nan::Callback(Local::Cast(info[0])); + GetSubmodulesWorker *worker = new GetSubmodulesWorker(baton, callback); + worker->SaveToPersistent("repo", info.This()); + Nan::AsyncQueueWorker(worker); + return; +} + +struct submodule_foreach_payload { + git_repository *repo; + std::vector *out; +}; + +int foreachSubmoduleCB(git_submodule *submodule, const char *name, void *void_payload) { + submodule_foreach_payload *payload = (submodule_foreach_payload *)void_payload; + git_submodule *out; + + int result = git_submodule_lookup(&out, payload->repo, name); + if (result == GIT_OK) { + payload->out->push_back(out); + } + + return result; +} + +void GitRepository::GetSubmodulesWorker::Execute() +{ + giterr_clear(); + + LockMaster lockMaster(true, baton->repo); + + submodule_foreach_payload payload { baton->repo, baton->out }; + baton->error_code = git_submodule_foreach(baton->repo, foreachSubmoduleCB, (void *)&payload); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + + while (baton->out->size()) { + git_submodule_free(baton->out->back()); + baton->out->pop_back(); + } + delete baton->out; + baton->out = NULL; + } +} + +void GitRepository::GetSubmodulesWorker::HandleOKCallback() +{ + if (baton->out != NULL) + { + unsigned int size = baton->out->size(); + Local result = Nan::New(size); + for (unsigned int i = 0; i < size; i++) { + git_submodule *submodule = baton->out->at(i); + Nan::Set( + result, + Nan::New(i), + GitSubmodule::New( + submodule, + true, + GitRepository::New(git_submodule_owner(submodule), true)->ToObject() + ) + ); + } + + delete baton->out; + + Local argv[2] = { + Nan::Null(), + result + }; + callback->Call(2, argv, async_resource); + } + else if (baton->error) + { + Local argv[1] = { + Nan::Error(baton->error->message) + }; + callback->Call(1, argv, async_resource); + if (baton->error->message) + { + free((void *)baton->error->message); + } + + free((void *)baton->error); + } + else if (baton->error_code < 0) + { + Local err = Nan::Error("Repository getSubmodules has thrown an error.")->ToObject(); + err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getSubmodules").ToLocalChecked()); + Local argv[1] = { + err + }; + callback->Call(1, argv, async_resource); + } + else + { + callback->Call(0, NULL, async_resource); + } +} From 9be9da2dd4707e9a3abed53064a25d0f2daeae73 Mon Sep 17 00:00:00 2001 From: Tyler Wanek Date: Wed, 24 Oct 2018 11:55:43 -0700 Subject: [PATCH 087/145] Add commit walk in C++ --- generate/input/libgit2-supplement.json | 27 ++++ .../templates/manual/revwalk/commit_walk.cc | 123 ++++++++++++++++++ 2 files changed, 150 insertions(+) create mode 100644 generate/templates/manual/revwalk/commit_walk.cc diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index ca4a3c3f6..69a4717e6 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -352,6 +352,32 @@ }, "group": "reset" }, + "git_revwalk_commit_walk": { + "args": [ + { + "name": "max_count", + "type": "int" + }, + { + "name": "out", + "type": "std::vector *" + }, + { + "name": "walk", + "type": "git_revwalk *" + } + ], + "type": "function", + "isManual": true, + "cFile": "generate/templates/manual/revwalk/commit_walk.cc", + "isAsync": true, + "isPrototypeMethod": true, + "group": "revwalk", + "return": { + "type": "int", + "isErrorCode": true + } + }, "git_revwalk_fast_walk": { "args": [ { @@ -607,6 +633,7 @@ [ "revwalk", [ + "git_revwalk_commit_walk", "git_revwalk_fast_walk", "git_revwalk_file_history_walk" ] diff --git a/generate/templates/manual/revwalk/commit_walk.cc b/generate/templates/manual/revwalk/commit_walk.cc new file mode 100644 index 000000000..af0ff112a --- /dev/null +++ b/generate/templates/manual/revwalk/commit_walk.cc @@ -0,0 +1,123 @@ +NAN_METHOD(GitRevwalk::CommitWalk) { + if (info.Length() == 0 || !info[0]->IsNumber()) { + return Nan::ThrowError("Max count is required and must be a number."); + } + + if (info.Length() == 1 || !info[1]->IsFunction()) { + return Nan::ThrowError("Callback is required and must be a Function."); + } + + CommitWalkBaton* baton = new CommitWalkBaton; + + baton->error_code = GIT_OK; + baton->error = NULL; + baton->max_count = Nan::To(info[0]).FromJust(); + baton->out = new std::vector; + baton->out->reserve(baton->max_count); + baton->walk = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); + + Nan::Callback *callback = new Nan::Callback(Local::Cast(info[1])); + CommitWalkWorker *worker = new CommitWalkWorker(baton, callback); + worker->SaveToPersistent("fastWalk", info.This()); + + Nan::AsyncQueueWorker(worker); + return; +} + +void GitRevwalk::CommitWalkWorker::Execute() { + giterr_clear(); + + for (int i = 0; i < baton->max_count; i++) { + git_oid next_commit_id; + baton->error_code = git_revwalk_next(&next_commit_id, baton->walk); + + if (baton->error_code == GIT_ITEROVER) { + baton->error_code = GIT_OK; + return; + } + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + + while (baton->out->size()) { + git_commit_free(baton->out->back()); + baton->out->pop_back(); + } + + delete baton->out; + baton->out = NULL; + + return; + } + + git_commit *commit; + baton->error_code = git_commit_lookup(&commit, git_revwalk_repository(baton->walk), &next_commit_id); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + + while (baton->out->size()) { + git_commit_free(baton->out->back()); + baton->out->pop_back(); + } + + delete baton->out; + baton->out = NULL; + + return; + } + + baton->out->push_back(commit); + } +} + +void GitRevwalk::CommitWalkWorker::HandleOKCallback() { + if (baton->out != NULL) { + unsigned int size = baton->out->size(); + Local result = Nan::New(size); + for (unsigned int i = 0; i < size; i++) { + git_commit *commit = baton->out->at(i); + Nan::Set( + result, + Nan::New(i), + GitCommit::New( + commit, + true, + GitRepository::New(git_commit_owner(commit), true)->ToObject() + ) + ); + } + + delete baton->out; + + Local argv[2] = { + Nan::Null(), + result + }; + callback->Call(2, argv, async_resource); + } else if (baton->error) { + Local argv[1] = { + Nan::Error(baton->error->message) + }; + callback->Call(1, argv, async_resource); + if (baton->error->message) { + free((void *)baton->error->message); + } + + free((void *)baton->error); + } else if (baton->error_code < 0) { + Local err = Nan::Error("Revwalk commitWalk has thrown an error.")->ToObject(); + err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.commitWalk").ToLocalChecked()); + Local argv[1] = { + err + }; + callback->Call(1, argv, async_resource); + } else { + callback->Call(0, NULL, async_resource); + } +} From 4e039f589ecc41237207be1a3344fb0badb3a116 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Thu, 20 Dec 2018 13:56:36 -0700 Subject: [PATCH 088/145] Add refreshReferences for bulk lookup of critical references. --- generate/input/libgit2-supplement.json | 25 +- .../manual/repository/refresh_references.cc | 532 ++++++++++++++++++ 2 files changed, 556 insertions(+), 1 deletion(-) create mode 100644 generate/templates/manual/repository/refresh_references.cc diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 69a4717e6..42d9260b2 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -326,6 +326,28 @@ "isErrorCode": true } }, + "git_repository_refresh_references": { + "args": [ + { + "name": "out", + "type": "void *" + }, + { + "name": "repo", + "type": "git_repository *" + } + ], + "type": "function", + "isManual": true, + "cFile": "generate/templates/manual/repository/refresh_references.cc", + "isAsync": true, + "isPrototypeMethod": true, + "group": "repository", + "return": { + "type": "int", + "isErrorCode": true + } + }, "git_reset": { "type": "function", "file": "reset.h", @@ -627,7 +649,8 @@ [ "git_repository_get_references", "git_repository_get_submodules", - "git_repository_get_remotes" + "git_repository_get_remotes", + "git_repository_refresh_references" ] ], [ diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc new file mode 100644 index 000000000..2ee4c027d --- /dev/null +++ b/generate/templates/manual/repository/refresh_references.cc @@ -0,0 +1,532 @@ +int getOidOfReferenceCommit(git_oid *commitOid, git_reference *ref) { + git_object *commitObject; + int result = git_reference_peel(&commitObject, ref, GIT_OBJ_COMMIT); + + if (result != GIT_OK) { + return result; + } + + git_oid_cpy(commitOid, git_object_id(commitObject)); + git_object_free(commitObject); + return result; +} + +int asDirectReference(git_reference **out, git_reference *ref) { + if (git_reference_type(ref) != GIT_REF_SYMBOLIC) { + return git_reference_dup(out, ref); + } + + return git_reference_resolve(out, ref); +} + +int lookupDirectReferenceByShorthand(git_reference **out, git_repository *repo, const char *shorthand) { + git_reference *ref = NULL; + int result = git_reference_dwim(&ref, repo, shorthand); + + if (result != GIT_OK) { + return result; + } + + result = asDirectReference(out, ref); + git_reference_free(ref); + return result; +} + +int lookupDirectReferenceByFullName(git_reference **out, git_repository *repo, const char *fullName) { + git_reference *ref = NULL; + int result = git_reference_lookup(&ref, repo, fullName); + + if (result != GIT_OK) { + return result; + } + + result = asDirectReference(out, ref); + git_reference_free(ref); + return result; +} + +char *getRemoteNameOfReference(git_reference *remoteReference) { + return strtok(strdup(git_reference_shorthand(remoteReference)), "/"); +} + +bool gitStrArrayContains(git_strarray *strarray, const char *string) { + for (size_t i = 0; i < strarray->count; ++i) { + if (strcmp(strarray->strings[i], string) == 0) { + return true; + } + } + return false; +} + +class RefreshedRefModel { +public: + RefreshedRefModel(git_reference *ref): + fullName(strdup(git_reference_name(ref))), + message(NULL), + sha(new char[GIT_OID_HEXSZ + 1]), + shorthand(strdup(git_reference_shorthand(ref))), + type(NULL) + { + if (git_reference_is_branch(ref)) { + type = "branch"; + } else if (git_reference_is_remote(ref)) { + type = "remote"; + } else { + type = "tag"; + } + } + + static int fromReference(RefreshedRefModel **out, git_reference *ref) { + RefreshedRefModel *refModel = new RefreshedRefModel(ref); + git_oid referencedTargetOid; + + int result = getOidOfReferenceCommit(&referencedTargetOid, ref); + if (result != GIT_OK) { + delete refModel; + return result; + } + + if (git_reference_is_tag(ref)) { + git_repository *repo = git_reference_owner(ref); + + git_tag *referencedTag; + if (git_tag_lookup(&referencedTag, repo, &referencedTargetOid) == GIT_OK) { + refModel->message = strdup(git_tag_message(referencedTag)); + git_tag_free(referencedTag); + } + } + + git_oid_tostr(refModel->sha, GIT_OID_HEXSZ + 1, &referencedTargetOid); + + *out = refModel; + return GIT_OK; + } + + v8::Local toJavascript() { + v8::Local result = Nan::New(); + + v8::Local jsFullName; + if (fullName == NULL) { + jsFullName = Nan::Null(); + } else { + jsFullName = Nan::New(fullName).ToLocalChecked(); + } + Nan::Set(result, Nan::New("fullName").ToLocalChecked(), jsFullName); + + v8::Local jsMessage; + if (message == NULL) { + jsMessage = Nan::Null(); + } else { + jsMessage = Nan::New(message).ToLocalChecked(); + } + Nan::Set(result, Nan::New("message").ToLocalChecked(), jsMessage); + + Nan::Set( + result, + Nan::New("sha").ToLocalChecked(), + Nan::New(sha).ToLocalChecked() + ); + + v8::Local jsShorthand; + if (shorthand == NULL) { + jsShorthand = Nan::Null(); + } else { + jsShorthand = Nan::New(shorthand).ToLocalChecked(); + } + Nan::Set(result, Nan::New("shorthand").ToLocalChecked(), jsShorthand); + + v8::Local jsType; + if (type == NULL) { + jsType = Nan::Null(); + } else { + jsType = Nan::New(type).ToLocalChecked(); + } + Nan::Set(result, Nan::New("type").ToLocalChecked(), jsType); + + return result; + } + + ~RefreshedRefModel() { + if (fullName != NULL) { delete[] fullName; } + if (message != NULL) { delete[] message; } + delete[] sha; + if (shorthand != NULL) { delete[] shorthand; } + } + + char *fullName, *message, *sha, *shorthand; + const char *type; +}; + +class UpstreamModel { +public: + UpstreamModel(const char *inputDownstreamFullName, const char *inputUpstreamFullName): + downstreamFullName((char *)strdup(inputDownstreamFullName)), + upstreamFullName((char *)strdup(inputUpstreamFullName)), + ahead(0), + behind(0) {} + + static bool fromReference(UpstreamModel **out, git_reference *ref) { + if (!git_reference_is_branch(ref)) { + return false; + } + + git_reference *upstream; + int result = git_branch_upstream(&upstream, ref); + if (result != GIT_OK) { + return false; + } + + UpstreamModel *upstreamModel = new UpstreamModel( + git_reference_name(ref), + git_reference_name(upstream) + ); + + git_oid localCommitOid; + result = getOidOfReferenceCommit(&localCommitOid, ref); + if (result != GIT_OK) { + delete upstreamModel; + return false; + } + + git_oid upstreamCommitOid; + result = getOidOfReferenceCommit(&upstreamCommitOid, upstream); + if (result != GIT_OK) { + delete upstreamModel; + return false; + } + + result = git_graph_ahead_behind( + &upstreamModel->ahead, + &upstreamModel->behind, + git_reference_owner(ref), + &localCommitOid, + &upstreamCommitOid + ); + + if (result != GIT_OK) { + delete upstreamModel; + return false; + } + + *out = upstreamModel; + return true; + } + + v8::Local toJavascript() { + v8::Local result = Nan::New(); + + v8::Local jsDownstreamFullName; + if (downstreamFullName == NULL) { + jsDownstreamFullName = Nan::Null(); + } else { + jsDownstreamFullName = Nan::New(downstreamFullName).ToLocalChecked(); + } + Nan::Set(result, Nan::New("downstreamFullName").ToLocalChecked(), jsDownstreamFullName); + + v8::Local jsUpstreamFullName; + if (upstreamFullName == NULL) { + jsUpstreamFullName = Nan::Null(); + } else { + jsUpstreamFullName = Nan::New(upstreamFullName).ToLocalChecked(); + } + Nan::Set(result, Nan::New("upstreamFullName").ToLocalChecked(), jsUpstreamFullName); + + Nan::Set(result, Nan::New("ahead").ToLocalChecked(), Nan::New(ahead)); + Nan::Set(result, Nan::New("behind").ToLocalChecked(), Nan::New(behind)); + return result; + } + + ~UpstreamModel() { + if (downstreamFullName != NULL) { delete[] downstreamFullName; } + if (upstreamFullName != NULL) { delete[] upstreamFullName; } + } + + char *downstreamFullName; + char *upstreamFullName; + size_t ahead; + size_t behind; +}; + +class RefreshReferencesData { +public: + RefreshReferencesData(): + headRefFullName(NULL), + cherrypick(NULL), + merge(NULL) {} + + ~RefreshReferencesData() { + while(refs.size()) { + delete refs.back(); + refs.pop_back(); + } + while(upstreamInfo.size()) { + delete upstreamInfo.back(); + upstreamInfo.pop_back(); + } + if (headRefFullName != NULL) { delete[] headRefFullName; } + if (cherrypick != NULL) { delete cherrypick; } + if (merge != NULL) { delete merge; } + } + + std::vector refs; + std::vector upstreamInfo; + char *headRefFullName; + RefreshedRefModel *cherrypick; + RefreshedRefModel *merge; +}; + +NAN_METHOD(GitRepository::RefreshReferences) +{ + if (info.Length() == 0 || !info[0]->IsFunction()) { + return Nan::ThrowError("Callback is required and must be a Function."); + } + + RefreshReferencesBaton* baton = new RefreshReferencesBaton; + + baton->error_code = GIT_OK; + baton->error = NULL; + baton->out = (void *)new RefreshReferencesData; + baton->repo = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); + + Nan::Callback *callback = new Nan::Callback(Local::Cast(info[0])); + RefreshReferencesWorker *worker = new RefreshReferencesWorker(baton, callback); + worker->SaveToPersistent("repo", info.This()); + Nan::AsyncQueueWorker(worker); + return; +} + +void GitRepository::RefreshReferencesWorker::Execute() +{ + giterr_clear(); + + LockMaster lockMaster(true, baton->repo); + git_repository *repo = baton->repo; + RefreshReferencesData *refreshData = (RefreshReferencesData *)baton->out; + + // START Refresh HEAD + git_reference *headRef = NULL; + baton->error_code = lookupDirectReferenceByShorthand(&headRef, repo, "HEAD"); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete refreshData; + baton->out = NULL; + return; + } + + RefreshedRefModel *headModel; + baton->error_code = RefreshedRefModel::fromReference(&headModel, headRef); + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + git_reference_free(headRef); + delete refreshData; + baton->out = NULL; + return; + } + refreshData->refs.push_back(headModel); + + refreshData->headRefFullName = strdup(git_reference_name(headRef)); + git_reference_free(headRef); + // END Refresh HEAD + + // START Refresh CHERRY_PICK_HEAD + git_reference *cherrypickRef = NULL; + if (lookupDirectReferenceByShorthand(&cherrypickRef, repo, "CHERRY_PICK_HEAD") == GIT_OK) { + baton->error_code = RefreshedRefModel::fromReference(&refreshData->cherrypick, cherrypickRef); + git_reference_free(cherrypickRef); + } else { + cherrypickRef = NULL; + } + // END Refresh CHERRY_PICK_HEAD + + // START Refresh MERGE_HEAD + git_reference *mergeRef = NULL; + // fall through if cherry pick failed + if (baton->error_code == GIT_OK && lookupDirectReferenceByShorthand(&mergeRef, repo, "MERGE_HEAD") == GIT_OK) { + baton->error_code = RefreshedRefModel::fromReference(&refreshData->merge, mergeRef); + git_reference_free(mergeRef); + } else { + mergeRef = NULL; + } + // END Refresh MERGE_HEAD + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete refreshData; + baton->out = NULL; + return; + } + + // Retrieve reference models and upstream info for each reference + git_strarray referenceNames; + baton->error_code = git_reference_list(&referenceNames, repo); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete refreshData; + baton->out = NULL; + return; + } + + git_strarray remoteNames; + baton->error_code = git_remote_list(&remoteNames, repo); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + git_strarray_free(&referenceNames); + delete refreshData; + baton->out = NULL; + return; + } + + for (size_t referenceIndex = 0; referenceIndex < referenceNames.count; ++referenceIndex) { + git_reference *reference; + baton->error_code = lookupDirectReferenceByFullName(&reference, repo, referenceNames.strings[referenceIndex]); + + if (baton->error_code != GIT_OK) { + break; + } + + UpstreamModel *upstreamModel; + if (UpstreamModel::fromReference(&upstreamModel, reference)) { + refreshData->upstreamInfo.push_back(upstreamModel); + } + + bool isBranch = git_reference_is_branch(reference); + bool isRemote = git_reference_is_remote(reference); + bool isTag = git_reference_is_tag(reference); + if ( + strcmp(referenceNames.strings[referenceIndex], headModel->fullName) == 0 + || (!isBranch && !isRemote && !isTag) + ) { + git_reference_free(reference); + continue; + } + + if (isRemote) { + char *remoteNameOfRef = getRemoteNameOfReference(reference); + bool isFromExistingRemote = gitStrArrayContains(&remoteNames, remoteNameOfRef); + delete[] remoteNameOfRef; + if (!isFromExistingRemote) { + git_reference_free(reference); + continue; + } + } + + RefreshedRefModel *refreshedRefModel; + baton->error_code = RefreshedRefModel::fromReference(&refreshedRefModel, reference); + git_reference_free(reference); + + if (baton->error_code == GIT_OK) { + refreshData->refs.push_back(refreshedRefModel); + } + } + + git_strarray_free(&remoteNames); + git_strarray_free(&referenceNames); + + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete refreshData; + baton->out = NULL; + return; + } +} + +void GitRepository::RefreshReferencesWorker::HandleOKCallback() +{ + if (baton->out != NULL) + { + RefreshReferencesData *refreshData = (RefreshReferencesData *)baton->out; + v8::Local result = Nan::New(); + + Nan::Set( + result, + Nan::New("headRefFullName").ToLocalChecked(), + Nan::New(refreshData->headRefFullName).ToLocalChecked() + ); + + unsigned int numRefs = refreshData->refs.size(); + v8::Local refs = Nan::New(numRefs); + for (unsigned int i = 0; i < numRefs; ++i) { + RefreshedRefModel *refreshedRefModel = refreshData->refs[i]; + Nan::Set(refs, Nan::New(i), refreshedRefModel->toJavascript()); + } + Nan::Set(result, Nan::New("refs").ToLocalChecked(), refs); + + unsigned int numUpstreamInfo = refreshData->upstreamInfo.size(); + v8::Local upstreamInfo = Nan::New(numUpstreamInfo); + for (unsigned int i = 0; i < numUpstreamInfo; ++i) { + UpstreamModel *upstreamModel = refreshData->upstreamInfo[i]; + Nan::Set(upstreamInfo, Nan::New(i), upstreamModel->toJavascript()); + } + Nan::Set(result, Nan::New("upstreamInfo").ToLocalChecked(), upstreamInfo); + + if (refreshData->cherrypick != NULL) { + Nan::Set( + result, + Nan::New("cherrypick").ToLocalChecked(), + refreshData->cherrypick->toJavascript() + ); + } else { + Nan::Set(result, Nan::New("cherrypick").ToLocalChecked(), Nan::Null()); + } + + if (refreshData->merge != NULL) { + Nan::Set( + result, + Nan::New("merge").ToLocalChecked(), + refreshData->merge->toJavascript() + ); + } else { + Nan::Set(result, Nan::New("merge").ToLocalChecked(), Nan::Null()); + } + + delete refreshData; + + Local argv[2] = { + Nan::Null(), + result + }; + callback->Call(2, argv, async_resource); + } + else if (baton->error) + { + Local argv[1] = { + Nan::Error(baton->error->message) + }; + callback->Call(1, argv, async_resource); + if (baton->error->message) + { + free((void *)baton->error->message); + } + + free((void *)baton->error); + } + else if (baton->error_code < 0) + { + Local err = Nan::Error("Repository refreshReferences has thrown an error.")->ToObject(); + err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshReferences").ToLocalChecked()); + Local argv[1] = { + err + }; + callback->Call(1, argv, async_resource); + } + else + { + callback->Call(0, NULL, async_resource); + } +} From 7139a9e996146c773c311d961745a49d961722c7 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Wed, 17 Apr 2019 14:29:31 -0700 Subject: [PATCH 089/145] Fix linter issues --- lib/repository.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index cdbad7054..29c429fad 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -24,7 +24,6 @@ var TreeBuilder = NodeGit.Treebuilder; var _discover = Repository.discover; var _initExt = Repository.initExt; var _fetchheadForeach = Repository.prototype.fetchheadForeach; -var _getReferences = Repository.prototype.getReferences; var _mergeheadForeach = Repository.prototype.mergeheadForeach; function applySelectedLinesToTarget @@ -355,7 +354,7 @@ Repository.getReferences = function(repo, type, refNamesOnly) { var filteredRefList = refList; filteredRefList.filter(function(reference) { - return type == Reference.TYPE.LISTALL || ref.type === type + return type == Reference.TYPE.LISTALL || reference.type === type; }); if (refNamesOnly) { From ea358d4e6145974beff21cbbc8b9e76740a387ff Mon Sep 17 00:00:00 2001 From: Jordan Wallet Date: Fri, 19 Apr 2019 17:23:19 -0700 Subject: [PATCH 090/145] Add tag gpg signatures to refreshReferences --- .../manual/repository/refresh_references.cc | 183 +++++++++++++++--- 1 file changed, 157 insertions(+), 26 deletions(-) diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index 2ee4c027d..a525cd691 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -65,6 +65,8 @@ class RefreshedRefModel { message(NULL), sha(new char[GIT_OID_HEXSZ + 1]), shorthand(strdup(git_reference_shorthand(ref))), + tagOdbBuffer(NULL), + tagOdbBufferLength(0), type(NULL) { if (git_reference_is_branch(ref)) { @@ -76,33 +78,89 @@ class RefreshedRefModel { } } - static int fromReference(RefreshedRefModel **out, git_reference *ref) { + static int fromReference(RefreshedRefModel **out, git_reference *ref, git_odb *odb) { RefreshedRefModel *refModel = new RefreshedRefModel(ref); - git_oid referencedTargetOid; + const git_oid *referencedTargetOid = git_reference_target(ref); - int result = getOidOfReferenceCommit(&referencedTargetOid, ref); - if (result != GIT_OK) { - delete refModel; - return result; + if (!git_reference_is_tag(ref)) { + git_oid_tostr(refModel->sha, GIT_OID_HEXSZ + 1, referencedTargetOid); + + *out = refModel; + return GIT_OK; } + git_repository *repo = git_reference_owner(ref); - if (git_reference_is_tag(ref)) { - git_repository *repo = git_reference_owner(ref); + git_tag *referencedTag; + if (git_tag_lookup(&referencedTag, repo, referencedTargetOid) == GIT_OK) { + refModel->message = strdup(git_tag_message(referencedTag)); - git_tag *referencedTag; - if (git_tag_lookup(&referencedTag, repo, &referencedTargetOid) == GIT_OK) { - refModel->message = strdup(git_tag_message(referencedTag)); - git_tag_free(referencedTag); + git_odb_object *tagOdbObject; + if (git_odb_read(&tagOdbObject, odb, git_tag_id(referencedTag)) == GIT_OK) { + refModel->tagOdbBufferLength = git_odb_object_size(tagOdbObject); + refModel->tagOdbBuffer = new char[refModel->tagOdbBufferLength]; + std::memcpy(refModel->tagOdbBuffer, git_odb_object_data(tagOdbObject), refModel->tagOdbBufferLength); + git_odb_object_free(tagOdbObject); } + + git_tag_free(referencedTag); + } + + git_oid peeledReferencedTargetOid; + int error = getOidOfReferenceCommit(&peeledReferencedTargetOid, ref); + if (error != GIT_OK) { + delete refModel; + return error; } - git_oid_tostr(refModel->sha, GIT_OID_HEXSZ + 1, &referencedTargetOid); + git_oid_tostr(refModel->sha, GIT_OID_HEXSZ + 1, &peeledReferencedTargetOid); *out = refModel; return GIT_OK; } - v8::Local toJavascript() { + static void ensureSignatureRegexes() { + if (!signatureRegexesBySignatureType.IsEmpty()) { + return; + } + + v8::Local gpgsigArray = Nan::New(2), + x509Array = Nan::New(1); + + Nan::Set( + gpgsigArray, + Nan::New(0), + Nan::New( + Nan::New("-----BEGIN PGP SIGNATURE-----[\\s\\S]+?-----END PGP SIGNATURE-----").ToLocalChecked(), + static_cast(v8::RegExp::Flags::kGlobal | v8::RegExp::Flags::kMultiline) + ).ToLocalChecked() + ); + + Nan::Set( + gpgsigArray, + Nan::New(1), + Nan::New( + Nan::New("-----BEGIN PGP MESSAGE-----[\\s\\S]+?-----END PGP MESSAGE-----").ToLocalChecked(), + static_cast(v8::RegExp::Flags::kGlobal | v8::RegExp::Flags::kMultiline) + ).ToLocalChecked() + ); + + Nan::Set( + x509Array, + Nan::New(0), + Nan::New( + Nan::New("-----BEGIN SIGNED MESSAGE-----[\s\S]+?-----END SIGNED MESSAGE-----").ToLocalChecked(), + static_cast(v8::RegExp::Flags::kGlobal | v8::RegExp::Flags::kMultiline) + ).ToLocalChecked() + ); + + v8::Local result = Nan::New(); + Nan::Set(result, Nan::New("gpgsig").ToLocalChecked(), gpgsigArray); + Nan::Set(result, Nan::New("x509").ToLocalChecked(), x509Array); + + signatureRegexesBySignatureType.Reset(result); + } + + v8::Local toJavascript(v8::Local signatureType) { v8::Local result = Nan::New(); v8::Local jsFullName; @@ -135,6 +193,34 @@ class RefreshedRefModel { } Nan::Set(result, Nan::New("shorthand").ToLocalChecked(), jsShorthand); + v8::Local jsTagSignature = Nan::Null(); + if (tagOdbBuffer != NULL && tagOdbBufferLength != 0) { + // tagOdbBuffer is already a copy, so we'd like to use NewBuffer instead, + // but we were getting segfaults and couldn't easily figure out why. :( + // We tried passing the tagOdbBuffer directly to NewBuffer and then nullifying tagOdbBuffer so that + // the destructor didn't double free, but that still segfaulted internally in Node. + v8::Local buffer = Nan::CopyBuffer(tagOdbBuffer, tagOdbBufferLength).ToLocalChecked(); + v8::Local toStringProp = Nan::Get(buffer, Nan::New("toString").ToLocalChecked()).ToLocalChecked(); + v8::Local jsTagOdbObjectString = Nan::CallAsFunction(toStringProp->ToObject(), buffer, 0, NULL).ToLocalChecked()->ToObject(); + + v8::Local _signatureRegexesBySignatureType = Nan::New(signatureRegexesBySignatureType); + v8::Local signatureRegexes = v8::Local::Cast(Nan::Get(_signatureRegexesBySignatureType, signatureType).ToLocalChecked()); + + for (uint32_t i = 0; i < signatureRegexes->Length(); ++i) { + v8::Local argv[] = { + Nan::Get(signatureRegexes, Nan::New(i)).ToLocalChecked() + }; + + v8::Local matchProp = Nan::Get(jsTagOdbObjectString, Nan::New("match").ToLocalChecked()).ToLocalChecked(); + v8::Local match = Nan::CallAsFunction(matchProp->ToObject(), jsTagOdbObjectString, 1, argv).ToLocalChecked(); + if (match->IsArray()) { + jsTagSignature = Nan::Get(match->ToObject(), 0).ToLocalChecked(); + break; + } + } + } + Nan::Set(result, Nan::New("tagSignature").ToLocalChecked(), jsTagSignature); + v8::Local jsType; if (type == NULL) { jsType = Nan::Null(); @@ -151,12 +237,17 @@ class RefreshedRefModel { if (message != NULL) { delete[] message; } delete[] sha; if (shorthand != NULL) { delete[] shorthand; } + if (tagOdbBuffer != NULL) { delete[] tagOdbBuffer; } } - char *fullName, *message, *sha, *shorthand; + char *fullName, *message, *sha, *shorthand, *tagOdbBuffer; + size_t tagOdbBufferLength; const char *type; + static Nan::Persistent signatureRegexesBySignatureType; }; +Nan::Persistent RefreshedRefModel::signatureRegexesBySignatureType; + class UpstreamModel { public: UpstreamModel(const char *inputDownstreamFullName, const char *inputUpstreamFullName): @@ -277,7 +368,25 @@ class RefreshReferencesData { NAN_METHOD(GitRepository::RefreshReferences) { - if (info.Length() == 0 || !info[0]->IsFunction()) { + v8::Local signatureType; + if (info.Length() == 2) { + if (!info[0]->IsString()) { + return Nan::ThrowError("Signature type must be \"gpgsig\" or \"x509\"."); + } + + v8::Local signatureTypeParam = info[0]->ToString(); + if ( + Nan::Equals(signatureTypeParam, Nan::New("gpgsig").ToLocalChecked()) != Nan::Just(true) + && Nan::Equals(signatureTypeParam, Nan::New("x509").ToLocalChecked()) != Nan::Just(true) + ) { + return Nan::ThrowError("Signature type must be \"gpgsig\" or \"x509\"."); + } + signatureType = signatureTypeParam; + } else { + signatureType = Nan::New("gpgsig").ToLocalChecked(); + } + + if (info.Length() == 0 || (info.Length() == 1 && !info[0]->IsFunction()) || (info.Length() == 2 && !info[1]->IsFunction())) { return Nan::ThrowError("Callback is required and must be a Function."); } @@ -291,6 +400,7 @@ NAN_METHOD(GitRepository::RefreshReferences) Nan::Callback *callback = new Nan::Callback(Local::Cast(info[0])); RefreshReferencesWorker *worker = new RefreshReferencesWorker(baton, callback); worker->SaveToPersistent("repo", info.This()); + worker->SaveToPersistent("signatureType", signatureType); Nan::AsyncQueueWorker(worker); return; } @@ -302,6 +412,18 @@ void GitRepository::RefreshReferencesWorker::Execute() LockMaster lockMaster(true, baton->repo); git_repository *repo = baton->repo; RefreshReferencesData *refreshData = (RefreshReferencesData *)baton->out; + git_odb *odb; + + baton->error_code = git_repository_odb(&odb, repo); + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + git_odb_free(odb); + delete refreshData; + baton->out = NULL; + return; + } // START Refresh HEAD git_reference *headRef = NULL; @@ -311,17 +433,19 @@ void GitRepository::RefreshReferencesWorker::Execute() if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); } + git_odb_free(odb); delete refreshData; baton->out = NULL; return; } RefreshedRefModel *headModel; - baton->error_code = RefreshedRefModel::fromReference(&headModel, headRef); + baton->error_code = RefreshedRefModel::fromReference(&headModel, headRef, odb); if (baton->error_code != GIT_OK) { if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); } + git_odb_free(odb); git_reference_free(headRef); delete refreshData; baton->out = NULL; @@ -336,7 +460,7 @@ void GitRepository::RefreshReferencesWorker::Execute() // START Refresh CHERRY_PICK_HEAD git_reference *cherrypickRef = NULL; if (lookupDirectReferenceByShorthand(&cherrypickRef, repo, "CHERRY_PICK_HEAD") == GIT_OK) { - baton->error_code = RefreshedRefModel::fromReference(&refreshData->cherrypick, cherrypickRef); + baton->error_code = RefreshedRefModel::fromReference(&refreshData->cherrypick, cherrypickRef, odb); git_reference_free(cherrypickRef); } else { cherrypickRef = NULL; @@ -347,7 +471,7 @@ void GitRepository::RefreshReferencesWorker::Execute() git_reference *mergeRef = NULL; // fall through if cherry pick failed if (baton->error_code == GIT_OK && lookupDirectReferenceByShorthand(&mergeRef, repo, "MERGE_HEAD") == GIT_OK) { - baton->error_code = RefreshedRefModel::fromReference(&refreshData->merge, mergeRef); + baton->error_code = RefreshedRefModel::fromReference(&refreshData->merge, mergeRef, odb); git_reference_free(mergeRef); } else { mergeRef = NULL; @@ -358,6 +482,7 @@ void GitRepository::RefreshReferencesWorker::Execute() if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); } + git_odb_free(odb); delete refreshData; baton->out = NULL; return; @@ -371,6 +496,7 @@ void GitRepository::RefreshReferencesWorker::Execute() if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); } + git_odb_free(odb); delete refreshData; baton->out = NULL; return; @@ -383,6 +509,7 @@ void GitRepository::RefreshReferencesWorker::Execute() if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); } + git_odb_free(odb); git_strarray_free(&referenceNames); delete refreshData; baton->out = NULL; @@ -424,7 +551,7 @@ void GitRepository::RefreshReferencesWorker::Execute() } RefreshedRefModel *refreshedRefModel; - baton->error_code = RefreshedRefModel::fromReference(&refreshedRefModel, reference); + baton->error_code = RefreshedRefModel::fromReference(&refreshedRefModel, reference, odb); git_reference_free(reference); if (baton->error_code == GIT_OK) { @@ -432,6 +559,7 @@ void GitRepository::RefreshReferencesWorker::Execute() } } + git_odb_free(odb); git_strarray_free(&remoteNames); git_strarray_free(&referenceNames); @@ -449,6 +577,7 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() { if (baton->out != NULL) { + RefreshedRefModel::ensureSignatureRegexes(); RefreshReferencesData *refreshData = (RefreshReferencesData *)baton->out; v8::Local result = Nan::New(); @@ -458,19 +587,21 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() Nan::New(refreshData->headRefFullName).ToLocalChecked() ); + v8::Local signatureType = GetFromPersistent("signatureType")->ToString(); + unsigned int numRefs = refreshData->refs.size(); - v8::Local refs = Nan::New(numRefs); + v8::Local refs = Nan::New(numRefs); for (unsigned int i = 0; i < numRefs; ++i) { RefreshedRefModel *refreshedRefModel = refreshData->refs[i]; - Nan::Set(refs, Nan::New(i), refreshedRefModel->toJavascript()); + Nan::Set(refs, Nan::New(i), refreshedRefModel->toJavascript(signatureType)); } Nan::Set(result, Nan::New("refs").ToLocalChecked(), refs); unsigned int numUpstreamInfo = refreshData->upstreamInfo.size(); - v8::Local upstreamInfo = Nan::New(numUpstreamInfo); + v8::Local upstreamInfo = Nan::New(numUpstreamInfo); for (unsigned int i = 0; i < numUpstreamInfo; ++i) { UpstreamModel *upstreamModel = refreshData->upstreamInfo[i]; - Nan::Set(upstreamInfo, Nan::New(i), upstreamModel->toJavascript()); + Nan::Set(upstreamInfo, Nan::New(i), upstreamModel->toJavascript()); } Nan::Set(result, Nan::New("upstreamInfo").ToLocalChecked(), upstreamInfo); @@ -478,7 +609,7 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() Nan::Set( result, Nan::New("cherrypick").ToLocalChecked(), - refreshData->cherrypick->toJavascript() + refreshData->cherrypick->toJavascript(signatureType) ); } else { Nan::Set(result, Nan::New("cherrypick").ToLocalChecked(), Nan::Null()); @@ -488,7 +619,7 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() Nan::Set( result, Nan::New("merge").ToLocalChecked(), - refreshData->merge->toJavascript() + refreshData->merge->toJavascript(signatureType) ); } else { Nan::Set(result, Nan::New("merge").ToLocalChecked(), Nan::Null()); From f4926a0a534edbe3b2ae46606aff3289c7fbc0ea Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 23 Apr 2019 16:31:20 -0700 Subject: [PATCH 091/145] Fixup refreshReferences Reset baton->error_code to GIT_OK on clean loop exit. Use \\s instead of \s for regex string --- generate/templates/manual/repository/refresh_references.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index a525cd691..a13f3641c 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -148,7 +148,7 @@ class RefreshedRefModel { x509Array, Nan::New(0), Nan::New( - Nan::New("-----BEGIN SIGNED MESSAGE-----[\s\S]+?-----END SIGNED MESSAGE-----").ToLocalChecked(), + Nan::New("-----BEGIN SIGNED MESSAGE-----[\\s\\S]+?-----END SIGNED MESSAGE-----").ToLocalChecked(), static_cast(v8::RegExp::Flags::kGlobal | v8::RegExp::Flags::kMultiline) ).ToLocalChecked() ); @@ -556,6 +556,8 @@ void GitRepository::RefreshReferencesWorker::Execute() if (baton->error_code == GIT_OK) { refreshData->refs.push_back(refreshedRefModel); + } else { + baton->error_code = GIT_OK; } } From 5c63321b65ac1d0ce9f3b1f2560983937334e880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20S=C3=A1rk=C3=A1ny?= Date: Fri, 3 May 2019 02:50:15 +0200 Subject: [PATCH 092/145] node-gyp upgraded to 4.0.0 --- package-lock.json | 59 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index 04dff435c..ff74ee4ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -884,14 +884,6 @@ "safe-buffer": "^5.1.1" } }, - "block-stream": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", - "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", - "requires": { - "inherits": "~2.0.0" - } - }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -2441,17 +2433,6 @@ } } }, - "fstream": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", - "integrity": "sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE=", - "requires": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - } - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3633,11 +3614,10 @@ } }, "node-gyp": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", - "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-4.0.0.tgz", + "integrity": "sha512-2XiryJ8sICNo6ej8d0idXDEMKfVfFK7kekGCtJAuelGsYHQxhj13KTf95swTCN2dZ/4lTfZ84Fu31jqJEEgjWA==", "requires": { - "fstream": "^1.0.0", "glob": "^7.0.3", "graceful-fs": "^4.1.2", "mkdirp": "^0.5.0", @@ -5105,13 +5085,32 @@ "dev": true }, "tar": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz", - "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", - "requires": { - "block-stream": "*", - "fstream": "^1.0.2", - "inherits": "2" + "version": "4.4.8", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + }, + "dependencies": { + "minizlib": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "requires": { + "minipass": "^2.2.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + } } }, "tar-fs": { diff --git a/package.json b/package.json index f523fdae1..0058729a1 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "json5": "^2.1.0", "lodash": "^4.17.11", "nan": "^2.11.1", - "node-gyp": "^3.8.0", + "node-gyp": "^4.0.0", "node-pre-gyp": "^0.11.0", "promisify-node": "~0.3.0", "ramda": "^0.25.0", From 764146ca8054cd2839685c423bc2e5ba727165e9 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Fri, 3 May 2019 09:51:46 -0700 Subject: [PATCH 093/145] Bump to v0.25.0-alpha.10 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00c78c1b5..26400eda1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Change Log +## v0.25.0-alpha.10 [(2019-05-03)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.10) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.9...v0.25.0-alpha.10) + +#### Summary of changes +- Drops support for Ubuntu 14 after EOL +- Fixes openssl prebuilt downloads for electron builds +- Fixes commits retrieved from Commit.prototype.parent +- *DEPRECATION* Support signing commits in Repository.prototype.mergeBranches. The last parameter `processMergeMessageCallback` is now deprecated, but will continue to work. Use the options object instead, which will contain the `processMergeMessageCallback`, as well as the `signingCb`. +- Bump Node-Gyp to 4.0.0 to fix tar security vulnerability +- *BREAKING* `getRemotes` no longer returns remote names, it now returns remote objects directly. Use `getRemoteNames` to get a list of remote names. +- Optimized a set of routines in NodeGit. These methods as written in Javascript require hundreds or thousands of requests to async workers to retrieve data. We've batched these requests and performed them on a single async worker. There are now native implementations of the following: + - Repository.prototype.getReferences: Retrieves all references on async worker. + - Repository.prototype.getRemotes: Retrieves all remotes on async worker. + - Repository.prototype.getSubmodules: Retrieves all submodules on async worker. + - Repository.prototype.refreshReferences: Open sourced function from GitKraken. Grabs a lot of information about references on an async worker. + - Revwalk.prototype.commitWalk: Retrieves up to N commits from a revwalk on an async worker. + +#### Merged PRs into NodeGit +- [EOL for Node 6 and Ubuntu 14.04 #1649](https://github.com/nodegit/nodegit/pull/1649) +- [Ensures that commits from parent(*) has a repository #1658](https://github.com/nodegit/nodegit/pull/1658) +- [Update openssl conan distributions #1663](https://github.com/nodegit/nodegit/pull/1663) +- [Support signing in Repository#mergeBranches #1664](https://github.com/nodegit/nodegit/pull/1664) +- [Dependency upgrade node-gyp upgraded to 4.0.0 #1672](https://github.com/nodegit/nodegit/pull/1672) +- [Add additional getters to streamline information gathering (breaking change) #1671](https://github.com/nodegit/nodegit/pull/1671) + + + ## v0.25.0-alpha.9 [(2019-03-04)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.9) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.8...v0.25.0-alpha.9) diff --git a/package-lock.json b/package-lock.json index ff74ee4ae..5153839cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.9", + "version": "0.25.0-alpha.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 0058729a1..3ffdeb2db 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.9", + "version": "0.25.0-alpha.10", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 0eba0699fde7d9c0f13ddab1ad1e582881eaf7c8 Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Thu, 16 May 2019 14:25:52 -0700 Subject: [PATCH 094/145] Implement faster file history walk Co-authored-by: Tyler Ang-Wanek --- generate/input/libgit2-supplement.json | 4 +- .../manual/revwalk/file_history_walk.cc | 522 +++++++++++------- 2 files changed, 338 insertions(+), 188 deletions(-) diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 42d9260b2..1b3e66a21 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -434,11 +434,11 @@ }, { "name": "max_count", - "type": "int" + "type": "unsigned int" }, { "name": "out", - "type": "std::vector< std::pair > *> *" + "type": "std::vector *" }, { "name": "walk", diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index c70b6856c..555149e13 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -1,3 +1,182 @@ +// Note: commit is not owned by this class (must be freed elsewhere) +class FileHistoryEvent { +public: + FileHistoryEvent( + git_delta_t inputType, + bool inputExistsInCurrentTree, + bool inputIsMergeCommit, + git_commit *inputCommit, + const char *inputFrom, + const char *inputTo + ): + type(inputType), + existsInCurrentTree(inputExistsInCurrentTree), + isMergeCommit(inputIsMergeCommit), + from(inputFrom == NULL ? NULL : strdup(inputFrom)), + to(inputTo == NULL ? NULL : strdup(inputTo)), + commit(inputCommit) + { + if (inputCommit != NULL) { + const int error = git_commit_dup(&commit, inputCommit); + assert(error == GIT_OK); + } + } + + ~FileHistoryEvent() { + if (commit != NULL) { + git_commit_free(commit); + } + } + + v8::Local toJavascript() { + v8::Local historyEntry = Nan::New(); + v8::Local owners = Nan::New(1); + Nan::Set( + owners, + Nan::New(owners->Length()), + GitRepository::New( + git_commit_owner(commit), + true + )->ToObject() + ); + Nan::Set(historyEntry, Nan::New("commit").ToLocalChecked(), GitCommit::New(commit, true, owners)); + commit = NULL; + Nan::Set(historyEntry, Nan::New("status").ToLocalChecked(), Nan::New(type)); + Nan::Set(historyEntry, Nan::New("isMergeCommit").ToLocalChecked(), Nan::New(isMergeCommit)); + if (type == GIT_DELTA_RENAMED) { + if (existsInCurrentTree) { + Nan::Set(historyEntry, Nan::New("oldName").ToLocalChecked(), Nan::New(from).ToLocalChecked()); + } else { + Nan::Set(historyEntry, Nan::New("newName").ToLocalChecked(), Nan::New(to).ToLocalChecked()); + } + } + return historyEntry; + } + + static int buildHistoryEvent( + FileHistoryEvent **fileHistoryEvent, + git_repository *repo, + git_commit *currentCommit, + git_tree *currentTree, + git_tree *parentTree, + const char *filePath + ) { + int errorCode; + git_tree_entry *currentEntry; + if (git_tree_entry_bypath(¤tEntry, currentTree, filePath) != GIT_OK) { + currentEntry = NULL; + } + git_tree_entry *parentEntry; + if (git_tree_entry_bypath(&parentEntry, parentTree, filePath) != GIT_OK) { + parentEntry = NULL; + } + + if (!currentEntry && !parentEntry) { + *fileHistoryEvent = new FileHistoryEvent(GIT_DELTA_UNMODIFIED, false, false, currentCommit, NULL, NULL); + return GIT_OK; + } + + // The filePath was added + if (currentEntry && !parentEntry) { + git_diff *diff; + if ((errorCode = git_diff_tree_to_tree(&diff, repo, parentTree, currentTree, NULL)) != GIT_OK) { + git_tree_entry_free(currentEntry); + return errorCode; + } + if ((errorCode = git_diff_find_similar(diff, NULL)) != GIT_OK) { + git_diff_free(diff); + git_tree_entry_free(currentEntry); + return errorCode; + } + const size_t numDeltas = git_diff_num_deltas(diff); + for (size_t i = 0; i < numDeltas; ++i) { + const git_diff_delta *delta = git_diff_get_delta(diff, i); + if (delta->new_file.path != NULL && std::strcmp(delta->new_file.path, filePath) == 0) { + if (delta->status == GIT_DELTA_RENAMED + || (delta->old_file.path != NULL && std::strcmp(delta->old_file.path, filePath) != 0)) { + *fileHistoryEvent = new FileHistoryEvent( + GIT_DELTA_RENAMED, + true, + false, + currentCommit, + delta->old_file.path, + NULL + ); + git_diff_free(diff); + git_tree_entry_free(currentEntry); + return GIT_OK; + } + break; + } + } + git_diff_free(diff); + git_tree_entry_free(currentEntry); + + *fileHistoryEvent = new FileHistoryEvent(GIT_DELTA_ADDED, true, false, currentCommit, NULL, NULL); + return GIT_OK; + } + + // The filePath was deleted + if (!currentEntry && parentEntry) { + git_diff *diff; + if ((errorCode = git_diff_tree_to_tree(&diff, repo, parentTree, currentTree, NULL)) != GIT_OK) { + git_tree_entry_free(parentEntry); + return errorCode; + } + if ((errorCode = git_diff_find_similar(diff, NULL)) != GIT_OK) { + git_diff_free(diff); + git_tree_entry_free(parentEntry); + return errorCode; + } + const size_t numDeltas = git_diff_num_deltas(diff); + for (size_t i = 0; i < numDeltas; ++i) { + const git_diff_delta *delta = git_diff_get_delta(diff, i); + if (delta->old_file.path != NULL && std::strcmp(delta->old_file.path, filePath) == 0) { + if (delta->status == GIT_DELTA_RENAMED + || (delta->new_file.path != NULL && std::strcmp(delta->new_file.path, filePath) != 0)) { + *fileHistoryEvent = new FileHistoryEvent( + GIT_DELTA_RENAMED, + false, + false, + currentCommit, + NULL, + delta->new_file.path + ); + git_diff_free(diff); + git_tree_entry_free(parentEntry); + return GIT_OK; + } + break; + } + } + git_diff_free(diff); + git_tree_entry_free(parentEntry); + + *fileHistoryEvent = new FileHistoryEvent(GIT_DELTA_DELETED, false, false, currentCommit, NULL, NULL); + return GIT_OK; + } + + if (git_oid_cmp(git_tree_entry_id(currentEntry), git_tree_entry_id(parentEntry)) != 0 + || git_tree_entry_filemode(currentEntry) != git_tree_entry_filemode(parentEntry) + ) { + git_tree_entry_free(parentEntry); + git_tree_entry_free(currentEntry); + *fileHistoryEvent = new FileHistoryEvent(GIT_DELTA_MODIFIED, true, false, currentCommit, NULL, NULL); + return GIT_OK; + } + + *fileHistoryEvent = new FileHistoryEvent(GIT_DELTA_UNMODIFIED, true, false, currentCommit, NULL, NULL); + git_tree_entry_free(parentEntry); + git_tree_entry_free(currentEntry); + return GIT_OK; + } + + git_delta_t type; + bool existsInCurrentTree, isMergeCommit; + const char *from, *to; + git_commit *commit; +}; + NAN_METHOD(GitRevwalk::FileHistoryWalk) { if (info.Length() == 0 || !info[0]->IsString()) { @@ -19,7 +198,7 @@ NAN_METHOD(GitRevwalk::FileHistoryWalk) String::Utf8Value from_js_file_path(info[0]->ToString()); baton->file_path = strdup(*from_js_file_path); baton->max_count = Nan::To(info[1]).FromJust(); - baton->out = new std::vector< std::pair > *>; + baton->out = new std::vector; baton->out->reserve(baton->max_count); baton->walk = Nan::ObjectWrap::Unwrap(info.This())->GetValue(); @@ -34,251 +213,222 @@ NAN_METHOD(GitRevwalk::FileHistoryWalk) void GitRevwalk::FileHistoryWalkWorker::Execute() { git_repository *repo = git_revwalk_repository(baton->walk); - git_oid *nextOid = (git_oid *)malloc(sizeof(git_oid)); + git_oid currentOid; git_error_clear(); for ( - unsigned int i = 0; - i < baton->max_count && (baton->error_code = git_revwalk_next(nextOid, baton->walk)) == GIT_OK; - ++i + unsigned int revwalkIterations = 0; + revwalkIterations < baton->max_count && (baton->error_code = git_revwalk_next(¤tOid, baton->walk)) == GIT_OK; + ++revwalkIterations ) { - // check if this commit has the file - git_commit *nextCommit; - - if ((baton->error_code = git_commit_lookup(&nextCommit, repo, nextOid)) != GIT_OK) { + git_commit *currentCommit; + if ((baton->error_code = git_commit_lookup(¤tCommit, repo, ¤tOid)) != GIT_OK) { break; } - git_tree *thisTree, *parentTree; - if ((baton->error_code = git_commit_tree(&thisTree, nextCommit)) != GIT_OK) { - git_commit_free(nextCommit); + git_tree *currentTree; + if ((baton->error_code = git_commit_tree(¤tTree, currentCommit)) != GIT_OK) { + git_commit_free(currentCommit); break; } - git_diff *diffs; - git_diff_options opts = GIT_DIFF_OPTIONS_INIT; - char *file_path = strdup(baton->file_path); - opts.pathspec.strings = &file_path; - opts.pathspec.count = 1; - git_commit *parent; - unsigned int parents = git_commit_parentcount(nextCommit); - if (parents > 1) { - git_commit_free(nextCommit); - continue; - } else if (parents == 1) { - if ((baton->error_code = git_commit_parent(&parent, nextCommit, 0)) != GIT_OK) { - git_commit_free(nextCommit); - break; + const unsigned int parentCount = git_commit_parentcount(currentCommit); + if (parentCount == 0) { + git_tree_entry* entry; + if (git_tree_entry_bypath(&entry, currentTree, baton->file_path) == GIT_OK) { + baton->out->push_back(new FileHistoryEvent(GIT_DELTA_ADDED, false, false, currentCommit, NULL, NULL)); + git_tree_entry_free(entry); } - if ( - (baton->error_code = git_commit_tree(&parentTree, parent)) != GIT_OK || - (baton->error_code = git_diff_tree_to_tree(&diffs, repo, parentTree, thisTree, &opts)) != GIT_OK - ) { - git_commit_free(nextCommit); - git_commit_free(parent); + git_commit_free(currentCommit); + git_tree_free(currentTree); + continue; + } + + if (parentCount == 1) { + git_commit *parentCommit; + if ((baton->error_code = git_commit_parent(&parentCommit, currentCommit, 0)) != GIT_OK) { + git_commit_free(currentCommit); + git_tree_free(currentTree); break; } - } else { - if ((baton->error_code = git_diff_tree_to_tree(&diffs, repo, NULL, thisTree, &opts)) != GIT_OK) { - git_commit_free(nextCommit); + + git_tree *parentTree; + if ((baton->error_code = git_commit_tree(&parentTree, parentCommit)) != GIT_OK) { + git_commit_free(currentCommit); + git_commit_free(parentCommit); + git_tree_free(currentTree); break; } - } - free(file_path); - opts.pathspec.strings = NULL; - opts.pathspec.count = 0; - bool flag = false; - bool doRenamedPass = false; - unsigned int numDeltas = git_diff_num_deltas(diffs); - for (unsigned int j = 0; j < numDeltas; ++j) { - git_patch *nextPatch; - baton->error_code = git_patch_from_diff(&nextPatch, diffs, j); - - if (baton->error_code < GIT_OK) { + FileHistoryEvent *fileHistoryEvent; + if ((baton->error_code = FileHistoryEvent::buildHistoryEvent( + &fileHistoryEvent, + repo, + currentCommit, + currentTree, + parentTree, + baton->file_path + )) != GIT_OK) { + git_commit_free(currentCommit); + git_commit_free(parentCommit); + git_tree_free(currentTree); + git_tree_free(parentTree); break; } - if (nextPatch == NULL) { - continue; + if (fileHistoryEvent->type != GIT_DELTA_UNMODIFIED) { + baton->out->push_back(fileHistoryEvent); } - const git_diff_delta *delta = git_patch_get_delta(nextPatch); - bool isEqualOldFile = !strncmp(delta->old_file.path, baton->file_path, strlen(baton->file_path)); - bool isEqualNewFile = !strncmp(delta->new_file.path, baton->file_path, strlen(baton->file_path)); + git_commit_free(currentCommit); + git_commit_free(parentCommit); + git_tree_free(currentTree); + git_tree_free(parentTree); + continue; + } - if (isEqualNewFile) { - if (delta->status == GIT_DELTA_ADDED || delta->status == GIT_DELTA_DELETED) { - doRenamedPass = true; - break; - } - std::pair > *historyEntry; - if (!isEqualOldFile) { - historyEntry = new std::pair >( - nextCommit, - std::pair(strdup(delta->old_file.path), delta->status) - ); - } else { - historyEntry = new std::pair >( - nextCommit, - std::pair(strdup(delta->new_file.path), delta->status) - ); - } - baton->out->push_back(historyEntry); - flag = true; + std::pair firstMatchingParentIndex(false, 0); + bool fileExistsInCurrent = false, fileExistsInSomeParent = false; + for (unsigned int parentIndex = 0; parentIndex < parentCount; ++parentIndex) { + git_commit *parentCommit; + if ((baton->error_code = git_commit_parent(&parentCommit, currentCommit, parentIndex)) != GIT_OK) { + break; } - git_patch_free(nextPatch); - - if (flag) { + git_tree *parentTree; + if ((baton->error_code = git_commit_tree(&parentTree, parentCommit)) != GIT_OK) { + git_commit_free(parentCommit); break; } - } - if (doRenamedPass) { - git_diff_free(diffs); + FileHistoryEvent *fileHistoryEvent; + if ((baton->error_code = FileHistoryEvent::buildHistoryEvent( + &fileHistoryEvent, + repo, + currentCommit, + currentTree, + parentTree, + baton->file_path + )) != GIT_OK) { + git_tree_free(parentTree); + git_commit_free(parentCommit); + break; + } - if (parents == 1) { - if ((baton->error_code = git_diff_tree_to_tree(&diffs, repo, parentTree, thisTree, NULL)) != GIT_OK) { - git_commit_free(nextCommit); + switch (fileHistoryEvent->type) { + case GIT_DELTA_ADDED: { + fileExistsInCurrent = true; break; } - if ((baton->error_code = git_diff_find_similar(diffs, NULL)) != GIT_OK) { - git_commit_free(nextCommit); - break; - } - } else { - if ((baton->error_code = git_diff_tree_to_tree(&diffs, repo, NULL, thisTree, NULL)) != GIT_OK) { - git_commit_free(nextCommit); + case GIT_DELTA_MODIFIED: { + fileExistsInCurrent = true; + fileExistsInSomeParent = true; break; } - if((baton->error_code = git_diff_find_similar(diffs, NULL)) != GIT_OK) { - git_commit_free(nextCommit); + case GIT_DELTA_DELETED: { + fileExistsInSomeParent = true; break; } - } - - flag = false; - numDeltas = git_diff_num_deltas(diffs); - for (unsigned int j = 0; j < numDeltas; ++j) { - git_patch *nextPatch; - baton->error_code = git_patch_from_diff(&nextPatch, diffs, j); - - if (baton->error_code < GIT_OK) { + case GIT_DELTA_RENAMED: { + if (fileHistoryEvent->existsInCurrentTree) { + fileExistsInCurrent = true; + } else { + fileExistsInSomeParent = true; + } break; } - - if (nextPatch == NULL) { - continue; - } - - const git_diff_delta *delta = git_patch_get_delta(nextPatch); - bool isEqualOldFile = !strncmp(delta->old_file.path, baton->file_path, strlen(baton->file_path)); - bool isEqualNewFile = !strncmp(delta->new_file.path, baton->file_path, strlen(baton->file_path)); - int oldLen = strlen(delta->old_file.path); - int newLen = strlen(delta->new_file.path); - char *outPair = new char[oldLen + newLen + 2]; - strcpy(outPair, delta->new_file.path); - outPair[newLen] = '\n'; - outPair[newLen + 1] = '\0'; - strcat(outPair, delta->old_file.path); - - if (isEqualNewFile) { - std::pair > *historyEntry; - if (!isEqualOldFile || delta->status == GIT_DELTA_RENAMED) { - historyEntry = new std::pair >( - nextCommit, - std::pair(strdup(outPair), delta->status) - ); - } else { - historyEntry = new std::pair >( - nextCommit, - std::pair(strdup(delta->new_file.path), delta->status) - ); + case GIT_DELTA_UNMODIFIED: { + if (fileHistoryEvent->existsInCurrentTree) { + fileExistsInCurrent = true; + fileExistsInSomeParent = true; } - baton->out->push_back(historyEntry); - flag = true; - } else if (isEqualOldFile) { - std::pair > *historyEntry; - historyEntry = new std::pair >( - nextCommit, - std::pair(strdup(outPair), delta->status) - ); - baton->out->push_back(historyEntry); - flag = true; + firstMatchingParentIndex = std::make_pair(true, parentIndex); + break; } - - delete[] outPair; - - git_patch_free(nextPatch); - - if (flag) { + default: { break; } } - } - git_diff_free(diffs); + delete fileHistoryEvent; - if (!flag && nextCommit != NULL) { - git_commit_free(nextCommit); + if (firstMatchingParentIndex.first) { + git_commit_free(parentCommit); + git_tree_free(parentTree); + break; + } } if (baton->error_code != GIT_OK) { + git_tree_free(currentTree); + git_commit_free(currentCommit); break; } - } - free(nextOid); + if (!firstMatchingParentIndex.first) { + assert(fileExistsInCurrent || fileExistsInSomeParent); + git_delta_t mergeType = GIT_DELTA_UNREADABLE; // It will never result in this case because of the assertion above. + if (fileExistsInCurrent && fileExistsInSomeParent) { + mergeType = GIT_DELTA_MODIFIED; + } else if (fileExistsInCurrent) { + mergeType = GIT_DELTA_ADDED; + } else if (fileExistsInSomeParent) { + mergeType = GIT_DELTA_DELETED; + } - if (baton->error_code != GIT_OK) { - if (baton->error_code != GIT_ITEROVER) { - baton->error = git_error_dup(git_error_last()); + FileHistoryEvent *fileHistoryEvent = new FileHistoryEvent( + mergeType, + mergeType != GIT_DELTA_DELETED, + true, + currentCommit, + NULL, + NULL + ); + baton->out->push_back(fileHistoryEvent); + git_tree_free(currentTree); + git_commit_free(currentCommit); + continue; + } - while(!baton->out->empty()) - { - std::pair > *pairToFree = baton->out->back(); - baton->out->pop_back(); - git_commit_free(pairToFree->first); - free(pairToFree->second.first); - free(pairToFree); + assert(firstMatchingParentIndex.first); + for (unsigned int parentIndex = 0; parentIndex < parentCount; ++parentIndex) { + if (parentIndex == firstMatchingParentIndex.second) { + continue; } - delete baton->out; + const git_oid *parentOid = git_commit_parent_id(currentCommit, parentIndex); + assert(parentOid != NULL); + git_revwalk_hide(baton->walk, parentOid); + } + git_commit_free(currentCommit); + git_tree_free(currentTree); + } - baton->out = NULL; + if (baton->error_code != GIT_OK && baton->error_code != GIT_ITEROVER) { + // Something went wrong in our loop, discard everything in the async worker + for (unsigned int i = 0; i < baton->out->size(); ++i) { + delete static_cast(baton->out->at(i)); } - } else { - baton->error_code = GIT_OK; + delete baton->out; + baton->out = NULL; + baton->error = git_error_dup(git_error_last()); } } void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() { if (baton->out != NULL) { - unsigned int size = baton->out->size(); - Local result = Nan::New(size); + const unsigned int size = baton->out->size(); + v8::Local result = Nan::New(size); for (unsigned int i = 0; i < size; i++) { - Local historyEntry = Nan::New(); - std::pair > *batonResult = baton->out->at(i); - Nan::Set(historyEntry, Nan::New("commit").ToLocalChecked(), GitCommit::New(batonResult->first, true)); - Nan::Set(historyEntry, Nan::New("status").ToLocalChecked(), Nan::New(batonResult->second.second)); - if (batonResult->second.second == GIT_DELTA_RENAMED) { - char *namePair = batonResult->second.first; - char *split = strchr(namePair, '\n'); - *split = '\0'; - char *oldName = split + 1; - - Nan::Set(historyEntry, Nan::New("oldName").ToLocalChecked(), Nan::New(oldName).ToLocalChecked()); - Nan::Set(historyEntry, Nan::New("newName").ToLocalChecked(), Nan::New(namePair).ToLocalChecked()); - } - Nan::Set(result, Nan::New(i), historyEntry); - - free(batonResult->second.first); - free(batonResult); + FileHistoryEvent *batonResult = static_cast(baton->out->at(i)); + Nan::Set(result, Nan::New(i), batonResult->toJavascript()); + delete batonResult; } - Local argv[2] = { + Nan::Set(result, Nan::New("reachedEndOfHistory").ToLocalChecked(), Nan::New(baton->error_code == GIT_ITEROVER)); + + v8::Local argv[2] = { Nan::Null(), result }; @@ -289,7 +439,7 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() } if (baton->error) { - Local err; + v8::Local err; if (baton->error->message) { err = Nan::Error(baton->error->message)->ToObject(); } else { @@ -297,7 +447,7 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); - Local argv[1] = { + v8::Local argv[1] = { err }; callback->Call(1, argv, async_resource); @@ -311,10 +461,10 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() } if (baton->error_code < 0) { - Local err = Nan::Error("Method next has thrown an error.")->ToObject(); + v8::Local err = Nan::Error("Method next has thrown an error.")->ToObject(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); - Local argv[1] = { + v8::Local argv[1] = { err }; callback->Call(1, argv, async_resource); From 6231c50ae5064e98775e1eed1babeb3da4ec9c71 Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Thu, 16 May 2019 17:46:25 -0700 Subject: [PATCH 095/145] File history walk: include both new and old file paths when renamed --- generate/templates/manual/revwalk/file_history_walk.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index 555149e13..24b5ad16f 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -44,9 +44,10 @@ class FileHistoryEvent { Nan::Set(historyEntry, Nan::New("status").ToLocalChecked(), Nan::New(type)); Nan::Set(historyEntry, Nan::New("isMergeCommit").ToLocalChecked(), Nan::New(isMergeCommit)); if (type == GIT_DELTA_RENAMED) { - if (existsInCurrentTree) { + if (from != NULL) { Nan::Set(historyEntry, Nan::New("oldName").ToLocalChecked(), Nan::New(from).ToLocalChecked()); - } else { + } + if (to != NULL) { Nan::Set(historyEntry, Nan::New("newName").ToLocalChecked(), Nan::New(to).ToLocalChecked()); } } @@ -100,7 +101,7 @@ class FileHistoryEvent { false, currentCommit, delta->old_file.path, - NULL + delta->new_file.path ); git_diff_free(diff); git_tree_entry_free(currentEntry); @@ -139,7 +140,7 @@ class FileHistoryEvent { false, false, currentCommit, - NULL, + delta->old_file.path, delta->new_file.path ); git_diff_free(diff); From e3ed916e498c31ccb8a2ed84f44ae27d6d23d4c8 Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Thu, 16 May 2019 17:47:02 -0700 Subject: [PATCH 096/145] File history walk: include merge commit if trees have changed --- test/tests/revwalk.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/tests/revwalk.js b/test/tests/revwalk.js index 6c5865193..702bf35cf 100644 --- a/test/tests/revwalk.js +++ b/test/tests/revwalk.js @@ -234,6 +234,7 @@ describe("Revwalk", function() { }); magicShas = [ + "be6905d459f1b236e44b2445df25aff1783993e9", "4a34168b80fe706f52417106821c9cbfec630e47", "f80e085e3118bbd6aad49dad7c53bdc37088bf9b", "694b2d703a02501f288269bea7d1a5d643a83cc8", From 24cb2bfbb0f886ddfc022e6535756b7dc30a679e Mon Sep 17 00:00:00 2001 From: Ian Hattendorf Date: Mon, 20 May 2019 10:21:42 -0700 Subject: [PATCH 097/145] File history walk: memory management --- generate/templates/manual/revwalk/file_history_walk.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index 24b5ad16f..49c23445e 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -352,10 +352,10 @@ void GitRevwalk::FileHistoryWalkWorker::Execute() } delete fileHistoryEvent; + git_commit_free(parentCommit); + git_tree_free(parentTree); - if (firstMatchingParentIndex.first) { - git_commit_free(parentCommit); - git_tree_free(parentTree); + if (firstMatchingParentIndex.first) { break; } } @@ -414,6 +414,8 @@ void GitRevwalk::FileHistoryWalkWorker::Execute() baton->out = NULL; baton->error = git_error_dup(git_error_last()); } + free((void *)baton->file_path); + baton->file_path = NULL; } void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() From 7d277261b1e42883cf3df87710a103795a344c16 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 20 May 2019 12:12:51 -0700 Subject: [PATCH 098/145] Bump to v0.25.0-alpha.11 --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26400eda1..f86432772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## v0.25.0-alpha.11 [(2019-05-20)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.11) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.10...v0.25.0-alpha.11) + +#### Summary of changes +- Improve speed and correctness of fileHistoryWalk. The API should not have changed; however, when the end of the walk has been reached, `reachedEndOfHistory` will be specified on the resulting array. + +#### Merged PRs into NodeGit +- [Implement faster file history walk #1676](https://github.com/nodegit/nodegit/pull/1676) + + ## v0.25.0-alpha.10 [(2019-05-03)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.10) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.9...v0.25.0-alpha.10) diff --git a/package-lock.json b/package-lock.json index 5153839cc..0553fc82e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.10", + "version": "0.25.0-alpha.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3ffdeb2db..24813d442 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.10", + "version": "0.25.0-alpha.11", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 86b6dcb373264a54e88b99fc09f2a60e9415c8cd Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 21 May 2019 12:31:24 -0700 Subject: [PATCH 099/145] Clean up risky npm packages --- package-lock.json | 144 +++++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 66 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0553fc82e..7b9825c72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1334,9 +1334,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -1905,14 +1905,14 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", - "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", "dev": true, "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" }, "dependencies": { "abbrev": { @@ -1933,7 +1933,7 @@ "optional": true }, "are-we-there-yet": { - "version": "1.1.4", + "version": "1.1.5", "bundled": true, "dev": true, "optional": true, @@ -1957,7 +1957,7 @@ } }, "chownr": { - "version": "1.0.1", + "version": "1.1.1", "bundled": true, "dev": true, "optional": true @@ -1984,16 +1984,16 @@ "optional": true }, "debug": { - "version": "2.6.9", + "version": "4.1.1", "bundled": true, "dev": true, "optional": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-extend": { - "version": "0.5.1", + "version": "0.6.0", "bundled": true, "dev": true, "optional": true @@ -2042,7 +2042,7 @@ } }, "glob": { - "version": "7.1.2", + "version": "7.1.3", "bundled": true, "dev": true, "optional": true, @@ -2062,12 +2062,12 @@ "optional": true }, "iconv-lite": { - "version": "0.4.21", + "version": "0.4.24", "bundled": true, "dev": true, "optional": true, "requires": { - "safer-buffer": "^2.1.0" + "safer-buffer": ">= 2.1.2 < 3" } }, "ignore-walk": { @@ -2128,16 +2128,16 @@ "dev": true }, "minipass": { - "version": "2.2.4", + "version": "2.3.5", "bundled": true, "dev": true, "requires": { - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.1.0", + "version": "1.2.1", "bundled": true, "dev": true, "optional": true, @@ -2154,35 +2154,42 @@ } }, "ms": { - "version": "2.0.0", + "version": "2.1.1", "bundled": true, "dev": true, "optional": true }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, "needle": { - "version": "2.2.0", + "version": "2.3.0", "bundled": true, "dev": true, "optional": true, "requires": { - "debug": "^2.1.2", + "debug": "^4.1.0", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.10.0", + "version": "0.12.0", "bundled": true, "dev": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", - "needle": "^2.2.0", + "needle": "^2.2.1", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", - "rc": "^1.1.7", + "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" @@ -2199,13 +2206,13 @@ } }, "npm-bundled": { - "version": "1.0.3", + "version": "1.0.6", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.1.10", + "version": "1.4.1", "bundled": true, "dev": true, "optional": true, @@ -2280,12 +2287,12 @@ "optional": true }, "rc": { - "version": "1.2.7", + "version": "1.2.8", "bundled": true, "dev": true, "optional": true, "requires": { - "deep-extend": "^0.5.1", + "deep-extend": "^0.6.0", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" @@ -2315,16 +2322,16 @@ } }, "rimraf": { - "version": "2.6.2", + "version": "2.6.3", "bundled": true, "dev": true, "optional": true, "requires": { - "glob": "^7.0.5" + "glob": "^7.1.3" } }, "safe-buffer": { - "version": "5.1.1", + "version": "5.1.2", "bundled": true, "dev": true }, @@ -2341,7 +2348,7 @@ "optional": true }, "semver": { - "version": "5.5.0", + "version": "5.7.0", "bundled": true, "dev": true, "optional": true @@ -2392,17 +2399,17 @@ "optional": true }, "tar": { - "version": "4.4.1", + "version": "4.4.8", "bundled": true, "dev": true, "optional": true, "requires": { - "chownr": "^1.0.1", + "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.2.4", - "minizlib": "^1.1.0", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.1", + "safe-buffer": "^5.1.2", "yallist": "^3.0.2" } }, @@ -2413,12 +2420,12 @@ "optional": true }, "wide-align": { - "version": "1.1.2", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true, "requires": { - "string-width": "^1.0.2" + "string-width": "^1.0.2 || 2" } }, "wrappy": { @@ -2427,7 +2434,7 @@ "dev": true }, "yallist": { - "version": "3.0.2", + "version": "3.0.3", "bundled": true, "dev": true } @@ -2564,28 +2571,22 @@ "dev": true }, "handlebars": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.0.tgz", - "integrity": "sha512-l2jRuU1NAWK6AW5qqcTATWQJvNPEwkM7NEKSiv/gqOsoSQbVoWyqVEY5GS+XPQ88zLNmqASRpzfdm8d79hJS+w==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "dev": true, "requires": { - "async": "^2.5.0", + "neo-async": "^2.6.0", "optimist": "^0.6.1", "source-map": "^0.6.1", "uglify-js": "^3.1.4" }, "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "requires": { - "lodash": "^4.17.11" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -3135,9 +3136,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -3613,6 +3614,12 @@ } } }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, "node-gyp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-4.0.0.tgz", @@ -3627,7 +3634,7 @@ "request": "^2.87.0", "rimraf": "2", "semver": "~5.3.0", - "tar": "^2.0.0", + "tar": "^4.4.8", "which": "1" } }, @@ -3858,6 +3865,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", + "dev": true, "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" @@ -3866,7 +3874,8 @@ "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" + "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", + "dev": true } } }, @@ -5303,25 +5312,28 @@ "optional": true }, "uglify-js": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", - "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", + "version": "3.5.15", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.15.tgz", + "integrity": "sha512-fe7aYFotptIddkwcm6YuA0HmknBZ52ZzOsUxZEdhhkSsz7RfjHDX2QDxwKTiv4JQ5t5NhfmpgAK+J7LiDhKSqg==", + "dev": true, "optional": true, "requires": { - "commander": "~2.17.1", + "commander": "~2.20.0", "source-map": "~0.6.1" }, "dependencies": { "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true, "optional": true }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, "optional": true } } From 7489e69c30125ecac2adee2549c0a231436ab627 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 21 May 2019 12:36:07 -0700 Subject: [PATCH 100/145] Bump libssh2 to 1.8.2 --- vendor/libssh2/Makefile.in | 23 +- vendor/libssh2/NEWS | 79 +- vendor/libssh2/RELEASE-NOTES | 31 +- vendor/libssh2/aclocal.m4 | 191 ++--- vendor/libssh2/compile | 13 +- vendor/libssh2/config.guess | 920 ++++++++++----------- vendor/libssh2/config.sub | 418 +++++----- vendor/libssh2/configure | 204 ++--- vendor/libssh2/depcomp | 10 +- vendor/libssh2/docs/Makefile.in | 13 +- vendor/libssh2/example/Makefile.in | 133 ++- vendor/libssh2/example/libssh2_config.h.in | 11 +- vendor/libssh2/include/libssh2.h | 8 +- vendor/libssh2/install-sh | 551 ++++++++---- vendor/libssh2/ltmain.sh | 213 +++-- vendor/libssh2/m4/libtool.m4 | 21 +- vendor/libssh2/missing | 16 +- vendor/libssh2/src/Makefile.in | 142 +++- vendor/libssh2/src/channel.c | 26 +- vendor/libssh2/src/comp.c | 9 +- vendor/libssh2/src/kex.c | 24 + vendor/libssh2/src/libssh2_priv.h | 12 + vendor/libssh2/src/packet.c | 25 +- vendor/libssh2/src/session.c | 5 + vendor/libssh2/src/sftp.c | 317 +++++-- vendor/libssh2/src/transport.c | 26 +- vendor/libssh2/src/userauth.c | 55 +- vendor/libssh2/test-driver | 41 +- vendor/libssh2/tests/Makefile.in | 38 +- vendor/libssh2/win32/libssh2_config.h | 3 +- 30 files changed, 2190 insertions(+), 1388 deletions(-) diff --git a/vendor/libssh2/Makefile.in b/vendor/libssh2/Makefile.in index d95397cf0..61f9b1585 100644 --- a/vendor/libssh2/Makefile.in +++ b/vendor/libssh2/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -174,7 +174,7 @@ am__recursive_targets = \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - cscope distdir dist dist-all distcheck + cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -469,8 +469,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(srcdir)/Makefile.inc $(am__empty): @@ -642,7 +642,10 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -710,7 +713,7 @@ distdir: $(DISTFILES) ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir @@ -736,7 +739,7 @@ dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir @@ -754,7 +757,7 @@ dist dist-all: distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ @@ -764,7 +767,7 @@ distcheck: dist *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac diff --git a/vendor/libssh2/NEWS b/vendor/libssh2/NEWS index e3caaece5..a9c0a3f1b 100644 --- a/vendor/libssh2/NEWS +++ b/vendor/libssh2/NEWS @@ -1,5 +1,68 @@ Changelog for the libssh2 project. Generated with git2news.pl +Version 1.8.2 (25 Mar 2019) + +Daniel Stenberg (25 Mar 2019) +- RELEASE-NOTES: version 1.8.2 + +- [Will Cosgrove brought this change] + + moved MAX size declarations #330 + +- [Will Cosgrove brought this change] + + Fixed misapplied patch (#327) + + Fixes for user auth + +Version 1.8.1 (14 Mar 2019) + +Will Cosgrove (14 Mar 2019) +- [Michael Buckley brought this change] + + More 1.8.0 security fixes (#316) + + * Defend against possible integer overflows in comp_method_zlib_decomp. + + * Defend against writing beyond the end of the payload in _libssh2_transport_read(). + + * Sanitize padding_length - _libssh2_transport_read(). https://libssh2.org/CVE-2019-3861.html + + This prevents an underflow resulting in a potential out-of-bounds read if a server sends a too-large padding_length, possibly with malicious intent. + + * Prevent zero-byte allocation in sftp_packet_read() which could lead to an out-of-bounds read. https://libssh2.org/CVE-2019-3858.html + + * Check the length of data passed to sftp_packet_add() to prevent out-of-bounds reads. + + * Add a required_size parameter to sftp_packet_require et. al. to require callers of these functions to handle packets that are too short. https://libssh2.org/CVE-2019-3860.html + + * Additional length checks to prevent out-of-bounds reads and writes in _libssh2_packet_add(). https://libssh2.org/CVE-2019-3862.html + +GitHub (14 Mar 2019) +- [Will Cosgrove brought this change] + + 1.8 Security fixes (#314) + + * fixed possible integer overflow in packet_length + + CVE https://www.libssh2.org/CVE-2019-3861.html + + * fixed possible interger overflow with userauth_keyboard_interactive + + CVE https://www.libssh2.org/CVE-2019-3856.html + + * fixed possible out zero byte/incorrect bounds allocation + + CVE https://www.libssh2.org/CVE-2019-3857.html + + * bounds checks for response packets + + * fixed integer overflow in userauth_keyboard_interactive + + CVE https://www.libssh2.org/CVE-2019-3863.html + + * 1.8.1 release notes + Version 1.8.0 (25 Oct 2016) Daniel Stenberg (25 Oct 2016) @@ -5473,19 +5536,3 @@ Simon Josefsson (16 Nov 2009) Reported by Steven Van Ingelgem in . - -- Mention libssh2-style.el. - -- Use memmove instead of memcpy on overlapping memory areas. - - Reported by Bob Alexander in - . - -- Add. - -- Protect against crash on too small SSH_MSG_IGNORE packets. - - Reported by Bob Alexander - in . - -- add copyright line diff --git a/vendor/libssh2/RELEASE-NOTES b/vendor/libssh2/RELEASE-NOTES index 5b78ede38..d566bafe0 100644 --- a/vendor/libssh2/RELEASE-NOTES +++ b/vendor/libssh2/RELEASE-NOTES @@ -1,31 +1,12 @@ -libssh2 1.8.0 - -This release includes the following changes: - - o added a basic dockerised test suite - o crypto: add support for the mbedTLS backend +libssh2 1.8.2 This release includes the following bugfixes: - o libgcrypt: fixed a NULL pointer dereference on OOM - o VMS: can't use %zd for off_t format - o VMS: update vms/libssh2_config.h - o windows: link with crypt32.lib - o libssh2_channel_open: speeling error fixed in channel error message - o msvc: fixed 14 compilation warnings - o tests: HAVE_NETINET_IN_H was not defined correctly - o openssl: add OpenSSL 1.1.0 compatibility - o cmake: Add CLEAR_MEMORY option, analogously to that for autoconf - o configure: make the --with-* options override the OpenSSL default - o libssh2_wait_socket: set err_msg on errors - o libssh2_wait_socket: Fix comparison with api_timeout to use milliseconds - + o Fixed the misapplied userauth patch that broke 1.8.1 + o moved the MAX size declarations from the public header + This release would not have looked like this without help, code, reports and advice from friends like these: - Alexander Lamaison, Antenore Gatta, Brad Harder, Charles Collicutt, - Craig A. Berry, Dan Fandrich, Daniel Stenberg, Kamil Dudka, Keno Fischer, - Taylor Holberton, Viktor Szakats, Will Cosgrove, Zenju - (12 contributors) - - Thanks! (and sorry if I forgot to mention someone) + Will Cosgrove + (1 contributors) diff --git a/vendor/libssh2/aclocal.m4 b/vendor/libssh2/aclocal.m4 index 41ad8c694..35a317296 100644 --- a/vendor/libssh2/aclocal.m4 +++ b/vendor/libssh2/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.15 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2014 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -32,10 +32,10 @@ To do so, use the procedure documented by the package, typically 'autoreconf'.]) # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.15' +[am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.15], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.15])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -332,13 +332,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. - # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], @@ -346,49 +345,41 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + AS_CASE([$CONFIG_FILES], + [*\'*], [eval set x "$CONFIG_FILES"], + [*], [set x $CONFIG_FILES]) shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`AS_DIRNAME(["$am_mf"])` + am_filepart=`AS_BASENAME(["$am_mf"])` + AM_RUN_LOG([cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles]) || am_rc=$? done + if test $am_rc -ne 0; then + AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking).]) + fi + AS_UNSET([am_dirpart]) + AS_UNSET([am_filepart]) + AS_UNSET([am_mf]) + AS_UNSET([am_rc]) + rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -397,18 +388,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each '.P' file that we will -# need in order to bootstrap the dependency handling code. +# This code is only required when automatic dependency tracking is enabled. +# This creates each '.Po' and '.Plo' makefile fragment that we'll need in +# order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) + [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -495,8 +485,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. @@ -563,7 +553,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -605,7 +595,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -626,7 +616,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2014 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -648,7 +638,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -683,7 +673,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -691,49 +681,42 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # AM_MAKE_INCLUDE() # ----------------- -# Check to see how make treats includes. +# Check whether make has an 'include' directive that can support all +# the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' +[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) + AS_CASE([$?:`cat confinc.out 2>/dev/null`], + ['0:this is the am__doit target'], + [AS_CASE([$s], + [BSD], [am__include='.include' am__quote='"'], + [am__include='include' am__quote=''])]) + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +AC_MSG_RESULT([${_am_result}]) +AC_SUBST([am__include])]) +AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2014 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -772,7 +755,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -801,7 +784,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -848,7 +831,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -867,7 +850,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -948,7 +931,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1008,7 +991,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2014 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1036,7 +1019,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2014 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1055,7 +1038,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2014 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/vendor/libssh2/compile b/vendor/libssh2/compile index a85b723c7..99e50524b 100755 --- a/vendor/libssh2/compile +++ b/vendor/libssh2/compile @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ EOF echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/vendor/libssh2/config.guess b/vendor/libssh2/config.guess index d622a44e5..f50dcdb6d 100755 --- a/vendor/libssh2/config.guess +++ b/vendor/libssh2/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,24 +15,22 @@ timestamp='2012-02-10' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -43,7 +39,7 @@ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -113,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; + ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; @@ -138,9 +132,37 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "$UNAME_SYSTEM" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval "$set_cc_for_build" + cat <<-EOF > "$dummy.c" + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + + # If ldd exists, use it to detect musl libc. + if command -v ldd >/dev/null && \ + ldd --version 2>&1 | grep -q ^musl + then + LIBC=musl + fi + ;; +esac + # Note: order is significant - the case branches are not exclusive. -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in +case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -153,21 +175,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + "/sbin/$sysctl" 2>/dev/null || \ + "/usr/sbin/$sysctl" 2>/dev/null || \ + echo unknown)` + case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + earmv*) + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine="${arch}${endian}"-unknown + ;; + *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in + # to ELF recently (or will in the future) and ABI. + case "$UNAME_MACHINE_ARCH" in + earm*) + os=netbsdelf + ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -182,40 +214,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "$UNAME_MACHINE_ARCH" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in + case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "$machine-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" + exit ;; + *:LibertyBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" + exit ;; + *:MidnightBSD:*:*) + echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" + exit ;; + *:Sortix:*:*) + echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Redox:*:*) + echo "$UNAME_MACHINE"-unknown-redox + exit ;; + mips:OSF1:*.*) + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -232,63 +291,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; + UNAME_MACHINE=alpha ;; "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; + UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; + UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; + UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; + UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; + UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; + UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; + UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; + UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; + UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; + UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos + echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos + echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -300,9 +350,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} + echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -327,38 +377,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux${UNAME_RELEASE} + echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" + eval "$set_cc_for_build" + SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then - SUN_ARCH="x86_64" + SUN_ARCH=x86_64 fi fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in @@ -367,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) - echo m68k-sun-sunos${UNAME_RELEASE} + echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) - echo sparc-sun-sunos${UNAME_RELEASE} + echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} + echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not @@ -396,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} + echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} + echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} + echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} + echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} + echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} + echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} + echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} + echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { @@ -442,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} + echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax @@ -484,17 +534,17 @@ EOF AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] + if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ + [ "$TARGET_BINARY_INTERFACE"x = x ] then - echo m88k-dg-dgux${UNAME_RELEASE} + echo m88k-dg-dgux"$UNAME_RELEASE" else - echo m88k-dg-dguxbcs${UNAME_RELEASE} + echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else - echo i586-dg-dgux${UNAME_RELEASE} + echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) @@ -511,7 +561,7 @@ EOF echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id @@ -523,14 +573,14 @@ EOF if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include main() @@ -541,7 +591,7 @@ EOF exit(0); } EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else @@ -555,26 +605,27 @@ EOF exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} + echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) + ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx @@ -589,28 +640,28 @@ EOF echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + case "$UNAME_MACHINE" in + 9000/31?) HP_ARCH=m68000 ;; + 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + case "$sc_cpu_version" in + 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 + 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + case "$sc_kernel_bits" in + 32) HP_ARCH=hppa2.0n ;; + 64) HP_ARCH=hppa2.0w ;; + '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + if [ "$HP_ARCH" = "" ]; then + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include @@ -643,13 +694,13 @@ EOF exit (0); } EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ ${HP_ARCH} = "hppa2.0w" ] + if [ "$HP_ARCH" = hppa2.0w ] then - eval $set_cc_for_build + eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -660,23 +711,23 @@ EOF # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then - HP_ARCH="hppa2.0w" + HP_ARCH=hppa2.0w else - HP_ARCH="hppa64" + HP_ARCH=hppa64 fi fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} + echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} + HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #include int main () @@ -701,11 +752,11 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) @@ -714,7 +765,7 @@ EOF *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) @@ -722,9 +773,9 @@ EOF exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk + echo "$UNAME_MACHINE"-unknown-osf1mk else - echo ${UNAME_MACHINE}-unknown-osf1 + echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -749,124 +800,109 @@ EOF echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` - case ${UNAME_PROCESSOR} in + case "$UNAME_PROCESSOR" in amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=x86_64 ;; + i386) + UNAME_PROCESSOR=i586 ;; esac + echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + echo "$UNAME_MACHINE"-pc-cygwin exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 + *:MINGW64*:*) + echo "$UNAME_MACHINE"-pc-mingw64 exit ;; - i*:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys + *:MINGW*:*) + echo "$UNAME_MACHINE"-pc-mingw32 exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + *:MSYS*:*) + echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 + echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) - case ${UNAME_MACHINE} in + case "$UNAME_MACHINE" in x86) - echo i586-pc-interix${UNAME_RELEASE} + echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix${UNAME_RELEASE} + echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) - echo ia64-unknown-interix${UNAME_RELEASE} + echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin + echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix + echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,63 +915,64 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC=gnulibc1 ; fi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval $set_cc_for_build + eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo "$UNAME_MACHINE"-axis-linux-"$LIBC" + exit ;; + e2k:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + k1om:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + eval "$set_cc_for_build" + sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el @@ -949,55 +986,74 @@ EOF #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" + test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; - or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + mips64el:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-"$LIBC" + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; + PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; + *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-"$LIBC" + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-"$LIBC" + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-"$LIBC" + exit ;; + riscv32:Linux:*:* | riscv64:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + if objdump -f /bin/sh | grep -q elf32-x86-64; then + echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 + else + echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + fi exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1011,34 +1067,34 @@ EOF # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx + echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop + echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos + echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable + echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp + echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + i*86:*:4.*:*) + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) @@ -1048,12 +1104,12 @@ EOF *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 @@ -1063,9 +1119,9 @@ EOF && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else - echo ${UNAME_MACHINE}-pc-sysv32 + echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) @@ -1073,7 +1129,7 @@ EOF # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that + # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; @@ -1085,9 +1141,9 @@ EOF exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1107,9 +1163,9 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; @@ -1118,28 +1174,28 @@ EOF test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} + echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 @@ -1150,7 +1206,7 @@ EOF *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 + echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi @@ -1170,23 +1226,23 @@ EOF exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos + echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} + echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv"$UNAME_RELEASE" else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1201,66 +1257,97 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} + echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} + echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} + echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} + echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} + echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} + echo sx8r-nec-superux"$UNAME_RELEASE" + exit ;; + SX-ACE:SUPER-UX:*:*) + echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} + echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + eval "$set_cc_for_build" + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then + if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then + if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} + NEO-*:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} + NSR-*:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} + NSV-*:NONSTOP_KERNEL:*:*) + echo nsv-tandem-nsk"$UNAME_RELEASE" + exit ;; + NSX-*:NONSTOP_KERNEL:*:*) + echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux @@ -1269,18 +1356,18 @@ EOF echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - if test "$cputype" = "386"; then + if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-unknown-plan9 + echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 @@ -1301,14 +1388,14 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in + case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; @@ -1317,185 +1404,48 @@ EOF echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos + echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros + echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-unknown-esx + echo "$UNAME_MACHINE"-unknown-esx + exit ;; + amd64:Isilon\ OneFS:*:*) + echo x86_64-unknown-onefs exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif +echo "$0: unable to guess system type" >&2 -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif +case "$UNAME_MACHINE:$UNAME_SYSTEM" in + mips:Linux | mips64:Linux) + # If we got here on MIPS GNU/Linux, output extra information. + cat >&2 < -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} +NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize +the system type. Please install a C compiler and try again. EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi + ;; +esac cat >&2 < in order to provide the needed -information to handle your system. +If $0 has already been updated, send the following data and any +information you think might be pertinent to config-patches@gnu.org to +provide the necessary information to handle your system. config.guess timestamp = $timestamp @@ -1514,16 +1464,16 @@ hostinfo = `(hostinfo) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} +UNAME_MACHINE = "$UNAME_MACHINE" +UNAME_RELEASE = "$UNAME_RELEASE" +UNAME_SYSTEM = "$UNAME_SYSTEM" +UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/vendor/libssh2/config.sub b/vendor/libssh2/config.sub index c894da455..1d8e98bce 100755 --- a/vendor/libssh2/config.sub +++ b/vendor/libssh2/config.sub @@ -1,36 +1,31 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2018-02-22' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, see . +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -38,7 +33,7 @@ timestamp='2012-02-10' # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD +# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -58,12 +53,11 @@ timestamp='2012-02-10' me=`echo "$0" | sed -e 's,.*/,,'` usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS +Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. -Operation modes: +Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit @@ -73,9 +67,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -102,7 +94,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. - echo $1 + echo "$1" exit ;; * ) @@ -120,24 +112,24 @@ esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ + kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` + basic_machine=`echo "$1" | sed 's/-[^-]*$//'` + if [ "$basic_machine" != "$1" ] + then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac @@ -156,7 +148,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -186,53 +178,56 @@ case $os in ;; -sco6) os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` + basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos @@ -253,21 +248,25 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | epiphany \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ - | i370 | i860 | i960 | ia64 \ + | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ + | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -281,26 +280,30 @@ case $basic_machine in | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pru \ | pyramid \ + | riscv32 | riscv64 \ | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ @@ -308,7 +311,8 @@ case $basic_machine in | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | we32k \ + | visium \ + | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown @@ -322,11 +326,14 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown @@ -355,7 +362,7 @@ case $basic_machine in ;; # Object if more than one company name word. *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. @@ -364,26 +371,29 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ + | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -397,28 +407,34 @@ case $basic_machine in | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pru-* \ | pyramid-* \ + | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ @@ -426,6 +442,8 @@ case $basic_machine in | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ + | visium-* \ + | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -439,7 +457,7 @@ case $basic_machine in # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) - basic_machine=i386-unknown + basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) @@ -473,7 +491,7 @@ case $basic_machine in basic_machine=x86_64-pc ;; amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl @@ -502,6 +520,9 @@ case $basic_machine in basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -515,7 +536,7 @@ case $basic_machine in os=-linux ;; blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) @@ -523,13 +544,13 @@ case $basic_machine in os=-cnk ;; c54x-*) - basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) - basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) - basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray @@ -618,10 +639,18 @@ case $basic_machine in basic_machine=rs6000-bull os=-bosx ;; - dpx2* | dpx2*-bull) + dpx2*) basic_machine=m68k-bull os=-sysv3 ;; + e500v[12]) + basic_machine=powerpc-unknown + os=$os"spe" + ;; + e500v[12]-*) + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + os=$os"spe" + ;; ebmon29k) basic_machine=a29k-amd os=-ebmon @@ -711,9 +740,6 @@ case $basic_machine in hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; - hppa-next) - os=-nextstep3 - ;; hppaosf) basic_machine=hppa1.1-hp os=-osf @@ -726,26 +752,26 @@ case $basic_machine in basic_machine=i370-ibm ;; i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; - i386-vsta | vsta) + vsta) basic_machine=i386-unknown os=-vsta ;; @@ -763,17 +789,17 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; - m88k-omron*) - basic_machine=m88k-omron - ;; magnum | m3230) basic_machine=mips-mips os=-sysv @@ -782,11 +808,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -801,10 +831,10 @@ case $basic_machine in os=-mint ;; mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k @@ -814,15 +844,19 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -861,7 +895,7 @@ case $basic_machine in basic_machine=v70-nec os=-sysv ;; - next | m*-next ) + next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) @@ -906,6 +940,12 @@ case $basic_machine in nsr-tandem) basic_machine=nsr-tandem ;; + nsv-tandem) + basic_machine=nsv-tandem + ;; + nsx-tandem) + basic_machine=nsx-tandem + ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf @@ -938,7 +978,7 @@ case $basic_machine in os=-linux ;; parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) @@ -954,7 +994,7 @@ case $basic_machine in basic_machine=i386-pc ;; pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc @@ -969,16 +1009,16 @@ case $basic_machine in basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould @@ -988,23 +1028,23 @@ case $basic_machine in ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppcle | powerpclittle | ppc-le | powerpc-little) + ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) + ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm @@ -1013,7 +1053,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1054,17 +1098,10 @@ case $basic_machine in sequent) basic_machine=i386-sequent ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; sh5el) basic_machine=sh5le-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) + simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; @@ -1083,7 +1120,7 @@ case $basic_machine in os=-sysv4 ;; strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun @@ -1205,6 +1242,9 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + x64) + basic_machine=x86_64-pc + ;; xbox) basic_machine=i686-pc os=-mingw32 @@ -1213,20 +1253,12 @@ case $basic_machine in basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) - basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; none) basic_machine=none-none os=-none @@ -1255,10 +1287,6 @@ case $basic_machine in vax) basic_machine=vax-dec ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; pdp11) basic_machine=pdp11-dec ;; @@ -1268,9 +1296,6 @@ case $basic_machine in sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; cydra) basic_machine=cydra-cydrome ;; @@ -1290,7 +1315,7 @@ case $basic_machine in # Make sure to match an already-canonicalized machine name. ;; *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac @@ -1298,10 +1323,10 @@ esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; @@ -1312,8 +1337,8 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases that might get confused + # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux @@ -1324,45 +1349,48 @@ case $os in -solaris) os=-solaris2 ;; - -svr4*) - os=-sysv4 - ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; - # First accept the basic system types. + # es1800 is here to avoid being matched by es* (a different OS) + -es1800*) + os=-ose + ;; + # Now accept the basic system types. # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. + # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ + | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ + | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ + | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1379,12 +1407,12 @@ case $os in -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + -sim | -xray | -os68k* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) - os=`echo $os | sed -e 's|mac|macos|'` + os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc @@ -1393,10 +1421,10 @@ case $os in os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` + os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` + os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition @@ -1407,12 +1435,6 @@ case $os in -wince*) os=-wince ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; -utek*) os=-bsd ;; @@ -1437,7 +1459,7 @@ case $os in -nova*) os=-rtmk-nova ;; - -ns2 ) + -ns2) os=-nextstep2 ;; -nsk*) @@ -1459,7 +1481,7 @@ case $os in -oss*) os=-sysv3 ;; - -svr4) + -svr4*) os=-sysv4 ;; -svr3) @@ -1474,35 +1496,38 @@ case $os in -ose*) os=-ose ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; + -pikeos*) + # Until real need of OS specific support for + # particular features comes up, bare metal + # configurations are quite functional. + case $basic_machine in + arm*) + os=-eabi + ;; + *) + os=-elf + ;; + esac + ;; -nacl*) ;; + -ios) + ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac @@ -1537,6 +1562,12 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1586,12 +1617,12 @@ case $basic_machine in sparc-* | *-sun) os=-sunos4.1.1 ;; + pru-*) + os=-elf + ;; *-be) os=-beos ;; - *-haiku) - os=-haiku - ;; *-ibm) os=-aix ;; @@ -1631,7 +1662,7 @@ case $basic_machine in m88k-omron*) os=-luna ;; - *-next ) + *-next) os=-nextstep ;; *-sequent) @@ -1646,9 +1677,6 @@ case $basic_machine in i370-*) os=-mvs ;; - *-next) - os=-nextstep3 - ;; *-gould) os=-sysv ;; @@ -1758,15 +1786,15 @@ case $basic_machine in vendor=stratus ;; esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo $basic_machine$os +echo "$basic_machine$os" exit # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" diff --git a/vendor/libssh2/configure b/vendor/libssh2/configure index d891378d0..ac4d4931c 100755 --- a/vendor/libssh2/configure +++ b/vendor/libssh2/configure @@ -709,7 +709,6 @@ am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE -am__quote am__include DEPDIR OBJEXT @@ -797,7 +796,8 @@ PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR -SHELL' +SHELL +am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -2544,7 +2544,7 @@ $as_echo "$as_me: WARNING: sed was not found, this may ruin your chances to buil fi LIBSSH2VER=`$SED -ne 's/^#define LIBSSH2_VERSION *"\(.*\)"/\1/p' ${srcdir}/include/libssh2.h` -am__api_version='1.15' +am__api_version='1.16' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -3050,8 +3050,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: -# -# +# +# mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The @@ -3102,7 +3102,7 @@ END Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . +that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM @@ -3255,45 +3255,45 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" - -am_make=${MAKE-make} -cat > confinc << 'END' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +cat > confinc.mk << 'END' am__doit: - @echo this is the am__doit target + @echo this is the am__doit target >confinc.out .PHONY: am__doit END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# Ignore all kinds of additional output from 'make'. -case `$am_make -s -f confmf 2> /dev/null` in #( -*the\ am__doit\ target*) - am__include=include - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD +# BSD make does it like this. +echo '.include "confinc.mk" # ignored' > confmf.BSD +# Other make implementations (GNU, Solaris 10, AIX) do it like this. +echo 'include confinc.mk # ignored' > confmf.GNU +_am_result=no +for s in GNU BSD; do + { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 + (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + case $?:`cat confinc.out 2>/dev/null` in #( + '0:this is the am__doit target') : + case $s in #( + BSD) : + am__include='.include' am__quote='"' ;; #( + *) : + am__include='include' am__quote='' ;; +esac ;; #( + *) : ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf +esac + if test "$am__include" != "#"; then + _am_result="yes ($s style)" + break + fi +done +rm -f confinc.* confmf.* +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : @@ -7980,11 +7980,8 @@ _LT_EOF test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -10064,6 +10061,12 @@ lt_prog_compiler_static= lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -19338,7 +19341,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" +AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -20242,29 +20245,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac + # TODO: see whether this extra hack can be removed once we start + # requiring Autoconf 2.70 or later. + case $CONFIG_FILES in #( + *\'*) : + eval set x "$CONFIG_FILES" ;; #( + *) : + set x $CONFIG_FILES ;; #( + *) : + ;; +esac shift - for mf + # Used to flag and report bootstrapping failures. + am_rc=0 + for am_mf do # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named 'Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile which includes + # dependency-tracking related rules and includes. + # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | + sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ + || continue + am_dirpart=`$as_dirname -- "$am_mf" || +$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$am_mf" : 'X\(//\)[^/]' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -20282,53 +20291,48 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running 'make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "$am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ + am_filepart=`$as_basename -- "$am_mf" || +$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ + X"$am_mf" : 'X\(//\)$' \| \ + X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$am_mf" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } - /^X\(\/\/\)$/{ + /^X\/\(\/\/\)$/{ s//\1/ q } - /^X\(\/\).*/{ + /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done + { echo "$as_me:$LINENO: cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles" >&5 + (cd "$am_dirpart" \ + && sed -e '/# am--include-marker/d' "$am_filepart" \ + | $MAKE -f - am--depfiles) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } || am_rc=$? done + if test $am_rc -ne 0; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "Something went wrong bootstrapping makefile fragments + for automatic dependency tracking. Try re-running configure with the + '--disable-dependency-tracking' option to at least be able to build + the package (albeit without support for automatic dependency tracking). +See \`config.log' for more details" "$LINENO" 5; } + fi + { am_dirpart=; unset am_dirpart;} + { am_filepart=; unset am_filepart;} + { am_mf=; unset am_mf;} + { am_rc=; unset am_rc;} + rm -f conftest-deps.mk } ;; "libtool":C) diff --git a/vendor/libssh2/depcomp b/vendor/libssh2/depcomp index fc98710e2..65cbf7093 100755 --- a/vendor/libssh2/depcomp +++ b/vendor/libssh2/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2013-05-30.07; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -783,9 +783,9 @@ exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/vendor/libssh2/docs/Makefile.in b/vendor/libssh2/docs/Makefile.in index 857a39315..7ba7369e9 100644 --- a/vendor/libssh2/docs/Makefile.in +++ b/vendor/libssh2/docs/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -498,8 +498,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -566,7 +566,10 @@ ctags CTAGS: cscope cscopelist: -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ diff --git a/vendor/libssh2/example/Makefile.in b/vendor/libssh2/example/Makefile.in index 87f9f1286..ca43d33ec 100644 --- a/vendor/libssh2/example/Makefile.in +++ b/vendor/libssh2/example/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -227,7 +227,19 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/direct_tcpip.Po ./$(DEPDIR)/scp.Po \ + ./$(DEPDIR)/scp_nonblock.Po ./$(DEPDIR)/scp_write.Po \ + ./$(DEPDIR)/scp_write_nonblock.Po ./$(DEPDIR)/sftp.Po \ + ./$(DEPDIR)/sftp_RW_nonblock.Po ./$(DEPDIR)/sftp_append.Po \ + ./$(DEPDIR)/sftp_mkdir.Po ./$(DEPDIR)/sftp_mkdir_nonblock.Po \ + ./$(DEPDIR)/sftp_nonblock.Po ./$(DEPDIR)/sftp_write.Po \ + ./$(DEPDIR)/sftp_write_nonblock.Po \ + ./$(DEPDIR)/sftp_write_sliding.Po ./$(DEPDIR)/sftpdir.Po \ + ./$(DEPDIR)/sftpdir_nonblock.Po ./$(DEPDIR)/ssh2.Po \ + ./$(DEPDIR)/ssh2_agent.Po ./$(DEPDIR)/ssh2_echo.Po \ + ./$(DEPDIR)/ssh2_exec.Po ./$(DEPDIR)/subsystem_netconf.Po \ + ./$(DEPDIR)/tcpip-forward.Po ./$(DEPDIR)/x11.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -459,8 +471,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -590,29 +602,35 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_tcpip.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp_write.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp_write_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_RW_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_append.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_mkdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_mkdir_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_write.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_write_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_write_sliding.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpdir.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpdir_nonblock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2_agent.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2_echo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2_exec.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subsystem_netconf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpip-forward.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_tcpip.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp_write.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp_write_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_RW_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_append.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_mkdir.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_mkdir_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_write.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_write_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp_write_sliding.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpdir.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftpdir_nonblock.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2_agent.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2_echo.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2_exec.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subsystem_netconf.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpip-forward.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -693,7 +711,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -763,7 +784,29 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/direct_tcpip.Po + -rm -f ./$(DEPDIR)/scp.Po + -rm -f ./$(DEPDIR)/scp_nonblock.Po + -rm -f ./$(DEPDIR)/scp_write.Po + -rm -f ./$(DEPDIR)/scp_write_nonblock.Po + -rm -f ./$(DEPDIR)/sftp.Po + -rm -f ./$(DEPDIR)/sftp_RW_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_append.Po + -rm -f ./$(DEPDIR)/sftp_mkdir.Po + -rm -f ./$(DEPDIR)/sftp_mkdir_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_write.Po + -rm -f ./$(DEPDIR)/sftp_write_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_write_sliding.Po + -rm -f ./$(DEPDIR)/sftpdir.Po + -rm -f ./$(DEPDIR)/sftpdir_nonblock.Po + -rm -f ./$(DEPDIR)/ssh2.Po + -rm -f ./$(DEPDIR)/ssh2_agent.Po + -rm -f ./$(DEPDIR)/ssh2_echo.Po + -rm -f ./$(DEPDIR)/ssh2_exec.Po + -rm -f ./$(DEPDIR)/subsystem_netconf.Po + -rm -f ./$(DEPDIR)/tcpip-forward.Po + -rm -f ./$(DEPDIR)/x11.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags @@ -809,7 +852,29 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/direct_tcpip.Po + -rm -f ./$(DEPDIR)/scp.Po + -rm -f ./$(DEPDIR)/scp_nonblock.Po + -rm -f ./$(DEPDIR)/scp_write.Po + -rm -f ./$(DEPDIR)/scp_write_nonblock.Po + -rm -f ./$(DEPDIR)/sftp.Po + -rm -f ./$(DEPDIR)/sftp_RW_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_append.Po + -rm -f ./$(DEPDIR)/sftp_mkdir.Po + -rm -f ./$(DEPDIR)/sftp_mkdir_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_write.Po + -rm -f ./$(DEPDIR)/sftp_write_nonblock.Po + -rm -f ./$(DEPDIR)/sftp_write_sliding.Po + -rm -f ./$(DEPDIR)/sftpdir.Po + -rm -f ./$(DEPDIR)/sftpdir_nonblock.Po + -rm -f ./$(DEPDIR)/ssh2.Po + -rm -f ./$(DEPDIR)/ssh2_agent.Po + -rm -f ./$(DEPDIR)/ssh2_echo.Po + -rm -f ./$(DEPDIR)/ssh2_exec.Po + -rm -f ./$(DEPDIR)/subsystem_netconf.Po + -rm -f ./$(DEPDIR)/tcpip-forward.Po + -rm -f ./$(DEPDIR)/x11.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -830,9 +895,9 @@ uninstall-am: .MAKE: all install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libtool clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/vendor/libssh2/example/libssh2_config.h.in b/vendor/libssh2/example/libssh2_config.h.in index af4ab9ca0..307c62553 100644 --- a/vendor/libssh2/example/libssh2_config.h.in +++ b/vendor/libssh2/example/libssh2_config.h.in @@ -64,8 +64,8 @@ /* Define if you have the gcrypt library. */ #undef HAVE_LIBGCRYPT -/* Define if you have the mbedtls library. */ -#undef HAVE_LIBMBEDTLS +/* Define if you have the mbedcrypto library. */ +#undef HAVE_LIBMBEDCRYPTO /* Define if you have the ssl library. */ #undef HAVE_LIBSSL @@ -79,6 +79,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `memset_s' function. */ +#undef HAVE_MEMSET_S + /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H @@ -178,10 +181,10 @@ /* Use mbedtls */ #undef LIBSSH2_MBEDTLS -/* Use OpenSSL */ +/* Use openssl */ #undef LIBSSH2_OPENSSL -/* Use Windows CNG */ +/* Use wincng */ #undef LIBSSH2_WINCNG /* Define to the sub-directory where libtool stores uninstalled libraries. */ diff --git a/vendor/libssh2/include/libssh2.h b/vendor/libssh2/include/libssh2.h index 34d284210..fdcf6163d 100644 --- a/vendor/libssh2/include/libssh2.h +++ b/vendor/libssh2/include/libssh2.h @@ -46,13 +46,13 @@ to make the BANNER define (used by src/session.c) be a valid SSH banner. Release versions have no appended strings and may of course not have dashes either. */ -#define LIBSSH2_VERSION "1.8.0" +#define LIBSSH2_VERSION "1.8.2" /* The numeric version number is also available "in parts" by using these defines: */ #define LIBSSH2_VERSION_MAJOR 1 #define LIBSSH2_VERSION_MINOR 8 -#define LIBSSH2_VERSION_PATCH 0 +#define LIBSSH2_VERSION_PATCH 2 /* This is the numeric version of the libssh2 version number, meant for easier parsing and comparions by programs. The LIBSSH2_VERSION_NUM define will @@ -69,7 +69,7 @@ and it is always a greater number in a more recent release. It makes comparisons with greater than and less than work. */ -#define LIBSSH2_VERSION_NUM 0x010800 +#define LIBSSH2_VERSION_NUM 0x010802 /* * This is the date and time when the full source package was created. The @@ -80,7 +80,7 @@ * * "Mon Feb 12 11:35:33 UTC 2007" */ -#define LIBSSH2_TIMESTAMP "Tue Oct 25 06:44:33 UTC 2016" +#define LIBSSH2_TIMESTAMP "Mon Mar 25 19:29:57 UTC 2019" #ifndef RC_INVOKED diff --git a/vendor/libssh2/install-sh b/vendor/libssh2/install-sh index 4d4a9519e..8175c640f 100755 --- a/vendor/libssh2/install-sh +++ b/vendor/libssh2/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,42 +35,57 @@ scriptversion=2005-05-14.22 # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. -# set DOITPROG to echo to test this script +tab=' ' +nl=' +' +IFS=" $tab$nl" -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +# Set DOITPROG to "echo" to test this script. -# put in absolute paths if you don't have them in your path; or use env. vars. +doit=${DOITPROG-} +doit_exec=${doit:-exec} -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 -chmodcmd="$chmodprog 0755" -chowncmd= chgrpcmd= -stripcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= -no_target_directory= +dst_arg= + +copy_on_change=false +is_target_a_directory=possibly -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -80,108 +95,168 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; - -d) dir_arg=true - shift - continue;; + -C) copy_on_change=true;; + + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true - shift - continue;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac + shift done -if test -z "$1"; then +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi +if test -z "$dir_arg"; then + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src ;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -190,82 +265,193 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi + dst=$dst_arg - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. + # If destination is a directory, append the input filename. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 + if test "$is_target_a_directory" = never; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dstbase=`basename "$src"` + case $dst in + */) dst=$dst$dstbase;; + *) dst=$dst/$dstbase;; + esac + dstdir_status=0 + else + dstdir=`dirname "$dst"` + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + case $dstdir in + */) dstdirslash=$dstdir;; + *) dstdirslash=$dstdir/;; + esac - # Make sure that the destination directory exists. + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # Note that $RANDOM variable is not portable (e.g. dash); Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p' feature. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; + esac - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - pathcomp= + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + oIFS=$IFS + IFS=/ + set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + dsttmp=${dstdirslash}_inst.$$_ + rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -273,51 +459,60 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + set +f && + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi done -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" # End: diff --git a/vendor/libssh2/ltmain.sh b/vendor/libssh2/ltmain.sh index a736cf994..f402c9c17 100644 --- a/vendor/libssh2/ltmain.sh +++ b/vendor/libssh2/ltmain.sh @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-2" +VERSION="2.4.6 Debian-2.4.6-10" package_revision=2.4.6 @@ -1370,7 +1370,7 @@ func_lt_ver () #! /bin/sh # Set a version string for this script. -scriptversion=2014-01-07.03; # UTC +scriptversion=2015-10-07.11; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 @@ -1530,6 +1530,8 @@ func_run_hooks () { $debug_cmd + _G_rc_run_hooks=false + case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; @@ -1538,16 +1540,16 @@ func_run_hooks () eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do - eval $_G_hook '"$@"' - - # store returned options list back into positional - # parameters for next 'cmd' execution. - eval _G_hook_result=\$${_G_hook}_result - eval set dummy "$_G_hook_result"; shift + if eval $_G_hook '"$@"'; then + # store returned options list back into positional + # parameters for next 'cmd' execution. + eval _G_hook_result=\$${_G_hook}_result + eval set dummy "$_G_hook_result"; shift + _G_rc_run_hooks=: + fi done - func_quote_for_eval ${1+"$@"} - func_run_hooks_result=$func_quote_for_eval_result + $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result } @@ -1557,10 +1559,16 @@ func_run_hooks () ## --------------- ## # In order to add your own option parsing hooks, you must accept the -# full positional parameter list in your hook function, remove any -# options that you action, and then pass back the remaining unprocessed +# full positional parameter list in your hook function, you may remove/edit +# any options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for -# 'eval'. Like this: +# 'eval'. In this case you also must return $EXIT_SUCCESS to let the +# hook's caller know that it should pay attention to +# '_result'. Returning $EXIT_FAILURE signalizes that +# arguments are left untouched by the hook and therefore caller will ignore the +# result variable. +# +# Like this: # # my_options_prep () # { @@ -1570,9 +1578,11 @@ func_run_hooks () # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' -# -# func_quote_for_eval ${1+"$@"} -# my_options_prep_result=$func_quote_for_eval_result +# # No change in '$@' (ignored completely by this hook). There is +# # no need to do the equivalent (but slower) action: +# # func_quote_for_eval ${1+"$@"} +# # my_options_prep_result=$func_quote_for_eval_result +# false # } # func_add_hook func_options_prep my_options_prep # @@ -1581,25 +1591,37 @@ func_run_hooks () # { # $debug_cmd # +# args_changed=false +# # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in -# --silent|-s) opt_silent=: ;; +# --silent|-s) opt_silent=: +# args_changed=: +# ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift +# args_changed=: # ;; -# *) set dummy "$_G_opt" "$*"; shift; break ;; +# *) # Make sure the first unrecognised option "$_G_opt" +# # is added back to "$@", we could need that later +# # if $args_changed is true. +# set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # -# func_quote_for_eval ${1+"$@"} -# my_silent_option_result=$func_quote_for_eval_result +# if $args_changed; then +# func_quote_for_eval ${1+"$@"} +# my_silent_option_result=$func_quote_for_eval_result +# fi +# +# $args_changed # } # func_add_hook func_parse_options my_silent_option # @@ -1611,16 +1633,32 @@ func_run_hooks () # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # -# func_quote_for_eval ${1+"$@"} -# my_option_validation_result=$func_quote_for_eval_result +# false # } # func_add_hook func_validate_options my_option_validation # -# You'll alse need to manually amend $usage_message to reflect the extra +# You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. +# func_options_finish [ARG]... +# ---------------------------- +# Finishing the option parse loop (call 'func_options' hooks ATM). +func_options_finish () +{ + $debug_cmd + + _G_func_options_finish_exit=false + if func_run_hooks func_options ${1+"$@"}; then + func_options_finish_result=$func_run_hooks_result + _G_func_options_finish_exit=: + fi + + $_G_func_options_finish_exit +} + + # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the @@ -1630,17 +1668,28 @@ func_options () { $debug_cmd - func_options_prep ${1+"$@"} - eval func_parse_options \ - ${func_options_prep_result+"$func_options_prep_result"} - eval func_validate_options \ - ${func_parse_options_result+"$func_parse_options_result"} + _G_rc_options=false - eval func_run_hooks func_options \ - ${func_validate_options_result+"$func_validate_options_result"} + for my_func in options_prep parse_options validate_options options_finish + do + if eval func_$my_func '${1+"$@"}'; then + eval _G_res_var='$'"func_${my_func}_result" + eval set dummy "$_G_res_var" ; shift + _G_rc_options=: + fi + done + + # Save modified positional parameters for caller. As a top-level + # options-parser function we always need to set the 'func_options_result' + # variable (regardless the $_G_rc_options value). + if $_G_rc_options; then + func_options_result=$_G_res_var + else + func_quote_for_eval ${1+"$@"} + func_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_options_result=$func_run_hooks_result + $_G_rc_options } @@ -1649,9 +1698,9 @@ func_options () # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and -# needs to propogate that back to rest of this script, then the complete +# needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before -# returning. +# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned). func_hookable func_options_prep func_options_prep () { @@ -1661,10 +1710,14 @@ func_options_prep () opt_verbose=false opt_warning_types= - func_run_hooks func_options_prep ${1+"$@"} + _G_rc_options_prep=false + if func_run_hooks func_options_prep ${1+"$@"}; then + _G_rc_options_prep=: + # save modified positional parameters for caller + func_options_prep_result=$func_run_hooks_result + fi - # save modified positional parameters for caller - func_options_prep_result=$func_run_hooks_result + $_G_rc_options_prep } @@ -1678,18 +1731,20 @@ func_parse_options () func_parse_options_result= + _G_rc_parse_options=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. - func_run_hooks func_parse_options ${1+"$@"} - - # Adjust func_parse_options positional parameters to match - eval set dummy "$func_run_hooks_result"; shift + if func_run_hooks func_parse_options ${1+"$@"}; then + eval set dummy "$func_run_hooks_result"; shift + _G_rc_parse_options=: + fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break + _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -1704,7 +1759,10 @@ func_parse_options () ;; --warnings|--warning|-W) - test $# = 0 && func_missing_arg $_G_opt && break + if test $# = 0 && func_missing_arg $_G_opt; then + _G_rc_parse_options=: + break + fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above @@ -1757,15 +1815,25 @@ func_parse_options () shift ;; - --) break ;; + --) _G_rc_parse_options=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + *) set dummy "$_G_opt" ${1+"$@"}; shift + _G_match_parse_options=false + break + ;; esac + + $_G_match_parse_options && _G_rc_parse_options=: done - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - func_parse_options_result=$func_quote_for_eval_result + + if $_G_rc_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + func_parse_options_result=$func_quote_for_eval_result + fi + + $_G_rc_parse_options } @@ -1778,16 +1846,21 @@ func_validate_options () { $debug_cmd + _G_rc_validate_options=false + # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" - func_run_hooks func_validate_options ${1+"$@"} + if func_run_hooks func_validate_options ${1+"$@"}; then + # save modified positional parameters for caller + func_validate_options_result=$func_run_hooks_result + _G_rc_validate_options=: + fi # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE - # save modified positional parameters for caller - func_validate_options_result=$func_run_hooks_result + $_G_rc_validate_options } @@ -2068,7 +2141,7 @@ include the following information: compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-2 + version: $progname $scriptversion Debian-2.4.6-10 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` @@ -2270,6 +2343,8 @@ libtool_options_prep () nonopt= preserve_args= + _G_rc_lt_options_prep=: + # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) @@ -2293,11 +2368,18 @@ libtool_options_prep () uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; + *) + _G_rc_lt_options_prep=false + ;; esac - # Pass back the list of options. - func_quote_for_eval ${1+"$@"} - libtool_options_prep_result=$func_quote_for_eval_result + if $_G_rc_lt_options_prep; then + # Pass back the list of options. + func_quote_for_eval ${1+"$@"} + libtool_options_prep_result=$func_quote_for_eval_result + fi + + $_G_rc_lt_options_prep } func_add_hook func_options_prep libtool_options_prep @@ -2309,9 +2391,12 @@ libtool_parse_options () { $debug_cmd + _G_rc_lt_parse_options=false + # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do + _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in @@ -2386,15 +2471,22 @@ libtool_parse_options () func_append preserve_args " $_G_opt" ;; - # An option not handled by this hook function: - *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; + # An option not handled by this hook function: + *) set dummy "$_G_opt" ${1+"$@"} ; shift + _G_match_lt_parse_options=false + break + ;; esac + $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done + if $_G_rc_lt_parse_options; then + # save modified positional parameters for caller + func_quote_for_eval ${1+"$@"} + libtool_parse_options_result=$func_quote_for_eval_result + fi - # save modified positional parameters for caller - func_quote_for_eval ${1+"$@"} - libtool_parse_options_result=$func_quote_for_eval_result + $_G_rc_lt_parse_options } func_add_hook func_parse_options libtool_parse_options @@ -7275,10 +7367,11 @@ func_mode_link () # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer + # -fuse-ld=* Linker select flags for GCC -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ - -specs=*|-fsanitize=*) + -specs=*|-fsanitize=*|-fuse-ld=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" diff --git a/vendor/libssh2/m4/libtool.m4 b/vendor/libssh2/m4/libtool.m4 index ee80844b6..9d6dd9fce 100644 --- a/vendor/libssh2/m4/libtool.m4 +++ b/vendor/libssh2/m4/libtool.m4 @@ -4063,7 +4063,8 @@ _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then + $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD + if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; + # flang / f18. f95 an alias for gfortran or flang on Debian + flang* | f18* | f95*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) @@ -6438,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else GXX=no @@ -6813,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -6878,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then @@ -7217,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # FIXME: insert proper C++ library support @@ -7301,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. @@ -7312,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' diff --git a/vendor/libssh2/missing b/vendor/libssh2/missing index f62bbae30..625aeb118 100755 --- a/vendor/libssh2/missing +++ b/vendor/libssh2/missing @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ else exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/vendor/libssh2/src/Makefile.in b/vendor/libssh2/src/Makefile.in index 9e59967ee..44533bded 100644 --- a/vendor/libssh2/src/Makefile.in +++ b/vendor/libssh2/src/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -176,7 +176,20 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/agent.Plo ./$(DEPDIR)/channel.Plo \ + ./$(DEPDIR)/comp.Plo ./$(DEPDIR)/crypt.Plo \ + ./$(DEPDIR)/global.Plo ./$(DEPDIR)/hostkey.Plo \ + ./$(DEPDIR)/keepalive.Plo ./$(DEPDIR)/kex.Plo \ + ./$(DEPDIR)/knownhost.Plo ./$(DEPDIR)/libgcrypt.Plo \ + ./$(DEPDIR)/mac.Plo ./$(DEPDIR)/mbedtls.Plo \ + ./$(DEPDIR)/misc.Plo ./$(DEPDIR)/openssl.Plo \ + ./$(DEPDIR)/os400qc3.Plo ./$(DEPDIR)/packet.Plo \ + ./$(DEPDIR)/pem.Plo ./$(DEPDIR)/publickey.Plo \ + ./$(DEPDIR)/scp.Plo ./$(DEPDIR)/session.Plo \ + ./$(DEPDIR)/sftp.Plo ./$(DEPDIR)/transport.Plo \ + ./$(DEPDIR)/userauth.Plo ./$(DEPDIR)/version.Plo \ + ./$(DEPDIR)/wincng.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -463,8 +476,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(srcdir)/../Makefile.OpenSSL.inc $(srcdir)/../Makefile.libgcrypt.inc $(srcdir)/../Makefile.WinCNG.inc $(srcdir)/../Makefile.os400qc3.inc $(srcdir)/../Makefile.mbedTLS.inc $(srcdir)/../Makefile.inc $(am__empty): @@ -536,31 +549,37 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/global.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostkey.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keepalive.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kex.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/knownhost.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbedtls.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openssl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os400qc3.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pem.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/publickey.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/session.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transport.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userauth.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wincng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agent.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/comp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crypt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/global.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostkey.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keepalive.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kex.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/knownhost.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgcrypt.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbedtls.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/openssl.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os400qc3.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/packet.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pem.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/publickey.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/session.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sftp.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transport.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/userauth.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wincng.Plo@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -641,7 +660,10 @@ cscopelist-am: $(am__tagged_files) distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -714,7 +736,31 @@ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/agent.Plo + -rm -f ./$(DEPDIR)/channel.Plo + -rm -f ./$(DEPDIR)/comp.Plo + -rm -f ./$(DEPDIR)/crypt.Plo + -rm -f ./$(DEPDIR)/global.Plo + -rm -f ./$(DEPDIR)/hostkey.Plo + -rm -f ./$(DEPDIR)/keepalive.Plo + -rm -f ./$(DEPDIR)/kex.Plo + -rm -f ./$(DEPDIR)/knownhost.Plo + -rm -f ./$(DEPDIR)/libgcrypt.Plo + -rm -f ./$(DEPDIR)/mac.Plo + -rm -f ./$(DEPDIR)/mbedtls.Plo + -rm -f ./$(DEPDIR)/misc.Plo + -rm -f ./$(DEPDIR)/openssl.Plo + -rm -f ./$(DEPDIR)/os400qc3.Plo + -rm -f ./$(DEPDIR)/packet.Plo + -rm -f ./$(DEPDIR)/pem.Plo + -rm -f ./$(DEPDIR)/publickey.Plo + -rm -f ./$(DEPDIR)/scp.Plo + -rm -f ./$(DEPDIR)/session.Plo + -rm -f ./$(DEPDIR)/sftp.Plo + -rm -f ./$(DEPDIR)/transport.Plo + -rm -f ./$(DEPDIR)/userauth.Plo + -rm -f ./$(DEPDIR)/version.Plo + -rm -f ./$(DEPDIR)/wincng.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags @@ -760,7 +806,31 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/agent.Plo + -rm -f ./$(DEPDIR)/channel.Plo + -rm -f ./$(DEPDIR)/comp.Plo + -rm -f ./$(DEPDIR)/crypt.Plo + -rm -f ./$(DEPDIR)/global.Plo + -rm -f ./$(DEPDIR)/hostkey.Plo + -rm -f ./$(DEPDIR)/keepalive.Plo + -rm -f ./$(DEPDIR)/kex.Plo + -rm -f ./$(DEPDIR)/knownhost.Plo + -rm -f ./$(DEPDIR)/libgcrypt.Plo + -rm -f ./$(DEPDIR)/mac.Plo + -rm -f ./$(DEPDIR)/mbedtls.Plo + -rm -f ./$(DEPDIR)/misc.Plo + -rm -f ./$(DEPDIR)/openssl.Plo + -rm -f ./$(DEPDIR)/os400qc3.Plo + -rm -f ./$(DEPDIR)/packet.Plo + -rm -f ./$(DEPDIR)/pem.Plo + -rm -f ./$(DEPDIR)/publickey.Plo + -rm -f ./$(DEPDIR)/scp.Plo + -rm -f ./$(DEPDIR)/session.Plo + -rm -f ./$(DEPDIR)/sftp.Plo + -rm -f ./$(DEPDIR)/transport.Plo + -rm -f ./$(DEPDIR)/userauth.Plo + -rm -f ./$(DEPDIR)/version.Plo + -rm -f ./$(DEPDIR)/wincng.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -781,9 +851,9 @@ uninstall-am: uninstall-libLTLIBRARIES .MAKE: all install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-generic clean-libLTLIBRARIES clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/vendor/libssh2/src/channel.c b/vendor/libssh2/src/channel.c index 538a0ab0d..39ff05bf1 100644 --- a/vendor/libssh2/src/channel.c +++ b/vendor/libssh2/src/channel.c @@ -238,7 +238,20 @@ _libssh2_channel_open(LIBSSH2_SESSION * session, const char *channel_type, goto channel_error; } + if(session->open_data_len < 1) { + _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet size"); + goto channel_error; + } + if (session->open_data[0] == SSH_MSG_CHANNEL_OPEN_CONFIRMATION) { + + if(session->open_data_len < 17) { + _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet size"); + goto channel_error; + } + session->open_channel->remote.id = _libssh2_ntohu32(session->open_data + 5); session->open_channel->local.window_size = @@ -518,7 +531,7 @@ channel_forward_listen(LIBSSH2_SESSION * session, const char *host, if (rc == LIBSSH2_ERROR_EAGAIN) { _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, "Would block"); return NULL; - } else if (rc) { + } else if (rc || data_len < 1) { _libssh2_error(session, LIBSSH2_ERROR_PROTO, "Unknown"); session->fwdLstn_state = libssh2_NB_state_idle; return NULL; @@ -855,6 +868,11 @@ static int channel_setenv(LIBSSH2_CHANNEL *channel, channel->setenv_state = libssh2_NB_state_idle; return rc; } + else if(data_len < 1) { + channel->setenv_state = libssh2_NB_state_idle; + return _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet size"); + } if (data[0] == SSH_MSG_CHANNEL_SUCCESS) { LIBSSH2_FREE(session, data); @@ -971,7 +989,7 @@ static int channel_request_pty(LIBSSH2_CHANNEL *channel, &channel->reqPTY_packet_requirev_state); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } else if (rc || data_len < 1) { channel->reqPTY_state = libssh2_NB_state_idle; return _libssh2_error(session, LIBSSH2_ERROR_PROTO, "Failed to require the PTY package"); @@ -1197,7 +1215,7 @@ channel_x11_req(LIBSSH2_CHANNEL *channel, int single_connection, &channel->reqX11_packet_requirev_state); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } else if (rc || data_len < 1) { channel->reqX11_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "waiting for x11-req response packet"); @@ -1324,7 +1342,7 @@ _libssh2_channel_process_startup(LIBSSH2_CHANNEL *channel, &channel->process_packet_requirev_state); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } else if (rc || data_len < 1) { channel->process_state = libssh2_NB_state_end; return _libssh2_error(session, rc, "Failed waiting for channel success"); diff --git a/vendor/libssh2/src/comp.c b/vendor/libssh2/src/comp.c index 4560188bb..629319590 100644 --- a/vendor/libssh2/src/comp.c +++ b/vendor/libssh2/src/comp.c @@ -224,7 +224,12 @@ comp_method_zlib_decomp(LIBSSH2_SESSION * session, /* A short-term alloc of a full data chunk is better than a series of reallocs */ char *out; - int out_maxlen = 4 * src_len; + size_t out_maxlen = src_len; + + if (src_len <= SIZE_MAX / 4) + out_maxlen = src_len * 4; + else + out_maxlen = payload_limit; /* If strm is null, then we have not yet been initialized. */ if (strm == NULL) @@ -271,7 +276,7 @@ comp_method_zlib_decomp(LIBSSH2_SESSION * session, "decompression failure"); } - if (out_maxlen >= (int) payload_limit) { + if (out_maxlen > (int) payload_limit || out_maxlen > SIZE_MAX / 2) { LIBSSH2_FREE(session, out); return _libssh2_error(session, LIBSSH2_ERROR_ZLIB, "Excessive growth in decompression phase"); diff --git a/vendor/libssh2/src/kex.c b/vendor/libssh2/src/kex.c index 65b722f42..3634cb5a9 100644 --- a/vendor/libssh2/src/kex.c +++ b/vendor/libssh2/src/kex.c @@ -228,11 +228,23 @@ static int diffie_hellman_sha1(LIBSSH2_SESSION *session, } /* Parse KEXDH_REPLY */ + if(exchange_state->s_packet_len < 5) { + ret = _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet length"); + goto clean_exit; + } + exchange_state->s = exchange_state->s_packet + 1; session->server_hostkey_len = _libssh2_ntohu32(exchange_state->s); exchange_state->s += 4; + if(session->server_hostkey_len > exchange_state->s_packet_len - 5) { + ret = _libssh2_error(session, LIBSSH2_ERROR_OUT_OF_BOUNDARY, + "Host key length out of bounds"); + goto clean_exit; + } + if (session->server_hostkey) LIBSSH2_FREE(session, session->server_hostkey); @@ -848,11 +860,23 @@ static int diffie_hellman_sha256(LIBSSH2_SESSION *session, } /* Parse KEXDH_REPLY */ + if(exchange_state->s_packet_len < 5) { + ret = _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet length"); + goto clean_exit; + } + exchange_state->s = exchange_state->s_packet + 1; session->server_hostkey_len = _libssh2_ntohu32(exchange_state->s); exchange_state->s += 4; + if(session->server_hostkey_len > exchange_state->s_packet_len - 5) { + ret = _libssh2_error(session, LIBSSH2_ERROR_OUT_OF_BOUNDARY, + "Host key length out of bounds"); + goto clean_exit; + } + if (session->server_hostkey) LIBSSH2_FREE(session, session->server_hostkey); diff --git a/vendor/libssh2/src/libssh2_priv.h b/vendor/libssh2/src/libssh2_priv.h index b4296a221..bb5d1a50a 100644 --- a/vendor/libssh2/src/libssh2_priv.h +++ b/vendor/libssh2/src/libssh2_priv.h @@ -146,6 +146,18 @@ static inline int writev(int sock, struct iovec *iov, int nvecs) #endif +#ifndef SIZE_MAX +#if _WIN64 +#define SIZE_MAX 0xFFFFFFFFFFFFFFFF +#else +#define SIZE_MAX 0xFFFFFFFF +#endif +#endif + +#ifndef UINT_MAX +#define UINT_MAX 0xFFFFFFFF +#endif + /* RFC4253 section 6.1 Maximum Packet Length says: * * "All implementations MUST be able to process packets with diff --git a/vendor/libssh2/src/packet.c b/vendor/libssh2/src/packet.c index 5f1feb8c6..c950b5dcf 100644 --- a/vendor/libssh2/src/packet.c +++ b/vendor/libssh2/src/packet.c @@ -775,8 +775,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, uint32_t len = _libssh2_ntohu32(data + 5); unsigned char want_reply = 1; - if(len < (datalen - 10)) - want_reply = data[9 + len]; + if((len + 9) < datalen) + want_reply = data[len + 9]; _libssh2_debug(session, LIBSSH2_TRACE_CONN, @@ -784,6 +784,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, channel, len, data + 9, want_reply); if (len == sizeof("exit-status") - 1 + && (sizeof("exit-status") - 1 + 9) <= datalen && !memcmp("exit-status", data + 9, sizeof("exit-status") - 1)) { @@ -792,7 +793,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, channelp = _libssh2_channel_locate(session, channel); - if (channelp) { + if (channelp && (sizeof("exit-status") + 13) <= datalen) { channelp->exit_status = _libssh2_ntohu32(data + 9 + sizeof("exit-status")); _libssh2_debug(session, LIBSSH2_TRACE_CONN, @@ -805,24 +806,32 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, } else if (len == sizeof("exit-signal") - 1 + && (sizeof("exit-signal") - 1 + 9) <= datalen && !memcmp("exit-signal", data + 9, sizeof("exit-signal") - 1)) { /* command terminated due to signal */ if(datalen >= 20) channelp = _libssh2_channel_locate(session, channel); - if (channelp) { + if (channelp && (sizeof("exit-signal") + 13) <= datalen) { /* set signal name (without SIG prefix) */ uint32_t namelen = _libssh2_ntohu32(data + 9 + sizeof("exit-signal")); - channelp->exit_signal = - LIBSSH2_ALLOC(session, namelen + 1); + + if(namelen <= UINT_MAX - 1) { + channelp->exit_signal = + LIBSSH2_ALLOC(session, namelen + 1); + } + else { + channelp->exit_signal = NULL; + } + if (!channelp->exit_signal) rc = _libssh2_error(session, LIBSSH2_ERROR_ALLOC, "memory for signal name"); - else { + else if ((sizeof("exit-signal") + 13 + namelen <= datalen)) { memcpy(channelp->exit_signal, - data + 13 + sizeof("exit_signal"), namelen); + data + 13 + sizeof("exit-signal"), namelen); channelp->exit_signal[namelen] = '\0'; /* TODO: save error message and language tag */ _libssh2_debug(session, LIBSSH2_TRACE_CONN, diff --git a/vendor/libssh2/src/session.c b/vendor/libssh2/src/session.c index 6352d12ee..b5a83ddd6 100644 --- a/vendor/libssh2/src/session.c +++ b/vendor/libssh2/src/session.c @@ -765,6 +765,11 @@ session_startup(LIBSSH2_SESSION *session, libssh2_socket_t sock) if (rc) return rc; + if(session->startup_data_len < 5) { + return _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet length"); + } + session->startup_service_length = _libssh2_ntohu32(session->startup_data + 1); diff --git a/vendor/libssh2/src/sftp.c b/vendor/libssh2/src/sftp.c index 7c4411640..fd94d3902 100644 --- a/vendor/libssh2/src/sftp.c +++ b/vendor/libssh2/src/sftp.c @@ -204,6 +204,10 @@ sftp_packet_add(LIBSSH2_SFTP *sftp, unsigned char *data, LIBSSH2_SFTP_PACKET *packet; uint32_t request_id; + if (data_len < 5) { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } + _libssh2_debug(session, LIBSSH2_TRACE_SFTP, "Received packet type %d (len %d)", (int) data[0], data_len); @@ -345,6 +349,10 @@ sftp_packet_read(LIBSSH2_SFTP *sftp) return _libssh2_error(session, LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED, "SFTP packet too large"); + if (sftp->partial_len == 0) + return _libssh2_error(session, + LIBSSH2_ERROR_ALLOC, + "Unable to allocate empty SFTP packet"); _libssh2_debug(session, LIBSSH2_TRACE_SFTP, "Data begin - Packet Length: %lu", @@ -504,11 +512,15 @@ sftp_packet_ask(LIBSSH2_SFTP *sftp, unsigned char packet_type, static int sftp_packet_require(LIBSSH2_SFTP *sftp, unsigned char packet_type, uint32_t request_id, unsigned char **data, - size_t *data_len) + size_t *data_len, size_t required_size) { LIBSSH2_SESSION *session = sftp->channel->session; int rc; + if (data == NULL || data_len == NULL || required_size == 0) { + return LIBSSH2_ERROR_BAD_USE; + } + _libssh2_debug(session, LIBSSH2_TRACE_SFTP, "Requiring packet %d id %ld", (int) packet_type, request_id); @@ -516,6 +528,11 @@ sftp_packet_require(LIBSSH2_SFTP *sftp, unsigned char packet_type, /* The right packet was available in the packet brigade */ _libssh2_debug(session, LIBSSH2_TRACE_SFTP, "Got %d", (int) packet_type); + + if (*data_len < required_size) { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } + return LIBSSH2_ERROR_NONE; } @@ -529,6 +546,11 @@ sftp_packet_require(LIBSSH2_SFTP *sftp, unsigned char packet_type, /* The right packet was available in the packet brigade */ _libssh2_debug(session, LIBSSH2_TRACE_SFTP, "Got %d", (int) packet_type); + + if (*data_len < required_size) { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } + return LIBSSH2_ERROR_NONE; } } @@ -544,11 +566,15 @@ static int sftp_packet_requirev(LIBSSH2_SFTP *sftp, int num_valid_responses, const unsigned char *valid_responses, uint32_t request_id, unsigned char **data, - size_t *data_len) + size_t *data_len, size_t required_size) { int i; int rc; + if (data == NULL || data_len == NULL || required_size == 0) { + return LIBSSH2_ERROR_BAD_USE; + } + /* If no timeout is active, start a new one */ if (sftp->requirev_start == 0) sftp->requirev_start = time(NULL); @@ -562,6 +588,11 @@ sftp_packet_requirev(LIBSSH2_SFTP *sftp, int num_valid_responses, * the timeout is not active */ sftp->requirev_start = 0; + + if (*data_len < required_size) { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } + return LIBSSH2_ERROR_NONE; } } @@ -636,36 +667,65 @@ sftp_attr2bin(unsigned char *p, const LIBSSH2_SFTP_ATTRIBUTES * attrs) /* sftp_bin2attr */ static int -sftp_bin2attr(LIBSSH2_SFTP_ATTRIBUTES * attrs, const unsigned char *p) +sftp_bin2attr(LIBSSH2_SFTP_ATTRIBUTES * attrs, const unsigned char *p, size_t data_len) { const unsigned char *s = p; - memset(attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES)); - attrs->flags = _libssh2_ntohu32(s); - s += 4; + if (data_len >= 4) { + memset(attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES)); + attrs->flags = _libssh2_ntohu32(s); + s += 4; + data_len -= 4; + } + else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } if (attrs->flags & LIBSSH2_SFTP_ATTR_SIZE) { - attrs->filesize = _libssh2_ntohu64(s); - s += 8; + if (data_len >= 8) { + attrs->filesize = _libssh2_ntohu64(s); + s += 8; + data_len -= 8; + } + else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } } if (attrs->flags & LIBSSH2_SFTP_ATTR_UIDGID) { - attrs->uid = _libssh2_ntohu32(s); - s += 4; - attrs->gid = _libssh2_ntohu32(s); - s += 4; + if (data_len >= 8) { + attrs->uid = _libssh2_ntohu32(s); + s += 4; + attrs->gid = _libssh2_ntohu32(s); + s += 4; + data_len -= 8; + } + else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } } if (attrs->flags & LIBSSH2_SFTP_ATTR_PERMISSIONS) { - attrs->permissions = _libssh2_ntohu32(s); - s += 4; + if (data_len >= 4) { + attrs->permissions = _libssh2_ntohu32(s); + s += 4; + data_len -= 4; + } + else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } } if (attrs->flags & LIBSSH2_SFTP_ATTR_ACMODTIME) { - attrs->atime = _libssh2_ntohu32(s); - s += 4; - attrs->mtime = _libssh2_ntohu32(s); - s += 4; + if (data_len >= 8) { + attrs->atime = _libssh2_ntohu32(s); + s += 4; + attrs->mtime = _libssh2_ntohu32(s); + s += 4; + } + else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } } return (s - p); @@ -835,18 +895,23 @@ static LIBSSH2_SFTP *sftp_init(LIBSSH2_SESSION *session) } rc = sftp_packet_require(sftp_handle, SSH_FXP_VERSION, - 0, &data, &data_len); - if (rc == LIBSSH2_ERROR_EAGAIN) + 0, &data, &data_len, 5); + if (rc == LIBSSH2_ERROR_EAGAIN) { + _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, + "Would block receiving SSH_FXP_VERSION"); return NULL; - else if (rc) { - _libssh2_error(session, rc, - "Timeout waiting for response from SFTP subsystem"); - goto sftp_init_error; } - if (data_len < 5) { + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, "Invalid SSH_FXP_VERSION response"); - LIBSSH2_FREE(session, data); + goto sftp_init_error; + } + else if (rc) { + _libssh2_error(session, rc, + "Timeout waiting for response from SFTP subsystem"); goto sftp_init_error; } @@ -1112,12 +1177,20 @@ sftp_open(LIBSSH2_SFTP *sftp, const char *filename, { SSH_FXP_HANDLE, SSH_FXP_STATUS }; rc = sftp_packet_requirev(sftp, 2, fopen_responses, sftp->open_request_id, &data, - &data_len); + &data_len, 1); if (rc == LIBSSH2_ERROR_EAGAIN) { _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, "Would block waiting for status message"); return NULL; } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Response too small"); + return NULL; + } sftp->open_state = libssh2_NB_state_idle; if (rc) { _libssh2_error(session, rc, "Timeout waiting for status message"); @@ -1148,12 +1221,20 @@ sftp_open(LIBSSH2_SFTP *sftp, const char *filename, /* silly situation, but check for a HANDLE */ rc = sftp_packet_require(sftp, SSH_FXP_HANDLE, sftp->open_request_id, &data, - &data_len); + &data_len, 10); if(rc == LIBSSH2_ERROR_EAGAIN) { /* go back to sent state and wait for something else */ sftp->open_state = libssh2_NB_state_sent; return NULL; } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Too small FXP_HANDLE"); + return NULL; + } else if(!rc) /* we got the handle so this is not a bad situation */ badness = 0; @@ -1480,15 +1561,21 @@ static ssize_t sftp_read(LIBSSH2_SFTP_HANDLE * handle, char *buffer, } rc = sftp_packet_requirev(sftp, 2, read_responses, - chunk->request_id, &data, &data_len); - - if (rc==LIBSSH2_ERROR_EAGAIN && bytes_in_buffer != 0) { + chunk->request_id, &data, &data_len, 9); + if (rc == LIBSSH2_ERROR_EAGAIN && bytes_in_buffer != 0) { /* do not return EAGAIN if we have already * written data into the buffer */ return bytes_in_buffer; } - if (rc < 0) { + if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Response too small"); + } + else if(rc < 0) { sftp->read_state = libssh2_NB_state_sent2; return rc; } @@ -1698,7 +1785,7 @@ static ssize_t sftp_readdir(LIBSSH2_SFTP_HANDLE *handle, char *buffer, if (attrs) memset(attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES)); - s += sftp_bin2attr(attrs ? attrs : &attrs_dummy, s); + s += sftp_bin2attr(attrs ? attrs : &attrs_dummy, s, 32); handle->u.dir.next_name = (char *) s; end: @@ -1753,9 +1840,16 @@ static ssize_t sftp_readdir(LIBSSH2_SFTP_HANDLE *handle, char *buffer, retcode = sftp_packet_requirev(sftp, 2, read_responses, sftp->readdir_request_id, &data, - &data_len); + &data_len, 9); if (retcode == LIBSSH2_ERROR_EAGAIN) return retcode; + else if (retcode == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Status message too short"); + } else if (retcode) { sftp->readdir_state = libssh2_NB_state_idle; return _libssh2_error(session, retcode, @@ -1981,8 +2075,15 @@ static ssize_t sftp_write(LIBSSH2_SFTP_HANDLE *handle, const char *buffer, /* we check the packets in order */ rc = sftp_packet_require(sftp, SSH_FXP_STATUS, - chunk->request_id, &data, &data_len); - if (rc < 0) { + chunk->request_id, &data, &data_len, 9); + if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "FXP write packet too short"); + } + else if (rc < 0) { if (rc == LIBSSH2_ERROR_EAGAIN) sftp->write_state = libssh2_NB_state_sent; return rc; @@ -2124,10 +2225,18 @@ static int sftp_fsync(LIBSSH2_SFTP_HANDLE *handle) } rc = sftp_packet_require(sftp, SSH_FXP_STATUS, - sftp->fsync_request_id, &data, &data_len); + sftp->fsync_request_id, &data, &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP fsync packet too short"); + } + else if (rc) { sftp->fsync_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "Error waiting for FXP EXTENDED REPLY"); @@ -2227,9 +2336,16 @@ static int sftp_fstat(LIBSSH2_SFTP_HANDLE *handle, rc = sftp_packet_requirev(sftp, 2, fstat_responses, sftp->fstat_request_id, &data, - &data_len); + &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) return rc; + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP fstat packet too short"); + } else if (rc) { sftp->fstat_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, @@ -2252,7 +2368,12 @@ static int sftp_fstat(LIBSSH2_SFTP_HANDLE *handle, } } - sftp_bin2attr(attrs, data + 5); + if (sftp_bin2attr(attrs, data + 5, data_len - 5) < 0) { + LIBSSH2_FREE(session, data); + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Attributes too short in SFTP fstat"); + } + LIBSSH2_FREE(session, data); return 0; @@ -2429,11 +2550,19 @@ sftp_close_handle(LIBSSH2_SFTP_HANDLE *handle) if (handle->close_state == libssh2_NB_state_sent) { rc = sftp_packet_require(sftp, SSH_FXP_STATUS, handle->close_request_id, &data, - &data_len); + &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + data = NULL; + _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Packet too short in FXP_CLOSE command"); + } + else if (rc) { _libssh2_error(session, rc, "Error waiting for status message"); } @@ -2547,10 +2676,17 @@ static int sftp_unlink(LIBSSH2_SFTP *sftp, const char *filename, rc = sftp_packet_require(sftp, SSH_FXP_STATUS, sftp->unlink_request_id, &data, - &data_len); + &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP unlink packet too short"); + } else if (rc) { sftp->unlink_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, @@ -2658,10 +2794,18 @@ static int sftp_rename(LIBSSH2_SFTP *sftp, const char *source_filename, rc = sftp_packet_require(sftp, SSH_FXP_STATUS, sftp->rename_request_id, &data, - &data_len); + &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP rename packet too short"); + } + else if (rc) { sftp->rename_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "Error waiting for FXP STATUS"); @@ -2783,11 +2927,19 @@ static int sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle, LIBSSH2_SFTP_STATVFS *st) } rc = sftp_packet_requirev(sftp, 2, responses, sftp->fstatvfs_request_id, - &data, &data_len); + &data, &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP rename packet too short"); + } + else if (rc) { sftp->fstatvfs_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "Error waiting for FXP EXTENDED REPLY"); @@ -2910,10 +3062,18 @@ static int sftp_statvfs(LIBSSH2_SFTP *sftp, const char *path, } rc = sftp_packet_requirev(sftp, 2, responses, sftp->statvfs_request_id, - &data, &data_len); + &data, &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP fstat packet too short"); + } + else if (rc) { sftp->statvfs_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "Error waiting for FXP EXTENDED REPLY"); @@ -3040,10 +3200,18 @@ static int sftp_mkdir(LIBSSH2_SFTP *sftp, const char *path, } rc = sftp_packet_require(sftp, SSH_FXP_STATUS, sftp->mkdir_request_id, - &data, &data_len); + &data, &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP mkdir packet too short"); + } + else if (rc) { sftp->mkdir_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "Error waiting for FXP STATUS"); @@ -3134,10 +3302,18 @@ static int sftp_rmdir(LIBSSH2_SFTP *sftp, const char *path, } rc = sftp_packet_require(sftp, SSH_FXP_STATUS, - sftp->rmdir_request_id, &data, &data_len); + sftp->rmdir_request_id, &data, &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) { return rc; - } else if (rc) { + } + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP rmdir packet too short"); + } + else if (rc) { sftp->rmdir_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, "Error waiting for FXP STATUS"); @@ -3247,9 +3423,16 @@ static int sftp_stat(LIBSSH2_SFTP *sftp, const char *path, } rc = sftp_packet_requirev(sftp, 2, stat_responses, - sftp->stat_request_id, &data, &data_len); + sftp->stat_request_id, &data, &data_len, 9); if (rc == LIBSSH2_ERROR_EAGAIN) return rc; + else if (rc == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP stat packet too short"); + } else if (rc) { sftp->stat_state = libssh2_NB_state_idle; return _libssh2_error(session, rc, @@ -3273,7 +3456,12 @@ static int sftp_stat(LIBSSH2_SFTP *sftp, const char *path, } memset(attrs, 0, sizeof(LIBSSH2_SFTP_ATTRIBUTES)); - sftp_bin2attr(attrs, data + 5); + if (sftp_bin2attr(attrs, data + 5, data_len - 5) < 0) { + LIBSSH2_FREE(session, data); + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "Attributes too short in SFTP fstat"); + } + LIBSSH2_FREE(session, data); return 0; @@ -3378,9 +3566,16 @@ static int sftp_symlink(LIBSSH2_SFTP *sftp, const char *path, retcode = sftp_packet_requirev(sftp, 2, link_responses, sftp->symlink_request_id, &data, - &data_len); + &data_len, 9); if (retcode == LIBSSH2_ERROR_EAGAIN) return retcode; + else if (retcode == LIBSSH2_ERROR_OUT_OF_BOUNDARY) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP symlink packet too short"); + } else if (retcode) { sftp->symlink_state = libssh2_NB_state_idle; return _libssh2_error(session, retcode, @@ -3410,6 +3605,14 @@ static int sftp_symlink(LIBSSH2_SFTP *sftp, const char *path, "no name entries"); } + if (data_len < 13) { + if (data_len > 0) { + LIBSSH2_FREE(session, data); + } + return _libssh2_error(session, LIBSSH2_ERROR_SFTP_PROTOCOL, + "SFTP stat packet too short"); + } + /* this reads a u32 and stores it into a signed 32bit value */ link_len = _libssh2_ntohu32(data + 9); if (link_len < target_len) { diff --git a/vendor/libssh2/src/transport.c b/vendor/libssh2/src/transport.c index 8725da095..7317579f3 100644 --- a/vendor/libssh2/src/transport.c +++ b/vendor/libssh2/src/transport.c @@ -438,6 +438,16 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) return LIBSSH2_ERROR_DECRYPT; p->padding_length = block[4]; + if(p->packet_length < 1) { + return LIBSSH2_ERROR_DECRYPT; + } + else if(p->packet_length > LIBSSH2_PACKET_MAXPAYLOAD) { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } + else if ( p->padding_length > p->packet_length - 1 ) { + return LIBSSH2_ERROR_DECRYPT; + } + /* total_num is the number of bytes following the initial (5 bytes) packet length and padding length fields */ @@ -471,8 +481,12 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) /* copy the data from index 5 to the end of the blocksize from the temporary buffer to the start of the decrypted buffer */ - memcpy(p->wptr, &block[5], blocksize - 5); - p->wptr += blocksize - 5; /* advance write pointer */ + if (blocksize - 5 <= total_num) { + memcpy(p->wptr, &block[5], blocksize - 5); + p->wptr += blocksize - 5; /* advance write pointer */ + } else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } } /* init the data_num field to the number of bytes of @@ -546,7 +560,13 @@ int _libssh2_transport_read(LIBSSH2_SESSION * session) /* if there are bytes to copy that aren't decrypted, simply copy them as-is to the target buffer */ if (numbytes > 0) { - memcpy(p->wptr, &p->buf[p->readidx], numbytes); + + if (numbytes <= total_num - (p->wptr - p->payload)) { + memcpy(p->wptr, &p->buf[p->readidx], numbytes); + } + else { + return LIBSSH2_ERROR_OUT_OF_BOUNDARY; + } /* advance the read pointer */ p->readidx += numbytes; diff --git a/vendor/libssh2/src/userauth.c b/vendor/libssh2/src/userauth.c index cdfa25e66..c02d81d0e 100644 --- a/vendor/libssh2/src/userauth.c +++ b/vendor/libssh2/src/userauth.c @@ -127,7 +127,7 @@ static char *userauth_list(LIBSSH2_SESSION *session, const char *username, _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, "Would block requesting userauth list"); return NULL; - } else if (rc) { + } else if (rc || (session->userauth_list_data_len < 1)) { _libssh2_error(session, rc, "Failed getting response"); session->userauth_list_state = libssh2_NB_state_idle; return NULL; @@ -143,8 +143,20 @@ static char *userauth_list(LIBSSH2_SESSION *session, const char *username, return NULL; } - methods_len = _libssh2_ntohu32(session->userauth_list_data + 1); + if(session->userauth_list_data_len < 5) { + LIBSSH2_FREE(session, session->userauth_list_data); + session->userauth_list_data = NULL; + _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet size"); + return NULL; + } + methods_len = _libssh2_ntohu32(session->userauth_list_data + 1); + if(methods_len >= session->userauth_list_data_len - 5) { + _libssh2_error(session, LIBSSH2_ERROR_OUT_OF_BOUNDARY, + "Unexpected userauth list size"); + return NULL; + } /* Do note that the memory areas overlap! */ memmove(session->userauth_list_data, session->userauth_list_data + 5, methods_len); @@ -285,6 +297,11 @@ userauth_password(LIBSSH2_SESSION *session, return _libssh2_error(session, rc, "Waiting for password response"); } + else if(session->userauth_pswd_data_len < 1) { + session->userauth_pswd_state = libssh2_NB_state_idle; + return _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet size"); + } if (session->userauth_pswd_data[0] == SSH_MSG_USERAUTH_SUCCESS) { _libssh2_debug(session, LIBSSH2_TRACE_AUTH, @@ -312,6 +329,12 @@ userauth_password(LIBSSH2_SESSION *session, session->userauth_pswd_state = libssh2_NB_state_sent1; } + if(session->userauth_pswd_data_len < 1) { + session->userauth_pswd_state = libssh2_NB_state_idle; + return _libssh2_error(session, LIBSSH2_ERROR_PROTO, + "Unexpected packet size"); + } + if ((session->userauth_pswd_data[0] == SSH_MSG_USERAUTH_PASSWD_CHANGEREQ) || (session->userauth_pswd_data0 == @@ -976,7 +999,7 @@ userauth_hostbased_fromfile(LIBSSH2_SESSION *session, } session->userauth_host_state = libssh2_NB_state_idle; - if (rc) { + if (rc || data_len < 1) { return _libssh2_error(session, LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED, "Auth failed"); } @@ -1172,7 +1195,7 @@ _libssh2_userauth_publickey(LIBSSH2_SESSION *session, if (rc == LIBSSH2_ERROR_EAGAIN) { return _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, "Would block"); } - else if (rc) { + else if (rc || (session->userauth_pblc_data_len < 1)) { LIBSSH2_FREE(session, session->userauth_pblc_packet); session->userauth_pblc_packet = NULL; LIBSSH2_FREE(session, session->userauth_pblc_method); @@ -1332,7 +1355,7 @@ _libssh2_userauth_publickey(LIBSSH2_SESSION *session, if (rc == LIBSSH2_ERROR_EAGAIN) { return _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, "Would block requesting userauth list"); - } else if (rc) { + } else if (rc || session->userauth_pblc_data_len < 1) { session->userauth_pblc_state = libssh2_NB_state_idle; return _libssh2_error(session, LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED, "Waiting for publickey USERAUTH response"); @@ -1654,7 +1677,7 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session, if (rc == LIBSSH2_ERROR_EAGAIN) { return _libssh2_error(session, LIBSSH2_ERROR_EAGAIN, "Would block"); - } else if (rc) { + } else if (rc || session->userauth_kybd_data_len < 1) { session->userauth_kybd_state = libssh2_NB_state_idle; return _libssh2_error(session, LIBSSH2_ERROR_AUTHENTICATION_FAILED, @@ -1734,6 +1757,13 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session, /* int num-prompts */ session->userauth_kybd_num_prompts = _libssh2_ntohu32(s); s += 4; + if(session->userauth_kybd_num_prompts && + session->userauth_kybd_num_prompts > 100) { + _libssh2_error(session, LIBSSH2_ERROR_OUT_OF_BOUNDARY, + "Too many replies for " + "keyboard-interactive prompts"); + goto cleanup; + } if(session->userauth_kybd_num_prompts) { session->userauth_kybd_prompts = @@ -1801,8 +1831,17 @@ userauth_keyboard_interactive(LIBSSH2_SESSION * session, for(i = 0; i < session->userauth_kybd_num_prompts; i++) { /* string response[1] (ISO-10646 UTF-8) */ - session->userauth_kybd_packet_len += - 4 + session->userauth_kybd_responses[i].length; + if(session->userauth_kybd_responses[i].length <= + (SIZE_MAX - 4 - session->userauth_kybd_packet_len) ) { + session->userauth_kybd_packet_len += + 4 + session->userauth_kybd_responses[i].length; + } + else { + _libssh2_error(session, LIBSSH2_ERROR_ALLOC, + "Unable to allocate memory for keyboard-" + "interactive response packet"); + goto cleanup; + } } /* A new userauth_kybd_data area is to be allocated, free the diff --git a/vendor/libssh2/test-driver b/vendor/libssh2/test-driver index 32bf39e83..b8521a482 100755 --- a/vendor/libssh2/test-driver +++ b/vendor/libssh2/test-driver @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2012-06-27.10; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# Copyright (C) 2011-2018 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,7 +16,7 @@ scriptversion=2012-06-27.10; # UTC # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -44,13 +44,12 @@ print_usage () Usage: test-driver --test-name=NAME --log-file=PATH --trs-file=PATH [--expect-failure={yes|no}] [--color-tests={yes|no}] - [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT + [--enable-hard-errors={yes|no}] [--] + TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. END } -# TODO: better error handling in option parsing (in particular, ensure -# TODO: $log_file, $trs_file and $test_name are defined). test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. @@ -69,10 +68,23 @@ while test $# -gt 0; do --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; + *) break;; esac shift done +missing_opts= +test x"$test_name" = x && missing_opts="$missing_opts --test-name" +test x"$log_file" = x && missing_opts="$missing_opts --log-file" +test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" +if test x"$missing_opts" != x; then + usage_error "the following mandatory options are missing:$missing_opts" +fi + +if test $# -eq 0; then + usage_error "missing argument" +fi + if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='' # Red. @@ -94,11 +106,14 @@ trap "st=143; $do_exit" 15 # Test script is run here. "$@" >$log_file 2>&1 estatus=$? + if test $enable_hard_errors = no && test $estatus -eq 99; then - estatus=1 + tweaked_estatus=1 +else + tweaked_estatus=$estatus fi -case $estatus:$expect_failure in +case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; @@ -107,6 +122,12 @@ case $estatus:$expect_failure in *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac +# Report the test outcome and exit status in the logs, so that one can +# know whether the test passed or failed simply by looking at the '.log' +# file, without the need of also peaking into the corresponding '.trs' +# file (automake bug#11814). +echo "$res $test_name (exit status: $estatus)" >>$log_file + # Report outcome to console. echo "${col}${res}${std}: $test_name" @@ -119,9 +140,9 @@ echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff --git a/vendor/libssh2/tests/Makefile.in b/vendor/libssh2/tests/Makefile.in index b3e7d461b..3228129f4 100644 --- a/vendor/libssh2/tests/Makefile.in +++ b/vendor/libssh2/tests/Makefile.in @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. +# Makefile.in generated by automake 1.16.1 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2014 Free Software Foundation, Inc. +# Copyright (C) 1994-2018 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -134,7 +134,8 @@ am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/example depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/simple.Po ./$(DEPDIR)/ssh2.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -578,8 +579,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -623,8 +624,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssh2.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -825,7 +832,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) fi; \ $$success || exit 1 -check-TESTS: +check-TESTS: $(check_PROGRAMS) @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @@ -882,7 +889,10 @@ ssh2.sh.log: ssh2.sh @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) -distdir: $(DISTFILES) +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ @@ -957,7 +967,8 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/simple.Po + -rm -f ./$(DEPDIR)/ssh2.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1003,7 +1014,8 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) + -rm -f ./$(DEPDIR)/simple.Po + -rm -f ./$(DEPDIR)/ssh2.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -1024,8 +1036,8 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool \ +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ diff --git a/vendor/libssh2/win32/libssh2_config.h b/vendor/libssh2/win32/libssh2_config.h index b6af97806..6ac2ef43e 100644 --- a/vendor/libssh2/win32/libssh2_config.h +++ b/vendor/libssh2/win32/libssh2_config.h @@ -18,7 +18,7 @@ #define HAVE_GETTIMEOFDAY #endif /* __MINGW32__ */ -#define LIBSSH2_OPENSSL +#define HAVE_LIBCRYPT32 #define HAVE_WINSOCK2_H #define HAVE_IOCTLSOCKET #define HAVE_SELECT @@ -44,3 +44,4 @@ #define LIBSSH2_DH_GEX_NEW 1 #endif /* LIBSSH2_CONFIG_H */ + From df2c3f3509ebaad7c627c815746d5a2fdcee343a Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Fri, 24 May 2019 15:10:29 -0700 Subject: [PATCH 101/145] Root functions should keep their function prototypes correctly Without treating the root of a nodegit collection as a function template when it is a function itself, when we do the importextension / fix the prototype dance, we were blowing away call, bind, and apply, as well as anything else on the prototype --- generate/input/descriptor.json | 1 + generate/scripts/generateNativeCode.js | 2 ++ .../filters/get_cpp_function_for_root_proto.js | 12 ++++++++++++ .../filters/has_function_on_root_proto.js | 7 +++++++ generate/templates/templates/class_content.cc | 16 ++++++++++++++-- 5 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 generate/templates/filters/get_cpp_function_for_root_proto.js create mode 100644 generate/templates/filters/has_function_on_root_proto.js diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index e846c62e6..7db3b4c05 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -3408,6 +3408,7 @@ ], "functions": { "git_reset": { + "isCollectionRoot": true, "args": { "checkout_opts": { "isOptional": true diff --git a/generate/scripts/generateNativeCode.js b/generate/scripts/generateNativeCode.js index 8ba821903..44f0501a9 100644 --- a/generate/scripts/generateNativeCode.js +++ b/generate/scripts/generateNativeCode.js @@ -57,6 +57,8 @@ module.exports = function generateNativeCode() { cppToV8: require("../templates/filters/cpp_to_v8"), defaultValue: require("../templates/filters/default_value"), fieldsInfo: require("../templates/filters/fields_info"), + getCPPFunctionForRootProto: require("../templates/filters/get_cpp_function_for_root_proto"), + hasFunctionOnRootProto: require("../templates/filters/has_function_on_root_proto"), hasReturnType: require("../templates/filters/has_return_type"), hasReturnValue: require("../templates/filters/has_return_value"), isArrayType: require("../templates/filters/is_array_type"), diff --git a/generate/templates/filters/get_cpp_function_for_root_proto.js b/generate/templates/filters/get_cpp_function_for_root_proto.js new file mode 100644 index 000000000..6571af880 --- /dev/null +++ b/generate/templates/filters/get_cpp_function_for_root_proto.js @@ -0,0 +1,12 @@ +module.exports = function(functions) { + if (!functions || functions.length === 0) { + throw new Error("Should not be able to get function from empty function list"); + } + + const fun = functions.find(function(f) { return f.useAsOnRootProto; }); + if (!fun) { + throw new Error("There is no function on the root prototype for this collection"); + } + + return fun.cppFunctionName; +}; diff --git a/generate/templates/filters/has_function_on_root_proto.js b/generate/templates/filters/has_function_on_root_proto.js new file mode 100644 index 000000000..626ce0ff6 --- /dev/null +++ b/generate/templates/filters/has_function_on_root_proto.js @@ -0,0 +1,7 @@ +module.exports = function(functions) { + if (!functions || functions.length === 0) { + return false; + } + + return functions.some(function(f) { return f.useAsOnRootProto; }); +}; diff --git a/generate/templates/templates/class_content.cc b/generate/templates/templates/class_content.cc index 48e67b0eb..dbac5e097 100644 --- a/generate/templates/templates/class_content.cc +++ b/generate/templates/templates/class_content.cc @@ -79,7 +79,11 @@ using namespace node; void {{ cppClassName }}::InitializeComponent(v8::Local target) { Nan::HandleScope scope; - v8::Local object = Nan::New(); + {% if functions|hasFunctionOnRootProto %} + v8::Local object = Nan::New({{ functions|getCPPFunctionForRootProto }}); + {% else %} + v8::Local object = Nan::New(); + {% endif %} {% each functions as function %} {% if not function.ignore %} @@ -87,7 +91,15 @@ using namespace node; {% endif %} {% endeach %} - Nan::Set(target, Nan::New("{{ jsClassName }}").ToLocalChecked(), object); + Nan::Set( + target, + Nan::New("{{ jsClassName }}").ToLocalChecked(), + {% if functions|hasFunctionOnRootProto %} + Nan::GetFunction(object).ToLocalChecked() + {% else %} + object + {% endif %} + ); } {% endif %} From 138bccbb3ef0cc108b7ef00851f4b949aa32731c Mon Sep 17 00:00:00 2001 From: Jordan W Date: Thu, 30 May 2019 09:28:00 -0700 Subject: [PATCH 102/145] refresh_references.cc: bust LibGit2 remote list cache by reading config Also removed calling `git_odb_free` when `git_repository_odb` fails. --- .../manual/repository/refresh_references.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index a13f3641c..69cdeeb57 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -415,6 +415,17 @@ void GitRepository::RefreshReferencesWorker::Execute() git_odb *odb; baton->error_code = git_repository_odb(&odb, repo); + if (baton->error_code != GIT_OK) { + if (giterr_last() != NULL) { + baton->error = git_error_dup(giterr_last()); + } + delete refreshData; + baton->out = NULL; + return; + } + + git_config *config; + baton->error_code = git_repository_config_snapshot(&config, repo); if (baton->error_code != GIT_OK) { if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); @@ -424,6 +435,8 @@ void GitRepository::RefreshReferencesWorker::Execute() baton->out = NULL; return; } + git_config_free(config); + // START Refresh HEAD git_reference *headRef = NULL; From 8e431e9dd3cbaa749f37fbd70a4509621763218b Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 3 Jun 2019 16:58:55 -0700 Subject: [PATCH 103/145] Bump to v0.25.0-alpha.12 --- CHANGELOG.md | 15 +++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f86432772..4194aa64d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Change Log +## v0.25.0-alpha.12 [(2019-06-03)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.12) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.11...v0.25.0-alpha.12) + +#### Summary of changes +- Fix bug in Repository.prototype.refreshReferences where new remote references from a new remote added/fetched on a separte repo instance do not show up in the result. +- Fixed a prototype problem with cherrypick, merge, and other collections that have a function at their root. call, apply, and bind should now be on NodeGit.Cherrypick. +- Bumped libssh2 to resolve security notice. + +#### Merged PRs into NodeGit +- [Bump libssh2 to 1.8.2 and fix some npm audit warnings #1678](https://github.com/nodegit/nodegit/pull/1678) +- [Root functions should keep their function prototypes correctly #1681](https://github.com/nodegit/nodegit/pull/1681) +- [refresh_references.cc: bust LibGit2 remote list cache by reading config #1685](https://github.com/nodegit/nodegit/pull/1685) + + ## v0.25.0-alpha.11 [(2019-05-20)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.11) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.10...v0.25.0-alpha.11) diff --git a/package-lock.json b/package-lock.json index 7b9825c72..679a52b8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.11", + "version": "0.25.0-alpha.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 24813d442..1a237dba0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.11", + "version": "0.25.0-alpha.12", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 2d2a1a895f2fb602f3bd24a036dd8337447e4294 Mon Sep 17 00:00:00 2001 From: Jordan W Date: Fri, 21 Jun 2019 09:25:18 -0700 Subject: [PATCH 104/145] refresh_references.cc: skip refs that can't be directly resolved --- .../manual/repository/refresh_references.cc | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index 69cdeeb57..65548812c 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -16,7 +16,12 @@ int asDirectReference(git_reference **out, git_reference *ref) { return git_reference_dup(out, ref); } - return git_reference_resolve(out, ref); + int error = git_reference_resolve(out, ref); + if (error != GIT_OK) { + *out = NULL; + } + + return GIT_OK; } int lookupDirectReferenceByShorthand(git_reference **out, git_repository *repo, const char *shorthand) { @@ -442,7 +447,7 @@ void GitRepository::RefreshReferencesWorker::Execute() git_reference *headRef = NULL; baton->error_code = lookupDirectReferenceByShorthand(&headRef, repo, "HEAD"); - if (baton->error_code != GIT_OK) { + if (baton->error_code != GIT_OK || headRef == NULL) { if (giterr_last() != NULL) { baton->error = git_error_dup(giterr_last()); } @@ -472,7 +477,7 @@ void GitRepository::RefreshReferencesWorker::Execute() // START Refresh CHERRY_PICK_HEAD git_reference *cherrypickRef = NULL; - if (lookupDirectReferenceByShorthand(&cherrypickRef, repo, "CHERRY_PICK_HEAD") == GIT_OK) { + if (lookupDirectReferenceByShorthand(&cherrypickRef, repo, "CHERRY_PICK_HEAD") == GIT_OK && cherrypickRef != NULL) { baton->error_code = RefreshedRefModel::fromReference(&refreshData->cherrypick, cherrypickRef, odb); git_reference_free(cherrypickRef); } else { @@ -483,7 +488,7 @@ void GitRepository::RefreshReferencesWorker::Execute() // START Refresh MERGE_HEAD git_reference *mergeRef = NULL; // fall through if cherry pick failed - if (baton->error_code == GIT_OK && lookupDirectReferenceByShorthand(&mergeRef, repo, "MERGE_HEAD") == GIT_OK) { + if (baton->error_code == GIT_OK && lookupDirectReferenceByShorthand(&mergeRef, repo, "MERGE_HEAD") == GIT_OK && mergeRef != NULL) { baton->error_code = RefreshedRefModel::fromReference(&refreshData->merge, mergeRef, odb); git_reference_free(mergeRef); } else { @@ -536,6 +541,10 @@ void GitRepository::RefreshReferencesWorker::Execute() if (baton->error_code != GIT_OK) { break; } + if (reference == NULL) { + // lookup found the reference but failed to resolve it directly + continue; + } UpstreamModel *upstreamModel; if (UpstreamModel::fromReference(&upstreamModel, reference)) { From 2dc4f2db56b54930e27c3e412ad9dd7959f1044a Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 25 Jun 2019 16:02:15 -0700 Subject: [PATCH 105/145] Bump libgit2 to fork of latest master --- vendor/libgit2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/libgit2 b/vendor/libgit2 index 97e4179a7..0cfb5596a 160000 --- a/vendor/libgit2 +++ b/vendor/libgit2 @@ -1 +1 @@ -Subproject commit 97e4179a76b935a15589a44662ce54a0ce0f3026 +Subproject commit 0cfb5596ac1d0a0a88c3a449f885ee84ec4a8fb3 From 885e5822d9ebcab8489d17616a426e69d1908f25 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 24 Jun 2019 10:12:03 -0700 Subject: [PATCH 106/145] Bump Libgit2 docs to HEAD --- generate/input/libgit2-docs.json | 9552 ++++++++---------------------- 1 file changed, 2551 insertions(+), 7001 deletions(-) diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index 90392f122..7717a3886 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -23,7 +23,7 @@ "git_apply" ], "meta": {}, - "lines": 125 + "lines": 128 }, { "file": "git2/attr.h", @@ -42,7 +42,7 @@ { "file": "git2/blame.h", "functions": [ - "git_blame_init_options", + "git_blame_options_init", "git_blame_get_hunk_count", "git_blame_get_hunk_byindex", "git_blame_get_hunk_byline", @@ -64,11 +64,11 @@ "git_blob_rawcontent", "git_blob_rawsize", "git_blob_filtered_content", - "git_blob_create_fromworkdir", - "git_blob_create_fromdisk", - "git_blob_create_fromstream", - "git_blob_create_fromstream_commit", - "git_blob_create_frombuffer", + "git_blob_create_from_workdir", + "git_blob_create_from_disk", + "git_blob_create_from_stream", + "git_blob_create_from_stream_commit", + "git_blob_create_from_buffer", "git_blob_is_binary", "git_blob_dup" ], @@ -116,18 +116,18 @@ "git_checkout_notify_cb", "git_checkout_progress_cb", "git_checkout_perfdata_cb", - "git_checkout_init_options", + "git_checkout_options_init", "git_checkout_head", "git_checkout_index", "git_checkout_tree" ], "meta": {}, - "lines": 362 + "lines": 375 }, { "file": "git2/cherrypick.h", "functions": [ - "git_cherrypick_init_options", + "git_cherrypick_options_init", "git_cherrypick_commit", "git_cherrypick" ], @@ -139,7 +139,7 @@ "functions": [ "git_remote_create_cb", "git_repository_create_cb", - "git_clone_init_options", + "git_clone_options_init", "git_clone" ], "meta": {}, @@ -191,7 +191,7 @@ "git_libgit2_opts" ], "meta": {}, - "lines": 402 + "lines": 404 }, { "file": "git2/config.h", @@ -255,20 +255,24 @@ { "file": "git2/deprecated.h", "functions": [ + "git_blob_create_fromworkdir", "git_buf_free", "giterr_last", "giterr_clear", "giterr_set_str", - "giterr_set_oom" + "giterr_set_oom", + "git_oid_iszero", + "git_headlist_cb", + "git_blame_init_options" ], "meta": {}, - "lines": 148 + "lines": 423 }, { "file": "git2/describe.h", "functions": [ - "git_describe_init_options", - "git_describe_init_format_options", + "git_describe_options_init", + "git_describe_format_options_init", "git_describe_commit", "git_describe_workdir", "git_describe_format", @@ -282,12 +286,12 @@ "functions": [ "git_diff_notify_cb", "git_diff_progress_cb", - "git_diff_init_options", + "git_diff_options_init", "git_diff_file_cb", "git_diff_binary_cb", "git_diff_hunk_cb", "git_diff_line_cb", - "git_diff_find_init_options", + "git_diff_find_options_init", "git_diff_free", "git_diff_tree_to_tree", "git_diff_tree_to_index", @@ -317,8 +321,8 @@ "git_diff_stats_free", "git_diff_format_email", "git_diff_commit_as_email", - "git_diff_format_email_init_options", - "git_diff_patchid_init_options", + "git_diff_format_email_options_init", + "git_diff_patchid_options_init", "git_diff_patchid" ], "meta": {}, @@ -411,7 +415,7 @@ "git_index_iterator_next", "git_index_iterator_free", "git_index_add_bypath", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_remove_bypath", "git_index_add_all", "git_index_remove_all", @@ -428,12 +432,13 @@ "git_index_conflict_iterator_free" ], "meta": {}, - "lines": 829 + "lines": 830 }, { "file": "git2/indexer.h", "functions": [ - "git_indexer_init_options", + "git_indexer_progress_cb", + "git_indexer_options_init", "git_indexer_new", "git_indexer_append", "git_indexer_commit", @@ -441,15 +446,7 @@ "git_indexer_free" ], "meta": {}, - "lines": 98 - }, - { - "file": "git2/inttypes.h", - "functions": [ - "imaxdiv" - ], - "meta": {}, - "lines": 298 + "lines": 142 }, { "file": "git2/mailmap.h", @@ -468,9 +465,9 @@ { "file": "git2/merge.h", "functions": [ - "git_merge_file_init_input", - "git_merge_file_init_options", - "git_merge_init_options", + "git_merge_file_input_init", + "git_merge_file_options_init", + "git_merge_options_init", "git_merge_analysis", "git_merge_analysis_for_ref", "git_merge_base", @@ -486,7 +483,7 @@ "git_merge" ], "meta": {}, - "lines": 606 + "lines": 602 }, { "file": "git2/message.h", @@ -500,11 +497,9 @@ }, { "file": "git2/net.h", - "functions": [ - "git_headlist_cb" - ], + "functions": [], "meta": {}, - "lines": 55 + "lines": 50 }, { "file": "git2/notes.h", @@ -545,7 +540,7 @@ "git_object_type2string", "git_object_string2type", "git_object_typeisloose", - "git_object__size", + "git_object_size", "git_object_peel", "git_object_dup" ], @@ -590,7 +585,7 @@ "git_odb_get_backend" ], "meta": {}, - "lines": 544 + "lines": 545 }, { "file": "git2/odb_backend.h", @@ -600,7 +595,7 @@ "git_odb_backend_one_pack" ], "meta": {}, - "lines": 130 + "lines": 131 }, { "file": "git2/oid.h", @@ -620,7 +615,7 @@ "git_oid_ncmp", "git_oid_streq", "git_oid_strcmp", - "git_oid_iszero", + "git_oid_is_zero", "git_oid_shorten_new", "git_oid_shorten_add", "git_oid_shorten_free" @@ -658,7 +653,7 @@ "git_packbuilder_free" ], "meta": {}, - "lines": 236 + "lines": 247 }, { "file": "git2/patch.h", @@ -704,7 +699,7 @@ { "file": "git2/proxy.h", "functions": [ - "git_proxy_init_options" + "git_proxy_options_init" ], "meta": {}, "lines": 92 @@ -712,9 +707,13 @@ { "file": "git2/rebase.h", "functions": [ - "git_rebase_init_options", + "git_rebase_options_init", "git_rebase_init", "git_rebase_open", + "git_rebase_orig_head_name", + "git_rebase_orig_head_id", + "git_rebase_onto_name", + "git_rebase_onto_id", "git_rebase_operation_entrycount", "git_rebase_operation_current", "git_rebase_operation_byindex", @@ -726,7 +725,7 @@ "git_rebase_free" ], "meta": {}, - "lines": 319 + "lines": 347 }, { "file": "git2/refdb.h", @@ -807,7 +806,7 @@ "git_reference_shorthand" ], "meta": {}, - "lines": 744 + "lines": 763 }, { "file": "git2/refspec.h", @@ -831,7 +830,7 @@ "file": "git2/remote.h", "functions": [ "git_remote_create", - "git_remote_create_init_options", + "git_remote_create_options_init", "git_remote_create_with_opts", "git_remote_create_with_fetchspec", "git_remote_create_anonymous", @@ -857,12 +856,13 @@ "git_remote_disconnect", "git_remote_free", "git_remote_list", - "git_push_transfer_progress", + "git_push_transfer_progress_cb", "git_push_negotiation", "git_push_update_reference_cb", + "git_url_resolve_cb", "git_remote_init_callbacks", - "git_fetch_init_options", - "git_push_init_options", + "git_fetch_options_init", + "git_push_options_init", "git_remote_download", "git_remote_upload", "git_remote_update_tips", @@ -879,7 +879,7 @@ "git_remote_default_branch" ], "meta": {}, - "lines": 926 + "lines": 948 }, { "file": "git2/repository.h", @@ -892,7 +892,7 @@ "git_repository_open_bare", "git_repository_free", "git_repository_init", - "git_repository_init_init_options", + "git_repository_init_options_init", "git_repository_init_ext", "git_repository_head", "git_repository_head_for_worktree", @@ -932,7 +932,7 @@ "git_repository_set_ident" ], "meta": {}, - "lines": 877 + "lines": 898 }, { "file": "git2/reset.h", @@ -947,7 +947,7 @@ { "file": "git2/revert.h", "functions": [ - "git_revert_init_options", + "git_revert_options_init", "git_revert_commit", "git_revert" ], @@ -1007,7 +1007,7 @@ "functions": [ "git_stash_save", "git_stash_apply_progress_cb", - "git_stash_apply_init_options", + "git_stash_apply_options_init", "git_stash_apply", "git_stash_cb", "git_stash_foreach", @@ -1021,7 +1021,7 @@ "file": "git2/status.h", "functions": [ "git_status_cb", - "git_status_init_options", + "git_status_options_init", "git_status_foreach", "git_status_foreach_ext", "git_status_file", @@ -1034,12 +1034,6 @@ "meta": {}, "lines": 374 }, - { - "file": "git2/stdint.h", - "functions": [], - "meta": {}, - "lines": 124 - }, { "file": "git2/strarray.h", "functions": [ @@ -1053,7 +1047,7 @@ "file": "git2/submodule.h", "functions": [ "git_submodule_cb", - "git_submodule_update_init_options", + "git_submodule_update_options_init", "git_submodule_update", "git_submodule_lookup", "git_submodule_free", @@ -1089,236 +1083,41 @@ "meta": {}, "lines": 633 }, - { - "file": "git2/sys/alloc.h", - "functions": [ - "git_stdalloc_init_allocator", - "git_win32_crtdbg_init_allocator" - ], - "meta": {}, - "lines": 97 - }, - { - "file": "git2/sys/commit.h", - "functions": [ - "git_commit_create_from_ids", - "git_commit_create_from_callback" - ], - "meta": {}, - "lines": 76 - }, - { - "file": "git2/sys/config.h", - "functions": [ - "git_config_init_backend", - "git_config_add_backend" - ], - "meta": {}, - "lines": 126 - }, - { - "file": "git2/sys/diff.h", - "functions": [ - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle", - "git_diff_get_perfdata", - "git_status_list_get_perfdata" - ], - "meta": {}, - "lines": 90 - }, { "file": "git2/sys/filter.h", - "functions": [ - "git_filter_lookup", - "git_filter_list_new", - "git_filter_list_push", - "git_filter_list_length", - "git_filter_source_repo", - "git_filter_source_path", - "git_filter_source_filemode", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_flags", - "git_filter_init_fn", - "git_filter_shutdown_fn", - "git_filter_check_fn", - "git_filter_apply_fn", - "git_filter_stream_fn", - "git_filter_cleanup_fn", - "git_filter_init", - "git_filter_register", - "git_filter_unregister" - ], + "functions": [], "meta": {}, - "lines": 328 + "lines": 95 }, { "file": "git2/sys/hashsig.h", - "functions": [ - "git_hashsig_create", - "git_hashsig_create_fromfile", - "git_hashsig_free", - "git_hashsig_compare" - ], - "meta": {}, - "lines": 102 - }, - { - "file": "git2/sys/index.h", - "functions": [ - "git_index_name_entrycount", - "git_index_name_get_byindex", - "git_index_name_add", - "git_index_name_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_bypath", - "git_index_reuc_get_byindex", - "git_index_reuc_add", - "git_index_reuc_remove", - "git_index_reuc_clear" - ], - "meta": {}, - "lines": 174 - }, - { - "file": "git2/sys/mempack.h", - "functions": [ - "git_mempack_new", - "git_mempack_dump", - "git_mempack_reset" - ], + "functions": [], "meta": {}, - "lines": 82 + "lines": 45 }, { "file": "git2/sys/merge.h", - "functions": [ - "git_merge_driver_lookup", - "git_merge_driver_source_repo", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_ours", - "git_merge_driver_source_theirs", - "git_merge_driver_source_file_options", - "git_merge_driver_init_fn", - "git_merge_driver_shutdown_fn", - "git_merge_driver_apply_fn", - "git_merge_driver_register", - "git_merge_driver_unregister" - ], - "meta": {}, - "lines": 178 - }, - { - "file": "git2/sys/odb_backend.h", - "functions": [ - "git_odb_init_backend", - "git_odb_backend_malloc" - ], - "meta": {}, - "lines": 120 - }, - { - "file": "git2/sys/openssl.h", - "functions": [ - "git_openssl_set_locking" - ], + "functions": [], "meta": {}, - "lines": 34 + "lines": 41 }, { "file": "git2/sys/path.h", - "functions": [ - "git_path_is_gitfile" - ], - "meta": {}, - "lines": 60 - }, - { - "file": "git2/sys/refdb_backend.h", - "functions": [ - "git_refdb_init_backend", - "git_refdb_backend_fs", - "git_refdb_set_backend" - ], - "meta": {}, - "lines": 214 - }, - { - "file": "git2/sys/reflog.h", - "functions": [ - "git_reflog_entry__alloc", - "git_reflog_entry__free" - ], - "meta": {}, - "lines": 17 - }, - { - "file": "git2/sys/refs.h", - "functions": [ - "git_reference__alloc", - "git_reference__alloc_symbolic" - ], - "meta": {}, - "lines": 45 - }, - { - "file": "git2/sys/repository.h", - "functions": [ - "git_repository_new", - "git_repository__cleanup", - "git_repository_reinit_filesystem", - "git_repository_set_config", - "git_repository_set_odb", - "git_repository_set_refdb", - "git_repository_set_index", - "git_repository_set_bare", - "git_repository_submodule_cache_all", - "git_repository_submodule_cache_clear" - ], + "functions": [], "meta": {}, - "lines": 165 + "lines": 41 }, { "file": "git2/sys/stream.h", - "functions": [ - "git_stream_register", - "git_stream_cb", - "git_stream_register_tls" - ], - "meta": {}, - "lines": 130 - }, - { - "file": "git2/sys/time.h", - "functions": [ - "git_time_monotonic" - ], + "functions": [], "meta": {}, - "lines": 27 + "lines": 83 }, { "file": "git2/sys/transport.h", - "functions": [ - "git_transport_init", - "git_transport_new", - "git_transport_ssh_with_paths", - "git_transport_register", - "git_transport_unregister", - "git_transport_dummy", - "git_transport_local", - "git_transport_smart", - "git_transport_smart_certificate_check", - "git_transport_smart_credentials", - "git_transport_smart_proxy_options", - "git_smart_subtransport_cb", - "git_smart_subtransport_http", - "git_smart_subtransport_git", - "git_smart_subtransport_ssh" - ], + "functions": [], "meta": {}, - "lines": 435 + "lines": 292 }, { "file": "git2/tag.h", @@ -1336,7 +1135,7 @@ "git_tag_message", "git_tag_create", "git_tag_annotation_create", - "git_tag_create_frombuffer", + "git_tag_create_from_buffer", "git_tag_create_lightweight", "git_tag_delete", "git_tag_list", @@ -1347,12 +1146,12 @@ "git_tag_dup" ], "meta": {}, - "lines": 357 + "lines": 366 }, { "file": "git2/trace.h", "functions": [ - "git_trace_callback", + "git_trace_cb", "git_trace_set" ], "meta": {}, @@ -1377,8 +1176,6 @@ "file": "git2/transport.h", "functions": [ "git_transport_cb", - "git_cred_sign_callback", - "git_cred_ssh_interactive_callback", "git_cred_has_username", "git_cred_userpass_plaintext_new", "git_cred_ssh_key_new", @@ -1438,12 +1235,11 @@ { "file": "git2/types.h", "functions": [ - "git_transfer_progress_cb", "git_transport_message_cb", "git_transport_certificate_check_cb" ], "meta": {}, - "lines": 442 + "lines": 412 }, { "file": "git2/worktree.h", @@ -1453,14 +1249,14 @@ "git_worktree_open_from_repository", "git_worktree_free", "git_worktree_validate", - "git_worktree_add_init_options", + "git_worktree_add_options_init", "git_worktree_add", "git_worktree_lock", "git_worktree_unlock", "git_worktree_is_locked", "git_worktree_name", "git_worktree_path", - "git_worktree_prune_init_options", + "git_worktree_prune_options_init", "git_worktree_is_prunable", "git_worktree_prune" ], @@ -1572,7 +1368,7 @@ "comment": " 0 on success or error code" }, "description": "

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.

\n", - "comments": "

An annotated commit contains information about how it was\n looked up, which may be useful for functions like merge or\n rebase to provide context to the operation. For example,\n conflict files will include the name of the source or target\n branches being merged. It is therefore preferable to use the\n most specific function (eg git_annotated_commit_from_ref)\n instead of this one when that data is known.

\n", + "comments": "

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.

\n", "group": "annotated" }, "git_annotated_commit_from_revspec": { @@ -1604,7 +1400,7 @@ "comment": " 0 on success or error code" }, "description": "

Creates a git_annotated_comit from a revision string.

\n", - "comments": "

See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n", + "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n", "group": "annotated" }, "git_annotated_commit_id": { @@ -1630,12 +1426,12 @@ "group": "annotated", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_annotated_commit_id-1" + "ex/HEAD/checkout.html#git_annotated_commit_id-1" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_annotated_commit_id-1", - "ex/v0.28.0/merge.html#git_annotated_commit_id-2", - "ex/v0.28.0/merge.html#git_annotated_commit_id-3" + "ex/HEAD/merge.html#git_annotated_commit_id-1", + "ex/HEAD/merge.html#git_annotated_commit_id-2", + "ex/HEAD/merge.html#git_annotated_commit_id-3" ] } }, @@ -1662,8 +1458,8 @@ "group": "annotated", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_annotated_commit_ref-2", - "ex/v0.28.0/checkout.html#git_annotated_commit_ref-3" + "ex/HEAD/checkout.html#git_annotated_commit_ref-2", + "ex/HEAD/checkout.html#git_annotated_commit_ref-3" ] } }, @@ -1690,15 +1486,15 @@ "group": "annotated", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_annotated_commit_free-4" + "ex/HEAD/checkout.html#git_annotated_commit_free-4" ] } }, "git_apply_to_tree": { "type": "function", "file": "git2/apply.h", - "line": 85, - "lineto": 90, + "line": 87, + "lineto": 92, "args": [ { "name": "out", @@ -1739,8 +1535,8 @@ "git_apply": { "type": "function", "file": "git2/apply.h", - "line": 121, - "lineto": 125, + "line": 124, + "lineto": 128, "args": [ { "name": "repo", @@ -1788,11 +1584,11 @@ "argline": "const char *attr", "sig": "const char *", "return": { - "type": "git_attr_t", + "type": "git_attr_value_t", "comment": " the value type for the attribute" }, "description": "

Return the value type for a given attribute.

\n", - "comments": "

This can be either TRUE, FALSE, UNSPECIFIED (if the attribute\n was not set at all), or VALUE, if the attribute was set to an\n actual string.

\n\n

If the attribute has a VALUE string, it can be accessed normally\n as a NULL-terminated C string.

\n", + "comments": "

This can be either TRUE, FALSE, UNSPECIFIED (if the attribute was not set at all), or VALUE, if the attribute was set to an actual string.

\n\n

If the attribute has a VALUE string, it can be accessed normally as a NULL-terminated C string.

\n", "group": "attr" }, "git_attr_get": { @@ -1804,36 +1600,36 @@ { "name": "value_out", "type": "const char **", - "comment": null + "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": null + "comment": "The repository containing the path." }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "A combination of GIT_ATTR_CHECK... flags." }, { "name": "path", "type": "const char *", - "comment": null + "comment": "The path 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": null + "comment": "The name of the attribute to look up." } ], - "argline": "const char **value_out, git_repository *repo, int flags, const char *path, const char *name", - "sig": "const char **::git_repository *::int::const char *::const char *", + "argline": "const char **value_out, git_repository *repo, uint32_t flags, const char *path, const char *name", + "sig": "const char **::git_repository *::uint32_t::const char *::const char *", "return": { "type": "int", "comment": null }, - "description": "", + "description": "

Look up the value of one git attribute for path.

\n", "comments": "", "group": "attr" }, @@ -1846,42 +1642,42 @@ { "name": "values_out", "type": "const char **", - "comment": null + "comment": "An array of num_attr entries that will have string\n pointers written into it for the values of the attributes.\n You should not modify or free the values that are written\n into this array (although of course, you should free the\n array itself if you allocated it)." }, { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository containing the path." }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "A combination of GIT_ATTR_CHECK... flags." }, { "name": "path", "type": "const char *", - "comment": null + "comment": "The path inside the repo to check attributes. This\n does not have to exist, but if it does not, then\n it will be treated as a plain file (i.e. not a directory)." }, { "name": "num_attr", "type": "size_t", - "comment": null + "comment": "The number of attributes being looked up" }, { "name": "names", "type": "const char **", - "comment": null + "comment": "An array of num_attr strings containing attribute names." } ], - "argline": "const char **values_out, git_repository *repo, int flags, const char *path, size_t num_attr, const char **names", - "sig": "const char **::git_repository *::int::const char *::size_t::const char **", + "argline": "const char **values_out, git_repository *repo, uint32_t flags, const char *path, size_t num_attr, const char **names", + "sig": "const char **::git_repository *::uint32_t::const char *::size_t::const char **", "return": { "type": "int", "comment": null }, - "description": "", - "comments": "", + "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.

\n\n

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\n

Then you could loop through the 3 values to get the settings for the three attributes you asked about.

\n", "group": "attr" }, "git_attr_foreach": { @@ -1893,36 +1689,36 @@ { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository containing the path." }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "A combination of GIT_ATTR_CHECK... flags." }, { "name": "path", "type": "const char *", - "comment": null + "comment": "Path inside the repo to check attributes. This does not have\n to exist, but if it does not, then it will be treated as a\n plain file (i.e. not a directory)." }, { "name": "callback", "type": "git_attr_foreach_cb", - "comment": null + "comment": "Function to invoke on each attribute name and value.\n See git_attr_foreach_cb." }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Passed on as extra parameter to callback function." } ], - "argline": "git_repository *repo, int flags, const char *path, git_attr_foreach_cb callback, void *payload", - "sig": "git_repository *::int::const char *::git_attr_foreach_cb::void *", + "argline": "git_repository *repo, uint32_t flags, const char *path, git_attr_foreach_cb callback, void *payload", + "sig": "git_repository *::uint32_t::const char *::git_attr_foreach_cb::void *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, non-zero callback return value, or error code" }, - "description": "", + "description": "

Loop over all the git attributes for a path.

\n", "comments": "", "group": "attr" }, @@ -1945,7 +1741,7 @@ "comment": null }, "description": "

Flush the gitattributes cache.

\n", - "comments": "

Call this if you have reason to believe that the attributes files on\n disk no longer match the cached contents of memory. This will cause\n the attributes files to be reloaded the next time that an attribute\n access function is called.

\n", + "comments": "

Call this if you have reason to believe that the attributes files on disk no longer match the cached contents of memory. This will cause the attributes files to be reloaded the next time that an attribute access function is called.

\n", "group": "attr" }, "git_attr_add_macro": { @@ -1977,10 +1773,10 @@ "comment": null }, "description": "

Add a macro definition.

\n", - "comments": "

Macros will automatically be loaded from the top level .gitattributes\n file of the repository (plus the build-in "binary" macro). This\n function allows you to add others. For example, to add the default\n macro, you would call:

\n\n
 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 build-in "binary" macro). This function allows you to add others. For example, to add the default macro, you would call:

\n\n
 git_attr_add_macro(repo, "binary", "-diff -crlf");\n
\n", "group": "attr" }, - "git_blame_init_options": { + "git_blame_options_init": { "type": "function", "file": "git2/blame.h", "line": 103, @@ -2004,7 +1800,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_blame_options structure

\n", - "comments": "

Initializes a git_blame_options with default values. Equivalent to creating\n an instance with GIT_BLAME_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_blame_options with default values. Equivalent to creating an instance with GIT_BLAME_OPTIONS_INIT.

\n", "group": "blame" }, "git_blame_get_hunk_count": { @@ -2012,14 +1808,20 @@ "file": "git2/blame.h", "line": 154, "lineto": 154, - "args": [], - "argline": "", - "sig": "", + "args": [ + { + "name": "blame", + "type": "git_blame *", + "comment": null + } + ], + "argline": "git_blame *blame", + "sig": "git_blame *", "return": { - "type": "int", + "type": "uint32_t", "comment": null }, - "description": "", + "description": "

Gets the number of hunks that exist in the blame structure.

\n", "comments": "", "group": "blame" }, @@ -2032,21 +1834,21 @@ { "name": "blame", "type": "git_blame *", - "comment": null + "comment": "the blame structure to query" }, { "name": "index", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "index of the hunk to retrieve" } ], - "argline": "git_blame *blame, int index", - "sig": "git_blame *::int", + "argline": "git_blame *blame, uint32_t index", + "sig": "git_blame *::uint32_t", "return": { "type": "const git_blame_hunk *", - "comment": null + "comment": " the hunk at the given index, or NULL on error" }, - "description": "", + "description": "

Gets the blame hunk at the given index.

\n", "comments": "", "group": "blame" }, @@ -2078,7 +1880,7 @@ "group": "blame", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blame_get_hunk_byline-1" + "ex/HEAD/blame.html#git_blame_get_hunk_byline-1" ] } }, @@ -2120,7 +1922,7 @@ "group": "blame", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blame_file-2" + "ex/HEAD/blame.html#git_blame_file-2" ] } }, @@ -2158,7 +1960,7 @@ "comment": " 0 on success, or an error code. (use git_error_last for information\n about the error)" }, "description": "

Get blame data for a file that has been modified in memory. The reference\n parameter is a pre-calculated blame for the in-odb history of the file. This\n means that once a file blame is completed (which can be expensive), updating\n the buffer blame is very fast.

\n", - "comments": "

Lines that differ between the buffer and the committed version are marked as\n having a zero OID for their final_commit_id.

\n", + "comments": "

Lines that differ between the buffer and the committed version are marked as having a zero OID for their final_commit_id.

\n", "group": "blame" }, "git_blame_free": { @@ -2184,7 +1986,7 @@ "group": "blame", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blame_free-3" + "ex/HEAD/blame.html#git_blame_free-3" ] } }, @@ -2221,10 +2023,10 @@ "group": "blob", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_lookup-4" + "ex/HEAD/blame.html#git_blob_lookup-4" ], "general.c": [ - "ex/v0.28.0/general.html#git_blob_lookup-1" + "ex/HEAD/general.html#git_blob_lookup-1" ] } }, @@ -2284,14 +2086,14 @@ "comment": null }, "description": "

Close an open blob

\n", - "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT:\n It is necessary to call this method when you stop\n using a blob. Failure to do so will cause a memory leak.

\n", + "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT: It is necessary to call this method when you stop using a blob. Failure to do so will cause a memory leak.

\n", "group": "blob", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_free-5" + "ex/HEAD/blame.html#git_blob_free-5" ], "general.c": [ - "ex/v0.28.0/general.html#git_blob_free-2" + "ex/HEAD/general.html#git_blob_free-2" ] } }, @@ -2358,17 +2160,17 @@ "comment": " the pointer" }, "description": "

Get a read-only buffer with the raw content of a blob.

\n", - "comments": "

A pointer to the raw content of a blob is returned;\n this pointer is owned internally by the object and shall\n not be free'd. The pointer may be invalidated at a later\n time.

\n", + "comments": "

A pointer to the raw content of a blob is returned; this pointer is owned internally by the object and shall not be free'd. The pointer may be invalidated at a later time.

\n", "group": "blob", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_rawcontent-6" + "ex/HEAD/blame.html#git_blob_rawcontent-6" ], "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_blob_rawcontent-1" + "ex/HEAD/cat-file.html#git_blob_rawcontent-1" ], "general.c": [ - "ex/v0.28.0/general.html#git_blob_rawcontent-3" + "ex/HEAD/general.html#git_blob_rawcontent-3" ] } }, @@ -2395,14 +2197,14 @@ "group": "blob", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_blob_rawsize-7" + "ex/HEAD/blame.html#git_blob_rawsize-7" ], "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_blob_rawsize-2" + "ex/HEAD/cat-file.html#git_blob_rawsize-2" ], "general.c": [ - "ex/v0.28.0/general.html#git_blob_rawsize-4", - "ex/v0.28.0/general.html#git_blob_rawsize-5" + "ex/HEAD/general.html#git_blob_rawsize-4", + "ex/HEAD/general.html#git_blob_rawsize-5" ] } }, @@ -2440,10 +2242,10 @@ "comment": " 0 on success or an error code" }, "description": "

Get a buffer with the filtered content of a blob.

\n", - "comments": "

This applies filters as if the blob was being checked out to the\n working directory under the specified filename. This may apply\n CRLF filtering or other types of changes depending on the file\n attributes set for the blob and the content detected in it.

\n\n

The output is written into a git_buf which the caller must free\n when done (via git_buf_dispose).

\n\n

If no filters need to be applied, then the out buffer will just\n be populated with a pointer to the raw content of the blob. In\n that case, be careful to not free the blob until done with the\n buffer or copy it into memory you own.

\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\n

The output is written into a git_buf which the caller must free when done (via git_buf_dispose).

\n\n

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.

\n", "group": "blob" }, - "git_blob_create_fromworkdir": { + "git_blob_create_from_workdir": { "type": "function", "file": "git2/blob.h", "line": 139, @@ -2475,7 +2277,7 @@ "comments": "", "group": "blob" }, - "git_blob_create_fromdisk": { + "git_blob_create_from_disk": { "type": "function", "file": "git2/blob.h", "line": 151, @@ -2507,7 +2309,7 @@ "comments": "", "group": "blob" }, - "git_blob_create_fromstream": { + "git_blob_create_from_stream": { "type": "function", "file": "git2/blob.h", "line": 178, @@ -2536,10 +2338,10 @@ "comment": " 0 or error code" }, "description": "

Create a stream to write a new blob into the object db

\n", - "comments": "

This function may need to buffer the data on disk and will in\n general not be the right choice if you know the size of the data\n to write. If you have data in memory, use\n git_blob_create_frombuffer(). If you do not, but know the size of\n the contents (and don't want/need to perform filtering), use\n git_odb_open_wstream().

\n\n

Don't close this stream yourself but pass it to\n git_blob_create_fromstream_commit() to commit the write to the\n object db and get the object id.

\n\n

If the hintpath parameter is filled, it will be used to determine\n what git filters should be applied to the object before it is written\n to the object database.

\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().

\n\n

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.

\n\n

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.

\n", "group": "blob" }, - "git_blob_create_fromstream_commit": { + "git_blob_create_from_stream_commit": { "type": "function", "file": "git2/blob.h", "line": 192, @@ -2566,7 +2368,7 @@ "comments": "

The stream will be closed and freed.

\n", "group": "blob" }, - "git_blob_create_frombuffer": { + "git_blob_create_from_buffer": { "type": "function", "file": "git2/blob.h", "line": 205, @@ -2622,7 +2424,7 @@ "comment": " 1 if the content of the blob is detected\n as binary; 0 otherwise." }, "description": "

Determine if the blob content is most certainly binary or not.

\n", - "comments": "

The heuristic used to guess if a file is binary is taken from core git:\n Searching for NUL bytes and looking for a reasonable ratio of printable\n to non-printable characters among the first 8000 bytes.

\n", + "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_dup": { @@ -2691,7 +2493,7 @@ "comment": " 0, GIT_EINVALIDSPEC or an error code.\n A proper reference is written in the refs/heads namespace\n pointing to the provided target commit." }, "description": "

Create a new branch pointing at a target commit

\n", - "comments": "

A new direct reference will be created pointing to\n this target commit. If force is true and a reference\n already exists with the given name, it'll be replaced.

\n\n

The returned reference must be freed by the user.

\n\n

The branch name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", + "comments": "

A new direct reference will be created pointing to this target commit. If force is true and a reference already exists with the given name, it'll be replaced.

\n\n

The returned reference must be freed by the user.

\n\n

The branch name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "branch" }, "git_branch_create_from_annotated": { @@ -2733,7 +2535,7 @@ "comment": null }, "description": "

Create a new branch pointing at a target commit

\n", - "comments": "

This behaves like git_branch_create() but takes an annotated\n commit, which lets you specify which extended sha syntax string was\n specified by a user, allowing for more exact reflog messages.

\n\n

See the documentation for git_branch_create().

\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.

\n\n

See the documentation for git_branch_create().

\n", "group": "branch" }, "git_branch_delete": { @@ -2755,7 +2557,7 @@ "comment": " 0 on success, or an error code." }, "description": "

Delete an existing branch reference.

\n", - "comments": "

If the branch is successfully deleted, the passed reference\n object will be invalidated. The reference must be freed manually\n by the user.

\n", + "comments": "

If the branch is successfully deleted, the passed reference object will be invalidated. The reference must be freed manually by the user.

\n", "group": "branch" }, "git_branch_iterator_new": { @@ -2878,7 +2680,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code." }, "description": "

Move/rename an existing local branch reference.

\n", - "comments": "

The new branch name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", + "comments": "

The new branch name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "branch" }, "git_branch_lookup": { @@ -2915,7 +2717,7 @@ "comment": " 0 on success; GIT_ENOTFOUND when no matching branch\n exists, GIT_EINVALIDSPEC, otherwise an error code." }, "description": "

Lookup a branch by its name in a repository.

\n", - "comments": "

The generated reference must be freed by the user.

\n\n

The branch name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", + "comments": "

The generated reference must be freed by the user.

\n\n

The branch name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "branch" }, "git_branch_name": { @@ -2942,11 +2744,11 @@ "comment": " 0 on success; otherwise an error code (e.g., if the\n ref is no local or remote branch)." }, "description": "

Return the name of the given local or remote branch.

\n", - "comments": "

The name of the branch matches the definition of the name\n for git_branch_lookup. That is, if the returned name is given\n to git_branch_lookup() then the reference is returned that\n was given to this function.

\n", + "comments": "

The name of the branch matches the definition of the name for git_branch_lookup. That is, if the returned name is given to git_branch_lookup() then the reference is returned that was given to this function.

\n", "group": "branch", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_branch_name-4" + "ex/HEAD/merge.html#git_branch_name-4" ] } }, @@ -3163,17 +2965,14 @@ "comment": null }, "description": "

Free the memory referred to by the git_buf.

\n", - "comments": "

Note that this does not free the git_buf itself, just the memory\n pointed to by buffer->ptr. This will not free the memory if it looks\n like it was not allocated internally, but it will clear the buffer back\n to the empty state.

\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.

\n", "group": "buf", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_buf_dispose-1" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_buf_dispose-1" + "ex/HEAD/diff.html#git_buf_dispose-1" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_buf_dispose-1" + "ex/HEAD/tag.html#git_buf_dispose-1" ] } }, @@ -3201,7 +3000,7 @@ "comment": " 0 on success, -1 on allocation failure" }, "description": "

Resize the buffer allocation to make more space.

\n", - "comments": "

This will attempt to grow the buffer to accommodate the target size.

\n\n

If the buffer refers to memory that was not allocated by libgit2 (i.e.\n the asize field is zero), then ptr will be replaced with a newly\n allocated block of data. Be careful so that memory allocated by the\n caller is not lost. As a special variant, if you pass target_size as\n 0 and the memory is not allocated by libgit2, this will allocate a new\n buffer of size size and copy the external data into it.

\n\n

Currently, this will never shrink a buffer, only expand it.

\n\n

If the allocation fails, this will return an error and the buffer will be\n marked as invalid for future operations, invaliding the contents.

\n", + "comments": "

This will attempt to grow the buffer to accommodate the target size.

\n\n

If 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.

\n\n

Currently, this will never shrink a buffer, only expand it.

\n\n

If 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_buf_set": { @@ -3280,11 +3079,11 @@ "comments": "", "group": "buf" }, - "git_checkout_init_options": { + "git_checkout_options_init": { "type": "function", "file": "git2/checkout.h", - "line": 309, - "lineto": 311, + "line": 322, + "lineto": 324, "args": [ { "name": "opts", @@ -3304,14 +3103,14 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_checkout_options structure

\n", - "comments": "

Initializes a git_checkout_options with default values. Equivalent to creating\n an instance with GIT_CHECKOUT_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_checkout_options with default values. Equivalent to creating an instance with GIT_CHECKOUT_OPTIONS_INIT.

\n", "group": "checkout" }, "git_checkout_head": { "type": "function", "file": "git2/checkout.h", - "line": 330, - "lineto": 332, + "line": 343, + "lineto": 345, "args": [ { "name": "repo", @@ -3331,14 +3130,14 @@ "comment": " 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non\n existing branch, non-zero value returned by `notify_cb`, or\n other error code \n<\n 0 (use git_error_last for error details)" }, "description": "

Updates files in the index and the working tree to match the content of\n the commit pointed at by HEAD.

\n", - "comments": "

Note that this is not the correct mechanism used to switch branches;\n do not change your HEAD and then call this method, that would leave\n you with checkout conflicts since your working directory would then\n appear to be dirty. Instead, checkout the target of the branch and\n then update HEAD using git_repository_set_head to point to the\n branch you checked out.

\n", + "comments": "

Note that this is not the correct mechanism used to switch branches; do not change your HEAD and then call this method, that would leave you with checkout conflicts since your working directory would then appear to be dirty. Instead, checkout the target of the branch and then update HEAD using git_repository_set_head to point to the branch you checked out.

\n", "group": "checkout" }, "git_checkout_index": { "type": "function", "file": "git2/checkout.h", - "line": 343, - "lineto": 346, + "line": 356, + "lineto": 359, "args": [ { "name": "repo", @@ -3369,8 +3168,8 @@ "git_checkout_tree": { "type": "function", "file": "git2/checkout.h", - "line": 359, - "lineto": 362, + "line": 372, + "lineto": 375, "args": [ { "name": "repo", @@ -3399,14 +3198,14 @@ "group": "checkout", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_checkout_tree-5" + "ex/HEAD/checkout.html#git_checkout_tree-5" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_checkout_tree-5" + "ex/HEAD/merge.html#git_checkout_tree-5" ] } }, - "git_cherrypick_init_options": { + "git_cherrypick_options_init": { "type": "function", "file": "git2/cherrypick.h", "line": 49, @@ -3430,7 +3229,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_cherrypick_options structure

\n", - "comments": "

Initializes a git_cherrypick_options with default values. Equivalent to creating\n an instance with GIT_CHERRYPICK_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_cherrypick_options with default values. Equivalent to creating an instance with GIT_CHERRYPICK_OPTIONS_INIT.

\n", "group": "cherrypick" }, "git_cherrypick_commit": { @@ -3512,7 +3311,7 @@ "comments": "", "group": "cherrypick" }, - "git_clone_init_options": { + "git_clone_options_init": { "type": "function", "file": "git2/clone.h", "line": 181, @@ -3536,7 +3335,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_clone_options structure

\n", - "comments": "

Initializes a git_clone_options with default values. Equivalent to creating\n an instance with GIT_CLONE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_clone_options with default values. Equivalent to creating an instance with GIT_CLONE_OPTIONS_INIT.

\n", "group": "clone" }, "git_clone": { @@ -3573,7 +3372,7 @@ "comment": " 0 on success, any non-zero return value from a callback\n function, or a negative value to indicate an error (use\n `git_error_last` for a detailed error message)" }, "description": "

Clone a remote repository.

\n", - "comments": "

By default this creates its repository and initial remote to match\n git's defaults. You can use the options in the callback to\n customize how these are created.

\n", + "comments": "

By default this creates its repository and initial remote to match git's defaults. You can use the options in the callback to customize how these are created.

\n", "group": "clone" }, "git_commit_lookup": { @@ -3605,22 +3404,22 @@ "comment": " 0 or an error code" }, "description": "

Lookup a commit object from a repository.

\n", - "comments": "

The returned object should be released with git_commit_free when no\n longer needed.

\n", + "comments": "

The returned object should be released with git_commit_free when no longer needed.

\n", "group": "commit", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_commit_lookup-6" + "ex/HEAD/checkout.html#git_commit_lookup-6" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_lookup-6", - "ex/v0.28.0/general.html#git_commit_lookup-7", - "ex/v0.28.0/general.html#git_commit_lookup-8" + "ex/HEAD/general.html#git_commit_lookup-6", + "ex/HEAD/general.html#git_commit_lookup-7", + "ex/HEAD/general.html#git_commit_lookup-8" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_lookup-1" + "ex/HEAD/log.html#git_commit_lookup-1" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_commit_lookup-6" + "ex/HEAD/merge.html#git_commit_lookup-6" ] } }, @@ -3658,7 +3457,7 @@ "comment": " 0 or an error code" }, "description": "

Lookup a commit object from a repository, given a prefix of its\n identifier (short id).

\n", - "comments": "

The returned object should be released with git_commit_free when no\n longer needed.

\n", + "comments": "

The returned object should be released with git_commit_free when no longer needed.

\n", "group": "commit" }, "git_commit_free": { @@ -3680,24 +3479,24 @@ "comment": null }, "description": "

Close an open commit

\n", - "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT:\n It is necessary to call this method when you stop\n using a commit. Failure to do so will cause a memory leak.

\n", + "comments": "

This is a wrapper around git_object_free()

\n\n

IMPORTANT: It is necessary to call this method when you stop using a commit. Failure to do so will cause a memory leak.

\n", "group": "commit", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_commit_free-7" + "ex/HEAD/checkout.html#git_commit_free-7" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_free-9", - "ex/v0.28.0/general.html#git_commit_free-10", - "ex/v0.28.0/general.html#git_commit_free-11", - "ex/v0.28.0/general.html#git_commit_free-12", - "ex/v0.28.0/general.html#git_commit_free-13" + "ex/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" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_free-2", - "ex/v0.28.0/log.html#git_commit_free-3", - "ex/v0.28.0/log.html#git_commit_free-4", - "ex/v0.28.0/log.html#git_commit_free-5" + "ex/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" ] } }, @@ -3724,10 +3523,10 @@ "group": "commit", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_commit_id-14" + "ex/HEAD/general.html#git_commit_id-14" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_id-6" + "ex/HEAD/log.html#git_commit_id-6" ] } }, @@ -3754,8 +3553,8 @@ "group": "commit", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_commit_owner-7", - "ex/v0.28.0/log.html#git_commit_owner-8" + "ex/HEAD/log.html#git_commit_owner-7", + "ex/HEAD/log.html#git_commit_owner-8" ] } }, @@ -3778,7 +3577,7 @@ "comment": " NULL, or the encoding" }, "description": "

Get the encoding for the message of a commit,\n as a string representing a standard encoding name.

\n", - "comments": "

The encoding may be NULL if the encoding header\n in the commit is missing; in that case UTF-8 is assumed.

\n", + "comments": "

The encoding may be NULL if the encoding header in the commit is missing; in that case UTF-8 is assumed.

\n", "group": "commit" }, "git_commit_message": { @@ -3800,25 +3599,25 @@ "comment": " the message of a commit" }, "description": "

Get the full message of a commit.

\n", - "comments": "

The returned message will be slightly prettified by removing any\n potential leading newlines.

\n", + "comments": "

The returned message will be slightly prettified by removing any potential leading newlines.

\n", "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_message-3", - "ex/v0.28.0/cat-file.html#git_commit_message-4" + "ex/HEAD/cat-file.html#git_commit_message-3", + "ex/HEAD/cat-file.html#git_commit_message-4" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_message-15", - "ex/v0.28.0/general.html#git_commit_message-16", - "ex/v0.28.0/general.html#git_commit_message-17" + "ex/HEAD/general.html#git_commit_message-15", + "ex/HEAD/general.html#git_commit_message-16", + "ex/HEAD/general.html#git_commit_message-17" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_message-9", - "ex/v0.28.0/log.html#git_commit_message-10", - "ex/v0.28.0/log.html#git_commit_message-11" + "ex/HEAD/log.html#git_commit_message-9", + "ex/HEAD/log.html#git_commit_message-10", + "ex/HEAD/log.html#git_commit_message-11" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_commit_message-2" + "ex/HEAD/tag.html#git_commit_message-2" ] } }, @@ -3863,7 +3662,7 @@ "comment": " the summary of a commit or NULL on error" }, "description": "

Get the short "summary" of the git commit message.

\n", - "comments": "

The returned message is the summary of the commit, comprising the\n first paragraph of the message with whitespace trimmed and squashed.

\n", + "comments": "

The returned message is the summary of the commit, comprising the first paragraph of the message with whitespace trimmed and squashed.

\n", "group": "commit" }, "git_commit_body": { @@ -3885,7 +3684,7 @@ "comment": " the body of a commit or NULL when no the message only\n consists of a summary" }, "description": "

Get the long "body" of the git commit message.

\n", - "comments": "

The returned message is the body of the commit, comprising\n everything but the first paragraph of the message. Leading and\n trailing whitespaces are trimmed.

\n", + "comments": "

The returned message is the body of the commit, comprising everything but the first paragraph of the message. Leading and trailing whitespaces are trimmed.

\n", "group": "commit" }, "git_commit_time": { @@ -3911,8 +3710,8 @@ "group": "commit", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_commit_time-18", - "ex/v0.28.0/general.html#git_commit_time-19" + "ex/HEAD/general.html#git_commit_time-18", + "ex/HEAD/general.html#git_commit_time-19" ] } }, @@ -3961,13 +3760,13 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_committer-5" + "ex/HEAD/cat-file.html#git_commit_committer-5" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_committer-20" + "ex/HEAD/general.html#git_commit_committer-20" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_committer-12" + "ex/HEAD/log.html#git_commit_committer-12" ] } }, @@ -3994,15 +3793,15 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_author-6" + "ex/HEAD/cat-file.html#git_commit_author-6" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_author-21", - "ex/v0.28.0/general.html#git_commit_author-22" + "ex/HEAD/general.html#git_commit_author-21", + "ex/HEAD/general.html#git_commit_author-22" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_author-13", - "ex/v0.28.0/log.html#git_commit_author-14" + "ex/HEAD/log.html#git_commit_author-13", + "ex/HEAD/log.html#git_commit_author-14" ] } }, @@ -4120,11 +3919,11 @@ "group": "commit", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_commit_tree-15", - "ex/v0.28.0/log.html#git_commit_tree-16", - "ex/v0.28.0/log.html#git_commit_tree-17", - "ex/v0.28.0/log.html#git_commit_tree-18", - "ex/v0.28.0/log.html#git_commit_tree-19" + "ex/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" ] } }, @@ -4151,7 +3950,7 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_tree_id-7" + "ex/HEAD/cat-file.html#git_commit_tree_id-7" ] } }, @@ -4178,14 +3977,14 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_parentcount-8" + "ex/HEAD/cat-file.html#git_commit_parentcount-8" ], "general.c": [ - "ex/v0.28.0/general.html#git_commit_parentcount-23" + "ex/HEAD/general.html#git_commit_parentcount-23" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_parentcount-20", - "ex/v0.28.0/log.html#git_commit_parentcount-21" + "ex/HEAD/log.html#git_commit_parentcount-20", + "ex/HEAD/log.html#git_commit_parentcount-21" ] } }, @@ -4222,11 +4021,11 @@ "group": "commit", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_commit_parent-24" + "ex/HEAD/general.html#git_commit_parent-24" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_parent-22", - "ex/v0.28.0/log.html#git_commit_parent-23" + "ex/HEAD/log.html#git_commit_parent-22", + "ex/HEAD/log.html#git_commit_parent-23" ] } }, @@ -4258,10 +4057,10 @@ "group": "commit", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_commit_parent_id-9" + "ex/HEAD/cat-file.html#git_commit_parent_id-9" ], "log.c": [ - "ex/v0.28.0/log.html#git_commit_parent_id-24" + "ex/HEAD/log.html#git_commit_parent_id-24" ] } }, @@ -4294,7 +4093,7 @@ "comment": " 0 on success; GIT_ENOTFOUND if no matching ancestor exists\n or an error code" }, "description": "

Get the commit object that is the \n<n

\n\n
\n

th generation ancestor\n of the named commit object, following only the first parents.\n The returned commit has to be freed by the caller.

\n
\n", - "comments": "

Passing 0 as the generation number returns another instance of the\n base commit itself.

\n", + "comments": "

Passing 0 as the generation number returns another instance of the base commit itself.

\n", "group": "commit" }, "git_commit_header_field": { @@ -4368,7 +4167,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if the id is not for a commit\n or the commit does not have a signature." }, "description": "

Extract the signature from a commit

\n", - "comments": "

If the id is not for a commit, the error class will be\n GIT_ERROR_INVALID. If the commit does not have a signature, the\n error class will be GIT_ERROR_OBJECT.

\n", + "comments": "

If the id is not for a commit, the error class will be GIT_ERROR_INVALID. If the commit does not have a signature, the error class will be GIT_ERROR_OBJECT.

\n", "group": "commit" }, "git_commit_create": { @@ -4435,11 +4234,11 @@ "comment": " 0 or an error code\n\tThe created commit will be written to the Object Database and\n\tthe given reference will be updated to point to it" }, "description": "

Create new commit in the repository from a list of git_object pointers

\n", - "comments": "

The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.

\n", + "comments": "

The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.

\n", "group": "commit", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_commit_create-7" + "ex/HEAD/merge.html#git_commit_create-7" ] } }, @@ -4502,14 +4301,14 @@ "comment": null }, "description": "

Create new commit in the repository using a variable argument list.

\n", - "comments": "

The message will not be cleaned up automatically. You can do that\n with the git_message_prettify() function.

\n\n

The parents for the commit are specified as a variable list of pointers\n to const git_commit *. Note that this is a convenience method which may\n not be safe to export for certain languages or compilers

\n\n

All other parameters remain the same as git_commit_create().

\n", + "comments": "

The message will not be cleaned up automatically. You can do that with the git_message_prettify() function.

\n\n

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

\n\n

All other parameters remain the same as git_commit_create().

\n", "group": "commit", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_commit_create_v-25" + "ex/HEAD/general.html#git_commit_create_v-25" ], "init.c": [ - "ex/v0.28.0/init.html#git_commit_create_v-1" + "ex/HEAD/init.html#git_commit_create_v-1" ] } }, @@ -4567,7 +4366,7 @@ "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,\n except that any non-NULL values will be updated. The new commit has\n the same parents as the old commit.

\n\n

The update_ref value works as in the regular git_commit_create(),\n updating the ref to point to the newly rewritten commit. If you want\n to amend a commit that is not currently the tip of the branch and then\n rewrite the following commits to reach a ref, pass this as NULL and\n update the rest of the commit chain and ref separately.

\n\n

Unlike git_commit_create(), the author, committer, message,\n message_encoding, and tree parameters can be NULL in which case this\n will use the values from the original commit_to_amend.

\n\n

All parameters have the same meanings as in git_commit_create().

\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\n

The 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.

\n\n

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.

\n\n

All parameters have the same meanings as in git_commit_create().

\n", "group": "commit" }, "git_commit_create_buffer": { @@ -4629,7 +4428,7 @@ "comment": " 0 or an error code" }, "description": "

Create a commit and write it into a buffer

\n", - "comments": "

Create a commit as with git_commit_create() but instead of\n writing it to the objectdb, write the contents of the object into a\n buffer.

\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.

\n", "group": "commit" }, "git_commit_create_with_signature": { @@ -4671,7 +4470,7 @@ "comment": " 0 or an error code" }, "description": "

Create a commit object from the given buffer and signature

\n", - "comments": "

Given the unsigned commit object's contents, its signature and the\n header field in which to store the signature, attach the signature\n to the commit and write it into the given repository.

\n", + "comments": "

Given the unsigned commit object's contents, its signature and the header field in which to store the signature, attach the signature to the commit and write it into the given repository.

\n", "group": "commit" }, "git_commit_dup": { @@ -4704,8 +4503,8 @@ "git_libgit2_version": { "type": "function", "file": "git2/common.h", - "line": 124, - "lineto": 124, + "line": 121, + "lineto": 121, "args": [ { "name": "major", @@ -4736,8 +4535,8 @@ "git_libgit2_features": { "type": "function", "file": "git2/common.h", - "line": 173, - "lineto": 173, + "line": 170, + "lineto": 170, "args": [], "argline": "", "sig": "", @@ -4746,14 +4545,14 @@ "comment": " A combination of GIT_FEATURE_* values." }, "description": "

Query compile time options for libgit2.

\n", - "comments": "
    \n
  • GIT_FEATURE_THREADS\nLibgit2 was compiled with thread support. Note that thread support is\nstill to be seen as a 'work in progress' - basic object lookups are\nbelieved to be threadsafe, but other operations may not be.

  • \n
  • GIT_FEATURE_HTTPS\nLibgit2 supports the https:// protocol. This requires the openssl\nlibrary to be found when compiling libgit2.

  • \n
  • GIT_FEATURE_SSH\nLibgit2 supports the SSH protocol for network operations. This requires\nthe libssh2 library to be found when compiling libgit2

  • \n
\n", + "comments": "
    \n
  • 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.

  • \n
  • GIT_FEATURE_HTTPS Libgit2 supports the https:// protocol. This requires the openssl library to be found when compiling libgit2.

  • \n
  • GIT_FEATURE_SSH Libgit2 supports the SSH protocol for network operations. This requires the libssh2 library to be found when compiling libgit2

  • \n
\n", "group": "libgit2" }, "git_libgit2_opts": { "type": "function", "file": "git2/common.h", - "line": 402, - "lineto": 402, + "line": 404, + "lineto": 404, "args": [ { "name": "option", @@ -4768,7 +4567,7 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set or query a library global option

\n", - "comments": "

Available options:

\n\n
* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n    > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n    > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n    > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n    >Set the maximum amount of memory that can be mapped at any time\n    by the library\n\n* opts(GIT_OPT_GET_SEARCH_PATH, int level, git_buf *buf)\n\n    > Get the search path for a given level of config data.  "level" must\n    > be one of `GIT_CONFIG_LEVEL_SYSTEM`, `GIT_CONFIG_LEVEL_GLOBAL`,\n    > `GIT_CONFIG_LEVEL_XDG`, or `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n    > The search path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_SEARCH_PATH, int level, const char *path)\n\n    > Set the search path for a level of config data.  The search path\n    > applied to shared attributes and ignore files, too.\n    >\n    > - `path` lists directories delimited by GIT_PATH_LIST_SEPARATOR.\n    >   Pass NULL to reset to the default (generally based on environment\n    >   variables).  Use magic path `$PATH` to include the old value\n    >   of the path (if you want to prepend or append, for instance).\n    >\n    > - `level` must be `GIT_CONFIG_LEVEL_SYSTEM`,\n    >   `GIT_CONFIG_LEVEL_GLOBAL`, `GIT_CONFIG_LEVEL_XDG`, or\n    >   `GIT_CONFIG_LEVEL_PROGRAMDATA`.\n\n* opts(GIT_OPT_SET_CACHE_OBJECT_LIMIT, git_object_t type, size_t size)\n\n    > Set the maximum data size for the given type of object to be\n    > considered eligible for caching in memory.  Setting to value to\n    > zero means that that type of object will not be cached.\n    > Defaults to 0 for GIT_OBJECT_BLOB (i.e. won't cache blobs) and 4k\n    > for GIT_OBJECT_COMMIT, GIT_OBJECT_TREE, and GIT_OBJECT_TAG.\n\n* opts(GIT_OPT_SET_CACHE_MAX_SIZE, ssize_t max_storage_bytes)\n\n    > Set the maximum total data size that will be cached in memory\n    > across all repositories before libgit2 starts evicting objects\n    > from the cache.  This is a soft limit, in that the library might\n    > briefly exceed it, but will start aggressively evicting objects\n    > from cache when that happens.  The default cache size is 256MB.\n\n* opts(GIT_OPT_ENABLE_CACHING, int enabled)\n\n    > Enable or disable caching completely.\n    >\n    > Because caches are repository-specific, disabling the cache\n    > cannot immediately clear all cached objects, but each cache will\n    > be cleared on the next attempt to update anything in it.\n\n* opts(GIT_OPT_GET_CACHED_MEMORY, ssize_t *current, ssize_t *allowed)\n\n    > Get the current bytes in cache and the maximum that would be\n    > allowed in the cache.\n\n* opts(GIT_OPT_GET_TEMPLATE_PATH, git_buf *out)\n\n    > Get the default template path.\n    > The path is written to the `out` buffer.\n\n* opts(GIT_OPT_SET_TEMPLATE_PATH, const char *path)\n\n    > Set the default template path.\n    >\n    > - `path` directory of template.\n\n* opts(GIT_OPT_SET_SSL_CERT_LOCATIONS, const char *file, const char *path)\n\n    > Set the SSL certificate-authority locations.\n    >\n    > - `file` is the location of a file containing several\n    >   certificates concatenated together.\n    > - `path` is the location of a directory holding several\n    >   certificates, one per file.\n    >\n    > Either parameter may be `NULL`, but not both.\n\n* opts(GIT_OPT_SET_USER_AGENT, const char *user_agent)\n\n    > Set the value of the User-Agent header.  This value will be\n    > appended to "git/1.0", for compatibility with other git clients.\n    >\n    > - `user_agent` is the value that will be delivered as the\n    >   User-Agent header on HTTP requests.\n\n* opts(GIT_OPT_SET_WINDOWS_SHAREMODE, unsigned long value)\n\n    > Set the share mode used when opening files on Windows.\n    > For more information, see the documentation for CreateFile.\n    > The default is: FILE_SHARE_READ | FILE_SHARE_WRITE.  This is\n    > ignored and unused on non-Windows platforms.\n\n* opts(GIT_OPT_GET_WINDOWS_SHAREMODE, unsigned long *value)\n\n    > Get the share mode used when opening files on Windows.\n\n* opts(GIT_OPT_ENABLE_STRICT_OBJECT_CREATION, int enabled)\n\n    > Enable strict input validation when creating new objects\n    > to ensure that all inputs to the new objects are valid.  For\n    > example, when this is enabled, the parent(s) and tree inputs\n    > will be validated when creating a new commit.  This defaults\n    > to enabled.\n\n* opts(GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION, int enabled)\n\n    > Validate the target of a symbolic ref when creating it.  For\n    > example, `foobar` is not a valid ref, therefore `foobar` is\n    > not a valid target for a symbolic ref by default, whereas\n    > `refs/heads/foobar` is.  Disabling this bypasses validation\n    > so that an arbitrary strings such as `foobar` can be used\n    > for a symbolic ref target.  This defaults to enabled.\n\n* opts(GIT_OPT_SET_SSL_CIPHERS, const char *ciphers)\n\n    > Set the SSL ciphers use for HTTPS connections.\n    >\n    > - `ciphers` is the list of ciphers that are eanbled.\n\n* opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)\n\n    > Enable or disable the use of "offset deltas" when creating packfiles,\n    > and the negotiation of them when talking to a remote server.\n    > Offset deltas store a delta base location as an offset into the\n    > packfile from the current location, which provides a shorter encoding\n    > and thus smaller resultant packfiles.\n    > Packfiles containing offset deltas can still be read.\n    > This defaults to enabled.\n\n* opts(GIT_OPT_ENABLE_FSYNC_GITDIR, int enabled)\n\n    > Enable synchronized writes of files in the gitdir using `fsync`\n    > (or the platform equivalent) to ensure that new object data\n    > is written to permanent storage, not simply cached.  This\n    > defaults to disabled.\n\n opts(GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, int enabled)\n\n    > Enable strict verification of object hashsums when reading\n    > objects from disk. This may impact performance due to an\n    > additional checksum calculation on each object. This defaults\n    > to enabled.\n\n opts(GIT_OPT_SET_ALLOCATOR, git_allocator *allocator)\n\n    > Set the memory allocator to a different memory allocator. This\n    > allocator will then be used to make all memory allocations for\n    > libgit2 operations.  If the given `allocator` is NULL, then the\n    > system default will be restored.\n\n opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled)\n\n    > Ensure that there are no unsaved changes in the index before\n    > beginning any operation that reloads the index from disk (eg,\n    > checkout).  If there are unsaved changes, the instruction will\n    > fail.  (Using the FORCE flag to checkout will still overwrite\n    > these changes.)\n\n opts(GIT_OPT_GET_PACK_MAX_OBJECTS, size_t *out)\n\n    > Get the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote. This can be\n    > used to limit maximum memory usage when fetching from an untrusted\n    > remote.\n\n opts(GIT_OPT_SET_PACK_MAX_OBJECTS, size_t objects)\n\n    > Set the maximum number of objects libgit2 will allow in a pack\n    > file when downloading a pack file from a remote.\n
\n", + "comments": "

Available options:

\n\n
* opts(GIT_OPT_GET_MWINDOW_SIZE, size_t *):\n\n    > Get the maximum mmap window size\n\n* opts(GIT_OPT_SET_MWINDOW_SIZE, size_t):\n\n    > Set the maximum mmap window size\n\n* opts(GIT_OPT_GET_MWINDOW_MAPPED_LIMIT, size_t *):\n\n    > Get the maximum memory that will be mapped in total by the library\n\n* opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, size_t):\n\n    >Set the maximum amount of memory that can be mapped at any time        by the library\n\n* opts(GIT_OPT_GET_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", "group": "libgit2" }, "git_config_entry_free": { @@ -4812,7 +4611,7 @@ "comment": " 0 if a global configuration file has been found. Its path will be stored in `out`." }, "description": "

Locate the path to the global configuration file

\n", - "comments": "

The user or global configuration file is usually\n located in $HOME/.gitconfig.

\n\n

This method will try to guess the full path to that\n file, if the file exists. The returned path\n may be used on any git_config call to load the\n global configuration file.

\n\n

This method will not guess the path to the xdg compatible\n config file (.config/git/config).

\n", + "comments": "

The user or global configuration file is usually located in $HOME/.gitconfig.

\n\n

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.

\n\n

This method will not guess the path to the xdg compatible config file (.config/git/config).

\n", "group": "config" }, "git_config_find_xdg": { @@ -4834,7 +4633,7 @@ "comment": " 0 if a xdg compatible configuration file has been\n\tfound. Its path will be stored in `out`." }, "description": "

Locate the path to the global xdg compatible configuration file

\n", - "comments": "

The xdg compatible configuration file is usually\n located in $HOME/.config/git/config.

\n\n

This method will try to guess the full path to that\n file, if the file exists. The returned path\n may be used on any git_config call to load the\n xdg compatible configuration file.

\n", + "comments": "

The xdg compatible configuration file is usually located in $HOME/.config/git/config.

\n\n

This method will try to guess the full path to that file, if the file exists. The returned path may be used on any git_config call to load the xdg compatible configuration file.

\n", "group": "config" }, "git_config_find_system": { @@ -4856,7 +4655,7 @@ "comment": " 0 if a system configuration file has been\n\tfound. Its path will be stored in `out`." }, "description": "

Locate the path to the system configuration file

\n", - "comments": "

If /etc/gitconfig doesn't exist, it will look for\n %PROGRAMFILES%

\n\n

.

\n", + "comments": "

If /etc/gitconfig doesn't exist, it will look for %PROGRAMFILES%.

\n", "group": "config" }, "git_config_find_programdata": { @@ -4878,7 +4677,7 @@ "comment": " 0 if a ProgramData configuration file has been\n\tfound. Its path will be stored in `out`." }, "description": "

Locate the path to the configuration file in ProgramData

\n", - "comments": "

Look for the file in %PROGRAMDATA%

\n\n

used by portable git.

\n", + "comments": "

Look for the file in %PROGRAMDATA% used by portable git.

\n", "group": "config" }, "git_config_open_default": { @@ -4900,7 +4699,7 @@ "comment": " 0 or an error code" }, "description": "

Open the global, XDG and system configuration files

\n", - "comments": "

Utility wrapper that finds the global, XDG and system configuration files\n and opens them into a single prioritized config object that can be\n used when accessing default config data outside a repository.

\n", + "comments": "

Utility wrapper that finds the global, XDG and system configuration files and opens them into a single prioritized config object that can be used when accessing default config data outside a repository.

\n", "group": "config" }, "git_config_new": { @@ -4922,7 +4721,7 @@ "comment": " 0 or an error code" }, "description": "

Allocate a new configuration object

\n", - "comments": "

This object is empty, so you have to add a file to it before you\n can do anything with it.

\n", + "comments": "

This object is empty, so you have to add a file to it before you can do anything with it.

\n", "group": "config" }, "git_config_add_file_ondisk": { @@ -4964,7 +4763,7 @@ "comment": " 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0),\n GIT_ENOTFOUND when the file doesn't exist or error code" }, "description": "

Add an on-disk config file instance to an existing config

\n", - "comments": "

The on-disk file pointed at by path will be opened and\n parsed; it's expected to be a native Git config file following\n the default Git config syntax (see man git-config).

\n\n

If the file does not exist, the file will still be added and it\n will be created the first time we write to it.

\n\n

Note that the configuration object will free the file\n automatically.

\n\n

Further queries on this config object will access each\n of the config file instances in order (instances with\n a higher priority level will be accessed first).

\n", + "comments": "

The on-disk file pointed at by path will be opened and parsed; it's expected to be a native Git config file following the default Git config syntax (see man git-config).

\n\n

If the file does not exist, the file will still be added and it will be created the first time we write to it.

\n\n

Note that the configuration object will free the file automatically.

\n\n

Further queries on this config object will access each of the config file instances in order (instances with a higher priority level will be accessed first).

\n", "group": "config" }, "git_config_open_ondisk": { @@ -4991,11 +4790,11 @@ "comment": " 0 on success, or an error code" }, "description": "

Create a new config instance containing a single on-disk file

\n", - "comments": "

This method is a simple utility wrapper for the following sequence\n of calls:\n - git_config_new\n - git_config_add_file_ondisk

\n", + "comments": "

This method is a simple utility wrapper for the following sequence of calls: - git_config_new - git_config_add_file_ondisk

\n", "group": "config", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_config_open_ondisk-26" + "ex/HEAD/general.html#git_config_open_ondisk-26" ] } }, @@ -5028,7 +4827,7 @@ "comment": " 0, GIT_ENOTFOUND if the passed level cannot be found in the\n multi-level parent config, or an error code" }, "description": "

Build a single-level focused config object from a multi-level one.

\n", - "comments": "

The returned config object can be used to perform get/set/delete operations\n on a single specific level.

\n\n

Getting several times the same level from the same parent multi-level config\n will return different config instances, but containing the same config_file\n instance.

\n", + "comments": "

The returned config object can be used to perform get/set/delete operations on a single specific level.

\n\n

Getting several times the same level from the same parent multi-level config will return different config instances, but containing the same config_file instance.

\n", "group": "config" }, "git_config_open_global": { @@ -5055,7 +4854,7 @@ "comment": null }, "description": "

Open the global/XDG configuration file according to git's rules

\n", - "comments": "

Git allows you to store your global configuration at\n $HOME/.gitconfig or $XDG_CONFIG_HOME/git/config. For backwards\n compatability, the XDG file shouldn't be used unless the use has\n created it explicitly. With this function you'll open the correct\n one to write to.

\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.

\n", "group": "config" }, "git_config_snapshot": { @@ -5082,7 +4881,7 @@ "comment": " 0 or an error code" }, "description": "

Create a snapshot of the configuration

\n", - "comments": "

Create a snapshot of the current state of a configuration, which\n allows you to look into a consistent view of the configuration for\n looking up complex values (e.g. a remote, submodule).

\n\n

The string returned when querying such a config object is valid\n until it is freed.

\n", + "comments": "

Create a snapshot of the current state of a configuration, which allows you to look into a consistent view of the configuration for looking up complex values (e.g. a remote, submodule).

\n\n

The string returned when querying such a config object is valid until it is freed.

\n", "group": "config" }, "git_config_free": { @@ -5108,8 +4907,8 @@ "group": "config", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_config_free-27", - "ex/v0.28.0/general.html#git_config_free-28" + "ex/HEAD/general.html#git_config_free-27", + "ex/HEAD/general.html#git_config_free-28" ] } }, @@ -5153,33 +4952,33 @@ "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int32_t *", + "comment": "pointer to the variable where the value should be stored" }, { "name": "cfg", "type": "const git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" } ], - "argline": "int *out, const git_config *cfg, const char *name", - "sig": "int *::const git_config *::const char *", + "argline": "int32_t *out, const git_config *cfg, const char *name", + "sig": "int32_t *::const git_config *::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code" }, - "description": "", - "comments": "", + "description": "

Get the value of an integer config variable.

\n", + "comments": "

All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.

\n", "group": "config", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_config_get_int32-29", - "ex/v0.28.0/general.html#git_config_get_int32-30" + "ex/HEAD/general.html#git_config_get_int32-29", + "ex/HEAD/general.html#git_config_get_int32-30" ] } }, @@ -5191,28 +4990,28 @@ "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int64_t *", + "comment": "pointer to the variable where the value should be stored" }, { "name": "cfg", "type": "const git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" } ], - "argline": "int *out, const git_config *cfg, const char *name", - "sig": "int *::const git_config *::const char *", + "argline": "int64_t *out, const git_config *cfg, const char *name", + "sig": "int64_t *::const git_config *::const char *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code" }, - "description": "", - "comments": "", + "description": "

Get the value of a long integer config variable.

\n", + "comments": "

All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_bool": { @@ -5244,7 +5043,7 @@ "comment": " 0 or an error code" }, "description": "

Get the value of a boolean config variable.

\n", - "comments": "

This function uses the usual C convention of 0 being false and\n anything else true.

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", + "comments": "

This function uses the usual C convention of 0 being false and anything else true.

\n\n

All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_path": { @@ -5276,7 +5075,7 @@ "comment": " 0 or an error code" }, "description": "

Get the value of a path config variable.

\n", - "comments": "

A leading '~' will be expanded to the global search path (which\n defaults to the user's home directory but can be overridden via\n git_libgit2_opts().

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", + "comments": "

A leading '~' will be expanded to the global search path (which defaults to the user's home directory but can be overridden via git_libgit2_opts().

\n\n

All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_string": { @@ -5308,12 +5107,12 @@ "comment": " 0 or an error code" }, "description": "

Get the value of a string config variable.

\n", - "comments": "

This function can only be used on snapshot config objects. The\n string is owned by the config and should not be freed by the\n user. The pointer will be valid until the config is freed.

\n\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", + "comments": "

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\n

All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.

\n", "group": "config", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_config_get_string-31", - "ex/v0.28.0/general.html#git_config_get_string-32" + "ex/HEAD/general.html#git_config_get_string-31", + "ex/HEAD/general.html#git_config_get_string-32" ] } }, @@ -5346,7 +5145,7 @@ "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\n

All config files will be looked into, in the order of their\n defined level. A higher level means a higher priority. The\n first occurrence of the variable will be returned here.

\n", + "comments": "

The value of the config will be copied into the buffer.

\n\n

All config files will be looked into, in the order of their defined level. A higher level means a higher priority. The first occurrence of the variable will be returned here.

\n", "group": "config" }, "git_config_get_multivar_foreach": { @@ -5388,7 +5187,7 @@ "comment": null }, "description": "

Get each value of a multivar in a foreach callback

\n", - "comments": "

The callback will be called on each variable found

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", + "comments": "

The callback will be called on each variable found

\n\n

The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.

\n", "group": "config" }, "git_config_multivar_iterator_new": { @@ -5425,7 +5224,7 @@ "comment": null }, "description": "

Get each value of a multivar

\n", - "comments": "

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", + "comments": "

The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.

\n", "group": "config" }, "git_config_next": { @@ -5452,7 +5251,7 @@ "comment": " 0 or an error code. GIT_ITEROVER if the iteration has completed" }, "description": "

Return the current entry and advance the iterator

\n", - "comments": "

The pointers returned by this function are valid until the iterator\n is freed.

\n", + "comments": "

The pointers returned by this function are valid until the iterator is freed.

\n", "group": "config" }, "git_config_iterator_free": { @@ -5486,26 +5285,26 @@ { "name": "cfg", "type": "git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" }, { "name": "value", - "type": "int", - "comment": null + "type": "int32_t", + "comment": "Integer value for the variable" } ], - "argline": "git_config *cfg, const char *name, int value", - "sig": "git_config *::const char *::int", + "argline": "git_config *cfg, const char *name, int32_t value", + "sig": "git_config *::const char *::int32_t", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code" }, - "description": "", + "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" }, @@ -5518,26 +5317,26 @@ { "name": "cfg", "type": "git_config *", - "comment": null + "comment": "where to look for the variable" }, { "name": "name", "type": "const char *", - "comment": null + "comment": "the variable's name" }, { "name": "value", - "type": "int", - "comment": null + "type": "int64_t", + "comment": "Long integer value for the variable" } ], - "argline": "git_config *cfg, const char *name, int value", - "sig": "git_config *::const char *::int", + "argline": "git_config *cfg, const char *name, int64_t value", + "sig": "git_config *::const char *::int64_t", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code" }, - "description": "", + "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" }, @@ -5602,7 +5401,7 @@ "comment": " 0 or an error code" }, "description": "

Set the value of a string config variable in the config file\n with the highest level (usually the local one).

\n", - "comments": "

A copy of the string is made and the user is free to use it\n afterwards.

\n", + "comments": "

A copy of the string is made and the user is free to use it afterwards.

\n", "group": "config" }, "git_config_set_multivar": { @@ -5730,7 +5529,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Perform an operation on each config variable.

\n", - "comments": "

The callback receives the normalized name and value of each variable\n in the config backend, and the data pointer passed to this function.\n If the callback returns a non-zero value, the function stops iterating\n and returns that value to the caller.

\n\n

The pointers passed to the callback are only valid as long as the\n iteration is ongoing.

\n", + "comments": "

The callback receives the normalized name and value of each variable in the config backend, and the data pointer passed to this function. If the callback returns a non-zero value, the function stops iterating and returns that value to the caller.

\n\n

The pointers passed to the callback are only valid as long as the iteration is ongoing.

\n", "group": "config" }, "git_config_iterator_new": { @@ -5757,7 +5556,7 @@ "comment": null }, "description": "

Iterate over all the config variables

\n", - "comments": "

Use git_config_next to advance the iteration and\n git_config_iterator_free when done.

\n", + "comments": "

Use git_config_next to advance the iteration and git_config_iterator_free when done.

\n", "group": "config" }, "git_config_iterator_glob_new": { @@ -5789,7 +5588,7 @@ "comment": null }, "description": "

Iterate over all the config variables whose name matches a pattern

\n", - "comments": "

Use git_config_next to advance the iteration and\n git_config_iterator_free when done.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", + "comments": "

Use git_config_next to advance the iteration and git_config_iterator_free when done.

\n\n

The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.

\n", "group": "config" }, "git_config_foreach_match": { @@ -5826,7 +5625,7 @@ "comment": " 0 or the return value of the callback which didn't return 0" }, "description": "

Perform an operation on each config variable matching a regular expression.

\n", - "comments": "

This behaves like git_config_foreach with an additional filter of a\n regular expression that filters which config keys are passed to the\n callback.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the case-insensitive parts are lower-case.

\n", + "comments": "

This behaves like git_config_foreach with an additional filter of a regular expression that filters which config keys are passed to the callback.

\n\n

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\n

The regular expression is applied case-sensitively on the normalized form of the variable name: the case-insensitive parts are lower-case.

\n", "group": "config" }, "git_config_get_mapped": { @@ -5868,7 +5667,7 @@ "comment": " 0 on success, error code otherwise" }, "description": "

Query the value of a config variable and return it mapped to\n an integer constant.

\n", - "comments": "

This is a helper method to easily map different possible values\n to a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n
git_cvar_map autocrlf_mapping[] = {\n    {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},\n    {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},\n    {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},\n    {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n
\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the\n mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing\n the GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison),\n the given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be\n returned.

\n", + "comments": "

This is a helper method to easily map different possible values to a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n
git_cvar_map autocrlf_mapping[] = {     {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},        {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},      {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},        {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n
\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing the GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison), the given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be returned.

\n", "group": "config" }, "git_config_lookup_map_value": { @@ -5932,7 +5731,7 @@ "comment": null }, "description": "

Parse a string value as a bool.

\n", - "comments": "

Valid values for true are: 'true', 'yes', 'on', 1 or any\n number different from 0\n Valid values for false are: 'false', 'no', 'off', 0

\n", + "comments": "

Valid values for true are: 'true', 'yes', 'on', 1 or any number different from 0 Valid values for false are: 'false', 'no', 'off', 0

\n", "group": "config" }, "git_config_parse_int32": { @@ -5943,23 +5742,23 @@ "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int32_t *", + "comment": "place to store the result of the parsing" }, { "name": "value", "type": "const char *", - "comment": null + "comment": "value to parse" } ], - "argline": "int *out, const char *value", - "sig": "int *::const char *", + "argline": "int32_t *out, const char *value", + "sig": "int32_t *::const char *", "return": { "type": "int", "comment": null }, - "description": "", - "comments": "", + "description": "

Parse a string value as an int32.

\n", + "comments": "

An optional value suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output.

\n", "group": "config" }, "git_config_parse_int64": { @@ -5970,23 +5769,23 @@ "args": [ { "name": "out", - "type": "int *", - "comment": null + "type": "int64_t *", + "comment": "place to store the result of the parsing" }, { "name": "value", "type": "const char *", - "comment": null + "comment": "value to parse" } ], - "argline": "int *out, const char *value", - "sig": "int *::const char *", + "argline": "int64_t *out, const char *value", + "sig": "int64_t *::const char *", "return": { "type": "int", "comment": null }, - "description": "", - "comments": "", + "description": "

Parse a string value as an int64.

\n", + "comments": "

An optional value suffix of 'k', 'm', or 'g' will cause the value to be multiplied by 1024, 1048576, or 1073741824 prior to output.

\n", "group": "config" }, "git_config_parse_path": { @@ -6013,7 +5812,7 @@ "comment": null }, "description": "

Parse a string value as a path.

\n", - "comments": "

A leading '~' will be expanded to the global search path (which\n defaults to the user's home directory but can be overridden via\n git_libgit2_opts().

\n\n

If the value does not begin with a tilde, the input will be\n returned.

\n", + "comments": "

A leading '~' will be expanded to the global search path (which defaults to the user's home directory but can be overridden via git_libgit2_opts().

\n\n

If the value does not begin with a tilde, the input will be returned.

\n", "group": "config" }, "git_config_backend_foreach_match": { @@ -6050,7 +5849,7 @@ "comment": null }, "description": "

Perform an operation on each config variable in a given config backend,\n matching a regular expression.

\n", - "comments": "

This behaves like git_config_foreach_match except that only config\n entries from the given backend entry are enumerated.

\n\n

The regular expression is applied case-sensitively on the normalized form of\n the variable name: the section and variable parts are lower-cased. The\n subsection is left unchanged.

\n", + "comments": "

This behaves like git_config_foreach_match except that only config entries from the given backend entry are enumerated.

\n\n

The regular expression is applied case-sensitively on the normalized form of the variable name: the section and variable parts are lower-cased. The subsection is left unchanged.

\n", "group": "config" }, "git_config_lock": { @@ -6077,7 +5876,7 @@ "comment": " 0 or an error code" }, "description": "

Lock the backend with the highest priority

\n", - "comments": "

Locking disallows anybody else from writing to that backend. Any\n updates made after locking will not be visible to a reader until\n the file is unlocked.

\n\n

You can apply the changes by calling git_transaction_commit()\n before freeing the transaction. Either of these actions will unlock\n the config.

\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\n

You can apply the changes by calling git_transaction_commit() before freeing the transaction. Either of these actions will unlock the config.

\n", "group": "config" }, "git_cred_userpass": { @@ -6122,11 +5921,43 @@ "comments": "", "group": "cred" }, + "git_blob_create_fromworkdir": { + "type": "function", + "file": "git2/deprecated.h", + "line": 80, + "lineto": 80, + "args": [ + { + "name": "id", + "type": "git_oid *", + "comment": null + }, + { + "name": "repo", + "type": "git_repository *", + "comment": null + }, + { + "name": "relative_path", + "type": "const char *", + "comment": null + } + ], + "argline": "git_oid *id, git_repository *repo, const char *relative_path", + "sig": "git_oid *::git_repository *::const char *", + "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\n

There is no plan to remove these backward compatibility values at this time.

\n\n

@{

\n", + "group": "blob" + }, "git_buf_free": { "type": "function", "file": "git2/deprecated.h", - "line": 51, - "lineto": 51, + "line": 115, + "lineto": 115, "args": [ { "name": "buffer", @@ -6141,14 +5972,14 @@ "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.

\n", - "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this function at this time.

\n", "group": "buf" }, "giterr_last": { "type": "function", "file": "git2/deprecated.h", - "line": 112, - "lineto": 112, + "line": 176, + "lineto": 176, "args": [], "argline": "", "sig": "", @@ -6157,14 +5988,14 @@ "comment": null }, "description": "

Return the last git_error object that was generated for the\n current thread. This is an alias of git_error_last and is\n preserved for backward compatibility.

\n", - "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this function at this time.

\n", "group": "giterr" }, "giterr_clear": { "type": "function", "file": "git2/deprecated.h", - "line": 124, - "lineto": 124, + "line": 188, + "lineto": 188, "args": [], "argline": "", "sig": "", @@ -6173,14 +6004,14 @@ "comment": null }, "description": "

Clear the last error. This is an alias of git_error_last and is\n preserved for backward compatibility.

\n", - "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this function at this time.

\n", "group": "giterr" }, "giterr_set_str": { "type": "function", "file": "git2/deprecated.h", - "line": 136, - "lineto": 136, + "line": 200, + "lineto": 200, "args": [ { "name": "error_class", @@ -6200,14 +6031,14 @@ "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.

\n", - "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this function at this time.

\n", "group": "giterr" }, "giterr_set_oom": { "type": "function", "file": "git2/deprecated.h", - "line": 148, - "lineto": 148, + "line": 212, + "lineto": 212, "args": [], "argline": "", "sig": "", @@ -6216,10 +6047,59 @@ "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.

\n", - "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", + "comments": "

This function is deprecated, but there is no plan to remove this function at this time.

\n", "group": "giterr" }, - "git_describe_init_options": { + "git_oid_iszero": { + "type": "function", + "file": "git2/deprecated.h", + "line": 364, + "lineto": 364, + "args": [ + { + "name": "id", + "type": "const git_oid *", + "comment": null + } + ], + "argline": "const git_oid *id", + "sig": "const git_oid *", + "return": { + "type": "int", + "comment": null + }, + "description": "", + "comments": "

These types are retained for backward compatibility. The newer versions of these values should be preferred in all new code.

\n\n

There is no plan to remove these backward compatibility values at this time.

\n\n

@{

\n", + "group": "oid" + }, + "git_blame_init_options": { + "type": "function", + "file": "git2/deprecated.h", + "line": 423, + "lineto": 423, + "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\n

There is no plan to remove these backward compatibility functions at this time.

\n\n

@{

\n", + "group": "blame" + }, + "git_describe_options_init": { "type": "function", "file": "git2/describe.h", "line": 82, @@ -6243,15 +6123,15 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_describe_options structure

\n", - "comments": "

Initializes a git_describe_options with default values. Equivalent to creating\n an instance with GIT_DESCRIBE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_describe_options with default values. Equivalent to creating an instance with GIT_DESCRIBE_OPTIONS_INIT.

\n", "group": "describe", "examples": { "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_init_options-1" + "ex/HEAD/describe.html#git_describe_options_init-1" ] } }, - "git_describe_init_format_options": { + "git_describe_format_options_init": { "type": "function", "file": "git2/describe.h", "line": 129, @@ -6275,11 +6155,11 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_describe_format_options structure

\n", - "comments": "

Initializes a git_describe_format_options with default values. Equivalent to creating\n an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_describe_format_options with default values. Equivalent to creating an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.

\n", "group": "describe", "examples": { "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_init_format_options-2" + "ex/HEAD/describe.html#git_describe_format_options_init-2" ] } }, @@ -6316,7 +6196,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_commit-3" + "ex/HEAD/describe.html#git_describe_commit-3" ] } }, @@ -6349,11 +6229,11 @@ "comment": null }, "description": "

Describe a commit

\n", - "comments": "

Perform the describe operation on the current commit and the\n worktree. After peforming describe on HEAD, a status is run and the\n description is considered to be dirty if there are.

\n", + "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", "group": "describe", "examples": { "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_workdir-4" + "ex/HEAD/describe.html#git_describe_workdir-4" ] } }, @@ -6390,7 +6270,7 @@ "group": "describe", "examples": { "describe.c": [ - "ex/v0.28.0/describe.html#git_describe_format-5" + "ex/HEAD/describe.html#git_describe_format-5" ] } }, @@ -6416,7 +6296,7 @@ "comments": "", "group": "describe" }, - "git_diff_init_options": { + "git_diff_options_init": { "type": "function", "file": "git2/diff.h", "line": 454, @@ -6440,10 +6320,10 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_diff_options structure

\n", - "comments": "

Initializes a git_diff_options with default values. Equivalent to creating\n an instance with GIT_DIFF_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_diff_options with default values. Equivalent to creating an instance with GIT_DIFF_OPTIONS_INIT.

\n", "group": "diff" }, - "git_diff_find_init_options": { + "git_diff_find_options_init": { "type": "function", "file": "git2/diff.h", "line": 787, @@ -6467,7 +6347,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_diff_find_options structure

\n", - "comments": "

Initializes a git_diff_find_options with default values. Equivalent to creating\n an instance with GIT_DIFF_FIND_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_diff_find_options with default values. Equivalent to creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.

\n", "group": "diff" }, "git_diff_free": { @@ -6493,11 +6373,11 @@ "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_free-2" + "ex/HEAD/diff.html#git_diff_free-2" ], "log.c": [ - "ex/v0.28.0/log.html#git_diff_free-25", - "ex/v0.28.0/log.html#git_diff_free-26" + "ex/HEAD/log.html#git_diff_free-25", + "ex/HEAD/log.html#git_diff_free-26" ] } }, @@ -6540,15 +6420,15 @@ "comment": null }, "description": "

Create a diff with the difference between two tree objects.

\n", - "comments": "

This is equivalent to git diff \n<old\n-tree> \n<new\n-tree>

\n\n

The first tree will be used for the "old_file" side of the delta and the\n second tree will be used for the "new_file" side of the delta. You can\n pass NULL to indicate an empty tree, although it is an error to pass\n NULL for both the old_tree and new_tree.

\n", + "comments": "

This is equivalent to git diff <old-tree> <new-tree>

\n\n

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.

\n", "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_tree_to_tree-3" + "ex/HEAD/diff.html#git_diff_tree_to_tree-3" ], "log.c": [ - "ex/v0.28.0/log.html#git_diff_tree_to_tree-27", - "ex/v0.28.0/log.html#git_diff_tree_to_tree-28" + "ex/HEAD/log.html#git_diff_tree_to_tree-27", + "ex/HEAD/log.html#git_diff_tree_to_tree-28" ] } }, @@ -6591,11 +6471,11 @@ "comment": null }, "description": "

Create a diff between a tree and repository index.

\n", - "comments": "

This is equivalent to `git diff --cached \n<treeish

\n\n
\n

or if you pass\n the HEAD tree, then likegit diff --cached`.

\n
\n\n

The tree you pass will be used for the "old_file" side of the delta, and\n the index will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo\n will be used. In this case, the index will be refreshed from disk\n (if it has changed) before the diff is generated.

\n", + "comments": "

This is equivalent to git diff --cached <treeish> or if you pass the HEAD tree, then like git diff --cached.

\n\n

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\n

If 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.

\n", "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_tree_to_index-4" + "ex/HEAD/diff.html#git_diff_tree_to_index-4" ] } }, @@ -6633,11 +6513,11 @@ "comment": null }, "description": "

Create a diff between the repository index and the workdir directory.

\n", - "comments": "

This matches the git diff command. See the note below on\n git_diff_tree_to_workdir for a discussion of the difference between\n git diff and git diff HEAD and how to emulate a `git diff \n<treeish

\n\n
\n

`\n using libgit2.

\n
\n\n

The index will be used for the "old_file" side of the delta, and the\n working directory will be used for the "new_file" side of the delta.

\n\n

If you pass NULL for the index, then the existing index of the repo\n will be used. In this case, the index will be refreshed from disk\n (if it has changed) before the diff is generated.

\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.

\n\n

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\n

If 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.

\n", "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_index_to_workdir-5" + "ex/HEAD/diff.html#git_diff_index_to_workdir-5" ] } }, @@ -6675,11 +6555,11 @@ "comment": null }, "description": "

Create a diff between a tree and the working directory.

\n", - "comments": "

The tree you provide will be used for the "old_file" side of the delta,\n and the working directory will be used for the "new_file" side.

\n\n

This is not the same as `git diff \n<treeish

\n\n
\n

orgit diff-index

\n
\n\n

<treeish

\n\n
\n

. Those commands use information from the index, whereas this\n function strictly returns the differences between the tree and the files\n in the working directory, regardless of the state of the index. Use\ngit_diff_tree_to_workdir_with_index` to emulate those commands.

\n
\n\n

To see difference between this and git_diff_tree_to_workdir_with_index,\n consider the example of a staged file deletion where the file has then\n been put back into the working dir and further modified. The\n tree-to-workdir diff for that file is 'modified', but git diff would\n show status 'deleted' since there is a staged delete.

\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\n

This 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.

\n\n

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.

\n", "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_tree_to_workdir-6" + "ex/HEAD/diff.html#git_diff_tree_to_workdir-6" ] } }, @@ -6717,11 +6597,11 @@ "comment": null }, "description": "

Create a diff between a tree and the working directory using index data\n to account for staged deletes, tracked files, etc.

\n", - "comments": "

This emulates `git diff \n<tree

\n\n
\n

` by diffing the tree to the index and\n the index to the working directory and blending the results into a\n single diff that includes staged deleted, etc.

\n
\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.

\n", "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_tree_to_workdir_with_index-7" + "ex/HEAD/diff.html#git_diff_tree_to_workdir_with_index-7" ] } }, @@ -6764,7 +6644,7 @@ "comment": null }, "description": "

Create a diff with the difference between two index objects.

\n", - "comments": "

The first index will be used for the "old_file" side of the delta and the\n second index will be used for the "new_file" side of the delta.

\n", + "comments": "

The first index will be used for the "old_file" side of the delta and the second index will be used for the "new_file" side of the delta.

\n", "group": "diff" }, "git_diff_merge": { @@ -6791,7 +6671,7 @@ "comment": null }, "description": "

Merge one diff into another.

\n", - "comments": "

This merges items from the "from" list into the "onto" list. The\n resulting diff will have all items that appear in either list.\n If an item appears in both lists, then it will be "merged" to appear\n as if the old version was from the "onto" list and the new version\n is from the "from" list (with the exception that if the item has a\n pending DELETE in the middle, then it will show as deleted).

\n", + "comments": "

This merges items from the "from" list into the "onto" list. The resulting diff will have all items that appear in either list. If an item appears in both lists, then it will be "merged" to appear as if the old version was from the "onto" list and the new version is from the "from" list (with the exception that if the item has a pending DELETE in the middle, then it will show as deleted).

\n", "group": "diff" }, "git_diff_find_similar": { @@ -6818,11 +6698,11 @@ "comment": " 0 on success, -1 on failure" }, "description": "

Transform a diff marking file renames, copies, etc.

\n", - "comments": "

This modifies a diff in place, replacing old entries that look\n like renames or copies with new entries reflecting those changes.\n This also will, if requested, break modified files into add/remove\n pairs if the amount of change is above a threshold.

\n", + "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/v0.28.0/diff.html#git_diff_find_similar-8" + "ex/HEAD/diff.html#git_diff_find_similar-8" ] } }, @@ -6849,7 +6729,7 @@ "group": "diff", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_diff_num_deltas-29" + "ex/HEAD/log.html#git_diff_num_deltas-29" ] } }, @@ -6877,7 +6757,7 @@ "comment": " Count of number of deltas matching delta_t type" }, "description": "

Query how many diff deltas are there in a diff filtered by type.

\n", - "comments": "

This works just like git_diff_entrycount() with an extra parameter\n that is a git_delta_t and returns just the count of how many deltas\n match that particular type.

\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.

\n", "group": "diff" }, "git_diff_get_delta": { @@ -6904,7 +6784,7 @@ "comment": " Pointer to git_diff_delta (or NULL if `idx` out of range)" }, "description": "

Return the diff delta for an entry in the diff list.

\n", - "comments": "

The git_diff_delta pointer points to internal data and you do not\n have to release it when you are done with it. It will go away when\n the * git_diff (or any associated git_patch) goes away.

\n\n

Note that the flags on the delta related to whether it has binary\n content or not may not be set if there are no attributes set for the\n file and there has been no reason to load the file data at this point.\n For now, if you need those flags to be up to date, your only option is\n to either use git_diff_foreach or create a git_patch.

\n", + "comments": "

The git_diff_delta pointer points to internal data and you do not have to release it when you are done with it. It will go away when the * git_diff (or any associated git_patch) goes away.

\n\n

Note that the flags on the delta related to whether it has binary content or not may not be set if there are no attributes set for the file and there has been no reason to load the file data at this point. For now, if you need those flags to be up to date, your only option is to either use git_diff_foreach or create a git_patch.

\n", "group": "diff" }, "git_diff_is_sorted_icase": { @@ -6973,7 +6853,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Loop over all deltas in a diff issuing callbacks.

\n", - "comments": "

This will iterate through all of the files described in a diff. You\n should provide a file callback to learn about each file.

\n\n

The "hunk" and "line" callbacks are optional, and the text diff of the\n files will only be calculated if they are not NULL. Of course, these\n callbacks will not be invoked for binary files on the diff or for\n files whose only changed is a file mode change.

\n\n

Returning a non-zero value from any of the callbacks will terminate\n the iteration and return the value to the user.

\n", + "comments": "

This will iterate through all of the files described in a diff. You should provide a file callback to learn about each file.

\n\n

The "hunk" and "line" callbacks are optional, and the text diff of the files will only be calculated if they are not NULL. Of course, these callbacks will not be invoked for binary files on the diff or for files whose only changed is a file mode change.

\n\n

Returning a non-zero value from any of the callbacks will terminate the iteration and return the value to the user.

\n", "group": "diff" }, "git_diff_status_char": { @@ -6995,7 +6875,7 @@ "comment": " The single character label for that code" }, "description": "

Look up the single character abbreviation for a delta status code.

\n", - "comments": "

When you run git diff --name-status it uses single letter codes in\n the output such as 'A' for added, 'D' for deleted, 'M' for modified,\n etc. This function converts a git_delta_t value into these letters for\n your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').

\n", + "comments": "

When you run git diff --name-status it uses single letter codes in the output such as 'A' for added, 'D' for deleted, 'M' for modified, etc. This function converts a git_delta_t value into these letters for your own purposes. GIT_DELTA_UNTRACKED will return a space (i.e. ' ').

\n", "group": "diff" }, "git_diff_print": { @@ -7032,14 +6912,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Iterate over a diff generating formatted text output.

\n", - "comments": "

Returning a non-zero value from the callbacks will terminate the\n iteration and return the non-zero value to the caller.

\n", + "comments": "

Returning a non-zero value from the callbacks will terminate the iteration and return the non-zero value to the caller.

\n", "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_print-9" + "ex/HEAD/diff.html#git_diff_print-9" ], "log.c": [ - "ex/v0.28.0/log.html#git_diff_print-30" + "ex/HEAD/log.html#git_diff_print-30" ] } }, @@ -7139,7 +7019,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Directly run a diff on two blobs.

\n", - "comments": "

Compared to a file, a blob lacks some contextual information. As such,\n the git_diff_file given to the callback will have some fake data; i.e.\n mode will be 0 and path will be NULL.

\n\n

NULL is allowed for either old_blob or new_blob and will be treated\n as an empty blob, with the oid set to NULL in the git_diff_file data.\n Passing NULL for both blobs is a noop; no callbacks will be made at all.

\n\n

We do run a binary content check on the blob content and if either blob\n looks like binary data, the git_diff_delta binary attribute will be set\n to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass\n GIT_DIFF_FORCE_TEXT of course).

\n", + "comments": "

Compared to a file, a blob lacks some contextual information. As such, the git_diff_file given to the callback will have some fake data; i.e. mode will be 0 and path will be NULL.

\n\n

NULL is allowed for either old_blob or new_blob and will be treated as an empty blob, with the oid set to NULL in the git_diff_file data. Passing NULL for both blobs is a noop; no callbacks will be made at all.

\n\n

We do run a binary content check on the blob content and if either blob looks like binary data, the git_diff_delta binary attribute will be set to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass GIT_DIFF_FORCE_TEXT of course).

\n", "group": "diff" }, "git_diff_blob_to_buffer": { @@ -7211,7 +7091,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Directly run a diff between a blob and a buffer.

\n", - "comments": "

As with git_diff_blobs, comparing a blob and buffer lacks some context,\n so the git_diff_file parameters to the callbacks will be faked a la the\n rules for git_diff_blobs().

\n\n

Passing NULL for old_blob will be treated as an empty blob (i.e. the\n file_cb will be invoked with GIT_DELTA_ADDED and the diff will be the\n entire content of the buffer added). Passing NULL to the buffer will do\n the reverse, with GIT_DELTA_REMOVED and blob content removed.

\n", + "comments": "

As with git_diff_blobs, comparing a blob and buffer lacks some context, so the git_diff_file parameters to the callbacks will be faked a la the rules for git_diff_blobs().

\n\n

Passing NULL for old_blob will be treated as an empty blob (i.e. the file_cb will be invoked with GIT_DELTA_ADDED and the diff will be the entire content of the buffer added). Passing NULL to the buffer will do the reverse, with GIT_DELTA_REMOVED and blob content removed.

\n", "group": "diff" }, "git_diff_buffers": { @@ -7288,7 +7168,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Directly run a diff between two buffers.

\n", - "comments": "

Even more than with git_diff_blobs, comparing two buffer lacks\n context, so the git_diff_file parameters to the callbacks will be\n faked a la the rules for git_diff_blobs().

\n", + "comments": "

Even more than with git_diff_blobs, comparing two buffer lacks context, so the git_diff_file parameters to the callbacks will be faked a la the rules for git_diff_blobs().

\n", "group": "diff" }, "git_diff_from_buffer": { @@ -7320,7 +7200,7 @@ "comment": " 0 or an error code" }, "description": "

Read the contents of a git patch file into a git_diff object.

\n", - "comments": "

The diff object produced is similar to the one that would be\n produced if you actually produced it computationally by comparing\n two trees, however there may be subtle differences. For example,\n a patch file likely contains abbreviated object IDs, so the\n object IDs in a git_diff_delta produced by this function will\n also be abbreviated.

\n\n

This function will only read patch files created by a git\n implementation, it will not read unified diffs produced by\n the diff program, nor any other types of patch files.

\n", + "comments": "

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.

\n\n

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.

\n", "group": "diff" }, "git_diff_get_stats": { @@ -7351,7 +7231,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_get_stats-10" + "ex/HEAD/diff.html#git_diff_get_stats-10" ] } }, @@ -7459,7 +7339,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_stats_to_buf-11" + "ex/HEAD/diff.html#git_diff_stats_to_buf-11" ] } }, @@ -7486,7 +7366,7 @@ "group": "diff", "examples": { "diff.c": [ - "ex/v0.28.0/diff.html#git_diff_stats_free-12" + "ex/HEAD/diff.html#git_diff_stats_free-12" ] } }, @@ -7574,7 +7454,7 @@ "comments": "

Does not support creating patches for merge commits (yet).

\n", "group": "diff" }, - "git_diff_format_email_init_options": { + "git_diff_format_email_options_init": { "type": "function", "file": "git2/diff.h", "line": 1451, @@ -7598,10 +7478,10 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_diff_format_email_options structure

\n", - "comments": "

Initializes a git_diff_format_email_options with default values. Equivalent\n to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_diff_format_email_options with default values. Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.

\n", "group": "diff" }, - "git_diff_patchid_init_options": { + "git_diff_patchid_options_init": { "type": "function", "file": "git2/diff.h", "line": 1479, @@ -7625,7 +7505,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_diff_patchid_options structure

\n", - "comments": "

Initializes a git_diff_patchid_options with default values. Equivalent to\n creating an instance with GIT_DIFF_PATCHID_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_diff_patchid_options with default values. Equivalent to creating an instance with GIT_DIFF_PATCHID_OPTIONS_INIT.

\n", "group": "diff" }, "git_diff_patchid": { @@ -7657,7 +7537,7 @@ "comment": " 0 on success, an error code otherwise." }, "description": "

Calculate the patch ID for the given patch.

\n", - "comments": "

Calculate a stable patch ID for the given patch by summing the\n hash of the file diffs, ignoring whitespace and line numbers.\n This can be used to derive whether two diffs are the same with\n a high probability.

\n\n

Currently, this function only calculates stable patch IDs, as\n defined in git-patch-id(1), and should in fact generate the\n same IDs as the upstream git project does.

\n", + "comments": "

Calculate a stable patch ID for the given patch by summing the hash of the file diffs, ignoring whitespace and line numbers. This can be used to derive whether two diffs are the same with a high probability.

\n\n

Currently, 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_error_last": { @@ -7673,21 +7553,21 @@ "comment": " A git_error object." }, "description": "

Return the last git_error object that was generated for the\n current thread.

\n", - "comments": "

The default behaviour of this function is to return NULL if no previous error has occurred.\n However, libgit2's error strings are not cleared aggressively, so a prior\n (unrelated) error may be returned. This can be avoided by only calling\n this function if the prior call to a libgit2 API returned an error.

\n", + "comments": "

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", "group": "error", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_error_last-8", - "ex/v0.28.0/checkout.html#git_error_last-9", - "ex/v0.28.0/checkout.html#git_error_last-10", - "ex/v0.28.0/checkout.html#git_error_last-11" + "ex/HEAD/checkout.html#git_error_last-8", + "ex/HEAD/checkout.html#git_error_last-9", + "ex/HEAD/checkout.html#git_error_last-10", + "ex/HEAD/checkout.html#git_error_last-11" ], "general.c": [ - "ex/v0.28.0/general.html#git_error_last-33" + "ex/HEAD/general.html#git_error_last-33" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_error_last-8", - "ex/v0.28.0/merge.html#git_error_last-9" + "ex/HEAD/merge.html#git_error_last-8", + "ex/HEAD/merge.html#git_error_last-9" ] } }, @@ -7731,7 +7611,7 @@ "comment": null }, "description": "

Set the error message string for this thread.

\n", - "comments": "

This function is public so that custom ODB backends and the like can\n relay an error message through libgit2. Most regular users of libgit2\n will never need to call this function -- actually, calling it in most\n circumstances (for example, calling from within a callback function)\n will just end up having the value overwritten by libgit2 internals.

\n\n

This error message is stored in thread-local storage and only applies\n to the particular thread that this libgit2 call is made from.

\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\n

This 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": { @@ -7747,7 +7627,7 @@ "comment": null }, "description": "

Set the error message to a special value for memory allocation failure.

\n", - "comments": "

The normal git_error_set_str() function attempts to strdup() the\n string that is passed in. This is not a good idea when the error in\n question is a memory allocation failure. That circumstance has a\n special setter function that sets the error string to a known and\n statically allocated internal value.

\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.

\n", "group": "error" }, "git_filter_list_load": { @@ -7759,42 +7639,42 @@ { "name": "filters", "type": "git_filter_list **", - "comment": null + "comment": "Output newly created git_filter_list (or NULL)" }, { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "Repository object that contains `path`" }, { "name": "blob", "type": "git_blob *", - "comment": null + "comment": "The blob to which the filter will be applied (if known)" }, { "name": "path", "type": "const char *", - "comment": null + "comment": "Relative path of the file to be filtered" }, { "name": "mode", "type": "git_filter_mode_t", - "comment": null + "comment": "Filtering direction (WT->ODB or ODB->WT)" }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Combination of `git_filter_flag_t` flags" } ], - "argline": "git_filter_list **filters, git_repository *repo, git_blob *blob, const char *path, git_filter_mode_t mode, int flags", - "sig": "git_filter_list **::git_repository *::git_blob *::const char *::git_filter_mode_t::int", + "argline": "git_filter_list **filters, git_repository *repo, git_blob *blob, const char *path, git_filter_mode_t mode, uint32_t flags", + "sig": "git_filter_list **::git_repository *::git_blob *::const char *::git_filter_mode_t::uint32_t", "return": { "type": "int", - "comment": null + "comment": " 0 on success (which could still return NULL if no filters are\n needed for the requested file), \n<\n0 on error" }, - "description": "", - "comments": "", + "description": "

Load the filter list for a given path.

\n", + "comments": "

This will return 0 (success) but set the output git_filter_list to NULL if no filters are requested for the given file.

\n", "group": "filter" }, "git_filter_list_contains": { @@ -7821,7 +7701,7 @@ "comment": " 1 if the filter is in the list, 0 otherwise" }, "description": "

Query the filter list to see if a given filter (by name) will run.\n The built-in filters "crlf" and "ident" can be queried, otherwise this\n is the name of the filter specified by the filter attribute.

\n", - "comments": "

This will return 0 if the given filter is not in the list, or 1 if\n the filter will be applied.

\n", + "comments": "

This will return 0 if the given filter is not in the list, or 1 if the filter will be applied.

\n", "group": "filter" }, "git_filter_list_apply_to_data": { @@ -7853,7 +7733,7 @@ "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.

\n\n

If the in buffer holds data allocated by libgit2 (i.e. in->asize is\n not zero), then it will be overwritten when applying the filters. If\n not, then it will be left untouched.

\n\n

If there are no filters to apply (or filters is NULL), then the out\n buffer will reference the in buffer data (with asize set to zero)\n instead of allocating data. This keeps allocations to a minimum, but\n it means you have to be careful about freeing the in data since out\n may be pointing to it!

\n", + "comments": "

See git2/buffer.h for background on git_buf objects.

\n\n

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.

\n\n

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!

\n", "group": "filter" }, "git_filter_list_apply_to_file": { @@ -8061,50 +7941,11 @@ "comment": " the number of initializations of the library, or an error code." }, "description": "

Init the global state

\n", - "comments": "

This function must be called before any other libgit2 function in\n order to set up global state and threading.

\n\n

This function may be called multiple times - it will return the number\n of times the initialization has been called (including this one) that have\n not subsequently been shutdown.

\n", + "comments": "

This function must be called before any other libgit2 function in order to set up global state and threading.

\n\n

This 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": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_libgit2_init-8" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_libgit2_init-10" - ], - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_libgit2_init-12" - ], - "describe.c": [ - "ex/v0.28.0/describe.html#git_libgit2_init-6" - ], - "diff.c": [ - "ex/v0.28.0/diff.html#git_libgit2_init-13" - ], "general.c": [ - "ex/v0.28.0/general.html#git_libgit2_init-34" - ], - "init.c": [ - "ex/v0.28.0/init.html#git_libgit2_init-2" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_libgit2_init-31" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_libgit2_init-1" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_libgit2_init-10" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_libgit2_init-2" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_libgit2_init-1" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_libgit2_init-1" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_libgit2_init-3" + "ex/HEAD/general.html#git_libgit2_init-34" ] } }, @@ -8121,49 +7962,8 @@ "comment": " the number of remaining initializations of the library, or an\n error code." }, "description": "

Shutdown the global state

\n", - "comments": "

Clean up the global state and threading context after calling it as\n many times as git_libgit2_init() was called - it will return the\n number of remainining initializations that have not been shutdown\n (after this one).

\n", - "group": "libgit2", - "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_libgit2_shutdown-9" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_libgit2_shutdown-11" - ], - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_libgit2_shutdown-13" - ], - "describe.c": [ - "ex/v0.28.0/describe.html#git_libgit2_shutdown-7" - ], - "diff.c": [ - "ex/v0.28.0/diff.html#git_libgit2_shutdown-14" - ], - "init.c": [ - "ex/v0.28.0/init.html#git_libgit2_shutdown-3" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_libgit2_shutdown-32" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_libgit2_shutdown-2" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_libgit2_shutdown-11" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_libgit2_shutdown-3" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_libgit2_shutdown-2" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_libgit2_shutdown-2" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_libgit2_shutdown-4" - ] - } + "comments": "

Clean up the global state and threading context after calling it as many times as git_libgit2_init() was called - it will return the number of remainining initializations that have not been shutdown (after this one).

\n", + "group": "libgit2" }, "git_graph_ahead_behind": { "type": "function", @@ -8204,7 +8004,7 @@ "comment": null }, "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\n upstream relationship, but it helps to think of one as a branch and\n the other as its upstream, the ahead and behind values will be\n what git would report for the branches.

\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.

\n", "group": "graph" }, "git_graph_descendant_of": { @@ -8236,7 +8036,7 @@ "comment": " 1 if the given commit is a descendant of the potential ancestor,\n 0 if not, error code otherwise." }, "description": "

Determine if a commit is the descendant of another commit.

\n", - "comments": "

Note that a commit is not considered a descendant of itself, in contrast\n to git merge-base --is-ancestor.

\n", + "comments": "

Note that a commit is not considered a descendant of itself, in contrast to git merge-base --is-ancestor.

\n", "group": "graph" }, "git_ignore_add_rule": { @@ -8263,7 +8063,7 @@ "comment": " 0 on success" }, "description": "

Add ignore rules for a repository.

\n", - "comments": "

Excludesfile rules (i.e. .gitignore rules) are generally read from\n .gitignore files in the repository tree or from a shared system file\n only if a "core.excludesfile" config value is set. The library also\n keeps a set of per-repository internal ignores that can be configured\n in-memory and will not persist. This function allows you to add to\n that internal rules list.

\n\n

Example usage:

\n\n
 error = git_ignore_add_rule(myrepo, "*.c\n
\n\n

/

\n\n

with space

\n\n

");

\n\n

This would add three rules to the ignores.

\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\n

Example usage:

\n\n
 error = git_ignore_add_rule(myrepo, "*.c/ with space");\n
\n\n

This would add three rules to the ignores.

\n", "group": "ignore" }, "git_ignore_clear_internal_rules": { @@ -8285,7 +8085,7 @@ "comment": " 0 on success" }, "description": "

Clear ignore rules that were explicitly added.

\n", - "comments": "

Resets to the default internal ignore rules. This will not turn off\n rules in .gitignore files that actually exist in the filesystem.

\n\n

The default internal ignores ignore ".", ".." and ".git" entries.

\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\n

The default internal ignores ignore ".", ".." and ".git" entries.

\n", "group": "ignore" }, "git_ignore_path_is_ignored": { @@ -8317,14 +8117,14 @@ "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." }, "description": "

Test if the ignore rules apply to a given path.

\n", - "comments": "

This function checks the ignore rules to see if they would apply to the\n given file. This indicates if the file would be ignored regardless of\n whether the file is already in the index or committed to the repository.

\n\n

One way to think of this is if you were to do "git check-ignore --no-index"\n on the given file, would it be shown or not?

\n", + "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\n

One 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": 186, - "lineto": 186, + "line": 187, + "lineto": 187, "args": [ { "name": "out", @@ -8344,14 +8144,14 @@ "comment": " 0 or an error code" }, "description": "

Create a new bare Git index object as a memory representation\n of the Git index file in 'index_path', without a repository\n to back it.

\n", - "comments": "

Since there is no ODB or working directory behind this index,\n any Index methods which rely on these (e.g. index_add_bypath)\n will fail with the GIT_ERROR error code.

\n\n

If you need to access the index of an actual repository,\n use the git_repository_index wrapper.

\n\n

The index must be freed once it's no longer in use.

\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\n

If you need to access the index of an actual repository, use the git_repository_index wrapper.

\n\n

The index must be freed once it's no longer in use.

\n", "group": "index" }, "git_index_new": { "type": "function", "file": "git2/index.h", - "line": 199, - "lineto": 199, + "line": 200, + "lineto": 200, "args": [ { "name": "out", @@ -8366,14 +8166,14 @@ "comment": " 0 or an error code" }, "description": "

Create an in-memory index object.

\n", - "comments": "

This index object cannot be read/written to the filesystem,\n but may be used to perform in-memory index operations.

\n\n

The index must be freed once it's no longer in use.

\n", + "comments": "

This index object cannot be read/written to the filesystem, but may be used to perform in-memory index operations.

\n\n

The index must be freed once it's no longer in use.

\n", "group": "index" }, "git_index_free": { "type": "function", "file": "git2/index.h", - "line": 206, - "lineto": 206, + "line": 207, + "lineto": 207, "args": [ { "name": "index", @@ -8391,22 +8191,25 @@ "comments": "", "group": "index", "examples": { + "add.c": [ + "ex/HEAD/add.html#git_index_free-1" + ], "general.c": [ - "ex/v0.28.0/general.html#git_index_free-35" + "ex/HEAD/general.html#git_index_free-35" ], "init.c": [ - "ex/v0.28.0/init.html#git_index_free-4" + "ex/HEAD/init.html#git_index_free-2" ], "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_index_free-3" + "ex/HEAD/ls-files.html#git_index_free-1" ] } }, "git_index_owner": { "type": "function", "file": "git2/index.h", - "line": 214, - "lineto": 214, + "line": 215, + "lineto": 215, "args": [ { "name": "index", @@ -8427,8 +8230,8 @@ "git_index_caps": { "type": "function", "file": "git2/index.h", - "line": 222, - "lineto": 222, + "line": 223, + "lineto": 223, "args": [ { "name": "index", @@ -8449,8 +8252,8 @@ "git_index_set_caps": { "type": "function", "file": "git2/index.h", - "line": 235, - "lineto": 235, + "line": 236, + "lineto": 236, "args": [ { "name": "index", @@ -8470,14 +8273,14 @@ "comment": " 0 on success, -1 on failure" }, "description": "

Set index capabilities flags.

\n", - "comments": "

If you pass GIT_INDEX_CAPABILITY_FROM_OWNER for the caps, then\n capabilities will be read from the config of the owner object,\n looking at core.ignorecase, core.filemode, core.symlinks.

\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.

\n", "group": "index" }, "git_index_version": { "type": "function", "file": "git2/index.h", - "line": 247, - "lineto": 247, + "line": 248, + "lineto": 248, "args": [ { "name": "index", @@ -8492,14 +8295,14 @@ "comment": " the index version" }, "description": "

Get index on-disk version.

\n", - "comments": "

Valid return values are 2, 3, or 4. If 3 is returned, an index\n with version 2 may be written instead, if the extension data in\n version 3 is not necessary.

\n", + "comments": "

Valid return values are 2, 3, or 4. If 3 is returned, an index with version 2 may be written instead, if the extension data in version 3 is not necessary.

\n", "group": "index" }, "git_index_set_version": { "type": "function", "file": "git2/index.h", - "line": 260, - "lineto": 260, + "line": 261, + "lineto": 261, "args": [ { "name": "index", @@ -8519,14 +8322,14 @@ "comment": " 0 on success, -1 on failure" }, "description": "

Set index on-disk version.

\n", - "comments": "

Valid values are 2, 3, or 4. If 2 is given, git_index_write may\n write an index with version 3 instead, if necessary to accurately\n represent the index.

\n", + "comments": "

Valid values are 2, 3, or 4. If 2 is given, git_index_write may write an index with version 3 instead, if necessary to accurately represent the index.

\n", "group": "index" }, "git_index_read": { "type": "function", "file": "git2/index.h", - "line": 279, - "lineto": 279, + "line": 280, + "lineto": 280, "args": [ { "name": "index", @@ -8546,14 +8349,14 @@ "comment": " 0 or an error code" }, "description": "

Update the contents of an existing index object in memory by reading\n from the hard disk.

\n", - "comments": "

If force is true, this performs a "hard" read that discards in-memory\n changes and always reloads the on-disk index data. If there is no\n on-disk version, the index will be cleared.

\n\n

If force is false, this does a "soft" read that reloads the index\n data from disk only if it has changed since the last time it was\n loaded. Purely in-memory index data will be untouched. Be aware: if\n there are changes on disk, unwritten in-memory changes are discarded.

\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.

\n\n

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.

\n", "group": "index" }, "git_index_write": { "type": "function", "file": "git2/index.h", - "line": 288, - "lineto": 288, + "line": 289, + "lineto": 289, "args": [ { "name": "index", @@ -8569,13 +8372,18 @@ }, "description": "

Write an existing index object from memory back to disk\n using an atomic file lock.

\n", "comments": "", - "group": "index" + "group": "index", + "examples": { + "add.c": [ + "ex/HEAD/add.html#git_index_write-2" + ] + } }, "git_index_path": { "type": "function", "file": "git2/index.h", - "line": 296, - "lineto": 296, + "line": 297, + "lineto": 297, "args": [ { "name": "index", @@ -8596,8 +8404,8 @@ "git_index_checksum": { "type": "function", "file": "git2/index.h", - "line": 308, - "lineto": 308, + "line": 309, + "lineto": 309, "args": [ { "name": "index", @@ -8612,14 +8420,14 @@ "comment": " a pointer to the checksum of the index" }, "description": "

Get the checksum of the index

\n", - "comments": "

This checksum is the SHA-1 hash over the index file (except the\n last 20 bytes which are the checksum itself). In cases where the\n index does not exist on-disk, it will be zeroed out.

\n", + "comments": "

This checksum is the SHA-1 hash over the index file (except the last 20 bytes which are the checksum itself). In cases where the index does not exist on-disk, it will be zeroed out.

\n", "group": "index" }, "git_index_read_tree": { "type": "function", "file": "git2/index.h", - "line": 319, - "lineto": 319, + "line": 320, + "lineto": 320, "args": [ { "name": "index", @@ -8645,8 +8453,8 @@ "git_index_write_tree": { "type": "function", "file": "git2/index.h", - "line": 340, - "lineto": 340, + "line": 341, + "lineto": 341, "args": [ { "name": "out", @@ -8666,22 +8474,22 @@ "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" }, "description": "

Write the index as a tree

\n", - "comments": "

This method will scan the index and write a representation\n of its current state back to disk; it recursively creates\n tree objects for each of the subtrees stored in the index,\n but only returns the OID of the root tree. This is the OID\n that can be used e.g. to create a commit.

\n\n

The index instance cannot be bare, and needs to be associated\n to an existing repository.

\n\n

The index must not contain any file in conflict.

\n", + "comments": "

This method will scan the index and write a representation of its current state back to disk; it recursively creates tree objects for each of the subtrees stored in the index, but only returns the OID of the root tree. This is the OID that can be used e.g. to create a commit.

\n\n

The index instance cannot be bare, and needs to be associated to an existing repository.

\n\n

The index must not contain any file in conflict.

\n", "group": "index", "examples": { "init.c": [ - "ex/v0.28.0/init.html#git_index_write_tree-5" + "ex/HEAD/init.html#git_index_write_tree-3" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_index_write_tree-12" + "ex/HEAD/merge.html#git_index_write_tree-10" ] } }, "git_index_write_tree_to": { "type": "function", "file": "git2/index.h", - "line": 357, - "lineto": 357, + "line": 358, + "lineto": 358, "args": [ { "name": "out", @@ -8706,14 +8514,14 @@ "comment": " 0 on success, GIT_EUNMERGED when the index is not clean\n or an error code" }, "description": "

Write the index as a tree to the given repository

\n", - "comments": "

This method will do the same as git_index_write_tree, but\n letting the user choose the repository where the tree will\n be written.

\n\n

The index must not contain any file in conflict.

\n", + "comments": "

This method will do the same as git_index_write_tree, but letting the user choose the repository where the tree will be written.

\n\n

The index must not contain any file in conflict.

\n", "group": "index" }, "git_index_entrycount": { "type": "function", "file": "git2/index.h", - "line": 376, - "lineto": 376, + "line": 377, + "lineto": 377, "args": [ { "name": "index", @@ -8732,18 +8540,18 @@ "group": "index", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_index_entrycount-36" + "ex/HEAD/general.html#git_index_entrycount-36" ], "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_index_entrycount-4" + "ex/HEAD/ls-files.html#git_index_entrycount-2" ] } }, "git_index_clear": { "type": "function", "file": "git2/index.h", - "line": 387, - "lineto": 387, + "line": 388, + "lineto": 388, "args": [ { "name": "index", @@ -8758,14 +8566,14 @@ "comment": " 0 on success, error code \n<\n 0 on failure" }, "description": "

Clear the contents (all the entries) of an index object.

\n", - "comments": "

This clears the index object in memory; changes must be explicitly\n written to disk for them to take effect persistently.

\n", + "comments": "

This clears the index object in memory; changes must be explicitly written to disk for them to take effect persistently.

\n", "group": "index" }, "git_index_get_byindex": { "type": "function", "file": "git2/index.h", - "line": 400, - "lineto": 401, + "line": 401, + "lineto": 402, "args": [ { "name": "index", @@ -8785,22 +8593,22 @@ "comment": " a pointer to the entry; NULL if out of bounds" }, "description": "

Get a pointer to one of the entries in the index

\n", - "comments": "

The entry is not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.

\n", + "comments": "

The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.

\n", "group": "index", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_index_get_byindex-37" + "ex/HEAD/general.html#git_index_get_byindex-37" ], "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_index_get_byindex-5" + "ex/HEAD/ls-files.html#git_index_get_byindex-3" ] } }, "git_index_get_bypath": { "type": "function", "file": "git2/index.h", - "line": 415, - "lineto": 416, + "line": 416, + "lineto": 417, "args": [ { "name": "index", @@ -8825,19 +8633,19 @@ "comment": " a pointer to the entry; NULL if it was not found" }, "description": "

Get a pointer to one of the entries in the index

\n", - "comments": "

The entry is not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.

\n", + "comments": "

The entry is not modifiable and should not be freed. Because the git_index_entry struct is a publicly defined struct, you should be able to make your own permanent copy of the data if necessary.

\n", "group": "index", "examples": { "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_index_get_bypath-6" + "ex/HEAD/ls-files.html#git_index_get_bypath-4" ] } }, "git_index_remove": { "type": "function", "file": "git2/index.h", - "line": 426, - "lineto": 426, + "line": 427, + "lineto": 427, "args": [ { "name": "index", @@ -8868,8 +8676,8 @@ "git_index_remove_directory": { "type": "function", "file": "git2/index.h", - "line": 436, - "lineto": 437, + "line": 437, + "lineto": 438, "args": [ { "name": "index", @@ -8900,8 +8708,8 @@ "git_index_add": { "type": "function", "file": "git2/index.h", - "line": 453, - "lineto": 453, + "line": 454, + "lineto": 454, "args": [ { "name": "index", @@ -8921,14 +8729,14 @@ "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\n as the given 'source_entry', it will be replaced. Otherwise, the\n 'source_entry' will be added.

\n\n

A full copy (including the 'path' string) of the given\n 'source_entry' will be inserted on the index.

\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\n

A full copy (including the 'path' string) of the given 'source_entry' will be inserted on the index.

\n", "group": "index" }, "git_index_entry_stage": { "type": "function", "file": "git2/index.h", - "line": 465, - "lineto": 465, + "line": 466, + "lineto": 466, "args": [ { "name": "entry", @@ -8943,14 +8751,14 @@ "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 \n
\n\n

&\n GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT

\n", + "comments": "

This entry is calculated from the entry's flag attribute like this:

\n\n
(entry->flags & GIT_INDEX_ENTRY_STAGEMASK) >> GIT_INDEX_ENTRY_STAGESHIFT\n
\n", "group": "index" }, "git_index_entry_is_conflict": { "type": "function", "file": "git2/index.h", - "line": 474, - "lineto": 474, + "line": 475, + "lineto": 475, "args": [ { "name": "entry", @@ -8971,8 +8779,8 @@ "git_index_iterator_new": { "type": "function", "file": "git2/index.h", - "line": 494, - "lineto": 496, + "line": 495, + "lineto": 497, "args": [ { "name": "iterator_out", @@ -8998,8 +8806,8 @@ "git_index_iterator_next": { "type": "function", "file": "git2/index.h", - "line": 505, - "lineto": 507, + "line": 506, + "lineto": 508, "args": [ { "name": "out", @@ -9025,8 +8833,8 @@ "git_index_iterator_free": { "type": "function", "file": "git2/index.h", - "line": 514, - "lineto": 514, + "line": 515, + "lineto": 515, "args": [ { "name": "iterator", @@ -9047,8 +8855,8 @@ "git_index_add_bypath": { "type": "function", "file": "git2/index.h", - "line": 545, - "lineto": 545, + "line": 546, + "lineto": 546, "args": [ { "name": "index", @@ -9068,14 +8876,14 @@ "comment": " 0 or an error code" }, "description": "

Add or update an index entry from a file on disk

\n", - "comments": "

The file path must be relative to the repository's\n working folder and must be readable.

\n\n

This method will fail in bare index instances.

\n\n

This forces the file to be added to the index, not looking\n at gitignore rules. Those rules can be evaluated through\n the git_status APIs (in status.h) before calling this.

\n\n

If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.

\n", + "comments": "

The file path must be relative to the repository's working folder and must be readable.

\n\n

This method will fail in bare index instances.

\n\n

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\n

If this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.

\n", "group": "index" }, - "git_index_add_frombuffer": { + "git_index_add_from_buffer": { "type": "function", "file": "git2/index.h", - "line": 574, - "lineto": 577, + "line": 575, + "lineto": 578, "args": [ { "name": "index", @@ -9105,14 +8913,14 @@ "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\n index and then add the index entry to the index. The path of the\n entry represents the position of the blob relative to the\n repository's root folder.

\n\n

If a previous index entry exists that has the same path as the\n given 'entry', it will be replaced. Otherwise, the 'entry' will be\n added. The id and the file_size of the 'entry' are updated with the\n real value of the blob.

\n\n

This forces the file to be added to the index, not looking\n at gitignore rules. Those rules can be evaluated through\n the git_status APIs (in status.h) before calling this.

\n\n

If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.

\n", + "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.

\n\n

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.

\n\n

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\n

If this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.

\n", "group": "index" }, "git_index_remove_bypath": { "type": "function", "file": "git2/index.h", - "line": 593, - "lineto": 593, + "line": 594, + "lineto": 594, "args": [ { "name": "index", @@ -9132,14 +8940,14 @@ "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\n working folder. It may exist.

\n\n

If this file currently is the result of a merge conflict, this\n file will no longer be marked as conflicting. The data about\n the conflict will be moved to the "resolve undo" (REUC) section.

\n", + "comments": "

The file path must be relative to the repository's working folder. It may exist.

\n\n

If this file currently is the result of a merge conflict, this file will no longer be marked as conflicting. The data about the conflict will be moved to the "resolve undo" (REUC) section.

\n", "group": "index" }, "git_index_add_all": { "type": "function", "file": "git2/index.h", - "line": 641, - "lineto": 646, + "line": 642, + "lineto": 647, "args": [ { "name": "index", @@ -9174,14 +8982,19 @@ "comment": " 0 on success, negative callback return value, or error code" }, "description": "

Add or update index entries matching files in the working directory.

\n", - "comments": "

This method will fail in bare index instances.

\n\n

The pathspec is a list of file names or shell glob patterns that will\n be matched against files in the repository's working directory. Each\n file that matches will be added to the index (either updating an\n existing entry or adding a new entry). You can disable glob expansion\n and force exact matching with the GIT_INDEX_ADD_DISABLE_PATHSPEC_MATCH\n flag.

\n\n

Files that are ignored will be skipped (unlike git_index_add_bypath).\n If a file is already tracked in the index, then it will be updated\n even if it is ignored. Pass the GIT_INDEX_ADD_FORCE flag to skip\n the checking of ignore rules.

\n\n

To emulate git add -A and generate an error if the pathspec contains\n the exact path of an ignored file (when not using FORCE), add the\n GIT_INDEX_ADD_CHECK_PATHSPEC flag. This checks that each entry\n in the pathspec that is an exact match to a filename on disk is\n either not ignored or already in the index. If this check fails, the\n function will return GIT_EINVALIDSPEC.

\n\n

To emulate git add -A with the "dry-run" option, just use a callback\n function that always returns a positive value. See below for details.

\n\n

If any files are currently the result of a merge conflict, those files\n will no longer be marked as conflicting. The data about the conflicts\n will be moved to the "resolve undo" (REUC) section.

\n\n

If you provide a callback function, it will be invoked on each matching\n item in the working directory immediately before it is added to /\n updated in the index. Returning zero will add the item to the index,\n greater than zero will skip the item, and less than zero will abort the\n scan and return that value to the caller.

\n", - "group": "index" + "comments": "

This method will fail in bare index instances.

\n\n

The 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.

\n\n

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.

\n\n

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.

\n\n

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.

\n\n

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\n

If 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" + ] + } }, "git_index_remove_all": { "type": "function", "file": "git2/index.h", - "line": 663, - "lineto": 667, + "line": 664, + "lineto": 668, "args": [ { "name": "index", @@ -9211,14 +9024,14 @@ "comment": " 0 on success, negative callback return value, or error code" }, "description": "

Remove all matching index entries.

\n", - "comments": "

If you provide a callback function, it will be invoked on each matching\n item in the index immediately before it is removed. Return 0 to\n remove the item, > 0 to skip the item, and \n<\n 0 to abort the scan.

\n", + "comments": "

If you provide a callback function, it will be invoked on each matching item in the index immediately before it is removed. Return 0 to remove the item, > 0 to skip the item, and < 0 to abort the scan.

\n", "group": "index" }, "git_index_update_all": { "type": "function", "file": "git2/index.h", - "line": 692, - "lineto": 696, + "line": 693, + "lineto": 697, "args": [ { "name": "index", @@ -9248,14 +9061,19 @@ "comment": " 0 on success, negative callback return value, or error code" }, "description": "

Update all index entries to match the working directory

\n", - "comments": "

This method will fail in bare index instances.

\n\n

This scans the existing index entries and synchronizes them with the\n working directory, deleting them if the corresponding working directory\n file no longer exists otherwise updating the information (including\n adding the latest version of file to the ODB if needed).

\n\n

If you provide a callback function, it will be invoked on each matching\n item in the index immediately before it is updated (either refreshed\n or removed depending on working directory state). Return 0 to proceed\n with updating the item, > 0 to skip the item, and \n<\n 0 to abort the scan.

\n", - "group": "index" + "comments": "

This method will fail in bare index instances.

\n\n

This 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\n

If 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" + ] + } }, "git_index_find": { "type": "function", "file": "git2/index.h", - "line": 707, - "lineto": 707, + "line": 708, + "lineto": 708, "args": [ { "name": "at_pos", @@ -9286,8 +9104,8 @@ "git_index_find_prefix": { "type": "function", "file": "git2/index.h", - "line": 718, - "lineto": 718, + "line": 719, + "lineto": 719, "args": [ { "name": "at_pos", @@ -9318,8 +9136,8 @@ "git_index_conflict_add": { "type": "function", "file": "git2/index.h", - "line": 743, - "lineto": 747, + "line": 744, + "lineto": 748, "args": [ { "name": "index", @@ -9349,14 +9167,14 @@ "comment": " 0 or an error code" }, "description": "

Add or update index entries to represent a conflict. Any staged\n entries that exist at the given paths will be removed.

\n", - "comments": "

The entries are the entries from the tree included in the merge. Any\n entry may be null to indicate that that file was not present in the\n trees during the merge. For example, ancestor_entry may be NULL to\n indicate that a file was added in both branches and must be resolved.

\n", + "comments": "

The entries are the entries from the tree included in the merge. Any entry may be null to indicate that that file was not present in the trees during the merge. For example, ancestor_entry may be NULL to indicate that a file was added in both branches and must be resolved.

\n", "group": "index" }, "git_index_conflict_get": { "type": "function", "file": "git2/index.h", - "line": 763, - "lineto": 768, + "line": 764, + "lineto": 769, "args": [ { "name": "ancestor_out", @@ -9391,14 +9209,14 @@ "comment": " 0 or an error code" }, "description": "

Get the index entries that represent a conflict of a single file.

\n", - "comments": "

The entries are not modifiable and should not be freed. Because the\n git_index_entry struct is a publicly defined struct, you should\n be able to make your own permanent copy of the data if necessary.

\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.

\n", "group": "index" }, "git_index_conflict_remove": { "type": "function", "file": "git2/index.h", - "line": 777, - "lineto": 777, + "line": 778, + "lineto": 778, "args": [ { "name": "index", @@ -9424,8 +9242,8 @@ "git_index_conflict_cleanup": { "type": "function", "file": "git2/index.h", - "line": 785, - "lineto": 785, + "line": 786, + "lineto": 786, "args": [ { "name": "index", @@ -9446,8 +9264,8 @@ "git_index_has_conflicts": { "type": "function", "file": "git2/index.h", - "line": 792, - "lineto": 792, + "line": 793, + "lineto": 793, "args": [ { "name": "index", @@ -9466,15 +9284,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_index_has_conflicts-13" + "ex/HEAD/merge.html#git_index_has_conflicts-11" ] } }, "git_index_conflict_iterator_new": { "type": "function", "file": "git2/index.h", - "line": 803, - "lineto": 805, + "line": 804, + "lineto": 806, "args": [ { "name": "iterator_out", @@ -9498,15 +9316,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_index_conflict_iterator_new-14" + "ex/HEAD/merge.html#git_index_conflict_iterator_new-12" ] } }, "git_index_conflict_next": { "type": "function", "file": "git2/index.h", - "line": 817, - "lineto": 821, + "line": 818, + "lineto": 822, "args": [ { "name": "ancestor_out", @@ -9540,15 +9358,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_index_conflict_next-15" + "ex/HEAD/merge.html#git_index_conflict_next-13" ] } }, "git_index_conflict_iterator_free": { "type": "function", "file": "git2/index.h", - "line": 828, - "lineto": 829, + "line": 829, + "lineto": 830, "args": [ { "name": "iterator", @@ -9567,15 +9385,15 @@ "group": "index", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_index_conflict_iterator_free-16" + "ex/HEAD/merge.html#git_index_conflict_iterator_free-14" ] } }, - "git_indexer_init_options": { + "git_indexer_options_init": { "type": "function", "file": "git2/indexer.h", - "line": 41, - "lineto": 43, + "line": 85, + "lineto": 87, "args": [ { "name": "opts", @@ -9601,8 +9419,8 @@ "git_indexer_new": { "type": "function", "file": "git2/indexer.h", - "line": 57, - "lineto": 62, + "line": 101, + "lineto": 106, "args": [ { "name": "out", @@ -9643,8 +9461,8 @@ "git_indexer_append": { "type": "function", "file": "git2/indexer.h", - "line": 72, - "lineto": 72, + "line": 116, + "lineto": 116, "args": [ { "name": "idx", @@ -9663,12 +9481,12 @@ }, { "name": "stats", - "type": "git_transfer_progress *", + "type": "git_indexer_progress *", "comment": "stat storage" } ], - "argline": "git_indexer *idx, const void *data, size_t size, git_transfer_progress *stats", - "sig": "git_indexer *::const void *::size_t::git_transfer_progress *", + "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 @@ -9680,8 +9498,8 @@ "git_indexer_commit": { "type": "function", "file": "git2/indexer.h", - "line": 81, - "lineto": 81, + "line": 125, + "lineto": 125, "args": [ { "name": "idx", @@ -9690,12 +9508,12 @@ }, { "name": "stats", - "type": "git_transfer_progress *", + "type": "git_indexer_progress *", "comment": null } ], - "argline": "git_indexer *idx, git_transfer_progress *stats", - "sig": "git_indexer *::git_transfer_progress *", + "argline": "git_indexer *idx, git_indexer_progress *stats", + "sig": "git_indexer *::git_indexer_progress *", "return": { "type": "int", "comment": null @@ -9707,8 +9525,8 @@ "git_indexer_hash": { "type": "function", "file": "git2/indexer.h", - "line": 91, - "lineto": 91, + "line": 135, + "lineto": 135, "args": [ { "name": "idx", @@ -9723,14 +9541,14 @@ "comment": null }, "description": "

Get the packfile's hash

\n", - "comments": "

A packfile's name is derived from the sorted hashing of all object\n names. This is only correct after the index has been finalized.

\n", + "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_free": { "type": "function", "file": "git2/indexer.h", - "line": 98, - "lineto": 98, + "line": 142, + "lineto": 142, "args": [ { "name": "idx", @@ -9748,33 +9566,6 @@ "comments": "", "group": "indexer" }, - "imaxdiv": { - "type": "function", - "file": "git2/inttypes.h", - "line": 284, - "lineto": 298, - "args": [ - { - "name": "numer", - "type": "intmax_t", - "comment": null - }, - { - "name": "denom", - "type": "intmax_t", - "comment": null - } - ], - "argline": "intmax_t numer, intmax_t denom", - "sig": "intmax_t::intmax_t", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "imaxdiv" - }, "git_mailmap_new": { "type": "function", "file": "git2/mailmap.h", @@ -9794,7 +9585,7 @@ "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\n anything with it. The mailmap must be freed with 'git_mailmap_free'.

\n", + "comments": "

This object is empty, so you'll have to add a mailmap file before you can do anything with it. The mailmap must be freed with 'git_mailmap_free'.

\n", "group": "mailmap" }, "git_mailmap_free": { @@ -9917,7 +9708,7 @@ "comment": " 0 on success, or an error code" }, "description": "

Create a new mailmap instance from a repository, loading mailmap files based\n on the repository's configuration.

\n", - "comments": "

Mailmaps are loaded in the following order:\n 1. '.mailmap' in the root of the repository's working directory, if present.\n 2. The blob object identified by the 'mailmap.blob' config entry, if set.\n [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]\n 3. The path in the 'mailmap.file' config entry, if set.

\n", + "comments": "

Mailmaps are loaded in the following order: 1. '.mailmap' in the root of the repository's working directory, if present. 2. The blob object identified by the 'mailmap.blob' config entry, if set. [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories] 3. The path in the 'mailmap.file' config entry, if set.

\n", "group": "mailmap" }, "git_mailmap_resolve": { @@ -9994,7 +9785,7 @@ "comments": "

Call git_signature_free() to free the data.

\n", "group": "mailmap" }, - "git_merge_file_init_input": { + "git_merge_file_input_init": { "type": "function", "file": "git2/merge.h", "line": 60, @@ -10021,11 +9812,11 @@ "comments": "", "group": "merge" }, - "git_merge_file_init_options": { + "git_merge_file_options_init": { "type": "function", "file": "git2/merge.h", "line": 215, - "lineto": 217, + "lineto": 215, "args": [ { "name": "opts", @@ -10045,14 +9836,14 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_merge_file_options structure

\n", - "comments": "

Initializes a git_merge_file_options with default values. Equivalent to\n creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_merge_file_options with default values. Equivalent to creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.

\n", "group": "merge" }, - "git_merge_init_options": { + "git_merge_options_init": { "type": "function", "file": "git2/merge.h", - "line": 313, - "lineto": 315, + "line": 311, + "lineto": 311, "args": [ { "name": "opts", @@ -10072,14 +9863,14 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_merge_options structure

\n", - "comments": "

Initializes a git_merge_options with default values. Equivalent to\n creating an instance with GIT_MERGE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_merge_options with default values. Equivalent to creating an instance with GIT_MERGE_OPTIONS_INIT.

\n", "group": "merge" }, "git_merge_analysis": { "type": "function", "file": "git2/merge.h", - "line": 384, - "lineto": 389, + "line": 380, + "lineto": 385, "args": [ { "name": "analysis_out", @@ -10118,15 +9909,15 @@ "group": "merge", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_merge_analysis-17" + "ex/HEAD/merge.html#git_merge_analysis-15" ] } }, "git_merge_analysis_for_ref": { "type": "function", "file": "git2/merge.h", - "line": 402, - "lineto": 408, + "line": 398, + "lineto": 404, "args": [ { "name": "analysis_out", @@ -10172,8 +9963,8 @@ "git_merge_base": { "type": "function", "file": "git2/merge.h", - "line": 419, - "lineto": 423, + "line": 415, + "lineto": 419, "args": [ { "name": "out", @@ -10207,18 +9998,18 @@ "group": "merge", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_merge_base-33" + "ex/HEAD/log.html#git_merge_base-31" ], "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_merge_base-3" + "ex/HEAD/rev-parse.html#git_merge_base-1" ] } }, "git_merge_bases": { "type": "function", "file": "git2/merge.h", - "line": 434, - "lineto": 438, + "line": 430, + "lineto": 434, "args": [ { "name": "out", @@ -10254,8 +10045,8 @@ "git_merge_base_many": { "type": "function", "file": "git2/merge.h", - "line": 449, - "lineto": 453, + "line": 445, + "lineto": 449, "args": [ { "name": "out", @@ -10291,8 +10082,8 @@ "git_merge_bases_many": { "type": "function", "file": "git2/merge.h", - "line": 464, - "lineto": 468, + "line": 460, + "lineto": 464, "args": [ { "name": "out", @@ -10328,8 +10119,8 @@ "git_merge_base_octopus": { "type": "function", "file": "git2/merge.h", - "line": 479, - "lineto": 483, + "line": 475, + "lineto": 479, "args": [ { "name": "out", @@ -10365,8 +10156,8 @@ "git_merge_file": { "type": "function", "file": "git2/merge.h", - "line": 501, - "lineto": 506, + "line": 497, + "lineto": 502, "args": [ { "name": "out", @@ -10401,14 +10192,14 @@ "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.

\n", - "comments": "

Note that this function does not reference a repository and any\n configuration must be passed as git_merge_file_options.

\n", + "comments": "

Note that this function does not reference a repository and any configuration must be passed as git_merge_file_options.

\n", "group": "merge" }, "git_merge_file_from_index": { "type": "function", "file": "git2/merge.h", - "line": 522, - "lineto": 528, + "line": 518, + "lineto": 524, "args": [ { "name": "out", @@ -10454,8 +10245,8 @@ "git_merge_file_result_free": { "type": "function", "file": "git2/merge.h", - "line": 535, - "lineto": 535, + "line": 531, + "lineto": 531, "args": [ { "name": "result", @@ -10476,8 +10267,8 @@ "git_merge_trees": { "type": "function", "file": "git2/merge.h", - "line": 553, - "lineto": 559, + "line": 549, + "lineto": 555, "args": [ { "name": "out", @@ -10523,8 +10314,8 @@ "git_merge_commits": { "type": "function", "file": "git2/merge.h", - "line": 576, - "lineto": 581, + "line": 572, + "lineto": 577, "args": [ { "name": "out", @@ -10565,8 +10356,8 @@ "git_merge": { "type": "function", "file": "git2/merge.h", - "line": 601, - "lineto": 606, + "line": 597, + "lineto": 602, "args": [ { "name": "repo", @@ -10601,11 +10392,11 @@ "comment": " 0 on success or error code" }, "description": "

Merges the given commit(s) into HEAD, writing the results into the working\n directory. Any changes are staged for commit and any conflicts are written\n to the index. Callers should inspect the repository's index after this\n completes, resolve any conflicts and prepare a commit.

\n", - "comments": "

For compatibility with git, the repository is put into a merging\n state. Once the commit is done (or if the uses wishes to abort),\n you should clear this state by calling\n git_repository_state_cleanup().

\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().

\n", "group": "merge", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_merge-18" + "ex/HEAD/merge.html#git_merge-16" ] } }, @@ -10670,7 +10461,7 @@ "comment": " 0 on success, or non-zero on error." }, "description": "

Parse trailers out of a message, filling the array pointed to by +arr+.

\n", - "comments": "

Trailers are key/value pairs in the last paragraph of a message, not\n including any patches or conflicts that may be present.

\n", + "comments": "

Trailers are key/value pairs in the last paragraph of a message, not including any patches or conflicts that may be present.

\n", "group": "message" }, "git_message_trailer_array_free": { @@ -11086,7 +10877,7 @@ "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,\n the commit is a dangling commit, no reference is created.

\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" }, "git_note_remove": { @@ -11298,14 +11089,14 @@ "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\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJECT_ANY' may be passed to let\n the method guess the object's type.

\n", + "comments": "

The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.

\n\n

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/v0.28.0/log.html#git_object_lookup-34" + "ex/HEAD/log.html#git_object_lookup-32" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_object_lookup-19" + "ex/HEAD/merge.html#git_object_lookup-17" ] } }, @@ -11348,7 +11139,7 @@ "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\n matches the first 'len' hexadecimal characters\n (packets of 4 bits) of the given 'id'.\n 'len' must be at least GIT_OID_MINPREFIXLEN, and\n long enough to identify a unique object matching\n the prefix; otherwise the method will fail.

\n\n

The generated reference is owned by the repository and\n should be closed with the git_object_free method\n instead of free'd manually.

\n\n

The 'type' parameter must match the type of the object\n in the odb; the method will fail otherwise.\n The special value 'GIT_OBJECT_ANY' may be passed to let\n the method guess the object's type.

\n", + "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\n

The generated reference is owned by the repository and should be closed with the git_object_free method instead of free'd manually.

\n\n

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" }, "git_object_lookup_bypath": { @@ -11411,27 +11202,27 @@ "group": "object", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_object_id-10", - "ex/v0.28.0/blame.html#git_object_id-11", - "ex/v0.28.0/blame.html#git_object_id-12", - "ex/v0.28.0/blame.html#git_object_id-13" + "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" ], "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_object_id-12", - "ex/v0.28.0/cat-file.html#git_object_id-13" + "ex/HEAD/cat-file.html#git_object_id-10", + "ex/HEAD/cat-file.html#git_object_id-11" ], "log.c": [ - "ex/v0.28.0/log.html#git_object_id-35", - "ex/v0.28.0/log.html#git_object_id-36", - "ex/v0.28.0/log.html#git_object_id-37", - "ex/v0.28.0/log.html#git_object_id-38" + "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" ], "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_object_id-4", - "ex/v0.28.0/rev-parse.html#git_object_id-5", - "ex/v0.28.0/rev-parse.html#git_object_id-6", - "ex/v0.28.0/rev-parse.html#git_object_id-7", - "ex/v0.28.0/rev-parse.html#git_object_id-8" + "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" ] } }, @@ -11459,11 +11250,11 @@ "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\n iteratively extends to a longer string if that length is ambiguous.\n The result will be unambiguous (at least until new objects are added to\n the repository).

\n", + "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/v0.28.0/tag.html#git_object_short_id-5" + "ex/HEAD/tag.html#git_object_short_id-3" ] } }, @@ -11490,12 +11281,12 @@ "group": "object", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_object_type-14", - "ex/v0.28.0/cat-file.html#git_object_type-15", - "ex/v0.28.0/cat-file.html#git_object_type-16" + "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" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_object_type-6" + "ex/HEAD/tag.html#git_object_type-4" ] } }, @@ -11518,7 +11309,7 @@ "comment": " the repository who owns this object" }, "description": "

Get the repository that owns this object

\n", - "comments": "

Freeing or calling git_repository_close on the\n returned pointer will invalidate the actual object.

\n\n

Any other operation may be run on the repository without\n affecting the object.

\n", + "comments": "

Freeing or calling git_repository_close on the returned pointer will invalidate the actual object.

\n\n

Any other operation may be run on the repository without affecting the object.

\n", "group": "object" }, "git_object_free": { @@ -11540,37 +11331,37 @@ "comment": null }, "description": "

Close an open object

\n", - "comments": "

This method instructs the library to close an existing\n object; note that git_objects are owned and cached by the repository\n so the object may or may not be freed after this library call,\n depending on how aggressive is the caching mechanism used\n by the repository.

\n\n

IMPORTANT:\n It is necessary to call this method when you stop using\n an object. Failure to do so will cause a memory leak.

\n", + "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\n

IMPORTANT: 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/v0.28.0/blame.html#git_object_free-14", - "ex/v0.28.0/blame.html#git_object_free-15", - "ex/v0.28.0/blame.html#git_object_free-16", - "ex/v0.28.0/blame.html#git_object_free-17" + "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/v0.28.0/cat-file.html#git_object_free-17" + "ex/HEAD/cat-file.html#git_object_free-15" ], "general.c": [ - "ex/v0.28.0/general.html#git_object_free-38" + "ex/HEAD/general.html#git_object_free-38" ], "log.c": [ - "ex/v0.28.0/log.html#git_object_free-39" + "ex/HEAD/log.html#git_object_free-37" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_object_free-20" + "ex/HEAD/merge.html#git_object_free-18" ], "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_object_free-9", - "ex/v0.28.0/rev-parse.html#git_object_free-10", - "ex/v0.28.0/rev-parse.html#git_object_free-11" + "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" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_object_free-7", - "ex/v0.28.0/tag.html#git_object_free-8", - "ex/v0.28.0/tag.html#git_object_free-9", - "ex/v0.28.0/tag.html#git_object_free-10" + "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" ] } }, @@ -11593,18 +11384,18 @@ "comment": " the corresponding string representation." }, "description": "

Convert an object type to its string representation.

\n", - "comments": "

The result is a pointer to a string in static memory and\n should not be free()'ed.

\n", + "comments": "

The result is a pointer to a string in static memory and should not be free()'ed.

\n", "group": "object", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_object_type2string-18", - "ex/v0.28.0/cat-file.html#git_object_type2string-19", - "ex/v0.28.0/cat-file.html#git_object_type2string-20", - "ex/v0.28.0/cat-file.html#git_object_type2string-21" + "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" ], "general.c": [ - "ex/v0.28.0/general.html#git_object_type2string-39", - "ex/v0.28.0/general.html#git_object_type2string-40" + "ex/HEAD/general.html#git_object_type2string-39", + "ex/HEAD/general.html#git_object_type2string-40" ] } }, @@ -11652,7 +11443,7 @@ "comments": "", "group": "object" }, - "git_object__size": { + "git_object_size": { "type": "function", "file": "git2/object.h", "line": 200, @@ -11671,7 +11462,7 @@ "comment": " size in bytes of the object" }, "description": "

Get the size in bytes for the structure which\n acts as an in-memory representation of any given\n object type.

\n", - "comments": "

For all the core types, this would the equivalent\n of calling sizeof(git_commit) if the core types\n were not opaque on the external API.

\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.

\n", "group": "object" }, "git_object_peel": { @@ -11703,7 +11494,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EPEEL, or an error code" }, "description": "

Recursively peel an object until an object of the specified type is met.

\n", - "comments": "

If the query cannot be satisfied due to the object model,\n GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a\n tree).

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object will\n be peeled until the type changes. A tag will be peeled until the\n referenced object is no longer a tag, and a commit will be peeled\n to a tree. Any other object type will return GIT_EINVALIDSPEC.

\n\n

If peeling a tag we discover an object which cannot be peeled to\n the target type due to the object model, GIT_EPEEL will be\n returned.

\n\n

You must free the returned object.

\n", + "comments": "

If the query cannot be satisfied due to the object model, GIT_EINVALIDSPEC will be returned (e.g. trying to peel a blob to a tree).

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object will be peeled until the type changes. A tag will be peeled until the referenced object is no longer a tag, and a commit will be peeled to a tree. Any other object type will return GIT_EINVALIDSPEC.

\n\n

If peeling a tag we discover an object which cannot be peeled to the target type due to the object model, GIT_EPEEL will be returned.

\n\n

You must free the returned object.

\n", "group": "object" }, "git_object_dup": { @@ -11736,8 +11527,8 @@ "git_odb_new": { "type": "function", "file": "git2/odb.h", - "line": 39, - "lineto": 39, + "line": 40, + "lineto": 40, "args": [ { "name": "out", @@ -11752,14 +11543,14 @@ "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\n backend must be manually added using git_odb_add_backend()

\n", + "comments": "

Before the ODB can be used for read/writing, a custom database backend must be manually added using git_odb_add_backend()

\n", "group": "odb" }, "git_odb_open": { "type": "function", "file": "git2/odb.h", - "line": 57, - "lineto": 57, + "line": 58, + "lineto": 58, "args": [ { "name": "out", @@ -11779,14 +11570,14 @@ "comment": " 0 or an error code" }, "description": "

Create a new object database and automatically add\n the two default backends:

\n", - "comments": "
- git_odb_backend_loose: read and write loose object files\n    from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles,\n    assuming `objects_dir` as the Objects folder which\n    contains a 'pack/' folder with the corresponding data\n
\n", + "comments": "
- git_odb_backend_loose: read and write loose object files      from disk, assuming `objects_dir` as the Objects folder\n\n- git_odb_backend_pack: read objects from packfiles,        assuming `objects_dir` as the Objects folder which      contains a 'pack/' folder with the corresponding data\n
\n", "group": "odb" }, "git_odb_add_disk_alternate": { "type": "function", "file": "git2/odb.h", - "line": 74, - "lineto": 74, + "line": 75, + "lineto": 75, "args": [ { "name": "odb", @@ -11806,14 +11597,14 @@ "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\n to a full repository, to use it as an alternate store.

\n\n

Alternate backends are always checked for objects after\n all the main backends have been exhausted.

\n\n

Writing is disabled on alternate backends.

\n", + "comments": "

Note that the added path must point to an objects, not to a full repository, to use it as an alternate store.

\n\n

Alternate backends are always checked for objects after all the main backends have been exhausted.

\n\n

Writing is disabled on alternate backends.

\n", "group": "odb" }, "git_odb_free": { "type": "function", "file": "git2/odb.h", - "line": 81, - "lineto": 81, + "line": 82, + "lineto": 82, "args": [ { "name": "db", @@ -11832,18 +11623,18 @@ "group": "odb", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_odb_free-22" + "ex/HEAD/cat-file.html#git_odb_free-20" ], "general.c": [ - "ex/v0.28.0/general.html#git_odb_free-41" + "ex/HEAD/general.html#git_odb_free-41" ] } }, "git_odb_read": { "type": "function", "file": "git2/odb.h", - "line": 100, - "lineto": 100, + "line": 101, + "lineto": 101, "args": [ { "name": "out", @@ -11868,22 +11659,22 @@ "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." }, "description": "

Read an object from the database.

\n", - "comments": "

This method queries all available ODB backends\n trying to read the given OID.

\n\n

The returned object is reference counted and\n internally cached, so it should be closed\n by the user once it's no longer in use.

\n", + "comments": "

This method queries all available ODB backends trying to read the given OID.

\n\n

The 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/v0.28.0/cat-file.html#git_odb_read-23" + "ex/HEAD/cat-file.html#git_odb_read-21" ], "general.c": [ - "ex/v0.28.0/general.html#git_odb_read-42" + "ex/HEAD/general.html#git_odb_read-42" ] } }, "git_odb_read_prefix": { "type": "function", "file": "git2/odb.h", - "line": 129, - "lineto": 129, + "line": 130, + "lineto": 130, "args": [ { "name": "out", @@ -11913,14 +11704,14 @@ "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database.\n - GIT_EAMBIGUOUS if the prefix is ambiguous (several objects match the prefix)" }, "description": "

Read an object from the database, given a prefix\n of its identifier.

\n", - "comments": "

This method queries all available ODB backends\n trying to match the 'len' first hexadecimal\n characters of the 'short_id'.\n The remaining (GIT_OID_HEXSZ-len)*4 bits of\n 'short_id' must be 0s.\n 'len' must be at least GIT_OID_MINPREFIXLEN,\n and the prefix must be long enough to identify\n a unique object in all the backends; the\n method will fail otherwise.

\n\n

The returned object is reference counted and\n internally cached, so it should be closed\n by the user once it's no longer in use.

\n", + "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\n

The 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": 149, - "lineto": 149, + "line": 150, + "lineto": 150, "args": [ { "name": "len_out", @@ -11950,14 +11741,14 @@ "comment": " - 0 if the object was read;\n - GIT_ENOTFOUND if the object is not in the database." }, "description": "

Read the header of an object from the database, without\n reading its full contents.

\n", - "comments": "

The header includes the length and the type of an object.

\n\n

Note that most backends do not support reading only the header\n of an object, so the whole object will be read and then the\n header will be returned.

\n", + "comments": "

The header includes the length and the type of an object.

\n\n

Note that most backends do not support reading only the header of an object, so the whole object will be read and then the header will be returned.

\n", "group": "odb" }, "git_odb_exists": { "type": "function", "file": "git2/odb.h", - "line": 160, - "lineto": 160, + "line": 161, + "lineto": 161, "args": [ { "name": "db", @@ -11983,8 +11774,8 @@ "git_odb_exists_prefix": { "type": "function", "file": "git2/odb.h", - "line": 173, - "lineto": 174, + "line": 174, + "lineto": 175, "args": [ { "name": "out", @@ -12020,8 +11811,8 @@ "git_odb_expand_ids": { "type": "function", "file": "git2/odb.h", - "line": 215, - "lineto": 218, + "line": 216, + "lineto": 219, "args": [ { "name": "db", @@ -12046,14 +11837,14 @@ "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.

\n", - "comments": "

Note that since this function operates on multiple objects, the\n underlying database will not be asked to be reloaded if an object is\n not found (which is unlike other object database operations.)

\n", + "comments": "

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": 238, - "lineto": 238, + "line": 239, + "lineto": 239, "args": [ { "name": "db", @@ -12068,14 +11859,14 @@ "comment": " 0 on success, error code otherwise" }, "description": "

Refresh the object database to load newly added files.

\n", - "comments": "

If the object databases have changed on disk while the library\n is running, this function will force a reload of the underlying\n indexes.

\n\n

Use this function when you're confident that an external\n application has tampered with the ODB.

\n\n

NOTE that it is not necessary to call this function at all. The\n library will automatically attempt to refresh the ODB\n when a lookup fails, to see if the looked up object exists\n on disk but hasn't been loaded yet.

\n", + "comments": "

If the object databases have changed on disk while the library is running, this function will force a reload of the underlying indexes.

\n\n

Use this function when you're confident that an external application has tampered with the ODB.

\n\n

NOTE that it is not necessary to call this function at all. The library will automatically attempt to refresh the ODB when a lookup fails, to see if the looked up object exists on disk but hasn't been loaded yet.

\n", "group": "odb" }, "git_odb_foreach": { "type": "function", "file": "git2/odb.h", - "line": 253, - "lineto": 253, + "line": 254, + "lineto": 254, "args": [ { "name": "db", @@ -12100,14 +11891,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

List all objects available in the database

\n", - "comments": "

The callback will be called for each object available in the\n database. Note that the objects are likely to be returned in the index\n order, which would make accessing the objects in that order inefficient.\n Return a non-zero value from the callback to stop looping.

\n", + "comments": "

The callback will be called for each object available in the database. Note that the objects are likely to be returned in the index order, which would make accessing the objects in that order inefficient. Return a non-zero value from the callback to stop looping.

\n", "group": "odb" }, "git_odb_write": { "type": "function", "file": "git2/odb.h", - "line": 273, - "lineto": 273, + "line": 274, + "lineto": 274, "args": [ { "name": "out", @@ -12142,19 +11933,19 @@ "comment": " 0 or an error code" }, "description": "

Write an object directly into the ODB

\n", - "comments": "

This method writes a full object straight into the ODB.\n For most cases, it is preferred to write objects through a write\n stream, which is both faster and less memory intensive, specially\n for big objects.

\n\n

This method is provided for compatibility with custom backends\n which are not able to support streaming writes

\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\n

This method is provided for compatibility with custom backends which are not able to support streaming writes

\n", "group": "odb", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_odb_write-43" + "ex/HEAD/general.html#git_odb_write-43" ] } }, "git_odb_open_wstream": { "type": "function", "file": "git2/odb.h", - "line": 296, - "lineto": 296, + "line": 297, + "lineto": 297, "args": [ { "name": "out", @@ -12184,14 +11975,14 @@ "comment": " 0 if the stream was created; error code otherwise" }, "description": "

Open a stream to write an object into the ODB

\n", - "comments": "

The type and final length of the object must be specified\n when opening the stream.

\n\n

The returned stream will be of type GIT_STREAM_WRONLY, and it\n won't be effective until git_odb_stream_finalize_write is called\n and returns without an error

\n\n

The stream must always be freed when done with git_odb_stream_free or\n will leak memory.

\n", + "comments": "

The type and final length of the object must be specified when opening the stream.

\n\n

The returned stream will be of type GIT_STREAM_WRONLY, and it won't be effective until git_odb_stream_finalize_write is called and returns without an error

\n\n

The stream must always be freed when done with git_odb_stream_free or will leak memory.

\n", "group": "odb" }, "git_odb_stream_write": { "type": "function", "file": "git2/odb.h", - "line": 309, - "lineto": 309, + "line": 310, + "lineto": 310, "args": [ { "name": "stream", @@ -12216,14 +12007,14 @@ "comment": " 0 if the write succeeded; error code otherwise" }, "description": "

Write to an odb stream

\n", - "comments": "

This method will fail if the total number of received bytes exceeds the\n size declared with git_odb_open_wstream()

\n", + "comments": "

This method will fail if the total number of received bytes exceeds the size declared with git_odb_open_wstream()

\n", "group": "odb" }, "git_odb_stream_finalize_write": { "type": "function", "file": "git2/odb.h", - "line": 324, - "lineto": 324, + "line": 325, + "lineto": 325, "args": [ { "name": "out", @@ -12243,14 +12034,14 @@ "comment": " 0 on success; an error code otherwise" }, "description": "

Finish writing to an odb stream

\n", - "comments": "

The object will take its final name and will be available to the\n odb.

\n\n

This method will fail if the total number of received bytes\n differs from the size declared with git_odb_open_wstream()

\n", + "comments": "

The object will take its final name and will be available to the odb.

\n\n

This method will fail if the total number of received bytes differs from the size declared with git_odb_open_wstream()

\n", "group": "odb" }, "git_odb_stream_read": { "type": "function", "file": "git2/odb.h", - "line": 331, - "lineto": 331, + "line": 332, + "lineto": 332, "args": [ { "name": "stream", @@ -12281,8 +12072,8 @@ "git_odb_stream_free": { "type": "function", "file": "git2/odb.h", - "line": 338, - "lineto": 338, + "line": 339, + "lineto": 339, "args": [ { "name": "stream", @@ -12303,8 +12094,8 @@ "git_odb_open_rstream": { "type": "function", "file": "git2/odb.h", - "line": 366, - "lineto": 371, + "line": 367, + "lineto": 372, "args": [ { "name": "out", @@ -12339,14 +12130,14 @@ "comment": " 0 if the stream was created; error code otherwise" }, "description": "

Open a stream to read an object from the ODB

\n", - "comments": "

Note that most backends do not support streaming reads\n because they store their objects as compressed/delta'ed blobs.

\n\n

It's recommended to use git_odb_read instead, which is\n assured to work on all backends.

\n\n

The returned stream will be of type GIT_STREAM_RDONLY and\n will have the following methods:

\n\n
    - stream->read: read `n` bytes from the stream\n    - stream->free: free the stream\n
\n\n

The stream must always be free'd or will leak memory.

\n", + "comments": "

Note that most backends do not support streaming reads because they store their objects as compressed/delta'ed blobs.

\n\n

It's recommended to use git_odb_read instead, which is assured to work on all backends.

\n\n

The returned stream will be of type GIT_STREAM_RDONLY and will have the following methods:

\n\n
    - stream->read: read `n` bytes from the stream      - stream->free: free the stream\n
\n\n

The stream must always be free'd or will leak memory.

\n", "group": "odb" }, "git_odb_write_pack": { "type": "function", "file": "git2/odb.h", - "line": 391, - "lineto": 395, + "line": 392, + "lineto": 396, "args": [ { "name": "out", @@ -12360,7 +12151,7 @@ }, { "name": "progress_cb", - "type": "git_transfer_progress_cb", + "type": "git_indexer_progress_cb", "comment": "function to call with progress information.\n Be aware that this is called inline with network and indexing operations,\n so performance may be affected." }, { @@ -12369,21 +12160,21 @@ "comment": "payload for the progress callback" } ], - "argline": "git_odb_writepack **out, git_odb *db, git_transfer_progress_cb progress_cb, void *progress_payload", - "sig": "git_odb_writepack **::git_odb *::git_transfer_progress_cb::void *", + "argline": "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 }, "description": "

Open a stream for writing a pack file to the ODB.

\n", - "comments": "

If the ODB layer understands pack files, then the given\n packfile will likely be streamed directly to disk (and a\n corresponding index created). If the ODB layer does not\n understand pack files, the objects will be stored in whatever\n format the ODB layer uses.

\n", + "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": { "type": "function", "file": "git2/odb.h", - "line": 409, - "lineto": 409, + "line": 410, + "lineto": 410, "args": [ { "name": "out", @@ -12413,14 +12204,14 @@ "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\n buffer as if the data buffer it were to written to the ODB.

\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": 424, - "lineto": 424, + "line": 425, + "lineto": 425, "args": [ { "name": "out", @@ -12451,8 +12242,8 @@ "git_odb_object_dup": { "type": "function", "file": "git2/odb.h", - "line": 438, - "lineto": 438, + "line": 439, + "lineto": 439, "args": [ { "name": "dest", @@ -12472,14 +12263,14 @@ "comment": " 0 or an error code" }, "description": "

Create a copy of an odb_object

\n", - "comments": "

The returned copy must be manually freed with git_odb_object_free.\n Note that because of an implementation detail, the returned copy will be\n the same pointer as source: the object is internally refcounted, so the\n copy still needs to be freed twice.

\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.

\n", "group": "odb" }, "git_odb_object_free": { "type": "function", "file": "git2/odb.h", - "line": 448, - "lineto": 448, + "line": 449, + "lineto": 449, "args": [ { "name": "object", @@ -12494,22 +12285,22 @@ "comment": null }, "description": "

Close an ODB object

\n", - "comments": "

This method must always be called once a git_odb_object is no\n longer needed, otherwise memory will leak.

\n", + "comments": "

This method must always be called once a git_odb_object is no longer needed, otherwise memory will leak.

\n", "group": "odb", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_odb_object_free-24" + "ex/HEAD/cat-file.html#git_odb_object_free-22" ], "general.c": [ - "ex/v0.28.0/general.html#git_odb_object_free-44" + "ex/HEAD/general.html#git_odb_object_free-44" ] } }, "git_odb_object_id": { "type": "function", "file": "git2/odb.h", - "line": 458, - "lineto": 458, + "line": 459, + "lineto": 459, "args": [ { "name": "object", @@ -12530,8 +12321,8 @@ "git_odb_object_data": { "type": "function", "file": "git2/odb.h", - "line": 471, - "lineto": 471, + "line": 472, + "lineto": 472, "args": [ { "name": "object", @@ -12546,19 +12337,19 @@ "comment": " a pointer to the data" }, "description": "

Return the data of an ODB object

\n", - "comments": "

This is the uncompressed, raw data as read from the ODB,\n without the leading header.

\n\n

This pointer is owned by the object and shall not be free'd.

\n", + "comments": "

This is the uncompressed, raw data as read from the ODB, without the leading header.

\n\n

This pointer is owned by the object and shall not be free'd.

\n", "group": "odb", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_odb_object_data-45" + "ex/HEAD/general.html#git_odb_object_data-45" ] } }, "git_odb_object_size": { "type": "function", "file": "git2/odb.h", - "line": 482, - "lineto": 482, + "line": 483, + "lineto": 483, "args": [ { "name": "object", @@ -12573,22 +12364,22 @@ "comment": " the size" }, "description": "

Return the size of an ODB object

\n", - "comments": "

This is the real size of the data buffer, not the\n actual size of the object.

\n", + "comments": "

This is the real size of the data buffer, not the actual size of the object.

\n", "group": "odb", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_odb_object_size-25" + "ex/HEAD/cat-file.html#git_odb_object_size-23" ], "general.c": [ - "ex/v0.28.0/general.html#git_odb_object_size-46" + "ex/HEAD/general.html#git_odb_object_size-46" ] } }, "git_odb_object_type": { "type": "function", "file": "git2/odb.h", - "line": 490, - "lineto": 490, + "line": 491, + "lineto": 491, "args": [ { "name": "object", @@ -12607,15 +12398,15 @@ "group": "odb", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_odb_object_type-47" + "ex/HEAD/general.html#git_odb_object_type-47" ] } }, "git_odb_add_backend": { "type": "function", "file": "git2/odb.h", - "line": 505, - "lineto": 505, + "line": 506, + "lineto": 506, "args": [ { "name": "odb", @@ -12640,14 +12431,14 @@ "comment": " 0 on success; error code otherwise" }, "description": "

Add a custom backend to an existing Object DB

\n", - "comments": "

The backends are checked in relative ordering, based on the\n value of the priority parameter.

\n\n

Read \n for more information.

\n", + "comments": "

The backends are checked in relative ordering, based on the value of the priority parameter.

\n\n

Read for more information.

\n", "group": "odb" }, "git_odb_add_alternate": { "type": "function", "file": "git2/odb.h", - "line": 526, - "lineto": 526, + "line": 527, + "lineto": 527, "args": [ { "name": "odb", @@ -12672,14 +12463,14 @@ "comment": " 0 on success; error code otherwise" }, "description": "

Add a custom backend to an existing Object DB; this\n backend will work as an alternate.

\n", - "comments": "

Alternate backends are always checked for objects after\n all the main backends have been exhausted.

\n\n

The backends are checked in relative ordering, based on the\n value of the priority parameter.

\n\n

Writing is disabled on alternate backends.

\n\n

Read \n for more information.

\n", + "comments": "

Alternate backends are always checked for objects after all the main backends have been exhausted.

\n\n

The backends are checked in relative ordering, based on the value of the priority parameter.

\n\n

Writing is disabled on alternate backends.

\n\n

Read for more information.

\n", "group": "odb" }, "git_odb_num_backends": { "type": "function", "file": "git2/odb.h", - "line": 534, - "lineto": 534, + "line": 535, + "lineto": 535, "args": [ { "name": "odb", @@ -12700,8 +12491,8 @@ "git_odb_get_backend": { "type": "function", "file": "git2/odb.h", - "line": 544, - "lineto": 544, + "line": 545, + "lineto": 545, "args": [ { "name": "out", @@ -12732,8 +12523,8 @@ "git_odb_backend_pack": { "type": "function", "file": "git2/odb_backend.h", - "line": 34, - "lineto": 34, + "line": 35, + "lineto": 35, "args": [ { "name": "out", @@ -12759,8 +12550,8 @@ "git_odb_backend_loose": { "type": "function", "file": "git2/odb_backend.h", - "line": 48, - "lineto": 54, + "line": 49, + "lineto": 55, "args": [ { "name": "out", @@ -12806,8 +12597,8 @@ "git_odb_backend_one_pack": { "type": "function", "file": "git2/odb_backend.h", - "line": 67, - "lineto": 67, + "line": 68, + "lineto": 68, "args": [ { "name": "out", @@ -12827,7 +12618,7 @@ "comment": " 0 or an error code" }, "description": "

Create a backend out of a single packfile

\n", - "comments": "

This can be useful for inspecting the contents of a single\n packfile.

\n", + "comments": "

This can be useful for inspecting the contents of a single packfile.

\n", "group": "odb" }, "git_oid_fromstr": { @@ -12858,14 +12649,14 @@ "group": "oid", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_oid_fromstr-48", - "ex/v0.28.0/general.html#git_oid_fromstr-49", - "ex/v0.28.0/general.html#git_oid_fromstr-50", - "ex/v0.28.0/general.html#git_oid_fromstr-51", - "ex/v0.28.0/general.html#git_oid_fromstr-52", - "ex/v0.28.0/general.html#git_oid_fromstr-53", - "ex/v0.28.0/general.html#git_oid_fromstr-54", - "ex/v0.28.0/general.html#git_oid_fromstr-55" + "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" ] } }, @@ -12925,7 +12716,7 @@ "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\n low nibble set to zero.

\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": { @@ -12982,20 +12773,20 @@ "comments": "", "group": "oid", "examples": { + "fetch.c": [ + "ex/HEAD/fetch.html#git_oid_fmt-1", + "ex/HEAD/fetch.html#git_oid_fmt-2" + ], "general.c": [ - "ex/v0.28.0/general.html#git_oid_fmt-56", - "ex/v0.28.0/general.html#git_oid_fmt-57", - "ex/v0.28.0/general.html#git_oid_fmt-58", - "ex/v0.28.0/general.html#git_oid_fmt-59", - "ex/v0.28.0/general.html#git_oid_fmt-60", - "ex/v0.28.0/general.html#git_oid_fmt-61" - ], - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_oid_fmt-1", - "ex/v0.28.0/network/fetch.html#git_oid_fmt-2" - ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_oid_fmt-1" + "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" + ], + "ls-remote.c": [ + "ex/HEAD/ls-remote.html#git_oid_fmt-1" ] } }, @@ -13055,7 +12846,7 @@ "comment": null }, "description": "

Format a git_oid into a loose-object path string.

\n", - "comments": "

The resulting string is "aa/...", where "aa" is the first two\n hex digits of the oid and "..." is the remaining 38 digits.

\n", + "comments": "

The resulting string is "aa/...", where "aa" is the first two hex digits of the oid and "..." is the remaining 38 digits.

\n", "group": "oid" }, "git_oid_tostr_s": { @@ -13077,12 +12868,12 @@ "comment": " the c-string" }, "description": "

Format a git_oid into a statically allocated c-string.

\n", - "comments": "

The c-string is owned by the library and should not be freed\n by the user. If libgit2 is built with thread support, the string\n will be stored in TLS (i.e. one buffer per thread) to allow for\n concurrent calls of the function.

\n", + "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/v0.28.0/merge.html#git_oid_tostr_s-21", - "ex/v0.28.0/merge.html#git_oid_tostr_s-22" + "ex/HEAD/merge.html#git_oid_tostr_s-19", + "ex/HEAD/merge.html#git_oid_tostr_s-20" ] } }, @@ -13115,29 +12906,29 @@ "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\n oid c-string will be truncated to n-1 characters (but will still be\n NUL-byte terminated).

\n\n

If there are any input parameter errors (out == NULL, n == 0, oid ==\n NULL), then a pointer to an empty string is returned, so that the\n return value can always be printed.

\n", + "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\n

If 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/v0.28.0/blame.html#git_oid_tostr-18", - "ex/v0.28.0/blame.html#git_oid_tostr-19" + "ex/HEAD/blame.html#git_oid_tostr-16", + "ex/HEAD/blame.html#git_oid_tostr-17" ], "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_oid_tostr-26", - "ex/v0.28.0/cat-file.html#git_oid_tostr-27", - "ex/v0.28.0/cat-file.html#git_oid_tostr-28", - "ex/v0.28.0/cat-file.html#git_oid_tostr-29", - "ex/v0.28.0/cat-file.html#git_oid_tostr-30" + "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" ], "log.c": [ - "ex/v0.28.0/log.html#git_oid_tostr-40", - "ex/v0.28.0/log.html#git_oid_tostr-41" + "ex/HEAD/log.html#git_oid_tostr-38", + "ex/HEAD/log.html#git_oid_tostr-39" ], "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_oid_tostr-12", - "ex/v0.28.0/rev-parse.html#git_oid_tostr-13", - "ex/v0.28.0/rev-parse.html#git_oid_tostr-14", - "ex/v0.28.0/rev-parse.html#git_oid_tostr-15" + "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" ] } }, @@ -13169,9 +12960,9 @@ "group": "oid", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_oid_cpy-20", - "ex/v0.28.0/blame.html#git_oid_cpy-21", - "ex/v0.28.0/blame.html#git_oid_cpy-22" + "ex/HEAD/blame.html#git_oid_cpy-18", + "ex/HEAD/blame.html#git_oid_cpy-19", + "ex/HEAD/blame.html#git_oid_cpy-20" ] } }, @@ -13315,7 +13106,7 @@ "comments": "", "group": "oid" }, - "git_oid_iszero": { + "git_oid_is_zero": { "type": "function", "file": "git2/oid.h", "line": 210, @@ -13338,10 +13129,10 @@ "group": "oid", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_oid_iszero-23" + "ex/HEAD/blame.html#git_oid_is_zero-21" ], - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_oid_iszero-3" + "fetch.c": [ + "ex/HEAD/fetch.html#git_oid_is_zero-3" ] } }, @@ -13364,7 +13155,7 @@ "comment": " a `git_oid_shorten` instance, NULL if OOM" }, "description": "

Create a new OID shortener.

\n", - "comments": "

The OID shortener is used to process a list of OIDs\n in text form and return the shortest length that would\n uniquely identify all of them.

\n\n

E.g. look at the result of git log --abbrev.

\n", + "comments": "

The OID shortener is used to process a list of OIDs in text form and return the shortest length that would uniquely identify all of them.

\n\n

E.g. look at the result of git log --abbrev.

\n", "group": "oid" }, "git_oid_shorten_add": { @@ -13391,7 +13182,7 @@ "comment": " the minimal length to uniquely identify all OIDs\n\t\tadded so far to the set; or an error code (\n<\n0) if an\n\t\terror occurs." }, "description": "

Add a new OID to set of shortened OIDs and calculate\n the minimal length to uniquely identify all the OIDs in\n the set.

\n", - "comments": "

The OID is expected to be a 40-char hexadecimal string.\n The OID is owned by the user and will not be modified\n or freed.

\n\n

For performance reasons, there is a hard-limit of how many\n OIDs can be added to a single set (around ~32000, assuming\n a mostly randomized distribution), which should be enough\n for any kind of program, and keeps the algorithm fast and\n memory-efficient.

\n\n

Attempting to add more than those OIDs will result in a\n GIT_ERROR_INVALID error

\n", + "comments": "

The OID is expected to be a 40-char hexadecimal string. The OID is owned by the user and will not be modified or freed.

\n\n

For performance reasons, there is a hard-limit of how many OIDs can be added to a single set (around ~32000, assuming a mostly randomized distribution), which should be enough for any kind of program, and keeps the algorithm fast and memory-efficient.

\n\n

Attempting to add more than those OIDs will result in a GIT_ERROR_INVALID error

\n", "group": "oid" }, "git_oid_shorten_free": { @@ -13435,14 +13226,14 @@ "comment": null }, "description": "

Free the OID array

\n", - "comments": "

This method must (and must only) be called on git_oidarray\n objects where the array is allocated by the library. Not doing so,\n will result in a memory leak.

\n\n

This does not free the git_oidarray itself, since the library will\n never allocate that object directly itself (it is more commonly embedded\n inside another struct or created on the stack).

\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.

\n\n

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).

\n", "group": "oidarray" }, "git_packbuilder_new": { "type": "function", "file": "git2/pack.h", - "line": 64, - "lineto": 64, + "line": 65, + "lineto": 65, "args": [ { "name": "out", @@ -13468,8 +13259,8 @@ "git_packbuilder_set_threads": { "type": "function", "file": "git2/pack.h", - "line": 77, - "lineto": 77, + "line": 78, + "lineto": 78, "args": [ { "name": "pb", @@ -13489,14 +13280,14 @@ "comment": " number of actual threads to be used" }, "description": "

Set number of threads to spawn

\n", - "comments": "

By default, libgit2 won't spawn any threads at all;\n when set to 0, libgit2 will autodetect the number of\n CPUs.

\n", + "comments": "

By default, libgit2 won't spawn any threads at all; when set to 0, libgit2 will autodetect the number of CPUs.

\n", "group": "packbuilder" }, "git_packbuilder_insert": { "type": "function", "file": "git2/pack.h", - "line": 91, - "lineto": 91, + "line": 92, + "lineto": 92, "args": [ { "name": "pb", @@ -13521,14 +13312,14 @@ "comment": " 0 or an error code" }, "description": "

Insert a single object

\n", - "comments": "

For an optimal pack it's mandatory to insert objects in recency order,\n commits followed by trees and blobs.

\n", + "comments": "

For an optimal pack it's mandatory to insert objects in recency order, commits followed by trees and blobs.

\n", "group": "packbuilder" }, "git_packbuilder_insert_tree": { "type": "function", "file": "git2/pack.h", - "line": 103, - "lineto": 103, + "line": 104, + "lineto": 104, "args": [ { "name": "pb", @@ -13554,8 +13345,8 @@ "git_packbuilder_insert_commit": { "type": "function", "file": "git2/pack.h", - "line": 115, - "lineto": 115, + "line": 116, + "lineto": 116, "args": [ { "name": "pb", @@ -13581,8 +13372,8 @@ "git_packbuilder_insert_walk": { "type": "function", "file": "git2/pack.h", - "line": 128, - "lineto": 128, + "line": 129, + "lineto": 129, "args": [ { "name": "pb", @@ -13602,14 +13393,14 @@ "comment": " 0 or an error code" }, "description": "

Insert objects as given by the walk

\n", - "comments": "

Those commits and all objects they reference will be inserted into\n the packbuilder.

\n", + "comments": "

Those commits and all objects they reference will be inserted into the packbuilder.

\n", "group": "packbuilder" }, "git_packbuilder_insert_recur": { "type": "function", "file": "git2/pack.h", - "line": 140, - "lineto": 140, + "line": 141, + "lineto": 141, "args": [ { "name": "pb", @@ -13640,8 +13431,8 @@ "git_packbuilder_write_buf": { "type": "function", "file": "git2/pack.h", - "line": 151, - "lineto": 151, + "line": 152, + "lineto": 152, "args": [ { "name": "buf", @@ -13661,14 +13452,14 @@ "comment": null }, "description": "

Write the contents of the packfile to an in-memory buffer

\n", - "comments": "

The contents of the buffer will become a valid packfile, even though there\n will be no attached index

\n", + "comments": "

The contents of the buffer will become a valid packfile, even though there will be no attached index

\n", "group": "packbuilder" }, "git_packbuilder_write": { "type": "function", "file": "git2/pack.h", - "line": 164, - "lineto": 169, + "line": 165, + "lineto": 170, "args": [ { "name": "pb", @@ -13687,7 +13478,7 @@ }, { "name": "progress_cb", - "type": "git_transfer_progress_cb", + "type": "git_indexer_progress_cb", "comment": "function to call with progress information from the indexer (optional)" }, { @@ -13696,8 +13487,8 @@ "comment": "payload for the progress callback (optional)" } ], - "argline": "git_packbuilder *pb, const char *path, unsigned int mode, git_transfer_progress_cb progress_cb, void *progress_cb_payload", - "sig": "git_packbuilder *::const char *::unsigned int::git_transfer_progress_cb::void *", + "argline": "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" @@ -13709,8 +13500,8 @@ "git_packbuilder_hash": { "type": "function", "file": "git2/pack.h", - "line": 179, - "lineto": 179, + "line": 180, + "lineto": 180, "args": [ { "name": "pb", @@ -13725,14 +13516,14 @@ "comment": null }, "description": "

Get the packfile's hash

\n", - "comments": "

A packfile's name is derived from the sorted hashing of all object\n names. This is only correct after the packfile has been written.

\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_foreach": { "type": "function", "file": "git2/pack.h", - "line": 191, - "lineto": 191, + "line": 202, + "lineto": 202, "args": [ { "name": "pb", @@ -13763,8 +13554,8 @@ "git_packbuilder_object_count": { "type": "function", "file": "git2/pack.h", - "line": 199, - "lineto": 199, + "line": 210, + "lineto": 210, "args": [ { "name": "pb", @@ -13785,8 +13576,8 @@ "git_packbuilder_written": { "type": "function", "file": "git2/pack.h", - "line": 207, - "lineto": 207, + "line": 218, + "lineto": 218, "args": [ { "name": "pb", @@ -13807,8 +13598,8 @@ "git_packbuilder_set_callbacks": { "type": "function", "file": "git2/pack.h", - "line": 226, - "lineto": 229, + "line": 237, + "lineto": 240, "args": [ { "name": "pb", @@ -13839,8 +13630,8 @@ "git_packbuilder_free": { "type": "function", "file": "git2/pack.h", - "line": 236, - "lineto": 236, + "line": 247, + "lineto": 247, "args": [ { "name": "pb", @@ -13887,7 +13678,7 @@ "comment": " 0 on success, other value \n<\n 0 on error" }, "description": "

Return a patch for an entry in the diff list.

\n", - "comments": "

The git_patch is a newly created object contains the text diffs\n for the delta. You have to call git_patch_free() when you are\n done with it. You can use the patch object to loop over all the hunks\n and lines in the diff of the one delta.

\n\n

For an unchanged file or a binary file, no git_patch will be\n created, the output will be set to NULL, and the binary flag will be\n set true in the git_diff_delta structure.

\n\n

It is okay to pass NULL for either of the output parameters; if you pass\n NULL for the git_patch, then the text diff will not be calculated.

\n", + "comments": "

The git_patch is a newly created object contains the text diffs for the delta. You have to call git_patch_free() when you are done with it. You can use the patch object to loop over all the hunks and lines in the diff of the one delta.

\n\n

For an unchanged file or a binary file, no git_patch will be created, the output will be set to NULL, and the binary flag will be set true in the git_diff_delta structure.

\n\n

It is okay to pass NULL for either of the output parameters; if you pass NULL for the git_patch, then the text diff will not be calculated.

\n", "group": "patch" }, "git_patch_from_blobs": { @@ -13934,7 +13725,7 @@ "comment": " 0 on success or error code \n<\n 0" }, "description": "

Directly generate a patch from the difference between two blobs.

\n", - "comments": "

This is just like git_diff_blobs() except it generates a patch object\n for the difference instead of directly making callbacks. You can use the\n standard git_patch accessor functions to read the patch data, and\n you must call git_patch_free() on the patch when done.

\n", + "comments": "

This is just like git_diff_blobs() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", "group": "patch" }, "git_patch_from_blob_and_buffer": { @@ -13986,7 +13777,7 @@ "comment": " 0 on success or error code \n<\n 0" }, "description": "

Directly generate a patch from the difference between a blob and a buffer.

\n", - "comments": "

This is just like git_diff_blob_to_buffer() except it generates a patch\n object for the difference instead of directly making callbacks. You can\n use the standard git_patch accessor functions to read the patch\n data, and you must call git_patch_free() on the patch when done.

\n", + "comments": "

This is just like git_diff_blob_to_buffer() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", "group": "patch" }, "git_patch_from_buffers": { @@ -14043,7 +13834,7 @@ "comment": " 0 on success or error code \n<\n 0" }, "description": "

Directly generate a patch from the difference between two buffers.

\n", - "comments": "

This is just like git_diff_buffers() except it generates a patch\n object for the difference instead of directly making callbacks. You can\n use the standard git_patch accessor functions to read the patch\n data, and you must call git_patch_free() on the patch when done.

\n", + "comments": "

This is just like git_diff_buffers() except it generates a patch object for the difference instead of directly making callbacks. You can use the standard git_patch accessor functions to read the patch data, and you must call git_patch_free() on the patch when done.

\n", "group": "patch" }, "git_patch_free": { @@ -14146,7 +13937,7 @@ "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,\n you only need the total_additions and total_deletions values, but we\n include the total_context line count in case you want the total number\n of lines of diff output that will be generated.

\n\n

All outputs are optional. Pass NULL if you don't need a particular count.

\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.

\n\n

All outputs are optional. Pass NULL if you don't need a particular count.

\n", "group": "patch" }, "git_patch_get_hunk": { @@ -14183,7 +13974,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if hunk_idx out of range, \n<\n0 on error" }, "description": "

Get the information about a hunk in a patch

\n", - "comments": "

Given a patch and a hunk index into the patch, this returns detailed\n information about that hunk. Any of the output pointers can be passed\n as NULL if you don't care about that particular piece of information.

\n", + "comments": "

Given a patch and a hunk index into the patch, this returns detailed information about that hunk. Any of the output pointers can be passed as NULL if you don't care about that particular piece of information.

\n", "group": "patch" }, "git_patch_num_lines_in_hunk": { @@ -14247,7 +14038,7 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Get data about a line in a hunk of a patch.

\n", - "comments": "

Given a patch, a hunk index, and a line index in the hunk, this\n will return a lot of details about that line. If you pass a hunk\n index larger than the number of hunks or a line index larger than\n the number of lines in the hunk, this will return -1.

\n", + "comments": "

Given a patch, a hunk index, and a line index in the hunk, this will return a lot of details about that line. If you pass a hunk index larger than the number of hunks or a line index larger than the number of lines in the hunk, this will return -1.

\n", "group": "patch" }, "git_patch_size": { @@ -14284,7 +14075,7 @@ "comment": " The number of bytes of data" }, "description": "

Look up size of patch diff data in bytes

\n", - "comments": "

This returns the raw size of the patch data. This only includes the\n actual data from the lines of the diff, not the file or hunk headers.

\n\n

If you pass include_context as true (non-zero), this will be the size\n of all of the diff output; if you pass it as false (zero), this will\n only include the actual changed lines (as if context_lines was 0).

\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\n

If 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).

\n", "group": "patch" }, "git_patch_print": { @@ -14316,7 +14107,7 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Serialize the patch to text via callback.

\n", - "comments": "

Returning a non-zero value from the callback will terminate the iteration\n and return that value to the caller.

\n", + "comments": "

Returning a non-zero value from the callback will terminate the iteration and return that value to the caller.

\n", "group": "patch" }, "git_patch_to_buf": { @@ -14374,7 +14165,7 @@ "group": "pathspec", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_pathspec_new-42" + "ex/HEAD/log.html#git_pathspec_new-40" ] } }, @@ -14401,7 +14192,7 @@ "group": "pathspec", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_pathspec_free-43" + "ex/HEAD/log.html#git_pathspec_free-41" ] } }, @@ -14414,27 +14205,27 @@ { "name": "ps", "type": "const git_pathspec *", - "comment": null + "comment": "The compiled pathspec" }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" }, { "name": "path", "type": "const char *", - "comment": null + "comment": "The pathname to attempt to match" } ], - "argline": "const git_pathspec *ps, int flags, const char *path", - "sig": "const git_pathspec *::int::const char *", + "argline": "const git_pathspec *ps, uint32_t flags, const char *path", + "sig": "const git_pathspec *::uint32_t::const char *", "return": { "type": "int", - "comment": null + "comment": " 1 is path matches spec, 0 if it does not" }, - "description": "", - "comments": "", + "description": "

Try to match a path against a pathspec

\n", + "comments": "

Unlike most of the other pathspec matching functions, this will not fall back on the native case-sensitivity for your platform. You must explicitly pass flags to control case sensitivity or else this will fall back on being case sensitive.

\n", "group": "pathspec" }, "git_pathspec_match_workdir": { @@ -14446,32 +14237,32 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": null + "comment": "Output list of matches; pass NULL to just get return value" }, { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The repository in which to match; bare repo is an error" }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" }, { "name": "ps", "type": "git_pathspec *", - "comment": null + "comment": "Pathspec to be matched" } ], - "argline": "git_pathspec_match_list **out, git_repository *repo, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_repository *::int::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_repository *repo, uint32_t flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_repository *::uint32_t::git_pathspec *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag was given" }, - "description": "", - "comments": "", + "description": "

Match a pathspec against the working directory of a repository.

\n", + "comments": "

This matches the pathspec against the current files in the working directory of the repository. It is an error to invoke this on a bare repo. This handles git ignores (i.e. ignored files will not be considered to match the pathspec unless the file is tracked in the index).

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec" }, "git_pathspec_match_index": { @@ -14483,32 +14274,32 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": null + "comment": "Output list of matches; pass NULL to just get return value" }, { "name": "index", "type": "git_index *", - "comment": null + "comment": "The index to match against" }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" }, { "name": "ps", "type": "git_pathspec *", - "comment": null + "comment": "Pathspec to be matched" } ], - "argline": "git_pathspec_match_list **out, git_index *index, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_index *::int::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_index *index, uint32_t flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_index *::uint32_t::git_pathspec *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" }, - "description": "", - "comments": "", + "description": "

Match a pathspec against entries in an index.

\n", + "comments": "

This matches the pathspec against the files in the repository index.

\n\n

NOTE: At the moment, the case sensitivity of this match is controlled by the current case-sensitivity of the index object itself and the USE_CASE and IGNORE_CASE flags will have no effect. This behavior will be corrected in a future release.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec" }, "git_pathspec_match_tree": { @@ -14520,36 +14311,36 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": null + "comment": "Output list of matches; pass NULL to just get return value" }, { "name": "tree", "type": "git_tree *", - "comment": null + "comment": "The root-level tree to match against" }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" }, { "name": "ps", "type": "git_pathspec *", - "comment": null + "comment": "Pathspec to be matched" } ], - "argline": "git_pathspec_match_list **out, git_tree *tree, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_tree *::int::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_tree *tree, uint32_t flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_tree *::uint32_t::git_pathspec *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" }, - "description": "", - "comments": "", + "description": "

Match a pathspec against files in a tree.

\n", + "comments": "

This matches the pathspec against the files in the given tree.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_pathspec_match_tree-44" + "ex/HEAD/log.html#git_pathspec_match_tree-42" ] } }, @@ -14562,32 +14353,32 @@ { "name": "out", "type": "git_pathspec_match_list **", - "comment": null + "comment": "Output list of matches; pass NULL to just get return value" }, { "name": "diff", "type": "git_diff *", - "comment": null + "comment": "A generated diff list" }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Combination of git_pathspec_flag_t options to control match" }, { "name": "ps", "type": "git_pathspec *", - "comment": null + "comment": "Pathspec to be matched" } ], - "argline": "git_pathspec_match_list **out, git_diff *diff, int flags, git_pathspec *ps", - "sig": "git_pathspec_match_list **::git_diff *::int::git_pathspec *", + "argline": "git_pathspec_match_list **out, git_diff *diff, uint32_t flags, git_pathspec *ps", + "sig": "git_pathspec_match_list **::git_diff *::uint32_t::git_pathspec *", "return": { "type": "int", - "comment": null + "comment": " 0 on success, -1 on error, GIT_ENOTFOUND if no matches and\n the GIT_PATHSPEC_NO_MATCH_ERROR flag is used" }, - "description": "", - "comments": "", + "description": "

Match a pathspec against files in a diff list.

\n", + "comments": "

This matches the pathspec against the files in the given diff list.

\n\n

If out is not NULL, this returns a git_patchspec_match_list. That contains the list of all matched filenames (unless you pass the GIT_PATHSPEC_FAILURES_ONLY flag) and may also contain the list of pathspecs with no match (if you used the GIT_PATHSPEC_FIND_FAILURES flag). You must call git_pathspec_match_list_free() on this object.

\n", "group": "pathspec" }, "git_pathspec_match_list_free": { @@ -14658,7 +14449,7 @@ "comment": " The filename of the match" }, "description": "

Get a matching filename by position.

\n", - "comments": "

This routine cannot be used if the match list was generated by\n git_pathspec_match_diff. If so, it will always return NULL.

\n", + "comments": "

This routine cannot be used if the match list was generated by git_pathspec_match_diff. If so, it will always return NULL.

\n", "group": "pathspec" }, "git_pathspec_match_list_diff_entry": { @@ -14685,7 +14476,7 @@ "comment": " The filename of the match" }, "description": "

Get a matching diff delta by position.

\n", - "comments": "

This routine can only be used if the match list was generated by\n git_pathspec_match_diff. Otherwise it will always return NULL.

\n", + "comments": "

This routine can only be used if the match list was generated by git_pathspec_match_diff. Otherwise it will always return NULL.

\n", "group": "pathspec" }, "git_pathspec_match_list_failed_entrycount": { @@ -14707,7 +14498,7 @@ "comment": " Number of items in original pathspec that had no matches" }, "description": "

Get the number of pathspec items that did not match.

\n", - "comments": "

This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when\n generating the git_pathspec_match_list.

\n", + "comments": "

This will be zero unless you passed GIT_PATHSPEC_FIND_FAILURES when generating the git_pathspec_match_list.

\n", "group": "pathspec" }, "git_pathspec_match_list_failed_entry": { @@ -14737,7 +14528,7 @@ "comments": "

This will be return NULL for positions out of range.

\n", "group": "pathspec" }, - "git_proxy_init_options": { + "git_proxy_options_init": { "type": "function", "file": "git2/proxy.h", "line": 92, @@ -14761,10 +14552,10 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_proxy_options structure

\n", - "comments": "

Initializes a git_proxy_options with default values. Equivalent to\n creating an instance with GIT_PROXY_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_proxy_options with default values. Equivalent to creating an instance with GIT_PROXY_OPTIONS_INIT.

\n", "group": "proxy" }, - "git_rebase_init_options": { + "git_rebase_options_init": { "type": "function", "file": "git2/rebase.h", "line": 159, @@ -14788,7 +14579,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_rebase_options structure

\n", - "comments": "

Initializes a git_rebase_options with default values. Equivalent to\n creating an instance with GIT_REBASE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_rebase_options with default values. Equivalent to creating an instance with GIT_REBASE_OPTIONS_INIT.

\n", "group": "rebase" }, "git_rebase_init": { @@ -14870,11 +14661,99 @@ "comments": "", "group": "rebase" }, + "git_rebase_orig_head_name": { + "type": "function", + "file": "git2/rebase.h", + "line": 207, + "lineto": 207, + "args": [ + { + "name": "rebase", + "type": "git_rebase *", + "comment": null + } + ], + "argline": "git_rebase *rebase", + "sig": "git_rebase *", + "return": { + "type": "const char *", + "comment": " The original `HEAD` ref name" + }, + "description": "

Gets the original HEAD ref name for merge rebases.

\n", + "comments": "", + "group": "rebase" + }, + "git_rebase_orig_head_id": { + "type": "function", + "file": "git2/rebase.h", + "line": 214, + "lineto": 214, + "args": [ + { + "name": "rebase", + "type": "git_rebase *", + "comment": null + } + ], + "argline": "git_rebase *rebase", + "sig": "git_rebase *", + "return": { + "type": "const git_oid *", + "comment": " The original `HEAD` id" + }, + "description": "

Gets the original HEAD id for merge rebases.

\n", + "comments": "", + "group": "rebase" + }, + "git_rebase_onto_name": { + "type": "function", + "file": "git2/rebase.h", + "line": 221, + "lineto": 221, + "args": [ + { + "name": "rebase", + "type": "git_rebase *", + "comment": null + } + ], + "argline": "git_rebase *rebase", + "sig": "git_rebase *", + "return": { + "type": "const char *", + "comment": " The `onto` ref name" + }, + "description": "

Gets the onto ref name for merge rebases.

\n", + "comments": "", + "group": "rebase" + }, + "git_rebase_onto_id": { + "type": "function", + "file": "git2/rebase.h", + "line": 228, + "lineto": 228, + "args": [ + { + "name": "rebase", + "type": "git_rebase *", + "comment": null + } + ], + "argline": "git_rebase *rebase", + "sig": "git_rebase *", + "return": { + "type": "const git_oid *", + "comment": " The `onto` id" + }, + "description": "

Gets the onto id for merge rebases.

\n", + "comments": "", + "group": "rebase" + }, "git_rebase_operation_entrycount": { "type": "function", "file": "git2/rebase.h", - "line": 208, - "lineto": 208, + "line": 236, + "lineto": 236, "args": [ { "name": "rebase", @@ -14895,8 +14774,8 @@ "git_rebase_operation_current": { "type": "function", "file": "git2/rebase.h", - "line": 219, - "lineto": 219, + "line": 247, + "lineto": 247, "args": [ { "name": "rebase", @@ -14917,8 +14796,8 @@ "git_rebase_operation_byindex": { "type": "function", "file": "git2/rebase.h", - "line": 228, - "lineto": 230, + "line": 256, + "lineto": 258, "args": [ { "name": "rebase", @@ -14944,8 +14823,8 @@ "git_rebase_next": { "type": "function", "file": "git2/rebase.h", - "line": 243, - "lineto": 245, + "line": 271, + "lineto": 273, "args": [ { "name": "operation", @@ -14971,8 +14850,8 @@ "git_rebase_inmemory_index": { "type": "function", "file": "git2/rebase.h", - "line": 258, - "lineto": 260, + "line": 286, + "lineto": 288, "args": [ { "name": "index", @@ -14992,14 +14871,14 @@ "comment": null }, "description": "

Gets the index produced by the last operation, which is the result\n of git_rebase_next and which will be committed by the next\n invocation of git_rebase_commit. This is useful for resolving\n conflicts in an in-memory rebase before committing them. You must\n call git_index_free when you are finished with this.

\n", - "comments": "

This is only applicable for in-memory rebases; for rebases within\n a working directory, the changes were applied to the repository's\n index.

\n", + "comments": "

This is only applicable for in-memory rebases; for rebases within a working directory, the changes were applied to the repository's index.

\n", "group": "rebase" }, "git_rebase_commit": { "type": "function", "file": "git2/rebase.h", - "line": 284, - "lineto": 290, + "line": 312, + "lineto": 318, "args": [ { "name": "id", @@ -15045,8 +14924,8 @@ "git_rebase_abort": { "type": "function", "file": "git2/rebase.h", - "line": 300, - "lineto": 300, + "line": 328, + "lineto": 328, "args": [ { "name": "rebase", @@ -15067,8 +14946,8 @@ "git_rebase_finish": { "type": "function", "file": "git2/rebase.h", - "line": 310, - "lineto": 312, + "line": 338, + "lineto": 340, "args": [ { "name": "rebase", @@ -15094,8 +14973,8 @@ "git_rebase_free": { "type": "function", "file": "git2/rebase.h", - "line": 319, - "lineto": 319, + "line": 347, + "lineto": 347, "args": [ { "name": "rebase", @@ -15137,7 +15016,7 @@ "comment": " 0 or an error code" }, "description": "

Create a new reference database with no backends.

\n", - "comments": "

Before the Ref DB can be used for read/writing, a custom database\n backend must be manually set using git_refdb_set_backend()

\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()

\n", "group": "refdb" }, "git_refdb_open": { @@ -15164,7 +15043,7 @@ "comment": " 0 or an error code" }, "description": "

Create a new reference database and automatically add\n the default backends:

\n", - "comments": "
    \n
  • git_refdb_dir: read and write loose and packed refs\n from disk, assuming the repository dir as the folder
  • \n
\n", + "comments": "
    \n
  • git_refdb_dir: read and write loose and packed refs from disk, assuming the repository dir as the folder
  • \n
\n", "group": "refdb" }, "git_refdb_compress": { @@ -15240,7 +15119,7 @@ "comment": " 0 or an error code" }, "description": "

Read the reflog for the given reference

\n", - "comments": "

If there is no reflog file for the given\n reference yet, an empty reflog object will\n be returned.

\n\n

The reflog must be freed manually by using\n git_reflog_free().

\n", + "comments": "

If there is no reflog file for the given reference yet, an empty reflog object will be returned.

\n\n

The reflog must be freed manually by using git_reflog_free().

\n", "group": "reflog" }, "git_reflog_write": { @@ -15331,7 +15210,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" }, "description": "

Rename a reflog

\n", - "comments": "

The reflog to be renamed is expected to already exist

\n\n

The new name will be checked for validity.\n See git_reference_create_symbolic() for rules about valid names.

\n", + "comments": "

The reflog to be renamed is expected to already exist

\n\n

The new name will be checked for validity. See git_reference_create_symbolic() for rules about valid names.

\n", "group": "reflog" }, "git_reflog_delete": { @@ -15407,7 +15286,7 @@ "comment": " the entry; NULL if not found" }, "description": "

Lookup an entry by its index

\n", - "comments": "

Requesting the reflog entry with an index of 0 (zero) will\n return the most recently created entry.

\n", + "comments": "

Requesting the reflog entry with an index of 0 (zero) will return the most recently created entry.

\n", "group": "reflog" }, "git_reflog_drop": { @@ -15439,7 +15318,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if the entry doesn't exist\n or an error code." }, "description": "

Remove an entry from the reflog by its index

\n", - "comments": "

To ensure there's no gap in the log history, set rewrite_previous_entry\n param value to 1. When deleting entry n, member old_oid of entry n-1\n (if any) will be updated with the value of member new_oid of entry n+1.

\n", + "comments": "

To ensure there's no gap in the log history, set rewrite_previous_entry param value to 1. When deleting entry n, member old_oid of entry n-1 (if any) will be updated with the value of member new_oid of entry n+1.

\n", "group": "reflog" }, "git_reflog_entry_id_old": { @@ -15581,14 +15460,14 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code." }, "description": "

Lookup a reference by name in a repository.

\n", - "comments": "

The returned reference must be freed by the user.

\n\n

The name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n", + "comments": "

The returned reference must be freed by the user.

\n\n

The name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_reference_lookup-62" + "ex/HEAD/general.html#git_reference_lookup-62" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_lookup-23" + "ex/HEAD/merge.html#git_reference_lookup-21" ] } }, @@ -15621,7 +15500,7 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code." }, "description": "

Lookup a reference by name and resolve immediately to OID.

\n", - "comments": "

This function provides a quick way to resolve a reference name straight\n through to the object id that it refers to. This avoids having to\n allocate or free any git_reference objects for simple situations.

\n\n

The name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n", + "comments": "

This function provides a quick way to resolve a reference name straight through to the object id that it refers to. This avoids having to allocate or free any git_reference objects for simple situations.

\n\n

The name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference" }, "git_reference_dwim": { @@ -15653,11 +15532,11 @@ "comment": " 0 or an error code" }, "description": "

Lookup a reference by DWIMing its short name

\n", - "comments": "

Apply the git precendence rules to the given shorthand to determine\n which reference the user is referring to.

\n", + "comments": "

Apply the git precendence rules to the given shorthand to determine which reference the user is referring to.

\n", "group": "reference", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_dwim-24" + "ex/HEAD/merge.html#git_reference_dwim-22" ] } }, @@ -15710,7 +15589,7 @@ "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\n reference name. If the other name moves, the symbolic name will move,\n too. As a simple example, the "HEAD" reference might refer to\n "refs/heads/master" while on the "master" branch of a repository.

\n\n

The symbolic reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and it does not have a reflog.

\n\n

It will return GIT_EMODIFIED if the reference's value at the time\n of updating does not match the one passed through current_value\n (i.e. if the ref has changed since the user read it).

\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\n

The symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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\n

It 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).

\n", "group": "reference" }, "git_reference_symbolic_create": { @@ -15757,7 +15636,7 @@ "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" }, "description": "

Create a new symbolic reference.

\n", - "comments": "

A symbolic reference is a reference name that refers to another\n reference name. If the other name moves, the symbolic name will move,\n too. As a simple example, the "HEAD" reference might refer to\n "refs/heads/master" while on the "master" branch of a repository.

\n\n

The symbolic reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and it does not have a reflog.

\n", + "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\n

The symbolic reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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_create": { @@ -15804,11 +15683,11 @@ "comment": " 0 on success, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" }, "description": "

Create a new direct reference.

\n", - "comments": "

A direct reference (also called an object id reference) refers directly\n to a specific object id (a.k.a. OID or SHA) in the repository. The id\n permanently refers to the object (although the reference itself can be\n moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\n refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.

\n\n

The direct reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.

\n", + "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\n

The direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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", "group": "reference", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_create-25" + "ex/HEAD/merge.html#git_reference_create-23" ] } }, @@ -15861,7 +15740,7 @@ "comment": " 0 on success, GIT_EMODIFIED if the value of the reference\n has changed, GIT_EEXISTS, GIT_EINVALIDSPEC or an error code" }, "description": "

Conditionally create new direct reference

\n", - "comments": "

A direct reference (also called an object id reference) refers directly\n to a specific object id (a.k.a. OID or SHA) in the repository. The id\n permanently refers to the object (although the reference itself can be\n moved). For example, in libgit2 the direct ref "refs/tags/v0.17.0"\n refers to OID 5b9fac39d8a76b9139667c26a63e6b3f204b3977.

\n\n

The direct reference will be created in the repository and written to\n the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n\n

This function will return an error if a reference already exists with the\n given name unless force is true, in which case it will be overwritten.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.

\n\n

It will return GIT_EMODIFIED if the reference's value at the time\n of updating does not match the one passed through current_id\n (i.e. if the ref has changed since the user read it).

\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\n

The direct reference will be created in the repository and written to the disk. The generated reference object must be freed by the user.

\n\n

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n\n

This 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.

\n\n

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\n

It 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).

\n", "group": "reference" }, "git_reference_target": { @@ -15883,11 +15762,11 @@ "comment": " a pointer to the oid if available, NULL otherwise" }, "description": "

Get the OID pointed to by a direct reference.

\n", - "comments": "

Only available if the reference is direct (i.e. an object id reference,\n not a symbolic one).

\n\n

To find the OID of a symbolic ref, call git_reference_resolve() and\n then this function (or maybe use git_reference_name_to_id() to\n directly resolve a reference name all the way through to an OID).

\n", + "comments": "

Only available if the reference is direct (i.e. an object id reference, not a symbolic one).

\n\n

To 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).

\n", "group": "reference", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_reference_target-63" + "ex/HEAD/general.html#git_reference_target-63" ] } }, @@ -15910,7 +15789,7 @@ "comment": " a pointer to the oid if available, NULL otherwise" }, "description": "

Return the peeled OID target of this reference.

\n", - "comments": "

This peeled OID only applies to direct references that point to\n a hard Tag object: it is the result of peeling such Tag.

\n", + "comments": "

This peeled OID only applies to direct references that point to a hard Tag object: it is the result of peeling such Tag.

\n", "group": "reference" }, "git_reference_symbolic_target": { @@ -15936,10 +15815,10 @@ "group": "reference", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_reference_symbolic_target-64" + "ex/HEAD/general.html#git_reference_symbolic_target-64" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_symbolic_target-26" + "ex/HEAD/merge.html#git_reference_symbolic_target-24" ] } }, @@ -15966,7 +15845,7 @@ "group": "reference", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_reference_type-65" + "ex/HEAD/general.html#git_reference_type-65" ] } }, @@ -15993,7 +15872,7 @@ "group": "reference", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_name-27" + "ex/HEAD/merge.html#git_reference_name-25" ] } }, @@ -16021,7 +15900,7 @@ "comment": " 0 or an error code" }, "description": "

Resolve a symbolic reference to a direct reference.

\n", - "comments": "

This method iteratively peels a symbolic reference until it resolves to\n a direct reference to an OID.

\n\n

The peeled reference is returned in the resolved_ref argument, and\n must be freed manually once it's no longer needed.

\n\n

If a direct reference is passed as an argument, a copy of that\n reference is returned. This copy must be manually freed too.

\n", + "comments": "

This method iteratively peels a symbolic reference until it resolves to a direct reference to an OID.

\n\n

The peeled reference is returned in the resolved_ref argument, and must be freed manually once it's no longer needed.

\n\n

If a direct reference is passed as an argument, a copy of that reference is returned. This copy must be manually freed too.

\n", "group": "reference" }, "git_reference_owner": { @@ -16080,7 +15959,7 @@ "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\n

The target name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n\n

The message for the reflog will be ignored if the reference does\n not belong in the standard set (HEAD, branches and remote-tracking\n branches) and and it does not have a reflog.

\n", + "comments": "

The new reference will be written to disk, overwriting the given reference.

\n\n

The target name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n\n

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", "group": "reference" }, "git_reference_set_target": { @@ -16121,7 +16000,7 @@ "group": "reference", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_set_target-28" + "ex/HEAD/merge.html#git_reference_set_target-26" ] } }, @@ -16164,7 +16043,7 @@ "comment": " 0 on success, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, "description": "

Rename an existing reference.

\n", - "comments": "

This method works for both direct and symbolic references.

\n\n

The new name will be checked for validity.\n See git_reference_symbolic_create() for rules about valid names.

\n\n

If the force flag is not enabled, and there's already\n a reference with the given name, the renaming will fail.

\n\n

IMPORTANT:\n The user needs to write a proper reflog entry if the\n reflog is enabled for the repository. We only rename\n the reflog if it exists.

\n", + "comments": "

This method works for both direct and symbolic references.

\n\n

The new name will be checked for validity. See git_reference_symbolic_create() for rules about valid names.

\n\n

If the force flag is not enabled, and there's already a reference with the given name, the renaming will fail.

\n\n

IMPORTANT: The user needs to write a proper reflog entry if the reflog is enabled for the repository. We only rename the reflog if it exists.

\n", "group": "reference" }, "git_reference_delete": { @@ -16186,7 +16065,7 @@ "comment": " 0, GIT_EMODIFIED or an error code" }, "description": "

Delete an existing reference.

\n", - "comments": "

This method works for both direct and symbolic references. The reference\n will be immediately removed on disk but the memory will not be freed.\n Callers must call git_reference_free.

\n\n

This function will return an error if the reference has changed\n from the time it was looked up.

\n", + "comments": "

This method works for both direct and symbolic references. The reference will be immediately removed on disk but the memory will not be freed. Callers must call git_reference_free.

\n\n

This function will return an error if the reference has changed from the time it was looked up.

\n", "group": "reference" }, "git_reference_remove": { @@ -16213,7 +16092,7 @@ "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\n looking at its old value.

\n", + "comments": "

This method removes the named reference from the repository without looking at its old value.

\n", "group": "reference" }, "git_reference_list": { @@ -16240,19 +16119,19 @@ "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\n values are owned by the user and should be free'd manually when no\n longer needed, using git_strarray_free().

\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().

\n", "group": "reference", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_reference_list-66" + "ex/HEAD/general.html#git_reference_list-66" ] } }, "git_reference_foreach": { "type": "function", "file": "git2/refs.h", - "line": 444, - "lineto": 447, + "line": 463, + "lineto": 466, "args": [ { "name": "repo", @@ -16277,14 +16156,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Perform a callback on each reference in the repository.

\n", - "comments": "

The callback function will be called for each reference in the\n repository, receiving the reference object and the payload value\n passed to this method. Returning a non-zero value from the callback\n will terminate the iteration.

\n\n

Note that the callback function is responsible to call git_reference_free\n on each reference passed to it.

\n", + "comments": "

The callback function will be called for each reference in the repository, receiving the reference object and the payload value passed to this method. Returning a non-zero value from the callback will terminate the iteration.

\n\n

Note that the callback function is responsible to call git_reference_free on each reference passed to it.

\n", "group": "reference" }, "git_reference_foreach_name": { "type": "function", "file": "git2/refs.h", - "line": 462, - "lineto": 465, + "line": 481, + "lineto": 484, "args": [ { "name": "repo", @@ -16309,14 +16188,14 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Perform a callback on the fully-qualified name of each reference.

\n", - "comments": "

The callback function will be called for each reference in the\n repository, receiving the name of the reference and the payload value\n passed to this method. Returning a non-zero value from the callback\n will terminate the iteration.

\n", + "comments": "

The callback function will be called for each reference in the repository, receiving the name of the reference and the payload value passed to this method. Returning a non-zero value from the callback will terminate the iteration.

\n", "group": "reference" }, "git_reference_dup": { "type": "function", "file": "git2/refs.h", - "line": 476, - "lineto": 476, + "line": 495, + "lineto": 495, "args": [ { "name": "dest", @@ -16342,8 +16221,8 @@ "git_reference_free": { "type": "function", "file": "git2/refs.h", - "line": 483, - "lineto": 483, + "line": 502, + "lineto": 502, "args": [ { "name": "ref", @@ -16362,23 +16241,23 @@ "group": "reference", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_reference_free-67" + "ex/HEAD/general.html#git_reference_free-67" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_free-29", - "ex/v0.28.0/merge.html#git_reference_free-30", - "ex/v0.28.0/merge.html#git_reference_free-31" + "ex/HEAD/merge.html#git_reference_free-27", + "ex/HEAD/merge.html#git_reference_free-28", + "ex/HEAD/merge.html#git_reference_free-29" ], "status.c": [ - "ex/v0.28.0/status.html#git_reference_free-3" + "ex/HEAD/status.html#git_reference_free-1" ] } }, "git_reference_cmp": { "type": "function", "file": "git2/refs.h", - "line": 492, - "lineto": 494, + "line": 511, + "lineto": 513, "args": [ { "name": "ref1", @@ -16404,8 +16283,8 @@ "git_reference_iterator_new": { "type": "function", "file": "git2/refs.h", - "line": 503, - "lineto": 505, + "line": 522, + "lineto": 524, "args": [ { "name": "out", @@ -16431,8 +16310,8 @@ "git_reference_iterator_glob_new": { "type": "function", "file": "git2/refs.h", - "line": 516, - "lineto": 519, + "line": 535, + "lineto": 538, "args": [ { "name": "out", @@ -16463,8 +16342,8 @@ "git_reference_next": { "type": "function", "file": "git2/refs.h", - "line": 528, - "lineto": 528, + "line": 547, + "lineto": 547, "args": [ { "name": "out", @@ -16490,8 +16369,8 @@ "git_reference_next_name": { "type": "function", "file": "git2/refs.h", - "line": 541, - "lineto": 541, + "line": 560, + "lineto": 560, "args": [ { "name": "out", @@ -16511,14 +16390,14 @@ "comment": " 0, GIT_ITEROVER if there are no more; or an error code" }, "description": "

Get the next reference's name

\n", - "comments": "

This function is provided for convenience in case only the names\n are interesting as it avoids the allocation of the git_reference\n object which git_reference_next() needs.

\n", + "comments": "

This function is provided for convenience in case only the names are interesting as it avoids the allocation of the git_reference object which git_reference_next() needs.

\n", "group": "reference" }, "git_reference_iterator_free": { "type": "function", "file": "git2/refs.h", - "line": 548, - "lineto": 548, + "line": 567, + "lineto": 567, "args": [ { "name": "iter", @@ -16539,8 +16418,8 @@ "git_reference_foreach_glob": { "type": "function", "file": "git2/refs.h", - "line": 568, - "lineto": 572, + "line": 587, + "lineto": 591, "args": [ { "name": "repo", @@ -16570,14 +16449,14 @@ "comment": " 0 on success, GIT_EUSER on non-zero callback, or error code" }, "description": "

Perform a callback on each reference in the repository whose name\n matches the given pattern.

\n", - "comments": "

This function acts like git_reference_foreach() with an additional\n pattern match being applied to the reference name before issuing the\n callback function. See that function for more information.

\n\n

The pattern is matched using fnmatch or "glob" style where a '*' matches\n any sequence of letters, a '?' matches any letter, and square brackets\n can be used to define character ranges (such as "[0-9]" for digits).

\n", + "comments": "

This function acts like git_reference_foreach() with an additional pattern match being applied to the reference name before issuing the callback function. See that function for more information.

\n\n

The pattern is matched using fnmatch or "glob" style where a '*' matches any sequence of letters, a '?' matches any letter, and square brackets can be used to define character ranges (such as "[0-9]" for digits).

\n", "group": "reference" }, "git_reference_has_log": { "type": "function", "file": "git2/refs.h", - "line": 582, - "lineto": 582, + "line": 601, + "lineto": 601, "args": [ { "name": "repo", @@ -16603,8 +16482,8 @@ "git_reference_ensure_log": { "type": "function", "file": "git2/refs.h", - "line": 594, - "lineto": 594, + "line": 613, + "lineto": 613, "args": [ { "name": "repo", @@ -16624,14 +16503,14 @@ "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\n its log.

\n", + "comments": "

Make sure that successive updates to the reference will append to its log.

\n", "group": "reference" }, "git_reference_is_branch": { "type": "function", "file": "git2/refs.h", - "line": 604, - "lineto": 604, + "line": 623, + "lineto": 623, "args": [ { "name": "ref", @@ -16652,8 +16531,8 @@ "git_reference_is_remote": { "type": "function", "file": "git2/refs.h", - "line": 614, - "lineto": 614, + "line": 633, + "lineto": 633, "args": [ { "name": "ref", @@ -16674,8 +16553,8 @@ "git_reference_is_tag": { "type": "function", "file": "git2/refs.h", - "line": 624, - "lineto": 624, + "line": 643, + "lineto": 643, "args": [ { "name": "ref", @@ -16696,8 +16575,8 @@ "git_reference_is_note": { "type": "function", "file": "git2/refs.h", - "line": 634, - "lineto": 634, + "line": 653, + "lineto": 653, "args": [ { "name": "ref", @@ -16718,8 +16597,8 @@ "git_reference_normalize_name": { "type": "function", "file": "git2/refs.h", - "line": 690, - "lineto": 694, + "line": 709, + "lineto": 713, "args": [ { "name": "buffer_out", @@ -16749,14 +16628,14 @@ "comment": " 0 on success, GIT_EBUFS if buffer is too small, GIT_EINVALIDSPEC\n or an error code." }, "description": "

Normalize reference name and check validity.

\n", - "comments": "

This will normalize the reference name by removing any leading slash\n '/' characters and collapsing runs of adjacent slashes between name\n components into a single slash.

\n\n

Once normalized, if the reference name is valid, it will be returned in\n the user allocated buffer.

\n\n

See git_reference_symbolic_create() for rules about valid names.

\n", + "comments": "

This will normalize the reference name by removing any leading slash '/' characters and collapsing runs of adjacent slashes between name components into a single slash.

\n\n

Once normalized, if the reference name is valid, it will be returned in the user allocated buffer.

\n\n

See git_reference_symbolic_create() for rules about valid names.

\n", "group": "reference" }, "git_reference_peel": { "type": "function", "file": "git2/refs.h", - "line": 711, - "lineto": 714, + "line": 730, + "lineto": 733, "args": [ { "name": "out", @@ -16781,19 +16660,19 @@ "comment": " 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code" }, "description": "

Recursively peel reference until object of the specified type is found.

\n", - "comments": "

The retrieved peeled object is owned by the repository\n and should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object\n will be peeled until a non-tag object is met.

\n", + "comments": "

The retrieved peeled object is owned by the repository and should be closed with the git_object_free method.

\n\n

If you pass GIT_OBJECT_ANY as the target type, then the object will be peeled until a non-tag object is met.

\n", "group": "reference", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_reference_peel-32" + "ex/HEAD/merge.html#git_reference_peel-30" ] } }, "git_reference_is_valid_name": { "type": "function", "file": "git2/refs.h", - "line": 730, - "lineto": 730, + "line": 749, + "lineto": 749, "args": [ { "name": "refname", @@ -16808,14 +16687,14 @@ "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\n
    \n
  1. Top-level names must contain only capital letters and underscores,\nand must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD").
  2. \n
  3. Names prefixed with "refs/" can be almost anything. You must avoid\nthe characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\nsequences ".." and "\n@\n{" which have special meaning to revparse.
  4. \n
\n", + "comments": "

Valid reference names must follow one of two patterns:

\n\n
    \n
  1. Top-level names must contain only capital letters and underscores, and must begin and end with a letter. (e.g. "HEAD", "ORIG_HEAD"). 2. Names prefixed with "refs/" can be almost anything. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.
  2. \n
\n", "group": "reference" }, "git_reference_shorthand": { "type": "function", "file": "git2/refs.h", - "line": 744, - "lineto": 744, + "line": 763, + "lineto": 763, "args": [ { "name": "ref", @@ -16830,11 +16709,11 @@ "comment": " the human-readable version of the name" }, "description": "

Get the reference's short name

\n", - "comments": "

This will transform the reference name into a name "human-readable"\n version. If no shortname is appropriate, it will return the full\n name.

\n\n

The memory is owned by the reference and must not be freed.

\n", + "comments": "

This will transform the reference name into a name "human-readable" version. If no shortname is appropriate, it will return the full name.

\n\n

The memory is owned by the reference and must not be freed.

\n", "group": "reference", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_reference_shorthand-4" + "ex/HEAD/status.html#git_reference_shorthand-2" ] } }, @@ -17158,11 +17037,11 @@ "group": "remote", "examples": { "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_create-4" + "ex/HEAD/remote.html#git_remote_create-1" ] } }, - "git_remote_create_init_options": { + "git_remote_create_options_init": { "type": "function", "file": "git2/remote.h", "line": 97, @@ -17186,7 +17065,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_remote_create_options structure

\n", - "comments": "

Initializes a git_remote_create_options with default values. Equivalent to\n creating an instance with GIT_REMOTE_CREATE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_remote_create_options with default values. Equivalent to creating an instance with GIT_REMOTE_CREATE_OPTIONS_INIT.

\n", "group": "remote" }, "git_remote_create_with_opts": { @@ -17292,14 +17171,14 @@ "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\n you have a URL instead of a remote's name.

\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": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_create_anonymous-4" + "fetch.c": [ + "ex/HEAD/fetch.html#git_remote_create_anonymous-4" ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_create_anonymous-2" + "ls-remote.c": [ + "ex/HEAD/ls-remote.html#git_remote_create_anonymous-2" ] } }, @@ -17327,7 +17206,7 @@ "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\n you have a URL instead of a remote's name.

\n\n

Contrasted with git_remote_create_anonymous, a detached remote\n will not consider any repo configuration values (such as insteadof url\n substitutions).

\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\n

Contrasted with git_remote_create_anonymous, a detached remote will not consider any repo configuration values (such as insteadof url substitutions).

\n", "group": "remote" }, "git_remote_lookup": { @@ -17359,17 +17238,17 @@ "comment": " 0, GIT_ENOTFOUND, GIT_EINVALIDSPEC or an error code" }, "description": "

Get the information for a particular remote

\n", - "comments": "

The name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", + "comments": "

The name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "remote", "examples": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_lookup-5" + "fetch.c": [ + "ex/HEAD/fetch.html#git_remote_lookup-5" ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_lookup-3" + "ls-remote.c": [ + "ex/HEAD/ls-remote.html#git_remote_lookup-3" ], "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_lookup-5" + "ex/HEAD/remote.html#git_remote_lookup-2" ] } }, @@ -17463,11 +17342,11 @@ "comment": " a pointer to the url" }, "description": "

Get the remote's url

\n", - "comments": "

If url.*.insteadOf has been configured for this URL, it will\n return the modified URL.

\n", + "comments": "

If url.*.insteadOf has been configured for this URL, it will return the modified URL.

\n", "group": "remote", "examples": { "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_url-6" + "ex/HEAD/remote.html#git_remote_url-3" ] } }, @@ -17490,11 +17369,11 @@ "comment": " a pointer to the url or NULL if no special url for pushing is set" }, "description": "

Get the remote's url for pushing

\n", - "comments": "

If url.*.pushInsteadOf has been configured for this URL, it\n will return the modified URL.

\n", + "comments": "

If url.*.pushInsteadOf has been configured for this URL, it will return the modified URL.

\n", "group": "remote", "examples": { "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_pushurl-7" + "ex/HEAD/remote.html#git_remote_pushurl-4" ] } }, @@ -17527,11 +17406,11 @@ "comment": " 0 or an error value" }, "description": "

Set the remote's url in the configuration

\n", - "comments": "

Remote objects already in memory will not be affected. This assumes\n the common case of a single-url remote and will otherwise return an error.

\n", + "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/v0.28.0/remote.html#git_remote_set_url-8" + "ex/HEAD/remote.html#git_remote_set_url-5" ] } }, @@ -17564,11 +17443,11 @@ "comment": null }, "description": "

Set the remote's url for pushing in the configuration.

\n", - "comments": "

Remote objects already in memory will not be affected. This assumes\n the common case of a single-url remote and will otherwise return an error.

\n", + "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/v0.28.0/remote.html#git_remote_set_pushurl-9" + "ex/HEAD/remote.html#git_remote_set_pushurl-6" ] } }, @@ -17601,7 +17480,7 @@ "comment": " 0, GIT_EINVALIDSPEC if refspec is invalid or an error value" }, "description": "

Add a fetch refspec to the remote's configuration

\n", - "comments": "

Add the given refspec to the fetch list in the configuration. No\n loaded remote instances will be affected.

\n", + "comments": "

Add the given refspec to the fetch list in the configuration. No loaded remote instances will be affected.

\n", "group": "remote" }, "git_remote_get_fetch_refspecs": { @@ -17628,7 +17507,7 @@ "comment": null }, "description": "

Get the remote's list of fetch refspecs

\n", - "comments": "

The memory is owned by the user and should be freed with\n git_strarray_free.

\n", + "comments": "

The memory is owned by the user and should be freed with git_strarray_free.

\n", "group": "remote" }, "git_remote_add_push": { @@ -17660,7 +17539,7 @@ "comment": " 0, GIT_EINVALIDSPEC if refspec is invalid or an error value" }, "description": "

Add a push refspec to the remote's configuration

\n", - "comments": "

Add the given refspec to the push list in the configuration. No\n loaded remote instances will be affected.

\n", + "comments": "

Add the given refspec to the push list in the configuration. No loaded remote instances will be affected.

\n", "group": "remote" }, "git_remote_get_push_refspecs": { @@ -17687,7 +17566,7 @@ "comment": null }, "description": "

Get the remote's list of push refspecs

\n", - "comments": "

The memory is owned by the user and should be freed with\n git_strarray_free.

\n", + "comments": "

The memory is owned by the user and should be freed with git_strarray_free.

\n", "group": "remote" }, "git_remote_refspec_count": { @@ -17778,11 +17657,11 @@ "comment": " 0 or an error code" }, "description": "

Open a connection to a remote

\n", - "comments": "

The transport is selected based on the URL. The direction argument\n is due to a limitation of the git protocol (over TCP or SSH) which\n starts up a specific binary which can only do the one or the other.

\n", + "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": { - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_connect-4" + "ls-remote.c": [ + "ex/HEAD/ls-remote.html#git_remote_connect-4" ] } }, @@ -17815,11 +17694,11 @@ "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\n connection.

\n\n

The remote (or more exactly its transport) must have connected to\n the remote repository. This list is available as soon as the\n connection to the remote is initiated and it remains available\n after disconnecting.

\n\n

The memory belongs to the remote. The pointer will be valid as long\n as a new connection is not initiated, but it is recommended that\n you make a copy in order to make use of the data.

\n", + "comments": "

Get the list of references with which the server responds to a new connection.

\n\n

The 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\n

The 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": { - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_ls-5" + "ls-remote.c": [ + "ex/HEAD/ls-remote.html#git_remote_ls-5" ] } }, @@ -17842,7 +17721,7 @@ "comment": " 1 if it's connected, 0 otherwise." }, "description": "

Check whether the remote is connected

\n", - "comments": "

Check whether the remote's underlying transport is connected to the\n remote host.

\n", + "comments": "

Check whether the remote's underlying transport is connected to the remote host.

\n", "group": "remote" }, "git_remote_stop": { @@ -17864,7 +17743,7 @@ "comment": null }, "description": "

Cancel the operation

\n", - "comments": "

At certain points in its operation, the network code checks whether\n the operation has been cancelled and if so stops the operation.

\n", + "comments": "

At certain points in its operation, the network code checks whether the operation has been cancelled and if so stops the operation.

\n", "group": "remote" }, "git_remote_disconnect": { @@ -17908,18 +17787,18 @@ "comment": null }, "description": "

Free the memory associated with a remote

\n", - "comments": "

This also disconnects from the remote, if the connection\n has not been closed yet (using git_remote_disconnect).

\n", + "comments": "

This also disconnects from the remote, if the connection has not been closed yet (using git_remote_disconnect).

\n", "group": "remote", "examples": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_free-6", - "ex/v0.28.0/network/fetch.html#git_remote_free-7" + "fetch.c": [ + "ex/HEAD/fetch.html#git_remote_free-6", + "ex/HEAD/fetch.html#git_remote_free-7" ], - "network/ls-remote.c": [ - "ex/v0.28.0/network/ls-remote.html#git_remote_free-6" + "ls-remote.c": [ + "ex/HEAD/ls-remote.html#git_remote_free-6" ], "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_free-10" + "ex/HEAD/remote.html#git_remote_free-7" ] } }, @@ -17951,15 +17830,15 @@ "group": "remote", "examples": { "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_list-11" + "ex/HEAD/remote.html#git_remote_list-8" ] } }, "git_remote_init_callbacks": { "type": "function", "file": "git2/remote.h", - "line": 577, - "lineto": 579, + "line": 598, + "lineto": 600, "args": [ { "name": "opts", @@ -17982,11 +17861,11 @@ "comments": "", "group": "remote" }, - "git_fetch_init_options": { + "git_fetch_options_init": { "type": "function", "file": "git2/remote.h", - "line": 682, - "lineto": 684, + "line": 704, + "lineto": 706, "args": [ { "name": "opts", @@ -18006,14 +17885,14 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_fetch_options structure

\n", - "comments": "

Initializes a git_fetch_options with default values. Equivalent to\n creating an instance with GIT_FETCH_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_fetch_options with default values. Equivalent to creating an instance with GIT_FETCH_OPTIONS_INIT.

\n", "group": "fetch" }, - "git_push_init_options": { + "git_push_options_init": { "type": "function", "file": "git2/remote.h", - "line": 732, - "lineto": 734, + "line": 754, + "lineto": 756, "args": [ { "name": "opts", @@ -18033,14 +17912,14 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_push_options structure

\n", - "comments": "

Initializes a git_push_options with default values. Equivalent to\n creating an instance with GIT_PUSH_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_push_options with default values. Equivalent to creating an instance with GIT_PUSH_OPTIONS_INIT.

\n", "group": "push" }, "git_remote_download": { "type": "function", "file": "git2/remote.h", - "line": 752, - "lineto": 752, + "line": 774, + "lineto": 774, "args": [ { "name": "remote", @@ -18065,14 +17944,14 @@ "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\n the remote git which objects are missing, download and index the\n packfile.

\n\n

The .idx file will be created and both it and the packfile with be\n renamed to their final name.

\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\n

The .idx file will be created and both it and the packfile with be renamed to their final name.

\n", "group": "remote" }, "git_remote_upload": { "type": "function", "file": "git2/remote.h", - "line": 766, - "lineto": 766, + "line": 788, + "lineto": 788, "args": [ { "name": "remote", @@ -18097,14 +17976,14 @@ "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\n 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", "group": "remote" }, "git_remote_update_tips": { "type": "function", "file": "git2/remote.h", - "line": 782, - "lineto": 787, + "line": 804, + "lineto": 809, "args": [ { "name": "remote", @@ -18145,8 +18024,8 @@ "git_remote_fetch": { "type": "function", "file": "git2/remote.h", - "line": 803, - "lineto": 807, + "line": 825, + "lineto": 829, "args": [ { "name": "remote", @@ -18176,19 +18055,19 @@ "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,\n disconnect and update the remote-tracking branches.

\n", + "comments": "

Convenience function to connect to a remote, download the data, disconnect and update the remote-tracking branches.

\n", "group": "remote", "examples": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_fetch-8" + "fetch.c": [ + "ex/HEAD/fetch.html#git_remote_fetch-8" ] } }, "git_remote_prune": { "type": "function", "file": "git2/remote.h", - "line": 816, - "lineto": 816, + "line": 838, + "lineto": 838, "args": [ { "name": "remote", @@ -18214,8 +18093,8 @@ "git_remote_push": { "type": "function", "file": "git2/remote.h", - "line": 828, - "lineto": 830, + "line": 850, + "lineto": 852, "args": [ { "name": "remote", @@ -18246,8 +18125,8 @@ "git_remote_stats": { "type": "function", "file": "git2/remote.h", - "line": 835, - "lineto": 835, + "line": 857, + "lineto": 857, "args": [ { "name": "remote", @@ -18258,23 +18137,23 @@ "argline": "git_remote *remote", "sig": "git_remote *", "return": { - "type": "const git_transfer_progress *", + "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": { - "network/fetch.c": [ - "ex/v0.28.0/network/fetch.html#git_remote_stats-9" + "fetch.c": [ + "ex/HEAD/fetch.html#git_remote_stats-9" ] } }, "git_remote_autotag": { "type": "function", "file": "git2/remote.h", - "line": 843, - "lineto": 843, + "line": 865, + "lineto": 865, "args": [ { "name": "remote", @@ -18295,8 +18174,8 @@ "git_remote_set_autotag": { "type": "function", "file": "git2/remote.h", - "line": 855, - "lineto": 855, + "line": 877, + "lineto": 877, "args": [ { "name": "repo", @@ -18321,14 +18200,14 @@ "comment": null }, "description": "

Set the remote's tag following setting.

\n", - "comments": "

The change will be made in the configuration. No loaded remotes\n will be affected.

\n", + "comments": "

The change will be made in the configuration. No loaded remotes will be affected.

\n", "group": "remote" }, "git_remote_prune_refs": { "type": "function", "file": "git2/remote.h", - "line": 862, - "lineto": 862, + "line": 884, + "lineto": 884, "args": [ { "name": "remote", @@ -18349,8 +18228,8 @@ "git_remote_rename": { "type": "function", "file": "git2/remote.h", - "line": 884, - "lineto": 888, + "line": 906, + "lineto": 910, "args": [ { "name": "problems", @@ -18380,19 +18259,19 @@ "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, "description": "

Give the remote a new name

\n", - "comments": "

All remote-tracking branches and configuration settings\n for the remote are updated.

\n\n

The new name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n\n

No loaded instances of a the remote with the old name will change\n their name or their list of refspecs.

\n", + "comments": "

All remote-tracking branches and configuration settings for the remote are updated.

\n\n

The new name will be checked for validity. See git_tag_create() for rules about valid names.

\n\n

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/v0.28.0/remote.html#git_remote_rename-12" + "ex/HEAD/remote.html#git_remote_rename-9" ] } }, "git_remote_is_valid_name": { "type": "function", "file": "git2/remote.h", - "line": 896, - "lineto": 896, + "line": 918, + "lineto": 918, "args": [ { "name": "remote_name", @@ -18413,8 +18292,8 @@ "git_remote_delete": { "type": "function", "file": "git2/remote.h", - "line": 908, - "lineto": 908, + "line": 930, + "lineto": 930, "args": [ { "name": "repo", @@ -18434,19 +18313,19 @@ "comment": " 0 on success, or an error code." }, "description": "

Delete an existing persisted remote.

\n", - "comments": "

All remote-tracking branches and configuration settings\n for the remote will be removed.

\n", + "comments": "

All remote-tracking branches and configuration settings for the remote will be removed.

\n", "group": "remote", "examples": { "remote.c": [ - "ex/v0.28.0/remote.html#git_remote_delete-13" + "ex/HEAD/remote.html#git_remote_delete-10" ] } }, "git_remote_default_branch": { "type": "function", "file": "git2/remote.h", - "line": 926, - "lineto": 926, + "line": 948, + "lineto": 948, "args": [ { "name": "out", @@ -18466,7 +18345,7 @@ "comment": " 0, GIT_ENOTFOUND if the remote does not have any references\n or none of them point to HEAD's commit, or an error message." }, "description": "

Retrieve the name of the remote's default branch

\n", - "comments": "

The default branch of a repository is the branch which HEAD points\n to. If the remote does not support reporting this information\n directly, it performs the guess as git does; that is, if there are\n multiple branches which point to the same commit, the first one is\n chosen. If the master branch is a candidate, it wins.

\n\n

This function must only be called after connecting.

\n", + "comments": "

The default branch of a repository is the branch which HEAD points to. If the remote does not support reporting this information directly, it performs the guess as git does; that is, if there are multiple branches which point to the same commit, the first one is chosen. If the master branch is a candidate, it wins.

\n\n

This function must only be called after connecting.

\n", "group": "remote" }, "git_repository_open": { @@ -18493,14 +18372,11 @@ "comment": " 0 or an error code" }, "description": "

Open a git repository.

\n", - "comments": "

The 'path' argument must point to either a git repository\n folder, or an existing work dir.

\n\n

The method will automatically detect if 'path' is a normal\n or bare repository or fail is 'path' is neither.

\n", + "comments": "

The 'path' argument must point to either a git repository folder, or an existing work dir.

\n\n

The 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/v0.28.0/general.html#git_repository_open-68" - ], - "remote.c": [ - "ex/v0.28.0/remote.html#git_repository_open-14" + "ex/HEAD/general.html#git_repository_open-68" ] } }, @@ -18528,7 +18404,7 @@ "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\n repository that can then be worked on.

\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": { @@ -18555,7 +18431,7 @@ "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\n with the API when all you have is an object database. This doesn't\n have any paths associated with it, so use with care.

\n", + "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": { @@ -18592,13 +18468,8 @@ "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\n (if there is a repository).

\n", - "group": "repository", - "examples": { - "remote.c": [ - "ex/v0.28.0/remote.html#git_repository_discover-15" - ] - } + "comments": "

The method will automatically detect if the repository is bare (if there is a repository).

\n", + "group": "repository" }, "git_repository_open_ext": { "type": "function", @@ -18637,39 +18508,8 @@ "comments": "", "group": "repository", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_repository_open_ext-24" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_repository_open_ext-31" - ], - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_open_ext-14" - ], - "describe.c": [ - "ex/v0.28.0/describe.html#git_repository_open_ext-8" - ], - "diff.c": [ - "ex/v0.28.0/diff.html#git_repository_open_ext-15" - ], "log.c": [ - "ex/v0.28.0/log.html#git_repository_open_ext-45", - "ex/v0.28.0/log.html#git_repository_open_ext-46" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_repository_open_ext-7" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_open_ext-33" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_repository_open_ext-16" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_repository_open_ext-5" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_repository_open_ext-11" + "ex/HEAD/log.html#git_repository_open_ext-43" ] } }, @@ -18697,7 +18537,7 @@ "comment": " 0 on success, or an error code" }, "description": "

Open a bare repository on the serverside.

\n", - "comments": "

This is a fast open for bare repositories that will come in handy\n if you're e.g. hosting git repositories and need to access them\n efficiently

\n", + "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" }, "git_repository_free": { @@ -18719,47 +18559,14 @@ "comment": null }, "description": "

Free a previously allocated repository

\n", - "comments": "

Note that after a repository is free'd, all the objects it has spawned\n will still exist until they are manually closed by the user\n with git_object_free, but accessing any of the attributes of\n an object without a backing repository will result in undefined\n behavior

\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

\n", "group": "repository", "examples": { - "blame.c": [ - "ex/v0.28.0/blame.html#git_repository_free-25" - ], - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_repository_free-32" - ], - "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_free-15" - ], - "describe.c": [ - "ex/v0.28.0/describe.html#git_repository_free-9" - ], - "diff.c": [ - "ex/v0.28.0/diff.html#git_repository_free-16" - ], "general.c": [ - "ex/v0.28.0/general.html#git_repository_free-69" + "ex/HEAD/general.html#git_repository_free-69" ], "init.c": [ - "ex/v0.28.0/init.html#git_repository_free-6" - ], - "log.c": [ - "ex/v0.28.0/log.html#git_repository_free-47" - ], - "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_repository_free-8" - ], - "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_free-34" - ], - "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_repository_free-17" - ], - "status.c": [ - "ex/v0.28.0/status.html#git_repository_free-6" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_repository_free-12" + "ex/HEAD/init.html#git_repository_free-4" ] } }, @@ -18792,15 +18599,15 @@ "comment": " 0 or an error code" }, "description": "

Creates a new Git repository in the given folder.

\n", - "comments": "

TODO:\n - Reinit the repository

\n", + "comments": "

TODO: - Reinit the repository

\n", "group": "repository", "examples": { "init.c": [ - "ex/v0.28.0/init.html#git_repository_init-7" + "ex/HEAD/init.html#git_repository_init-5" ] } }, - "git_repository_init_init_options": { + "git_repository_init_options_init": { "type": "function", "file": "git2/repository.h", "line": 326, @@ -18824,7 +18631,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_repository_init_options structure

\n", - "comments": "

Initializes a git_repository_init_options with default values. Equivalent to\n creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_repository_init_options with default values. Equivalent to creating an instance with GIT_REPOSITORY_INIT_OPTIONS_INIT.

\n", "group": "repository" }, "git_repository_init_ext": { @@ -18856,11 +18663,11 @@ "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\n if requested by flags) and working directory as needed. It will\n auto-detect the case sensitivity of the file system and if the\n file system supports file mode bits correctly.

\n", + "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/v0.28.0/init.html#git_repository_init_ext-8" + "ex/HEAD/init.html#git_repository_init_ext-6" ] } }, @@ -18888,15 +18695,15 @@ "comment": " 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch, GIT_ENOTFOUND when HEAD is missing; an error code otherwise" }, "description": "

Retrieve and resolve the reference pointed at by HEAD.

\n", - "comments": "

The returned git_reference will be owned by caller and\n git_reference_free() must be called when done with it to release the\n allocated memory and prevent a leak.

\n", + "comments": "

The returned git_reference will be owned by caller and git_reference_free() must be called when done with it to release the allocated memory and prevent a leak.

\n", "group": "repository", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_head-35", - "ex/v0.28.0/merge.html#git_repository_head-36" + "ex/HEAD/merge.html#git_repository_head-31", + "ex/HEAD/merge.html#git_repository_head-32" ], "status.c": [ - "ex/v0.28.0/status.html#git_repository_head-7" + "ex/HEAD/status.html#git_repository_head-3" ] } }, @@ -18951,7 +18758,7 @@ "comment": " 1 if HEAD is detached, 0 if it's not; error code if there\n was an error." }, "description": "

Check if a repository's HEAD is detached

\n", - "comments": "

A repository's HEAD is detached when it points directly to a commit\n instead of a branch.

\n", + "comments": "

A repository's HEAD is detached when it points directly to a commit instead of a branch.

\n", "group": "repository" }, "git_repository_head_detached_for_worktree": { @@ -18978,7 +18785,7 @@ "comment": " 1 if HEAD is detached, 0 if its not; error code if\n there was an error" }, "description": "

Check if a worktree's HEAD is detached

\n", - "comments": "

A worktree's HEAD is detached when it points directly to a\n commit instead of a branch.

\n", + "comments": "

A worktree's HEAD is detached when it points directly to a commit instead of a branch.

\n", "group": "repository" }, "git_repository_head_unborn": { @@ -19000,7 +18807,7 @@ "comment": " 1 if the current branch is unborn, 0 if it's not; error\n code if there was an error" }, "description": "

Check if the current branch is unborn

\n", - "comments": "

An unborn branch is one named from HEAD but which doesn't exist in\n the refs namespace, because it doesn't have any commit to point to.

\n", + "comments": "

An unborn branch is one named from HEAD but which doesn't exist in the refs namespace, because it doesn't have any commit to point to.

\n", "group": "repository" }, "git_repository_is_empty": { @@ -19022,7 +18829,7 @@ "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\n 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.

\n", "group": "repository" }, "git_repository_item_path": { @@ -19054,7 +18861,7 @@ "comment": " 0, GIT_ENOTFOUND if the path cannot exist or an error code" }, "description": "

Get the location of a specific repository file or directory

\n", - "comments": "

This function will retrieve the path of a specific repository\n item. It will thereby honor things like the repository's\n common directory, gitdir, etc. In case a file path cannot\n exist for a given item (e.g. the working directory of a bare\n repository), GIT_ENOTFOUND is returned.

\n", + "comments": "

This function will retrieve the path of a specific repository item. It will thereby honor things like the repository's common directory, gitdir, etc. In case a file path cannot exist for a given item (e.g. the working directory of a bare repository), GIT_ENOTFOUND is returned.

\n", "group": "repository" }, "git_repository_path": { @@ -19076,14 +18883,14 @@ "comment": " the path to the repository" }, "description": "

Get the path of this repository

\n", - "comments": "

This is the path of the .git folder for normal repositories,\n or of the repository itself for bare repositories.

\n", + "comments": "

This is the path of the .git folder for normal repositories, or of the repository itself for bare repositories.

\n", "group": "repository", "examples": { "init.c": [ - "ex/v0.28.0/init.html#git_repository_path-9" + "ex/HEAD/init.html#git_repository_path-7" ], "status.c": [ - "ex/v0.28.0/status.html#git_repository_path-8" + "ex/HEAD/status.html#git_repository_path-4" ] } }, @@ -19106,11 +18913,11 @@ "comment": " the path to the working dir, if it exists" }, "description": "

Get the path of the working directory for this repository

\n", - "comments": "

If the repository is bare, this function will always return\n NULL.

\n", + "comments": "

If the repository is bare, this function will always return NULL.

\n", "group": "repository", "examples": { "init.c": [ - "ex/v0.28.0/init.html#git_repository_workdir-10" + "ex/HEAD/init.html#git_repository_workdir-8" ] } }, @@ -19133,7 +18940,7 @@ "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\n path is returned.

\n", + "comments": "

If the repository is bare is not a worktree, the git directory path is returned.

\n", "group": "repository" }, "git_repository_set_workdir": { @@ -19165,7 +18972,7 @@ "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\n that contains the .git folder for this repository.

\n\n

If this repository is bare, setting its working directory\n will turn it into a normal repository, capable of performing\n all the common workdir operations (checkout, status, index\n manipulation, etc).

\n", + "comments": "

The working directory doesn't need to be the same one that contains the .git folder for this repository.

\n\n

If this repository is bare, setting its working directory will turn it into a normal repository, capable of performing all the common workdir operations (checkout, status, index manipulation, etc).

\n", "group": "repository" }, "git_repository_is_bare": { @@ -19191,7 +18998,7 @@ "group": "repository", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_repository_is_bare-9" + "ex/HEAD/status.html#git_repository_is_bare-5" ] } }, @@ -19241,7 +19048,7 @@ "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\n config set for the repository will be returned, including\n global and system configurations (if they are available).

\n\n

The configuration file must be freed once it's no longer\n being used by the user.

\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\n

The configuration file must be freed once it's no longer being used by the user.

\n", "group": "repository" }, "git_repository_config_snapshot": { @@ -19268,12 +19075,12 @@ "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\n configuration. The contents of this snapshot will not change,\n even if the underlying config files are modified.

\n\n

The configuration file must be freed once it's no longer\n being used by the user.

\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\n

The configuration file must be freed once it's no longer being used by the user.

\n", "group": "repository", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_repository_config_snapshot-70", - "ex/v0.28.0/general.html#git_repository_config_snapshot-71" + "ex/HEAD/general.html#git_repository_config_snapshot-70", + "ex/HEAD/general.html#git_repository_config_snapshot-71" ] } }, @@ -19301,14 +19108,14 @@ "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\n database for the repository will be returned (the one\n located in .git/objects).

\n\n

The ODB must be freed once it's no longer being used by\n the user.

\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).

\n\n

The ODB must be freed once it's no longer being used by the user.

\n", "group": "repository", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_repository_odb-33" + "ex/HEAD/cat-file.html#git_repository_odb-29" ], "general.c": [ - "ex/v0.28.0/general.html#git_repository_odb-72" + "ex/HEAD/general.html#git_repository_odb-72" ] } }, @@ -19336,7 +19143,7 @@ "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\n the repository will be returned (the one that manipulates loose\n and packed references in the .git directory).

\n\n

The refdb must be freed once it's no longer being used by\n the user.

\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).

\n\n

The refdb must be freed once it's no longer being used by the user.

\n", "group": "repository" }, "git_repository_index": { @@ -19363,20 +19170,23 @@ "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\n index for the repository will be returned (the one\n located in .git/index).

\n\n

The index must be freed once it's no longer being used by\n the user.

\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).

\n\n

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/v0.28.0/general.html#git_repository_index-73" + "ex/HEAD/general.html#git_repository_index-73" ], "init.c": [ - "ex/v0.28.0/init.html#git_repository_index-11" + "ex/HEAD/init.html#git_repository_index-9" ], "ls-files.c": [ - "ex/v0.28.0/ls-files.html#git_repository_index-9" + "ex/HEAD/ls-files.html#git_repository_index-5" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_index-37" + "ex/HEAD/merge.html#git_repository_index-33" ] } }, @@ -19404,7 +19214,7 @@ "comment": " 0, GIT_ENOTFOUND if no message exists or an error code" }, "description": "

Retrieve git's prepared message

\n", - "comments": "

Operations such as git revert/cherry-pick/merge with the -n option\n stop just short of creating a commit with the changes and save\n their prepared message in .git/MERGE_MSG so the next git-commit\n execution can present it to the user for them to amend if they\n wish.

\n\n

Use this function to get the contents of this file. Don't forget to\n remove the file after you create the commit.

\n", + "comments": "

Operations such as git revert/cherry-pick/merge with the -n option stop just short of creating a commit with the changes and save their prepared message in .git/MERGE_MSG so the next git-commit execution can present it to the user for them to amend if they wish.

\n\n

Use this function to get the contents of this file. Don't forget to remove the file after you create the commit.

\n", "group": "repository" }, "git_repository_message_remove": { @@ -19452,15 +19262,15 @@ "group": "repository", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_state_cleanup-38" + "ex/HEAD/merge.html#git_repository_state_cleanup-34" ] } }, "git_repository_fetchhead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 660, - "lineto": 663, + "line": 672, + "lineto": 675, "args": [ { "name": "repo", @@ -19491,8 +19301,8 @@ "git_repository_mergehead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 680, - "lineto": 683, + "line": 701, + "lineto": 704, "args": [ { "name": "repo", @@ -19523,8 +19333,8 @@ "git_repository_hashfile": { "type": "function", "file": "git2/repository.h", - "line": 708, - "lineto": 713, + "line": 729, + "lineto": 734, "args": [ { "name": "out", @@ -19559,14 +19369,14 @@ "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,\n you can just use the git_odb_hashfile() API. However, if you want to\n hash a file in the repository and you want to apply filtering rules (e.g.\n crlf filters) before generating the SHA, then use this function.

\n\n

Note: if the repository has core.safecrlf set to fail and the\n filtering triggers that failure, then this function will return an\n error and not calculate the hash of the file.

\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.

\n\n

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.

\n", "group": "repository" }, "git_repository_set_head": { "type": "function", "file": "git2/repository.h", - "line": 733, - "lineto": 735, + "line": 754, + "lineto": 756, "args": [ { "name": "repo", @@ -19586,19 +19396,19 @@ "comment": " 0 on success, or an error code" }, "description": "

Make the repository HEAD point to the specified reference.

\n", - "comments": "

If the provided reference points to a Tree or a Blob, the HEAD is\n unaltered and -1 is returned.

\n\n

If the provided reference points to a branch, the HEAD will point\n to that branch, staying attached, or become attached if it isn't yet.\n If the branch doesn't exist yet, no error will be return. The HEAD\n will then be attached to an unborn branch.

\n\n

Otherwise, the HEAD will be detached and will directly point to\n the Commit.

\n", + "comments": "

If the provided reference points to a Tree or a Blob, the HEAD is unaltered and -1 is returned.

\n\n

If 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\n

Otherwise, the HEAD will be detached and will directly point to the Commit.

\n", "group": "repository", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_set_head-16" + "ex/HEAD/checkout.html#git_repository_set_head-12" ] } }, "git_repository_set_head_detached": { "type": "function", "file": "git2/repository.h", - "line": 753, - "lineto": 755, + "line": 774, + "lineto": 776, "args": [ { "name": "repo", @@ -19618,14 +19428,14 @@ "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\n is unaltered and GIT_ENOTFOUND is returned.

\n\n

If the provided commitish cannot be peeled into a commit, the HEAD\n is unaltered and -1 is returned.

\n\n

Otherwise, the HEAD will eventually be detached and will directly point to\n 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\n

If the provided commitish cannot be peeled into a commit, the HEAD is unaltered and -1 is returned.

\n\n

Otherwise, 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": 769, - "lineto": 771, + "line": 790, + "lineto": 792, "args": [ { "name": "repo", @@ -19645,19 +19455,19 @@ "comment": null }, "description": "

Make the repository HEAD directly point to the Commit.

\n", - "comments": "

This behaves like git_repository_set_head_detached() but takes an\n annotated commit, which lets you specify which extended sha syntax\n string was specified by a user, allowing for more exact reflog\n messages.

\n\n

See the documentation for git_repository_set_head_detached().

\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.

\n\n

See the documentation for git_repository_set_head_detached().

\n", "group": "repository", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_set_head_detached_from_annotated-17" + "ex/HEAD/checkout.html#git_repository_set_head_detached_from_annotated-13" ] } }, "git_repository_detach_head": { "type": "function", "file": "git2/repository.h", - "line": 790, - "lineto": 791, + "line": 811, + "lineto": 812, "args": [ { "name": "repo", @@ -19672,14 +19482,14 @@ "comment": " 0 on success, GIT_EUNBORNBRANCH when HEAD points to a non existing\n branch or an error code" }, "description": "

Detach the HEAD.

\n", - "comments": "

If the HEAD is already detached and points to a Commit, 0 is returned.

\n\n

If the HEAD is already detached and points to a Tag, the HEAD is\n updated into making it point to the peeled Commit, and 0 is returned.

\n\n

If the HEAD is already detached and points to a non commitish, the HEAD is\n unaltered, and -1 is returned.

\n\n

Otherwise, 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\n

If 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\n

If the HEAD is already detached and points to a non commitish, the HEAD is unaltered, and -1 is returned.

\n\n

Otherwise, the HEAD will be detached and point to the peeled Commit.

\n", "group": "repository" }, "git_repository_state": { "type": "function", "file": "git2/repository.h", - "line": 821, - "lineto": 821, + "line": 842, + "lineto": 842, "args": [ { "name": "repo", @@ -19698,18 +19508,18 @@ "group": "repository", "examples": { "checkout.c": [ - "ex/v0.28.0/checkout.html#git_repository_state-18" + "ex/HEAD/checkout.html#git_repository_state-14" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_repository_state-39" + "ex/HEAD/merge.html#git_repository_state-35" ] } }, "git_repository_set_namespace": { "type": "function", "file": "git2/repository.h", - "line": 835, - "lineto": 835, + "line": 856, + "lineto": 856, "args": [ { "name": "repo", @@ -19729,14 +19539,14 @@ "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.\n See man gitnamespaces

\n", + "comments": "

This namespace affects all reference operations for the repo. See man gitnamespaces

\n", "group": "repository" }, "git_repository_get_namespace": { "type": "function", "file": "git2/repository.h", - "line": 843, - "lineto": 843, + "line": 864, + "lineto": 864, "args": [ { "name": "repo", @@ -19757,8 +19567,8 @@ "git_repository_is_shallow": { "type": "function", "file": "git2/repository.h", - "line": 852, - "lineto": 852, + "line": 873, + "lineto": 873, "args": [ { "name": "repo", @@ -19779,8 +19589,8 @@ "git_repository_ident": { "type": "function", "file": "git2/repository.h", - "line": 864, - "lineto": 864, + "line": 885, + "lineto": 885, "args": [ { "name": "name", @@ -19805,14 +19615,14 @@ "comment": null }, "description": "

Retrieve the configured identity to use for reflogs

\n", - "comments": "

The memory is owned by the repository and must not be freed by the\n user.

\n", + "comments": "

The memory is owned by the repository and must not be freed by the user.

\n", "group": "repository" }, "git_repository_set_ident": { "type": "function", "file": "git2/repository.h", - "line": 877, - "lineto": 877, + "line": 898, + "lineto": 898, "args": [ { "name": "repo", @@ -19837,7 +19647,7 @@ "comment": null }, "description": "

Set the identity to be used for writing reflogs

\n", - "comments": "

If both are set, this name and email will be used to write to the\n reflog. Pass NULL to unset. When unset, the identity will be taken\n from the repository's configuration.

\n", + "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_reset": { @@ -19874,7 +19684,7 @@ "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\n

MIXED reset will trigger a SOFT reset, plus the index will be replaced\n with the content of the commit tree.

\n\n

HARD reset will trigger a MIXED reset and the working directory will be\n replaced with the content of the index. (Untracked and ignored files\n will be left alone, however.)

\n\n

TODO: Implement remaining kinds of resets.

\n", + "comments": "

SOFT reset means the Head will be moved to the commit.

\n\n

MIXED reset will trigger a SOFT reset, plus the index will be replaced with the content of the commit tree.

\n\n

HARD 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\n

TODO: Implement remaining kinds of resets.

\n", "group": "reset" }, "git_reset_from_annotated": { @@ -19911,7 +19721,7 @@ "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,\n which lets you specify which extended sha syntax string was\n specified by a user, allowing for more exact reflog messages.

\n\n

See the documentation for git_reset().

\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.

\n\n

See the documentation for git_reset().

\n", "group": "reset" }, "git_reset_default": { @@ -19943,10 +19753,10 @@ "comment": " 0 on success or an error code \n<\n 0" }, "description": "

Updates some entries in the index from the target commit tree.

\n", - "comments": "

The scope of the updated entries is determined by the paths\n being passed in the pathspec parameters.

\n\n

Passing a NULL target will result in removing\n entries in the index matching the provided pathspecs.

\n", + "comments": "

The scope of the updated entries is determined by the paths being passed in the pathspec parameters.

\n\n

Passing a NULL target will result in removing entries in the index matching the provided pathspecs.

\n", "group": "reset" }, - "git_revert_init_options": { + "git_revert_options_init": { "type": "function", "file": "git2/revert.h", "line": 49, @@ -19970,7 +19780,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_revert_options structure

\n", - "comments": "

Initializes a git_revert_options with default values. Equivalent to\n creating an instance with GIT_REVERT_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_revert_options with default values. Equivalent to creating an instance with GIT_REVERT_OPTIONS_INIT.

\n", "group": "revert" }, "git_revert_commit": { @@ -20081,26 +19891,26 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC or an error code" }, "description": "

Find a single object, as specified by a revision string.

\n", - "comments": "

See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n\n

The returned object should be released with git_object_free when no\n longer needed.

\n", + "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n\n

The returned object should be released with git_object_free when no longer needed.

\n", "group": "revparse", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_revparse_single-26" + "ex/HEAD/blame.html#git_revparse_single-22" ], "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_revparse_single-34" + "ex/HEAD/cat-file.html#git_revparse_single-30" ], "describe.c": [ - "ex/v0.28.0/describe.html#git_revparse_single-10" + "ex/HEAD/describe.html#git_revparse_single-6" ], "log.c": [ - "ex/v0.28.0/log.html#git_revparse_single-48" + "ex/HEAD/log.html#git_revparse_single-44" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_revparse_single-13", - "ex/v0.28.0/tag.html#git_revparse_single-14", - "ex/v0.28.0/tag.html#git_revparse_single-15", - "ex/v0.28.0/tag.html#git_revparse_single-16" + "ex/HEAD/tag.html#git_revparse_single-9", + "ex/HEAD/tag.html#git_revparse_single-10", + "ex/HEAD/tag.html#git_revparse_single-11", + "ex/HEAD/tag.html#git_revparse_single-12" ] } }, @@ -20138,7 +19948,7 @@ "comment": " 0 on success, GIT_ENOTFOUND, GIT_EAMBIGUOUS, GIT_EINVALIDSPEC\n or an error code" }, "description": "

Find a single object and intermediate reference by a revision string.

\n", - "comments": "

See man gitrevisions, or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n\n

In some cases (\n@\n{\n<\n-n>} or `\n<branchname

\n\n
\n

@\n{upstream}), the expression may\n point to an intermediate reference. When such expressions are being passed\n in,reference_out` will be valued as well.

\n
\n\n

The returned object should be released with git_object_free and the\n returned reference with git_reference_free when no longer needed.

\n", + "comments": "

See man gitrevisions, or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n\n

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.

\n\n

The returned object should be released with git_object_free and the returned reference with git_reference_free when no longer needed.

\n", "group": "revparse" }, "git_revparse": { @@ -20170,18 +19980,18 @@ "comment": " 0 on success, GIT_INVALIDSPEC, GIT_ENOTFOUND, GIT_EAMBIGUOUS or an error code" }, "description": "

Parse a revision string for from, to, and intent.

\n", - "comments": "

See man gitrevisions or\n http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for\n information on the syntax accepted.

\n", + "comments": "

See man gitrevisions or http://git-scm.com/docs/git-rev-parse.html#_specifying_revisions for information on the syntax accepted.

\n", "group": "revparse", "examples": { "blame.c": [ - "ex/v0.28.0/blame.html#git_revparse-27" + "ex/HEAD/blame.html#git_revparse-23" ], "log.c": [ - "ex/v0.28.0/log.html#git_revparse-49" + "ex/HEAD/log.html#git_revparse-45" ], "rev-parse.c": [ - "ex/v0.28.0/rev-parse.html#git_revparse-18", - "ex/v0.28.0/rev-parse.html#git_revparse-19" + "ex/HEAD/rev-parse.html#git_revparse-14", + "ex/HEAD/rev-parse.html#git_revparse-15" ] } }, @@ -20209,15 +20019,15 @@ "comment": " 0 or an error code" }, "description": "

Allocate a new revision walker to iterate through a repo.

\n", - "comments": "

This revision walker uses a custom memory pool and an internal\n commit cache, so it is relatively expensive to allocate.

\n\n

For maximum performance, this revision walker should be\n reused for different walks.

\n\n

This revision walker is not thread safe: it may only be\n used to walk a repository on a single thread; however,\n it is possible to have several revision walkers in\n several different threads walking the same repository.

\n", + "comments": "

This revision walker uses a custom memory pool and an internal commit cache, so it is relatively expensive to allocate.

\n\n

For maximum performance, this revision walker should be reused for different walks.

\n\n

This 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/v0.28.0/general.html#git_revwalk_new-74" + "ex/HEAD/general.html#git_revwalk_new-74" ], "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_new-50", - "ex/v0.28.0/log.html#git_revwalk_new-51" + "ex/HEAD/log.html#git_revwalk_new-46", + "ex/HEAD/log.html#git_revwalk_new-47" ] } }, @@ -20240,7 +20050,7 @@ "comment": null }, "description": "

Reset the revision walker for reuse.

\n", - "comments": "

This will clear all the pushed and hidden commits, and\n leave the walker in a blank state (just like at\n creation) ready to receive new commit pushes and\n start a new walk.

\n\n

The revision walk is automatically reset when a walk\n is over.

\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\n

The revision walk is automatically reset when a walk is over.

\n", "group": "revwalk" }, "git_revwalk_push": { @@ -20267,14 +20077,14 @@ "comment": " 0 or an error code" }, "description": "

Add a new root for the traversal

\n", - "comments": "

The pushed commit will be marked as one of the roots from which to\n start the walk. This commit may not be walked if it or a child is\n hidden.

\n\n

At least one commit must be pushed onto the walker before a walk\n can be started.

\n\n

The given id must belong to a committish on the walked\n repository.

\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\n

At least one commit must be pushed onto the walker before a walk can be started.

\n\n

The given id must belong to a committish on the walked repository.

\n", "group": "revwalk", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_push-75" + "ex/HEAD/general.html#git_revwalk_push-75" ], "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_push-52" + "ex/HEAD/log.html#git_revwalk_push-48" ] } }, @@ -20302,7 +20112,7 @@ "comment": " 0 or an error code" }, "description": "

Push matching references

\n", - "comments": "

The OIDs pointed to by the references that match the given glob\n pattern will be pushed to the revision walker.

\n\n

A leading 'refs/' is implied if not present as well as a trailing\n '/\n\\\n*' if the glob lacks '?', '\n\\\n*' or '['.

\n\n

Any references matching this glob which do not point to a\n committish will be ignored.

\n", + "comments": "

The OIDs pointed to by the references that match the given glob pattern will be pushed to the revision walker.

\n\n

A leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.

\n\n

Any references matching this glob which do not point to a committish will be ignored.

\n", "group": "revwalk" }, "git_revwalk_push_head": { @@ -20328,7 +20138,7 @@ "group": "revwalk", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_push_head-53" + "ex/HEAD/log.html#git_revwalk_push_head-49" ] } }, @@ -20356,11 +20166,11 @@ "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\n repository.

\n\n

The resolved commit and all its parents will be hidden from the\n output on the revision walk.

\n", + "comments": "

The given id must belong to a committish on the walked repository.

\n\n

The resolved commit and all its parents will be hidden from the output on the revision walk.

\n", "group": "revwalk", "examples": { "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_hide-54" + "ex/HEAD/log.html#git_revwalk_hide-50" ] } }, @@ -20388,7 +20198,7 @@ "comment": " 0 or an error code" }, "description": "

Hide matching references.

\n", - "comments": "

The OIDs pointed to by the references that match the given glob\n pattern and their ancestors will be hidden from the output on the\n revision walk.

\n\n

A leading 'refs/' is implied if not present as well as a trailing\n '/\n\\\n*' if the glob lacks '?', '\n\\\n*' or '['.

\n\n

Any references matching this glob which do not point to a\n committish will be ignored.

\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\n

A leading 'refs/' is implied if not present as well as a trailing '/*' if the glob lacks '?', '*' or '['.

\n\n

Any references matching this glob which do not point to a committish will be ignored.

\n", "group": "revwalk" }, "git_revwalk_hide_head": { @@ -20491,14 +20301,14 @@ "comment": " 0 if the next commit was found;\n\tGIT_ITEROVER if there are no commits left to iterate" }, "description": "

Get the next commit from the revision walk.

\n", - "comments": "

The initial call to this method is not blocking when\n iterating through a repo with a time-sorting mode.

\n\n

Iterating with Topological or inverted modes makes the initial\n call blocking to preprocess the commit list, but this block should be\n mostly unnoticeable on most repositories (topological preprocessing\n times at 0.3s on the git.git repo).

\n\n

The revision walker is reset when the walk is over.

\n", + "comments": "

The initial call to this method is not blocking when iterating through a repo with a time-sorting mode.

\n\n

Iterating 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\n

The revision walker is reset when the walk is over.

\n", "group": "revwalk", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_next-76" + "ex/HEAD/general.html#git_revwalk_next-76" ], "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_next-55" + "ex/HEAD/log.html#git_revwalk_next-51" ] } }, @@ -20530,11 +20340,11 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_sorting-77" + "ex/HEAD/general.html#git_revwalk_sorting-77" ], "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_sorting-56", - "ex/v0.28.0/log.html#git_revwalk_sorting-57" + "ex/HEAD/log.html#git_revwalk_sorting-52", + "ex/HEAD/log.html#git_revwalk_sorting-53" ] } }, @@ -20562,7 +20372,7 @@ "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

\n\n

<commit

\n\n
\n

..\n<commit

\n\n

where each \n<commit\nis in the form accepted by 'git_revparse_single'.\n The left-hand commit will be hidden and the right-hand commit pushed.

\n
\n", + "comments": "

The range should be of the form .. where each is in the form accepted by 'git_revparse_single'. The left-hand commit will be hidden and the right-hand commit pushed.

\n", "group": "revwalk" }, "git_revwalk_simplify_first_parent": { @@ -20610,10 +20420,10 @@ "group": "revwalk", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_revwalk_free-78" + "ex/HEAD/general.html#git_revwalk_free-78" ], "log.c": [ - "ex/v0.28.0/log.html#git_revwalk_free-58" + "ex/HEAD/log.html#git_revwalk_free-54" ] } }, @@ -20710,12 +20520,12 @@ "comment": " 0 or an error code" }, "description": "

Create a new action signature.

\n", - "comments": "

Call git_signature_free() to free the data.

\n\n

Note: angle brackets ('\n<\n' and '>') characters are not allowed\n to be used in either the name or the email parameter.

\n", + "comments": "

Call git_signature_free() to free the data.

\n\n

Note: angle brackets ('<' and '>') characters are not allowed to be used in either the name or the email parameter.

\n", "group": "signature", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_signature_new-79", - "ex/v0.28.0/general.html#git_signature_new-80" + "ex/HEAD/general.html#git_signature_new-79", + "ex/HEAD/general.html#git_signature_new-80" ] } }, @@ -20752,7 +20562,7 @@ "group": "signature", "examples": { "merge.c": [ - "ex/v0.28.0/merge.html#git_signature_now-40" + "ex/HEAD/merge.html#git_signature_now-36" ] } }, @@ -20780,14 +20590,14 @@ "comment": " 0 on success, GIT_ENOTFOUND if config is missing, or error code" }, "description": "

Create a new action signature with default user and now timestamp.

\n", - "comments": "

This looks up the user.name and user.email from the configuration and\n uses the current time as the timestamp, and creates a new signature\n based on that information. It will return GIT_ENOTFOUND if either the\n user.name or user.email are not set.

\n", + "comments": "

This looks up the user.name and user.email from the configuration and uses the current time as the timestamp, and creates a new signature based on that information. It will return GIT_ENOTFOUND if either the user.name or user.email are not set.

\n", "group": "signature", "examples": { "init.c": [ - "ex/v0.28.0/init.html#git_signature_default-12" + "ex/HEAD/init.html#git_signature_default-10" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_signature_default-17" + "ex/HEAD/tag.html#git_signature_default-13" ] } }, @@ -20864,18 +20674,18 @@ "comment": null }, "description": "

Free an existing signature.

\n", - "comments": "

Because the signature is not an opaque structure, it is legal to free it\n manually, but be sure to free the "name" and "email" strings in addition\n to the structure itself.

\n", + "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": { "general.c": [ - "ex/v0.28.0/general.html#git_signature_free-81", - "ex/v0.28.0/general.html#git_signature_free-82" + "ex/HEAD/general.html#git_signature_free-81", + "ex/HEAD/general.html#git_signature_free-82" ], "init.c": [ - "ex/v0.28.0/init.html#git_signature_free-13" + "ex/HEAD/init.html#git_signature_free-11" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_signature_free-18" + "ex/HEAD/tag.html#git_signature_free-14" ] } }, @@ -20888,40 +20698,40 @@ { "name": "out", "type": "git_oid *", - "comment": null + "comment": "Object id of the commit containing the stashed state.\n This commit is also the target of the direct reference refs/stash." }, { "name": "repo", "type": "git_repository *", - "comment": null + "comment": "The owning repository." }, { "name": "stasher", "type": "const git_signature *", - "comment": null + "comment": "The identity of the person performing the stashing." }, { "name": "message", "type": "const char *", - "comment": null + "comment": "Optional description along with the stashed state." }, { "name": "flags", - "type": "int", - "comment": null + "type": "uint32_t", + "comment": "Flags to control the stashing process. (see GIT_STASH_* above)" } ], - "argline": "git_oid *out, git_repository *repo, const git_signature *stasher, const char *message, int flags", - "sig": "git_oid *::git_repository *::const git_signature *::const char *::int", + "argline": "git_oid *out, git_repository *repo, const git_signature *stasher, const char *message, uint32_t flags", + "sig": "git_oid *::git_repository *::const git_signature *::const char *::uint32_t", "return": { "type": "int", - "comment": null + "comment": " 0 on success, GIT_ENOTFOUND where there's nothing to stash,\n or error code." }, - "description": "", + "description": "

Save the local modifications to a new stash.

\n", "comments": "", "group": "stash" }, - "git_stash_apply_init_options": { + "git_stash_apply_options_init": { "type": "function", "file": "git2/stash.h", "line": 156, @@ -20945,7 +20755,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_stash_apply_options structure

\n", - "comments": "

Initializes a git_stash_apply_options with default values. Equivalent to\n creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_stash_apply_options with default values. Equivalent to creating an instance with GIT_STASH_APPLY_OPTIONS_INIT.

\n", "group": "stash" }, "git_stash_apply": { @@ -20977,7 +20787,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if there's no stashed state for the\n given index, GIT_EMERGECONFLICT if changes exist in the working\n directory, or an error code" }, "description": "

Apply a single stashed state from the stash list.

\n", - "comments": "

If local changes in the working directory conflict with changes in the\n stash then GIT_EMERGECONFLICT will be returned. In this case, the index\n will always remain unmodified and all files in the working directory will\n remain unmodified. However, if you are restoring untracked files or\n ignored files and there is a conflict when applying the modified files,\n then those files will remain in the working directory.

\n\n

If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be\n conflicts when reinstating the index, the function will return\n GIT_EMERGECONFLICT and both the working directory and index will be left\n unmodified.

\n\n

Note that a minimum checkout strategy of GIT_CHECKOUT_SAFE is implied.

\n", + "comments": "

If local changes in the working directory conflict with changes in the stash then GIT_EMERGECONFLICT will be returned. In this case, the index will always remain unmodified and all files in the working directory will remain unmodified. However, if you are restoring untracked files or ignored files and there is a conflict when applying the modified files, then those files will remain in the working directory.

\n\n

If passing the GIT_STASH_APPLY_REINSTATE_INDEX flag and there would be conflicts when reinstating the index, the function will return GIT_EMERGECONFLICT and both the working directory and index will be left unmodified.

\n\n

Note that a minimum checkout strategy of GIT_CHECKOUT_SAFE is implied.

\n", "group": "stash" }, "git_stash_foreach": { @@ -21071,7 +20881,7 @@ "comments": "", "group": "stash" }, - "git_status_init_options": { + "git_status_options_init": { "type": "function", "file": "git2/status.h", "line": 203, @@ -21095,7 +20905,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_status_options structure

\n", - "comments": "

Initializes a git_status_options with default values. Equivalent to\n creating an instance with GIT_STATUS_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_status_options with default values. Equivalent to creating an instance with GIT_STATUS_OPTIONS_INIT.

\n", "group": "status" }, "git_status_foreach": { @@ -21127,11 +20937,11 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "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\n the git_status_t values above) and the payload data pointer passed\n into this function.

\n\n

If the callback returns a non-zero value, this function will stop looping\n and return that value to caller.

\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.

\n\n

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/v0.28.0/status.html#git_status_foreach-10" + "ex/HEAD/status.html#git_status_foreach-6" ] } }, @@ -21169,11 +20979,11 @@ "comment": " 0 on success, non-zero callback return value, or error code" }, "description": "

Gather file status information and run callbacks as requested.

\n", - "comments": "

This is an extended version of the git_status_foreach() API that\n allows for more granular control over which paths will be processed and\n in what order. See the git_status_options structure for details\n about the additional controls that this makes available.

\n\n

Note that if a pathspec is given in the git_status_options to filter\n the status, then the results from rename detection (if you enable it) may\n not be accurate. To do rename detection properly, this must be called\n with no pathspec so that all files can be considered.

\n", + "comments": "

This is an extended version of the git_status_foreach() API that allows for more granular control over which paths will be processed and in what order. See the git_status_options structure for details about the additional controls that this makes available.

\n\n

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.

\n", "group": "status", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_status_foreach_ext-11" + "ex/HEAD/status.html#git_status_foreach_ext-7" ] } }, @@ -21206,8 +21016,13 @@ "comment": " 0 on success, GIT_ENOTFOUND if the file is not found in the HEAD,\n index, and work tree, GIT_EAMBIGUOUS if `path` matches multiple files\n or if it refers to a folder, and -1 on other errors." }, "description": "

Get file status for a single file.

\n", - "comments": "

This tries to get status for the filename that you give. If no files\n match that name (in either the HEAD, index, or working directory), this\n returns GIT_ENOTFOUND.

\n\n

If the name matches multiple files (for example, if the path names a\n directory or if running on a case- insensitive filesystem and yet the\n HEAD has two entries that both match the path), then this returns\n GIT_EAMBIGUOUS because it cannot give correct results.

\n\n

This does not do any sort of rename detection. Renames require a set of\n targets and because of the path filtering, there is not enough\n information to check renames correctly. To check file status with rename\n detection, there is no choice but to do a full git_status_list_new and\n scan through looking for the path that you are interested in.

\n", - "group": "status" + "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\n

If 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.

\n\n

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.

\n", + "group": "status", + "examples": { + "add.c": [ + "ex/HEAD/add.html#git_status_file-6" + ] + } }, "git_status_list_new": { "type": "function", @@ -21238,12 +21053,12 @@ "comment": " 0 on success or error code" }, "description": "

Gather file status information and populate the git_status_list.

\n", - "comments": "

Note that if a pathspec is given in the git_status_options to filter\n the status, then the results from rename detection (if you enable it) may\n not be accurate. To do rename detection properly, this must be called\n with no pathspec so that all files can be considered.

\n", + "comments": "

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.

\n", "group": "status", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_status_list_new-12", - "ex/v0.28.0/status.html#git_status_list_new-13" + "ex/HEAD/status.html#git_status_list_new-8", + "ex/HEAD/status.html#git_status_list_new-9" ] } }, @@ -21266,12 +21081,12 @@ "comment": " the number of status entries" }, "description": "

Gets the count of status entries in this list.

\n", - "comments": "

If there are no changes in status (at least according the options given\n when the status list was created), this can return 0.

\n", + "comments": "

If there are no changes in status (at least according the options given when the status list was created), this can return 0.

\n", "group": "status", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_status_list_entrycount-14", - "ex/v0.28.0/status.html#git_status_list_entrycount-15" + "ex/HEAD/status.html#git_status_list_entrycount-10", + "ex/HEAD/status.html#git_status_list_entrycount-11" ] } }, @@ -21303,12 +21118,12 @@ "group": "status", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_status_byindex-16", - "ex/v0.28.0/status.html#git_status_byindex-17", - "ex/v0.28.0/status.html#git_status_byindex-18", - "ex/v0.28.0/status.html#git_status_byindex-19", - "ex/v0.28.0/status.html#git_status_byindex-20", - "ex/v0.28.0/status.html#git_status_byindex-21" + "ex/HEAD/status.html#git_status_byindex-12", + "ex/HEAD/status.html#git_status_byindex-13", + "ex/HEAD/status.html#git_status_byindex-14", + "ex/HEAD/status.html#git_status_byindex-15", + "ex/HEAD/status.html#git_status_byindex-16", + "ex/HEAD/status.html#git_status_byindex-17" ] } }, @@ -21335,7 +21150,7 @@ "group": "status", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_status_list_free-22" + "ex/HEAD/status.html#git_status_list_free-18" ] } }, @@ -21368,7 +21183,7 @@ "comment": " 0 if ignore rules could be processed for the file (regardless\n of whether it exists or not), or an error \n<\n 0 if they could not." }, "description": "

Test if the ignore rules apply to a given file.

\n", - "comments": "

This function checks the ignore rules to see if they would apply to the\n given file. This indicates if the file would be ignored regardless of\n whether the file is already in the index or committed to the repository.

\n\n

One way to think of this is if you were to do "git add ." on the\n directory containing the file, would it be added or not?

\n", + "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\n

One 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": { @@ -21390,18 +21205,18 @@ "comment": null }, "description": "

Close a string array object

\n", - "comments": "

This method should be called on git_strarray objects where the strings\n array is allocated and contains allocated strings, such as what you\n would get from git_strarray_copy(). Not doing so, will result in a\n memory leak.

\n\n

This does not free the git_strarray itself, since the library will\n never allocate that object directly itself (it is more commonly embedded\n inside another struct or created on the stack).

\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.

\n\n

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).

\n", "group": "strarray", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_strarray_free-83" + "ex/HEAD/general.html#git_strarray_free-83" ], "remote.c": [ - "ex/v0.28.0/remote.html#git_strarray_free-16", - "ex/v0.28.0/remote.html#git_strarray_free-17" + "ex/HEAD/remote.html#git_strarray_free-11", + "ex/HEAD/remote.html#git_strarray_free-12" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_strarray_free-19" + "ex/HEAD/tag.html#git_strarray_free-15" ] } }, @@ -21429,10 +21244,10 @@ "comment": " 0 on success, \n<\n 0 on allocation failure" }, "description": "

Copy a string array object from source to target.

\n", - "comments": "

Note: target is overwritten and hence should be empty, otherwise its\n contents are leaked. Call git_strarray_free() if necessary.

\n", + "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_init_options": { + "git_submodule_update_options_init": { "type": "function", "file": "git2/submodule.h", "line": 171, @@ -21456,7 +21271,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_submodule_update_options structure

\n", - "comments": "

Initializes a git_submodule_update_options with default values. Equivalent to\n creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_submodule_update_options with default values. Equivalent to creating an instance with GIT_SUBMODULE_UPDATE_OPTIONS_INIT.

\n", "group": "submodule" }, "git_submodule_update": { @@ -21520,7 +21335,7 @@ "comment": " 0 on success, GIT_ENOTFOUND if submodule does not exist,\n GIT_EEXISTS if a repository is found in working directory only,\n -1 on other errors." }, "description": "

Lookup submodule information by name or path.

\n", - "comments": "

Given either the submodule name or path (they are usually the same), this\n returns a structure describing the submodule.

\n\n

There are two expected error scenarios:

\n\n
    \n
  • The submodule is not mentioned in the HEAD, the index, and the config,\nbut does "exist" in the working directory (i.e. there is a subdirectory\nthat appears to be a Git repository). In this case, this function\nreturns GIT_EEXISTS to indicate a sub-repository exists but not in a\nstate where a git_submodule can be instantiated.
  • \n
  • The submodule is not mentioned in the HEAD, index, or config and the\nworking directory doesn't contain a value git repo at that path.\nThere may or may not be anything else at that path, but nothing that\nlooks like a submodule. In this case, this returns GIT_ENOTFOUND.
  • \n
\n\n

You must call git_submodule_free when done with the submodule.

\n", + "comments": "

Given either the submodule name or path (they are usually the same), this returns a structure describing the submodule.

\n\n

There are two expected error scenarios:

\n\n
    \n
  • The submodule is not mentioned in the HEAD, the index, and the config, but does "exist" in the working directory (i.e. there is a subdirectory that appears to be a Git repository). In this case, this function returns GIT_EEXISTS to indicate a sub-repository exists but not in a state where a git_submodule can be instantiated. - The submodule is not mentioned in the HEAD, index, or config and the working directory doesn't contain a value git repo at that path. There may or may not be anything else at that path, but nothing that looks like a submodule. In this case, this returns GIT_ENOTFOUND.
  • \n
\n\n

You must call git_submodule_free when done with the submodule.

\n", "group": "submodule" }, "git_submodule_free": { @@ -21574,11 +21389,11 @@ "comment": " 0 on success, -1 on error, or non-zero return value of callback" }, "description": "

Iterate over all tracked submodules of a repository.

\n", - "comments": "

See the note on git_submodule above. This iterates over the tracked\n submodules as described therein.

\n\n

If you are concerned about items in the working directory that look like\n submodules but are not tracked, the diff API will generate a diff record\n for workdir items that look like submodules but are not tracked, showing\n them as added in the workdir. Also, the status API will treat the entire\n subdirectory of a contained git repo as a single GIT_STATUS_WT_NEW item.

\n", + "comments": "

See the note on git_submodule above. This iterates over the tracked submodules as described therein.

\n\n

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/v0.28.0/status.html#git_submodule_foreach-23" + "ex/HEAD/status.html#git_submodule_foreach-19" ] } }, @@ -21621,7 +21436,7 @@ "comment": " 0 on success, GIT_EEXISTS if submodule already exists,\n -1 on other errors." }, "description": "

Set up a new git submodule for checkout.

\n", - "comments": "

This does "git submodule add" up to the fetch and checkout of the\n submodule contents. It preps a new submodule, creates an entry in\n .gitmodules and creates an empty initialized repository either at the\n given path in the working directory or in .git/modules with a gitlink\n from the working directory to the new repo.

\n\n

To fully emulate "git submodule add" call this function, then open the\n submodule repo and perform the clone step as needed. Lastly, call\n git_submodule_add_finalize() to wrap up adding the new submodule and\n .gitmodules to the index to be ready to commit.

\n\n

You must call git_submodule_free on the submodule object when done.

\n", + "comments": "

This does "git submodule add" up to the fetch and checkout of the submodule contents. It preps a new submodule, creates an entry in .gitmodules and creates an empty initialized repository either at the given path in the working directory or in .git/modules with a gitlink from the working directory to the new repo.

\n\n

To fully emulate "git submodule add" call this function, then open the submodule repo and perform the clone step as needed. Lastly, call git_submodule_add_finalize() to wrap up adding the new submodule and .gitmodules to the index to be ready to commit.

\n\n

You must call git_submodule_free on the submodule object when done.

\n", "group": "submodule" }, "git_submodule_add_finalize": { @@ -21643,7 +21458,7 @@ "comment": null }, "description": "

Resolve the setup of a new git submodule.

\n", - "comments": "

This should be called on a submodule once you have called add setup\n and done the clone of the submodule. This adds the .gitmodules file\n and the newly cloned submodule to the index to be ready to be committed\n (but doesn't actually do the commit).

\n", + "comments": "

This should be called on a submodule once you have called add setup and done the clone of the submodule. This adds the .gitmodules file and the newly cloned submodule to the index to be ready to be committed (but doesn't actually do the commit).

\n", "group": "submodule" }, "git_submodule_add_to_index": { @@ -21692,7 +21507,7 @@ "comment": " Pointer to `git_repository`" }, "description": "

Get the containing repository for a submodule.

\n", - "comments": "

This returns a pointer to the repository that contains the submodule.\n This is a just a reference to the repository that was passed to the\n original git_submodule_lookup() call, so if that repository has been\n freed, then this may be a dangling reference.

\n", + "comments": "

This returns a pointer to the repository that contains the submodule. This is a just a reference to the repository that was passed to the original git_submodule_lookup() call, so if that repository has been freed, then this may be a dangling reference.

\n", "group": "submodule" }, "git_submodule_name": { @@ -21718,7 +21533,7 @@ "group": "submodule", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_submodule_name-24" + "ex/HEAD/status.html#git_submodule_name-20" ] } }, @@ -21741,11 +21556,11 @@ "comment": " Pointer to the submodule path" }, "description": "

Get the path to the submodule.

\n", - "comments": "

The path is almost always the same as the submodule name, but the\n two are actually not required to match.

\n", + "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/v0.28.0/status.html#git_submodule_path-25" + "ex/HEAD/status.html#git_submodule_path-21" ] } }, @@ -21854,7 +21669,7 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set the branch for the submodule in the configuration

\n", - "comments": "

After calling this, you may wish to call git_submodule_sync() to\n write the changes to the checked out submodule repository.

\n", + "comments": "

After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.

\n", "group": "submodule" }, "git_submodule_set_url": { @@ -21886,7 +21701,7 @@ "comment": " 0 on success, \n<\n0 on failure" }, "description": "

Set the URL for the submodule in the configuration

\n", - "comments": "

After calling this, you may wish to call git_submodule_sync() to\n write the changes to the checked out submodule repository.

\n", + "comments": "

After calling this, you may wish to call git_submodule_sync() to write the changes to the checked out submodule repository.

\n", "group": "submodule" }, "git_submodule_index_id": { @@ -21952,7 +21767,7 @@ "comment": " Pointer to git_oid or NULL if submodule is not checked out." }, "description": "

Get the OID for the submodule in the current working directory.

\n", - "comments": "

This returns the OID that corresponds to looking up 'HEAD' in the checked\n out submodule. If there are pending changes in the index or anything\n else, this won't notice that. You should call git_submodule_status()\n for a more complete picture about the state of the working directory.

\n", + "comments": "

This returns the OID that corresponds to looking up 'HEAD' in the checked out submodule. If there are pending changes in the index or anything else, this won't notice that. You should call git_submodule_status() for a more complete picture about the state of the working directory.

\n", "group": "submodule" }, "git_submodule_ignore": { @@ -21974,7 +21789,7 @@ "comment": " The current git_submodule_ignore_t valyue what will be used for\n this submodule." }, "description": "

Get the ignore rule that will be used for the submodule.

\n", - "comments": "

These values control the behavior of git_submodule_status() for this\n submodule. There are four ignore values:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_NONE will consider any change to the contents\nof the submodule from a clean checkout to be dirty, including the\naddition of untracked files. This is the default if unspecified.
  • \n
  • GIT_SUBMODULE_IGNORE_UNTRACKED examines the contents of the\nworking tree (i.e. call git_status_foreach() on the submodule) but\nUNTRACKED files will not count as making the submodule dirty.
  • \n
  • GIT_SUBMODULE_IGNORE_DIRTY means to only check if the HEAD of the\nsubmodule has moved for status. This is fast since it does not need to\nscan the working tree of the submodule at all.
  • \n
  • GIT_SUBMODULE_IGNORE_ALL means not to open the submodule repo.\nThe working directory will be consider clean so long as there is a\nchecked out version present.
  • \n
\n", + "comments": "

These values control the behavior of git_submodule_status() for this submodule. There are four ignore values:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_NONE will consider any change to the contents of the submodule from a clean checkout to be dirty, including the addition of untracked files. This is the default if unspecified. - GIT_SUBMODULE_IGNORE_UNTRACKED examines the contents of the working tree (i.e. call git_status_foreach() on the submodule) but UNTRACKED files will not count as making the submodule dirty. - GIT_SUBMODULE_IGNORE_DIRTY means to only check if the HEAD of the submodule has moved for status. This is fast since it does not need to scan the working tree of the submodule at all. - GIT_SUBMODULE_IGNORE_ALL means not to open the submodule repo. The working directory will be consider clean so long as there is a checked out version present.
  • \n
\n", "group": "submodule" }, "git_submodule_set_ignore": { @@ -22028,7 +21843,7 @@ "comment": " The current git_submodule_update_t value that will be used\n for this submodule." }, "description": "

Get the update rule that will be used for the submodule.

\n", - "comments": "

This value controls the behavior of the git submodule update command.\n There are four useful values documented with git_submodule_update_t.

\n", + "comments": "

This value controls the behavior of the git submodule update command. There are four useful values documented with git_submodule_update_t.

\n", "group": "submodule" }, "git_submodule_set_update": { @@ -22082,7 +21897,7 @@ "comment": " 0 if fetchRecurseSubmodules is false, 1 if true" }, "description": "

Read the fetchRecurseSubmodules rule for a submodule.

\n", - "comments": "

This accesses the submodule.\n<name

\n\n
\n

.fetchRecurseSubmodules value for\n the submodule that controls fetching behavior for the submodule.

\n
\n\n

Note that at this time, libgit2 does not honor this setting and the\n fetch functionality current ignores submodules.

\n", + "comments": "

This accesses the submodule..fetchRecurseSubmodules value for the submodule that controls fetching behavior for the submodule.

\n\n

Note that at this time, libgit2 does not honor this setting and the fetch functionality current ignores submodules.

\n", "group": "submodule" }, "git_submodule_set_fetch_recurse_submodules": { @@ -22141,7 +21956,7 @@ "comment": " 0 on success, \n<\n0 on failure." }, "description": "

Copy submodule info into ".git/config" file.

\n", - "comments": "

Just like "git submodule init", this copies information about the\n submodule into ".git/config". You can use the accessor functions\n above to alter the in-memory git_submodule object and control what\n is written to the config, overriding what is in .gitmodules.

\n", + "comments": "

Just like "git submodule init", this copies information about the submodule into ".git/config". You can use the accessor functions above to alter the in-memory git_submodule object and control what is written to the config, overriding what is in .gitmodules.

\n", "group": "submodule" }, "git_submodule_repo_init": { @@ -22173,7 +21988,7 @@ "comment": " 0 on success, \n<\n0 on failure." }, "description": "

Set up the subrepository for a submodule in preparation for clone.

\n", - "comments": "

This function can be called to init and set up a submodule\n repository from a submodule in preparation to clone it from\n its remote.

\n", + "comments": "

This function can be called to init and set up a submodule repository from a submodule in preparation to clone it from its remote.

\n", "group": "submodule" }, "git_submodule_sync": { @@ -22195,7 +22010,7 @@ "comment": null }, "description": "

Copy submodule remote info into submodule repo.

\n", - "comments": "

This copies the information about the submodules URL into the checked out\n submodule config, acting like "git submodule sync". This is useful if\n you have altered the URL for the submodule (or it has been altered by a\n fetch of upstream changes) and you need to update your local repo.

\n", + "comments": "

This copies the information about the submodules URL into the checked out submodule config, acting like "git submodule sync". This is useful if you have altered the URL for the submodule (or it has been altered by a fetch of upstream changes) and you need to update your local repo.

\n", "group": "submodule" }, "git_submodule_open": { @@ -22222,7 +22037,7 @@ "comment": " 0 on success, \n<\n0 if submodule repo could not be opened." }, "description": "

Open the repository for a submodule.

\n", - "comments": "

This is a newly opened repository object. The caller is responsible for\n calling git_repository_free() on it when done. Multiple calls to this\n function will return distinct git_repository objects. This will only\n work if the submodule is checked out into the working directory.

\n", + "comments": "

This is a newly opened repository object. The caller is responsible for calling git_repository_free() on it when done. Multiple calls to this function will return distinct git_repository objects. This will only work if the submodule is checked out into the working directory.

\n", "group": "submodule" }, "git_submodule_reload": { @@ -22249,7 +22064,7 @@ "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\n you have reason to believe that it has changed.

\n", + "comments": "

Call this to reread cached submodule information for this submodule if you have reason to believe that it has changed.

\n", "group": "submodule" }, "git_submodule_status": { @@ -22286,11 +22101,11 @@ "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\n will return a combination of the GIT_SUBMODULE_STATUS values above.\n How deeply it examines the working directory to do this will depend\n on the git_submodule_ignore_t value for the submodule.

\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.

\n", "group": "submodule", "examples": { "status.c": [ - "ex/v0.28.0/status.html#git_submodule_status-26" + "ex/HEAD/status.html#git_submodule_status-22" ] } }, @@ -22318,2696 +22133,277 @@ "comment": " 0 on success, \n<\n0 on error" }, "description": "

Get the locations of submodule information.

\n", - "comments": "

This is a bit like a very lightweight version of git_submodule_status.\n It just returns a made of the first four submodule status values (i.e.\n the ones like GIT_SUBMODULE_STATUS_IN_HEAD, etc) that tell you where the\n submodule data comes from (i.e. the HEAD commit, gitmodules file, etc.).\n This can be useful if you want to know if the submodule is present in the\n working directory at this point in time, etc.

\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.

\n", "group": "submodule" }, - "git_stdalloc_init_allocator": { - "type": "function", - "file": "git2/sys/alloc.h", - "line": 85, - "lineto": 85, - "args": [ - { - "name": "allocator", - "type": "git_allocator *", - "comment": "The allocator that is to be initialized." - } - ], - "argline": "git_allocator *allocator", - "sig": "git_allocator *", - "return": { - "type": "int", - "comment": " An error code or 0." - }, - "description": "

Initialize the allocator structure to use the stdalloc pointer.

\n", - "comments": "

Set up the structure so that all of its members are using the standard\n "stdalloc" allocator functions. The structure can then be used with\n git_allocator_setup.

\n", - "group": "stdalloc" - }, - "git_win32_crtdbg_init_allocator": { - "type": "function", - "file": "git2/sys/alloc.h", - "line": 97, - "lineto": 97, - "args": [ - { - "name": "allocator", - "type": "git_allocator *", - "comment": "The allocator that is to be initialized." - } - ], - "argline": "git_allocator *allocator", - "sig": "git_allocator *", - "return": { - "type": "int", - "comment": " An error code or 0." - }, - "description": "

Initialize the allocator structure to use the crtdbg pointer.

\n", - "comments": "

Set up the structure so that all of its members are using the "crtdbg"\n allocator functions. Note that this allocator is only available on Windows\n platforms and only if libgit2 is being compiled with "-DMSVC_CRTDBG".

\n", - "group": "win32" - }, - "git_commit_create_from_ids": { + "git_tag_lookup": { "type": "function", - "file": "git2/sys/commit.h", - "line": 34, - "lineto": 44, + "file": "git2/tag.h", + "line": 33, + "lineto": 34, "args": [ { - "name": "id", - "type": "git_oid *", - "comment": null + "name": "out", + "type": "git_tag **", + "comment": "pointer to the looked up tag" }, { "name": "repo", "type": "git_repository *", - "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 + "comment": "the repo to use when locating the tag." }, { - "name": "tree", + "name": "id", "type": "const git_oid *", - "comment": null - }, - { - "name": "parent_count", - "type": "size_t", - "comment": null - }, - { - "name": "parents", - "type": "const git_oid *[]", - "comment": null + "comment": "identity of the tag to locate." } ], - "argline": "git_oid *id, git_repository *repo, const char *update_ref, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message, const git_oid *tree, size_t parent_count, const git_oid *[] parents", - "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_oid *::size_t::const git_oid *[]", + "argline": "git_tag **out, git_repository *repo, const git_oid *id", + "sig": "git_tag **::git_repository *::const git_oid *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code" }, - "description": "

Create new commit in the repository from a list of git_oid values.

\n", - "comments": "

See documentation for git_commit_create() for information about the\n parameters, as the meaning is identical excepting that tree and\n parents now take git_oid. This is a dangerous API in that nor\n the tree, neither the parents list of git_oids are checked for\n validity.

\n", - "group": "commit" + "description": "

Lookup a tag object from the repository.

\n", + "comments": "", + "group": "tag", + "examples": { + "general.c": [ + "ex/HEAD/general.html#git_tag_lookup-84" + ] + } }, - "git_commit_create_from_callback": { + "git_tag_lookup_prefix": { "type": "function", - "file": "git2/sys/commit.h", - "line": 66, - "lineto": 76, + "file": "git2/tag.h", + "line": 48, + "lineto": 49, "args": [ { - "name": "id", - "type": "git_oid *", - "comment": null + "name": "out", + "type": "git_tag **", + "comment": "pointer to the looked up tag" }, { "name": "repo", "type": "git_repository *", - "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 + "comment": "the repo to use when locating the tag." }, { - "name": "tree", + "name": "id", "type": "const git_oid *", - "comment": null - }, - { - "name": "parent_cb", - "type": "git_commit_parent_callback", - "comment": null + "comment": "identity of the tag to locate." }, { - "name": "parent_payload", - "type": "void *", - "comment": null + "name": "len", + "type": "size_t", + "comment": "the length of the short identifier" } ], - "argline": "git_oid *id, git_repository *repo, const char *update_ref, const git_signature *author, const git_signature *committer, const char *message_encoding, const char *message, const git_oid *tree, git_commit_parent_callback parent_cb, void *parent_payload", - "sig": "git_oid *::git_repository *::const char *::const git_signature *::const git_signature *::const char *::const char *::const git_oid *::git_commit_parent_callback::void *", + "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": null + "comment": " 0 or an error code" }, - "description": "

Create a new commit in the repository with an callback to supply parents.

\n", - "comments": "

See documentation for git_commit_create() for information about the\n parameters, as the meaning is identical excepting that tree takes a\n git_oid and doesn't check for validity, and parent_cb is invoked\n with parent_payload and should return git_oid values or NULL to\n indicate that all parents are accounted for.

\n", - "group": "commit" + "description": "

Lookup a tag object from the repository,\n given a prefix of its identifier (short id).

\n", + "comments": "", + "group": "tag" }, - "git_config_init_backend": { + "git_tag_free": { "type": "function", - "file": "git2/sys/config.h", - "line": 97, - "lineto": 99, + "file": "git2/tag.h", + "line": 61, + "lineto": 61, "args": [ { - "name": "backend", - "type": "git_config_backend *", - "comment": "the `git_config_backend` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "Version of struct; pass `GIT_CONFIG_BACKEND_VERSION`" + "name": "tag", + "type": "git_tag *", + "comment": "the tag to close" } ], - "argline": "git_config_backend *backend, unsigned int version", - "sig": "git_config_backend *::unsigned int", + "argline": "git_tag *tag", + "sig": "git_tag *", "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." + "type": "void", + "comment": null }, - "description": "

Initializes a git_config_backend with default values. Equivalent to\n creating an instance with GIT_CONFIG_BACKEND_INIT.

\n", - "comments": "", - "group": "config" + "description": "

Close an open tag

\n", + "comments": "

You can no longer use the git_tag pointer after this call.

\n\n

IMPORTANT: 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" + ] + } }, - "git_config_add_backend": { + "git_tag_id": { "type": "function", - "file": "git2/sys/config.h", - "line": 121, - "lineto": 126, + "file": "git2/tag.h", + "line": 69, + "lineto": 69, "args": [ { - "name": "cfg", - "type": "git_config *", - "comment": "the configuration to add the file to" - }, - { - "name": "file", - "type": "git_config_backend *", - "comment": "the configuration file (backend) to add" - }, - { - "name": "level", - "type": "git_config_level_t", - "comment": "the priority level of the backend" - }, - { - "name": "repo", - "type": "const git_repository *", - "comment": "optional repository to allow parsing of\n conditional includes" - }, - { - "name": "force", - "type": "int", - "comment": "if a config file already exists for the given\n priority level, replace it" + "name": "tag", + "type": "const git_tag *", + "comment": "a previously loaded tag." } ], - "argline": "git_config *cfg, git_config_backend *file, git_config_level_t level, const git_repository *repo, int force", - "sig": "git_config *::git_config_backend *::git_config_level_t::const git_repository *::int", + "argline": "const git_tag *tag", + "sig": "const git_tag *", "return": { - "type": "int", - "comment": " 0 on success, GIT_EEXISTS when adding more than one file\n for a given priority level (and force_replace set to 0), or error code" + "type": "const git_oid *", + "comment": " object identity for the tag." }, - "description": "

Add a generic config file instance to an existing config

\n", - "comments": "

Note that the configuration object will free the file\n automatically.

\n\n

Further queries on this config object will access each\n of the config file instances in order (instances with\n a higher priority level will be accessed first).

\n", - "group": "config" + "description": "

Get the id of a tag.

\n", + "comments": "", + "group": "tag" }, - "git_diff_print_callback__to_buf": { + "git_tag_owner": { "type": "function", - "file": "git2/sys/diff.h", - "line": 37, - "lineto": 41, + "file": "git2/tag.h", + "line": 77, + "lineto": 77, "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": "tag", + "type": "const git_tag *", + "comment": "A previously loaded tag." } ], - "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload", - "sig": "const git_diff_delta *::const git_diff_hunk *::const git_diff_line *::void *", + "argline": "const git_tag *tag", + "sig": "const git_tag *", "return": { - "type": "int", - "comment": null + "type": "git_repository *", + "comment": " Repository that contains this tag." }, - "description": "

Diff print callback that writes to a git_buf.

\n", - "comments": "

This function is provided not for you to call it directly, but instead\n so you can use it as a function pointer to the git_diff_print or\n git_patch_print APIs. When using those APIs, you specify a callback\n to actually handle the diff and/or patch data.

\n\n

Use this callback to easily write that data to a git_buf buffer. You\n must pass a git_buf * value as the payload to the git_diff_print\n and/or git_patch_print function. The data will be appended to the\n buffer (after any existing content).

\n", - "group": "diff" + "description": "

Get the repository that contains the tag.

\n", + "comments": "", + "group": "tag" }, - "git_diff_print_callback__to_file_handle": { + "git_tag_target": { "type": "function", - "file": "git2/sys/diff.h", - "line": 57, - "lineto": 61, + "file": "git2/tag.h", + "line": 89, + "lineto": 89, "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": "target_out", + "type": "git_object **", + "comment": "pointer where to store the target" }, { - "name": "payload", - "type": "void *", - "comment": null + "name": "tag", + "type": "const git_tag *", + "comment": "a previously loaded tag." } ], - "argline": "const git_diff_delta *delta, const git_diff_hunk *hunk, const git_diff_line *line, void *payload", - "sig": "const git_diff_delta *::const git_diff_hunk *::const git_diff_line *::void *", + "argline": "git_object **target_out, const git_tag *tag", + "sig": "git_object **::const git_tag *", "return": { "type": "int", - "comment": null + "comment": " 0 or an error code" }, - "description": "

Diff print callback that writes to stdio FILE handle.

\n", - "comments": "

This function is provided not for you to call it directly, but instead\n so you can use it as a function pointer to the git_diff_print or\n git_patch_print APIs. When using those APIs, you specify a callback\n to actually handle the diff and/or patch data.

\n\n

Use this callback to easily write that data to a stdio FILE handle. You\n must pass a FILE * value (such as stdout or stderr or the return\n value from fopen()) as the payload to the git_diff_print\n and/or git_patch_print function. If you pass NULL, this will write\n data to stdout.

\n", - "group": "diff" + "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" + ] + } }, - "git_diff_get_perfdata": { + "git_tag_target_id": { "type": "function", - "file": "git2/sys/diff.h", - "line": 83, - "lineto": 84, + "file": "git2/tag.h", + "line": 97, + "lineto": 97, "args": [ { - "name": "out", - "type": "git_diff_perfdata *", - "comment": "Structure to be filled with diff performance data" - }, - { - "name": "diff", - "type": "const git_diff *", - "comment": "Diff to read performance data from" + "name": "tag", + "type": "const git_tag *", + "comment": "a previously loaded tag." } ], - "argline": "git_diff_perfdata *out, const git_diff *diff", - "sig": "git_diff_perfdata *::const git_diff *", + "argline": "const git_tag *tag", + "sig": "const git_tag *", "return": { - "type": "int", - "comment": " 0 for success, \n<\n0 for error" + "type": "const git_oid *", + "comment": " pointer to the OID" }, - "description": "

Get performance data for a diff object.

\n", + "description": "

Get the OID of the tagged object of a tag

\n", "comments": "", - "group": "diff" + "group": "tag", + "examples": { + "cat-file.c": [ + "ex/HEAD/cat-file.html#git_tag_target_id-31" + ] + } }, - "git_status_list_get_perfdata": { + "git_tag_target_type": { "type": "function", - "file": "git2/sys/diff.h", - "line": 89, - "lineto": 90, + "file": "git2/tag.h", + "line": 105, + "lineto": 105, "args": [ { - "name": "out", - "type": "git_diff_perfdata *", - "comment": null - }, - { - "name": "status", - "type": "const git_status_list *", - "comment": null + "name": "tag", + "type": "const git_tag *", + "comment": "a previously loaded tag." } ], - "argline": "git_diff_perfdata *out, const git_status_list *status", - "sig": "git_diff_perfdata *::const git_status_list *", + "argline": "const git_tag *tag", + "sig": "const git_tag *", "return": { - "type": "int", - "comment": null + "type": "git_object_t", + "comment": " type of the tagged object" }, - "description": "

Get performance data for diffs from a git_status_list

\n", + "description": "

Get the type of a tag's tagged object

\n", "comments": "", - "group": "status" + "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" + ] + } }, - "git_filter_lookup": { + "git_tag_name": { "type": "function", - "file": "git2/sys/filter.h", - "line": 27, - "lineto": 27, + "file": "git2/tag.h", + "line": 113, + "lineto": 113, "args": [ { - "name": "name", - "type": "const char *", - "comment": "The name of the filter" + "name": "tag", + "type": "const git_tag *", + "comment": "a previously loaded tag." } ], - "argline": "const char *name", - "sig": "const char *", + "argline": "const git_tag *tag", + "sig": "const git_tag *", "return": { - "type": "git_filter *", - "comment": " Pointer to the filter object or NULL if not found" + "type": "const char *", + "comment": " name of the tag" }, - "description": "

Look up a filter by name

\n", + "description": "

Get the name of a tag

\n", "comments": "", - "group": "filter" + "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" + ] + } }, - "git_filter_list_new": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 57, - "lineto": 61, - "args": [ - { - "name": "out", - "type": "git_filter_list **", - "comment": null - }, - { - "name": "repo", - "type": "git_repository *", - "comment": null - }, - { - "name": "mode", - "type": "git_filter_mode_t", - "comment": null - }, - { - "name": "options", - "type": "int", - "comment": null - } - ], - "argline": "git_filter_list **out, git_repository *repo, git_filter_mode_t mode, int options", - "sig": "git_filter_list **::git_repository *::git_filter_mode_t::int", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "filter" - }, - "git_filter_list_push": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 76, - "lineto": 77, - "args": [ - { - "name": "fl", - "type": "git_filter_list *", - "comment": null - }, - { - "name": "filter", - "type": "git_filter *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "git_filter_list *fl, git_filter *filter, void *payload", - "sig": "git_filter_list *::git_filter *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Add a filter to a filter list with the given payload.

\n", - "comments": "

Normally you won't have to do this because the filter list is created\n by calling the "check" function on registered filters when the filter\n attributes are set, but this does allow more direct manipulation of\n filter lists when desired.

\n\n

Note that normally the "check" function can set up a payload for the\n filter. Using this function, you can either pass in a payload if you\n know the expected payload format, or you can pass NULL. Some filters\n may fail with a NULL payload. Good luck!

\n", - "group": "filter" - }, - "git_filter_list_length": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 90, - "lineto": 90, - "args": [ - { - "name": "fl", - "type": "const git_filter_list *", - "comment": "A filter list" - } - ], - "argline": "const git_filter_list *fl", - "sig": "const git_filter_list *", - "return": { - "type": "size_t", - "comment": " The number of filters in the list" - }, - "description": "

Look up how many filters are in the list

\n", - "comments": "

We will attempt to apply all of these filters to any data passed in,\n but note that the filter apply action still has the option of skipping\n data that is passed in (for example, the CRLF filter will skip data\n that appears to be binary).

\n", - "group": "filter" - }, - "git_filter_source_repo": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 100, - "lineto": 100, - "args": [ - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "git_repository *", - "comment": null - }, - "description": "

Get the repository that the source data is coming from.

\n", - "comments": "", - "group": "filter" - }, - "git_filter_source_path": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 105, - "lineto": 105, - "args": [ - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "const char *", - "comment": null - }, - "description": "

Get the path that the source data is coming from.

\n", - "comments": "", - "group": "filter" - }, - "git_filter_source_filemode": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 111, - "lineto": 111, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "filter" - }, - "git_filter_source_id": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 118, - "lineto": 118, - "args": [ - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "const git_oid *", - "comment": null - }, - "description": "

Get the OID of the source\n If the OID is unknown (often the case with GIT_FILTER_CLEAN) then\n this will return NULL.

\n", - "comments": "", - "group": "filter" - }, - "git_filter_source_mode": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 123, - "lineto": 123, - "args": [ - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "const git_filter_source *src", - "sig": "const git_filter_source *", - "return": { - "type": "git_filter_mode_t", - "comment": null - }, - "description": "

Get the git_filter_mode_t to be used

\n", - "comments": "", - "group": "filter" - }, - "git_filter_source_flags": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 128, - "lineto": 128, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "", - "group": "filter" - }, - "git_filter_init": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 284, - "lineto": 284, - "args": [ - { - "name": "filter", - "type": "git_filter *", - "comment": "the `git_filter` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "Version the struct; pass `GIT_FILTER_VERSION`" - } - ], - "argline": "git_filter *filter, unsigned int version", - "sig": "git_filter *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "

Initializes a git_filter with default values. Equivalent to\n creating an instance with GIT_FILTER_INIT.

\n", - "comments": "", - "group": "filter" - }, - "git_filter_register": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 312, - "lineto": 313, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "A name by which the filter can be referenced. Attempting\n \t\t\tto register with an in-use name will return GIT_EEXISTS." - }, - { - "name": "filter", - "type": "git_filter *", - "comment": "The filter definition. This pointer will be stored as is\n \t\t\tby libgit2 so it must be a durable allocation (either static\n \t\t\tor on the heap)." - }, - { - "name": "priority", - "type": "int", - "comment": "The priority for filter application" - } - ], - "argline": "const char *name, git_filter *filter, int priority", - "sig": "const char *::git_filter *::int", - "return": { - "type": "int", - "comment": " 0 on successful registry, error code \n<\n0 on failure" - }, - "description": "

Register a filter under a given name with a given priority.

\n", - "comments": "

As mentioned elsewhere, the initialize callback will not be invoked\n immediately. It is deferred until the filter is used in some way.

\n\n

A filter's attribute checks and check and apply callbacks will be\n issued in order of priority on smudge (to workdir), and in reverse\n order of priority on clean (to odb).

\n\n

Two filters are preregistered with libgit2:\n - GIT_FILTER_CRLF with priority 0\n - GIT_FILTER_IDENT with priority 100

\n\n

Currently the filter registry is not thread safe, so any registering or\n deregistering of filters must be done outside of any possible usage of\n the filters (i.e. during application setup or shutdown).

\n", - "group": "filter" - }, - "git_filter_unregister": { - "type": "function", - "file": "git2/sys/filter.h", - "line": 328, - "lineto": 328, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "The name under which the filter was registered" - } - ], - "argline": "const char *name", - "sig": "const char *", - "return": { - "type": "int", - "comment": " 0 on success, error code \n<\n0 on failure" - }, - "description": "

Remove the filter with the given name

\n", - "comments": "

Attempting to remove the builtin libgit2 filters is not permitted and\n will return an error.

\n\n

Currently the filter registry is not thread safe, so any registering or\n deregistering of filters must be done outside of any possible usage of\n the filters (i.e. during application setup or shutdown).

\n", - "group": "filter" - }, - "git_hashsig_create": { - "type": "function", - "file": "git2/sys/hashsig.h", - "line": 62, - "lineto": 66, - "args": [ - { - "name": "out", - "type": "git_hashsig **", - "comment": "The computed similarity signature." - }, - { - "name": "buf", - "type": "const char *", - "comment": "The input buffer." - }, - { - "name": "buflen", - "type": "size_t", - "comment": "The input buffer size." - }, - { - "name": "opts", - "type": "git_hashsig_option_t", - "comment": "The signature computation options (see above)." - } - ], - "argline": "git_hashsig **out, const char *buf, size_t buflen, git_hashsig_option_t opts", - "sig": "git_hashsig **::const char *::size_t::git_hashsig_option_t", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EBUFS if the buffer doesn't contain enough data to\n compute a valid signature (unless GIT_HASHSIG_ALLOW_SMALL_FILES is set), or\n error code." - }, - "description": "

Compute a similarity signature for a text buffer

\n", - "comments": "

If you have passed the option GIT_HASHSIG_IGNORE_WHITESPACE, then the\n whitespace will be removed from the buffer while it is being processed,\n modifying the buffer in place. Sorry about that!

\n", - "group": "hashsig" - }, - "git_hashsig_create_fromfile": { - "type": "function", - "file": "git2/sys/hashsig.h", - "line": 81, - "lineto": 84, - "args": [ - { - "name": "out", - "type": "git_hashsig **", - "comment": "The computed similarity signature." - }, - { - "name": "path", - "type": "const char *", - "comment": "The path to the input file." - }, - { - "name": "opts", - "type": "git_hashsig_option_t", - "comment": "The signature computation options (see above)." - } - ], - "argline": "git_hashsig **out, const char *path, git_hashsig_option_t opts", - "sig": "git_hashsig **::const char *::git_hashsig_option_t", - "return": { - "type": "int", - "comment": " 0 on success, GIT_EBUFS if the buffer doesn't contain enough data to\n compute a valid signature (unless GIT_HASHSIG_ALLOW_SMALL_FILES is set), or\n error code." - }, - "description": "

Compute a similarity signature for a text file

\n", - "comments": "

This walks through the file, only loading a maximum of 4K of file data at\n a time. Otherwise, it acts just like git_hashsig_create.

\n", - "group": "hashsig" - }, - "git_hashsig_free": { - "type": "function", - "file": "git2/sys/hashsig.h", - "line": 91, - "lineto": 91, - "args": [ - { - "name": "sig", - "type": "git_hashsig *", - "comment": "The similarity signature to free." - } - ], - "argline": "git_hashsig *sig", - "sig": "git_hashsig *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Release memory for a content similarity signature

\n", - "comments": "", - "group": "hashsig" - }, - "git_hashsig_compare": { - "type": "function", - "file": "git2/sys/hashsig.h", - "line": 100, - "lineto": 102, - "args": [ - { - "name": "a", - "type": "const git_hashsig *", - "comment": "The first similarity signature to compare." - }, - { - "name": "b", - "type": "const git_hashsig *", - "comment": "The second similarity signature to compare." - } - ], - "argline": "const git_hashsig *a, const git_hashsig *b", - "sig": "const git_hashsig *::const git_hashsig *", - "return": { - "type": "int", - "comment": " [0 to 100] on success as the similarity score, or error code." - }, - "description": "

Measure similarity score between two similarity signatures

\n", - "comments": "", - "group": "hashsig" - }, - "git_index_name_entrycount": { - "type": "function", - "file": "git2/sys/index.h", - "line": 48, - "lineto": 48, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "size_t", - "comment": " integer of count of current filename conflict entries" - }, - "description": "

Get the count of filename conflict entries currently in the index.

\n", - "comments": "", - "group": "index" - }, - "git_index_name_get_byindex": { - "type": "function", - "file": "git2/sys/index.h", - "line": 60, - "lineto": 61, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "n", - "type": "size_t", - "comment": "the position of the entry" - } - ], - "argline": "git_index *index, size_t n", - "sig": "git_index *::size_t", - "return": { - "type": "const git_index_name_entry *", - "comment": " a pointer to the filename conflict entry; NULL if out of bounds" - }, - "description": "

Get a filename conflict entry from the index.

\n", - "comments": "

The returned entry is read-only and should not be modified\n or freed by the caller.

\n", - "group": "index" - }, - "git_index_name_add": { - "type": "function", - "file": "git2/sys/index.h", - "line": 71, - "lineto": 72, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "ancestor", - "type": "const char *", - "comment": "the path of the file as it existed in the ancestor" - }, - { - "name": "ours", - "type": "const char *", - "comment": "the path of the file as it existed in our tree" - }, - { - "name": "theirs", - "type": "const char *", - "comment": "the path of the file as it existed in their tree" - } - ], - "argline": "git_index *index, const char *ancestor, const char *ours, const char *theirs", - "sig": "git_index *::const char *::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Record the filenames involved in a rename conflict.

\n", - "comments": "", - "group": "index" - }, - "git_index_name_clear": { - "type": "function", - "file": "git2/sys/index.h", - "line": 79, - "lineto": 79, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Remove all filename conflict entries.

\n", - "comments": "", - "group": "index" - }, - "git_index_reuc_entrycount": { - "type": "function", - "file": "git2/sys/index.h", - "line": 96, - "lineto": 96, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "size_t", - "comment": " integer of count of current resolve undo entries" - }, - "description": "

Get the count of resolve undo entries currently in the index.

\n", - "comments": "", - "group": "index" - }, - "git_index_reuc_find": { - "type": "function", - "file": "git2/sys/index.h", - "line": 107, - "lineto": 107, - "args": [ - { - "name": "at_pos", - "type": "size_t *", - "comment": "the address to which the position of the reuc entry is written (optional)" - }, - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", - "type": "const char *", - "comment": "path to search" - } - ], - "argline": "size_t *at_pos, git_index *index, const char *path", - "sig": "size_t *::git_index *::const char *", - "return": { - "type": "int", - "comment": " 0 if found, \n<\n 0 otherwise (GIT_ENOTFOUND)" - }, - "description": "

Finds the resolve undo entry that points to the given path in the Git\n index.

\n", - "comments": "", - "group": "index" - }, - "git_index_reuc_get_bypath": { - "type": "function", - "file": "git2/sys/index.h", - "line": 119, - "lineto": 119, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", - "type": "const char *", - "comment": "path to search" - } - ], - "argline": "git_index *index, const char *path", - "sig": "git_index *::const char *", - "return": { - "type": "const git_index_reuc_entry *", - "comment": " the resolve undo entry; NULL if not found" - }, - "description": "

Get a resolve undo entry from the index.

\n", - "comments": "

The returned entry is read-only and should not be modified\n or freed by the caller.

\n", - "group": "index" - }, - "git_index_reuc_get_byindex": { - "type": "function", - "file": "git2/sys/index.h", - "line": 131, - "lineto": 131, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "n", - "type": "size_t", - "comment": "the position of the entry" - } - ], - "argline": "git_index *index, size_t n", - "sig": "git_index *::size_t", - "return": { - "type": "const git_index_reuc_entry *", - "comment": " a pointer to the resolve undo entry; NULL if out of bounds" - }, - "description": "

Get a resolve undo entry from the index.

\n", - "comments": "

The returned entry is read-only and should not be modified\n or freed by the caller.

\n", - "group": "index" - }, - "git_index_reuc_add": { - "type": "function", - "file": "git2/sys/index.h", - "line": 155, - "lineto": 158, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "path", - "type": "const char *", - "comment": "filename to add" - }, - { - "name": "ancestor_mode", - "type": "int", - "comment": "mode of the ancestor file" - }, - { - "name": "ancestor_id", - "type": "const git_oid *", - "comment": "oid of the ancestor file" - }, - { - "name": "our_mode", - "type": "int", - "comment": "mode of our file" - }, - { - "name": "our_id", - "type": "const git_oid *", - "comment": "oid of our file" - }, - { - "name": "their_mode", - "type": "int", - "comment": "mode of their file" - }, - { - "name": "their_id", - "type": "const git_oid *", - "comment": "oid of their file" - } - ], - "argline": "git_index *index, const char *path, int ancestor_mode, const git_oid *ancestor_id, int our_mode, const git_oid *our_id, int their_mode, const git_oid *their_id", - "sig": "git_index *::const char *::int::const git_oid *::int::const git_oid *::int::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Adds a resolve undo entry for a file based on the given parameters.

\n", - "comments": "

The resolve undo entry contains the OIDs of files that were involved\n in a merge conflict after the conflict has been resolved. This allows\n conflicts to be re-resolved later.

\n\n

If there exists a resolve undo entry for the given path in the index,\n it will be removed.

\n\n

This method will fail in bare index instances.

\n", - "group": "index" - }, - "git_index_reuc_remove": { - "type": "function", - "file": "git2/sys/index.h", - "line": 167, - "lineto": 167, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - }, - { - "name": "n", - "type": "size_t", - "comment": "position of the resolve undo entry to remove" - } - ], - "argline": "git_index *index, size_t n", - "sig": "git_index *::size_t", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Remove an resolve undo entry from the index

\n", - "comments": "", - "group": "index" - }, - "git_index_reuc_clear": { - "type": "function", - "file": "git2/sys/index.h", - "line": 174, - "lineto": 174, - "args": [ - { - "name": "index", - "type": "git_index *", - "comment": "an existing index object" - } - ], - "argline": "git_index *index", - "sig": "git_index *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Remove all resolve undo entries from the index

\n", - "comments": "", - "group": "index" - }, - "git_mempack_new": { - "type": "function", - "file": "git2/sys/mempack.h", - "line": 45, - "lineto": 45, - "args": [ - { - "name": "out", - "type": "git_odb_backend **", - "comment": "Pointer where to store the ODB backend" - } - ], - "argline": "git_odb_backend **out", - "sig": "git_odb_backend **", - "return": { - "type": "int", - "comment": " 0 on success; error code otherwise" - }, - "description": "

Instantiate a new mempack backend.

\n", - "comments": "

The backend must be added to an existing ODB with the highest\n priority.

\n\n
 git_mempack_new(\n
\n\n

&mempacker\n);\n git_repository_odb(\n&odb\n, repository);\n git_odb_add_backend(odb, mempacker, 999);

\n\n

Once the backend has been loaded, all writes to the ODB will\n instead be queued in memory, and can be finalized with\n git_mempack_dump.

\n\n

Subsequent reads will also be served from the in-memory store\n to ensure consistency, until the memory store is dumped.

\n", - "group": "mempack" - }, - "git_mempack_dump": { - "type": "function", - "file": "git2/sys/mempack.h", - "line": 68, - "lineto": 68, - "args": [ - { - "name": "pack", - "type": "git_buf *", - "comment": "Buffer where to store the raw packfile" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "The active repository where the backend is loaded" - }, - { - "name": "backend", - "type": "git_odb_backend *", - "comment": "The mempack backend" - } - ], - "argline": "git_buf *pack, git_repository *repo, git_odb_backend *backend", - "sig": "git_buf *::git_repository *::git_odb_backend *", - "return": { - "type": "int", - "comment": " 0 on success; error code otherwise" - }, - "description": "

Dump all the queued in-memory writes to a packfile.

\n", - "comments": "

The contents of the packfile will be stored in the given buffer.\n It is the caller's responsibility to ensure that the generated\n packfile is available to the repository (e.g. by writing it\n to disk, or doing something crazy like distributing it across\n several copies of the repository over a network).

\n\n

Once the generated packfile is available to the repository,\n call git_mempack_reset to cleanup the memory store.

\n\n

Calling git_mempack_reset before the packfile has been\n written to disk will result in an inconsistent repository\n (the objects in the memory store won't be accessible).

\n", - "group": "mempack" - }, - "git_mempack_reset": { - "type": "function", - "file": "git2/sys/mempack.h", - "line": 82, - "lineto": 82, - "args": [ - { - "name": "backend", - "type": "git_odb_backend *", - "comment": "The mempack backend" - } - ], - "argline": "git_odb_backend *backend", - "sig": "git_odb_backend *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Reset the memory packer by clearing all the queued objects.

\n", - "comments": "

This assumes that git_mempack_dump has been called before to\n store all the queued objects into a single packfile.

\n\n

Alternatively, call reset without a previous dump to "undo"\n all the recently written objects, giving transaction-like\n semantics to the Git repository.

\n", - "group": "mempack" - }, - "git_merge_driver_lookup": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 32, - "lineto": 32, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "The name of the merge driver" - } - ], - "argline": "const char *name", - "sig": "const char *", - "return": { - "type": "git_merge_driver *", - "comment": " Pointer to the merge driver object or NULL if not found" - }, - "description": "

Look up a merge driver by name

\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_source_repo": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 44, - "lineto": 45, - "args": [ - { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } - ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_repository *", - "comment": null - }, - "description": "

Get the repository that the source data is coming from.

\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_source_ancestor": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 48, - "lineto": 49, - "args": [ - { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } - ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_index_entry *", - "comment": null - }, - "description": "

Gets the ancestor of the file to merge.

\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_source_ours": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 52, - "lineto": 53, - "args": [ - { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } - ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_index_entry *", - "comment": null - }, - "description": "

Gets the ours side of the file to merge.

\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_source_theirs": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 56, - "lineto": 57, - "args": [ - { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } - ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_index_entry *", - "comment": null - }, - "description": "

Gets the theirs side of the file to merge.

\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_source_file_options": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 60, - "lineto": 61, - "args": [ - { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } - ], - "argline": "const git_merge_driver_source *src", - "sig": "const git_merge_driver_source *", - "return": { - "type": "const git_merge_file_options *", - "comment": null - }, - "description": "

Gets the merge file options that the merge was invoked with

\n", - "comments": "", - "group": "merge" - }, - "git_merge_driver_register": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 162, - "lineto": 163, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "The name of this driver to match an attribute. Attempting\n \t\t\tto register with an in-use name will return GIT_EEXISTS." - }, - { - "name": "driver", - "type": "git_merge_driver *", - "comment": "The merge driver definition. This pointer will be stored\n\t\t\tas is by libgit2 so it must be a durable allocation (either\n\t\t\tstatic or on the heap)." - } - ], - "argline": "const char *name, git_merge_driver *driver", - "sig": "const char *::git_merge_driver *", - "return": { - "type": "int", - "comment": " 0 on successful registry, error code \n<\n0 on failure" - }, - "description": "

Register a merge driver under a given name.

\n", - "comments": "

As mentioned elsewhere, the initialize callback will not be invoked\n immediately. It is deferred until the driver is used in some way.

\n\n

Currently the merge driver registry is not thread safe, so any\n registering or deregistering of merge drivers must be done outside of\n any possible usage of the drivers (i.e. during application setup or\n shutdown).

\n", - "group": "merge" - }, - "git_merge_driver_unregister": { - "type": "function", - "file": "git2/sys/merge.h", - "line": 178, - "lineto": 178, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "The name under which the merge driver was registered" - } - ], - "argline": "const char *name", - "sig": "const char *", - "return": { - "type": "int", - "comment": " 0 on success, error code \n<\n0 on failure" - }, - "description": "

Remove the merge driver with the given name.

\n", - "comments": "

Attempting to remove the builtin libgit2 merge drivers is not permitted\n and will return an error.

\n\n

Currently the merge driver registry is not thread safe, so any\n registering or deregistering of drivers must be done outside of any\n possible usage of the drivers (i.e. during application setup or shutdown).

\n", - "group": "merge" - }, - "git_odb_init_backend": { - "type": "function", - "file": "git2/sys/odb_backend.h", - "line": 116, - "lineto": 118, - "args": [ - { - "name": "backend", - "type": "git_odb_backend *", - "comment": "the `git_odb_backend` struct to initialize." - }, - { - "name": "version", - "type": "unsigned int", - "comment": "Version the struct; pass `GIT_ODB_BACKEND_VERSION`" - } - ], - "argline": "git_odb_backend *backend, unsigned int version", - "sig": "git_odb_backend *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "

Initializes a git_odb_backend with default values. Equivalent to\n creating an instance with GIT_ODB_BACKEND_INIT.

\n", - "comments": "", - "group": "odb" - }, - "git_odb_backend_malloc": { - "type": "function", - "file": "git2/sys/odb_backend.h", - "line": 120, - "lineto": 120, - "args": [ - { - "name": "backend", - "type": "git_odb_backend *", - "comment": null - }, - { - "name": "len", - "type": "size_t", - "comment": null - } - ], - "argline": "git_odb_backend *backend, size_t len", - "sig": "git_odb_backend *::size_t", - "return": { - "type": "void *", - "comment": null - }, - "description": "", - "comments": "", - "group": "odb" - }, - "git_openssl_set_locking": { - "type": "function", - "file": "git2/sys/openssl.h", - "line": 34, - "lineto": 34, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "int", - "comment": " 0 on success, -1 if there are errors or if libgit2 was not\n built with OpenSSL and threading support." - }, - "description": "

Initialize the OpenSSL locks

\n", - "comments": "

OpenSSL requires the application to determine how it performs\n locking.

\n\n

This is a last-resort convenience function which libgit2 provides for\n allocating and initializing the locks as well as setting the\n locking function to use the system's native locking functions.

\n\n

The locking function will be cleared and the memory will be freed\n when you call git_threads_sutdown().

\n\n

If your programming language has an OpenSSL package/bindings, it\n likely sets up locking. You should very strongly prefer that over\n this function.

\n", - "group": "openssl" - }, - "git_path_is_gitfile": { - "type": "function", - "file": "git2/sys/path.h", - "line": 60, - "lineto": 60, - "args": [ - { - "name": "path", - "type": "const char *", - "comment": "the path component to check" - }, - { - "name": "pathlen", - "type": "size_t", - "comment": "the length of `path` that is to be checked" - }, - { - "name": "gitfile", - "type": "git_path_gitfile", - "comment": "which file to check against" - }, - { - "name": "fs", - "type": "git_path_fs", - "comment": "which filesystem-specific checks to use" - } - ], - "argline": "const char *path, size_t pathlen, git_path_gitfile gitfile, git_path_fs fs", - "sig": "const char *::size_t::git_path_gitfile::git_path_fs", - "return": { - "type": "int", - "comment": " 0 in case the file does not match, a positive value if\n it does; -1 in case of an error" - }, - "description": "

Check whether a path component corresponds to a .git$SUFFIX\n file.

\n", - "comments": "

As some filesystems do special things to filenames when\n writing files to disk, you cannot always do a plain string\n comparison to verify whether a file name matches an expected\n path or not. This function can do the comparison for you,\n depending on the filesystem you're on.

\n", - "group": "path" - }, - "git_refdb_init_backend": { - "type": "function", - "file": "git2/sys/refdb_backend.h", - "line": 183, - "lineto": 185, - "args": [ - { - "name": "backend", - "type": "git_refdb_backend *", - "comment": "the `git_refdb_backend` struct to initialize" - }, - { - "name": "version", - "type": "unsigned int", - "comment": "Version of struct; pass `GIT_REFDB_BACKEND_VERSION`" - } - ], - "argline": "git_refdb_backend *backend, unsigned int version", - "sig": "git_refdb_backend *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "

Initializes a git_refdb_backend with default values. Equivalent to\n creating an instance with GIT_REFDB_BACKEND_INIT.

\n", - "comments": "", - "group": "refdb" - }, - "git_refdb_backend_fs": { - "type": "function", - "file": "git2/sys/refdb_backend.h", - "line": 198, - "lineto": 200, - "args": [ - { - "name": "backend_out", - "type": "git_refdb_backend **", - "comment": "Output pointer to the git_refdb_backend object" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "Git repository to access" - } - ], - "argline": "git_refdb_backend **backend_out, git_repository *repo", - "sig": "git_refdb_backend **::git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 error code on failure" - }, - "description": "

Constructors for default filesystem-based refdb backend

\n", - "comments": "

Under normal usage, this is called for you when the repository is\n opened / created, but you can use this to explicitly construct a\n filesystem refdb backend for a repository.

\n", - "group": "refdb" - }, - "git_refdb_set_backend": { - "type": "function", - "file": "git2/sys/refdb_backend.h", - "line": 212, - "lineto": 214, - "args": [ - { - "name": "refdb", - "type": "git_refdb *", - "comment": "database to add the backend to" - }, - { - "name": "backend", - "type": "git_refdb_backend *", - "comment": "pointer to a git_refdb_backend instance" - } - ], - "argline": "git_refdb *refdb, git_refdb_backend *backend", - "sig": "git_refdb *::git_refdb_backend *", - "return": { - "type": "int", - "comment": " 0 on success; error code otherwise" - }, - "description": "

Sets the custom backend to an existing reference DB

\n", - "comments": "

The git_refdb will take ownership of the git_refdb_backend so you\n should NOT free it after calling this function.

\n", - "group": "refdb" - }, - "git_reflog_entry__alloc": { - "type": "function", - "file": "git2/sys/reflog.h", - "line": 16, - "lineto": 16, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "git_reflog_entry *", - "comment": null - }, - "description": "", - "comments": "", - "group": "reflog" - }, - "git_reflog_entry__free": { - "type": "function", - "file": "git2/sys/reflog.h", - "line": 17, - "lineto": 17, - "args": [ - { - "name": "entry", - "type": "git_reflog_entry *", - "comment": null - } - ], - "argline": "git_reflog_entry *entry", - "sig": "git_reflog_entry *", - "return": { - "type": "void", - "comment": null - }, - "description": "", - "comments": "", - "group": "reflog" - }, - "git_reference__alloc": { - "type": "function", - "file": "git2/sys/refs.h", - "line": 31, - "lineto": 34, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "the reference name" - }, - { - "name": "oid", - "type": "const git_oid *", - "comment": "the object id for a direct reference" - }, - { - "name": "peel", - "type": "const git_oid *", - "comment": "the first non-tag object's OID, or NULL" - } - ], - "argline": "const char *name, const git_oid *oid, const git_oid *peel", - "sig": "const char *::const git_oid *::const git_oid *", - "return": { - "type": "git_reference *", - "comment": " the created git_reference or NULL on error" - }, - "description": "

Create a new direct reference from an OID.

\n", - "comments": "", - "group": "reference" - }, - "git_reference__alloc_symbolic": { - "type": "function", - "file": "git2/sys/refs.h", - "line": 43, - "lineto": 45, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": "the reference name" - }, - { - "name": "target", - "type": "const char *", - "comment": "the target for a symbolic reference" - } - ], - "argline": "const char *name, const char *target", - "sig": "const char *::const char *", - "return": { - "type": "git_reference *", - "comment": " the created git_reference or NULL on error" - }, - "description": "

Create a new symbolic reference.

\n", - "comments": "", - "group": "reference" - }, - "git_repository_new": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 31, - "lineto": 31, - "args": [ - { - "name": "out", - "type": "git_repository **", - "comment": "The blank repository" - } - ], - "argline": "git_repository **out", - "sig": "git_repository **", - "return": { - "type": "int", - "comment": " 0 on success, or an error code" - }, - "description": "

Create a new repository with neither backends nor config object

\n", - "comments": "

Note that this is only useful if you wish to associate the repository\n with a non-filesystem-backed object database and config store.

\n", - "group": "repository" - }, - "git_repository__cleanup": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 44, - "lineto": 44, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": null - } - ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Reset all the internal state in a repository.

\n", - "comments": "

This will free all the mapped memory and internal objects\n of the repository and leave it in a "blank" state.

\n\n

There's no need to call this function directly unless you're\n trying to aggressively cleanup the repo before its\n deallocation. git_repository_free already performs this operation\n before deallocation the repo.

\n", - "group": "repository" - }, - "git_repository_reinit_filesystem": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 61, - "lineto": 63, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "recurse_submodules", - "type": "int", - "comment": "Should submodules be updated recursively" - } - ], - "argline": "git_repository *repo, int recurse_submodules", - "sig": "git_repository *::int", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n 0 on error" - }, - "description": "

Update the filesystem config settings for an open repository

\n", - "comments": "

When a repository is initialized, config values are set based on the\n properties of the filesystem that the repository is on, such as\n "core.ignorecase", "core.filemode", "core.symlinks", etc. If the\n repository is moved to a new filesystem, these properties may no\n longer be correct and API calls may not behave as expected. This\n call reruns the phase of repository initialization that sets those\n properties to compensate for the current filesystem of the repo.

\n", - "group": "repository" - }, - "git_repository_set_config": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 78, - "lineto": 78, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "config", - "type": "git_config *", - "comment": "A Config object" - } - ], - "argline": "git_repository *repo, git_config *config", - "sig": "git_repository *::git_config *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Set the configuration file for this repository

\n", - "comments": "

This configuration file will be used for all configuration\n queries involving this repository.

\n\n

The repository will keep a reference to the config file;\n the user must still free the config after setting it\n to the repository, or it will leak.

\n", - "group": "repository" - }, - "git_repository_set_odb": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 93, - "lineto": 93, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "odb", - "type": "git_odb *", - "comment": "An ODB object" - } - ], - "argline": "git_repository *repo, git_odb *odb", - "sig": "git_repository *::git_odb *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Set the Object Database for this repository

\n", - "comments": "

The ODB will be used for all object-related operations\n involving this repository.

\n\n

The repository will keep a reference to the ODB; the user\n must still free the ODB object after setting it to the\n repository, or it will leak.

\n", - "group": "repository" - }, - "git_repository_set_refdb": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 108, - "lineto": 108, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "refdb", - "type": "git_refdb *", - "comment": "An refdb object" - } - ], - "argline": "git_repository *repo, git_refdb *refdb", - "sig": "git_repository *::git_refdb *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Set the Reference Database Backend for this repository

\n", - "comments": "

The refdb will be used for all reference related operations\n involving this repository.

\n\n

The repository will keep a reference to the refdb; the user\n must still free the refdb object after setting it to the\n repository, or it will leak.

\n", - "group": "repository" - }, - "git_repository_set_index": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 123, - "lineto": 123, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "A repository object" - }, - { - "name": "index", - "type": "git_index *", - "comment": "An index object" - } - ], - "argline": "git_repository *repo, git_index *index", - "sig": "git_repository *::git_index *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Set the index file for this repository

\n", - "comments": "

This index will be used for all index-related operations\n involving this repository.

\n\n

The repository will keep a reference to the index file;\n the user must still free the index after setting it\n to the repository, or it will leak.

\n", - "group": "repository" - }, - "git_repository_set_bare": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 136, - "lineto": 136, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "Repo to make bare" - } - ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": " 0 on success, \n<\n0 on failure" - }, - "description": "

Set a repository to be bare.

\n", - "comments": "

Clear the working directory and set core.bare to true. You may also\n want to call git_repository_set_index(repo, NULL) since a bare repo\n typically does not have an index, but this function will not do that\n for you.

\n", - "group": "repository" - }, - "git_repository_submodule_cache_all": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 149, - "lineto": 150, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository whose submodules will be cached." - } - ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Load and cache all submodules.

\n", - "comments": "

Because the .gitmodules file is unstructured, loading submodules is an\n O(N) operation. Any operation (such as git_rebase_init) that requires\n accessing all submodules is O(N^2) in the number of submodules, if it\n has to look each one up individually. This function loads all submodules\n and caches them so that subsequent calls to git_submodule_lookup are O(1).

\n", - "group": "repository" - }, - "git_repository_submodule_cache_clear": { - "type": "function", - "file": "git2/sys/repository.h", - "line": 164, - "lineto": 165, - "args": [ - { - "name": "repo", - "type": "git_repository *", - "comment": "the repository whose submodule cache will be cleared" - } - ], - "argline": "git_repository *repo", - "sig": "git_repository *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Clear the submodule cache.

\n", - "comments": "

Clear the submodule cache populated by git_repository_submodule_cache_all.\n If there is no cache, do nothing.

\n\n

The cache incorporates data from the repository's configuration, as well\n as the state of the working tree, the index, and HEAD. So any time any\n of these has changed, the cache might become invalid.

\n", - "group": "repository" - }, - "git_stream_register": { - "type": "function", - "file": "git2/sys/stream.h", - "line": 98, - "lineto": 99, - "args": [ - { - "name": "type", - "type": "git_stream_t", - "comment": "the type or types of stream to register" - }, - { - "name": "registration", - "type": "git_stream_registration *", - "comment": "the registration data" - } - ], - "argline": "git_stream_t type, git_stream_registration *registration", - "sig": "git_stream_t::git_stream_registration *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Register stream constructors for the library to use

\n", - "comments": "

If a registration structure is already set, it will be overwritten.\n Pass NULL in order to deregister the current constructor and return\n to the system defaults.

\n\n

The type parameter may be a bitwise AND of types.

\n", - "group": "stream" - }, - "git_stream_register_tls": { - "type": "function", - "file": "git2/sys/stream.h", - "line": 130, - "lineto": 130, - "args": [ - { - "name": "ctor", - "type": "git_stream_cb", - "comment": null - } - ], - "argline": "git_stream_cb ctor", - "sig": "git_stream_cb", - "return": { - "type": "int", - "comment": null - }, - "description": "

Register a TLS stream constructor for the library to use. This stream\n will not support HTTP CONNECT proxies. This internally calls\n git_stream_register and is preserved for backward compatibility.

\n", - "comments": "

This function is deprecated, but there is no plan to remove this\n function at this time.

\n", - "group": "stream" - }, - "git_time_monotonic": { - "type": "function", - "file": "git2/sys/time.h", - "line": 27, - "lineto": 27, - "args": [], - "argline": "", - "sig": "", - "return": { - "type": "double", - "comment": null - }, - "description": "

Return a monotonic time value, useful for measuring running time\n and setting up timeouts.

\n", - "comments": "

The returned value is an arbitrary point in time -- it can only be\n used when comparing it to another git_time_monotonic call.

\n\n

The time is returned in seconds, with a decimal fraction that differs\n on accuracy based on the underlying system, but should be least\n accurate to Nanoseconds.

\n\n

This function cannot fail.

\n", - "group": "time" - }, - "git_transport_init": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 137, - "lineto": 139, - "args": [ - { - "name": "opts", - "type": "git_transport *", - "comment": "the `git_transport` struct to initialize" - }, - { - "name": "version", - "type": "unsigned int", - "comment": "Version of struct; pass `GIT_TRANSPORT_VERSION`" - } - ], - "argline": "git_transport *opts, unsigned int version", - "sig": "git_transport *::unsigned int", - "return": { - "type": "int", - "comment": " Zero on success; -1 on failure." - }, - "description": "

Initializes a git_transport with default values. Equivalent to\n creating an instance with GIT_TRANSPORT_INIT.

\n", - "comments": "", - "group": "transport" - }, - "git_transport_new": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 151, - "lineto": 151, - "args": [ - { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" - }, - { - "name": "url", - "type": "const char *", - "comment": "The URL to connect to" - } - ], - "argline": "git_transport **out, git_remote *owner, const char *url", - "sig": "git_transport **::git_remote *::const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Function to use to create a transport from a URL. The transport database\n is scanned to find a transport that implements the scheme of the URI (i.e.\n git:// or http://) and a transport object is returned to the caller.

\n", - "comments": "", - "group": "transport" - }, - "git_transport_ssh_with_paths": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 167, - "lineto": 167, - "args": [ - { - "name": "out", - "type": "git_transport **", - "comment": "the resulting transport" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "the owning remote" - }, - { - "name": "payload", - "type": "void *", - "comment": "a strarray with the paths" - } - ], - "argline": "git_transport **out, git_remote *owner, void *payload", - "sig": "git_transport **::git_remote *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an ssh transport with custom git command paths

\n", - "comments": "

This is a factory function suitable for setting as the transport\n callback in a remote (or for a clone in the options).

\n\n

The payload argument must be a strarray pointer with the paths for\n the git-upload-pack and git-receive-pack at index 0 and 1.

\n", - "group": "transport" - }, - "git_transport_register": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 182, - "lineto": 185, - "args": [ - { - "name": "prefix", - "type": "const char *", - "comment": "The scheme (ending in \"://\") to match, i.e. \"git://\"" - }, - { - "name": "cb", - "type": "git_transport_cb", - "comment": "The callback used to create an instance of the transport" - }, - { - "name": "param", - "type": "void *", - "comment": "A fixed parameter to pass to cb at creation time" - } - ], - "argline": "const char *prefix, git_transport_cb cb, void *param", - "sig": "const char *::git_transport_cb::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Add a custom transport definition, to be used in addition to the built-in\n set of transports that come with libgit2.

\n", - "comments": "

The caller is responsible for synchronizing calls to git_transport_register\n and git_transport_unregister with other calls to the library that\n instantiate transports.

\n", - "group": "transport" - }, - "git_transport_unregister": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 198, - "lineto": 199, - "args": [ - { - "name": "prefix", - "type": "const char *", - "comment": "From the previous call to git_transport_register" - } - ], - "argline": "const char *prefix", - "sig": "const char *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Unregister a custom transport definition which was previously registered\n with git_transport_register.

\n", - "comments": "

The caller is responsible for synchronizing calls to git_transport_register\n and git_transport_unregister with other calls to the library that\n instantiate transports.

\n", - "group": "transport" - }, - "git_transport_dummy": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 212, - "lineto": 215, - "args": [ - { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" - }, - { - "name": "payload", - "type": "void *", - "comment": "You must pass NULL for this parameter." - } - ], - "argline": "git_transport **out, git_remote *owner, void *payload", - "sig": "git_transport **::git_remote *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an instance of the dummy transport.

\n", - "comments": "", - "group": "transport" - }, - "git_transport_local": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 225, - "lineto": 228, - "args": [ - { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" - }, - { - "name": "payload", - "type": "void *", - "comment": "You must pass NULL for this parameter." - } - ], - "argline": "git_transport **out, git_remote *owner, void *payload", - "sig": "git_transport **::git_remote *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an instance of the local transport.

\n", - "comments": "", - "group": "transport" - }, - "git_transport_smart": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 238, - "lineto": 241, - "args": [ - { - "name": "out", - "type": "git_transport **", - "comment": "The newly created transport (out)" - }, - { - "name": "owner", - "type": "git_remote *", - "comment": "The git_remote which will own this transport" - }, - { - "name": "payload", - "type": "void *", - "comment": "A pointer to a git_smart_subtransport_definition" - } - ], - "argline": "git_transport **out, git_remote *owner, void *payload", - "sig": "git_transport **::git_remote *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an instance of the smart transport.

\n", - "comments": "", - "group": "transport" - }, - "git_transport_smart_certificate_check": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 255, - "lineto": 255, - "args": [ - { - "name": "transport", - "type": "git_transport *", - "comment": "a smart transport" - }, - { - "name": "cert", - "type": "git_cert *", - "comment": "the certificate to pass to the caller" - }, - { - "name": "valid", - "type": "int", - "comment": "whether we believe the certificate is valid" - }, - { - "name": "hostname", - "type": "const char *", - "comment": "the hostname we connected to" - } - ], - "argline": "git_transport *transport, git_cert *cert, int valid, const char *hostname", - "sig": "git_transport *::git_cert *::int::const char *", - "return": { - "type": "int", - "comment": " the return value of the callback: 0 for no error, GIT_PASSTHROUGH\n to indicate that there is no callback registered (or the callback\n refused to validate the certificate and callers should behave as\n if no callback was set), or \n<\n 0 for an error" - }, - "description": "

Call the certificate check for this transport.

\n", - "comments": "", - "group": "transport" - }, - "git_transport_smart_credentials": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 269, - "lineto": 269, - "args": [ - { - "name": "out", - "type": "git_cred **", - "comment": "the pointer where the creds are to be stored" - }, - { - "name": "transport", - "type": "git_transport *", - "comment": "a smart transport" - }, - { - "name": "user", - "type": "const char *", - "comment": "the user we saw on the url (if any)" - }, - { - "name": "methods", - "type": "int", - "comment": "available methods for authentication" - } - ], - "argline": "git_cred **out, git_transport *transport, const char *user, int methods", - "sig": "git_cred **::git_transport *::const char *::int", - "return": { - "type": "int", - "comment": " the return value of the callback: 0 for no error, GIT_PASSTHROUGH\n to indicate that there is no callback registered (or the callback\n refused to provide credentials and callers should behave as if no\n callback was set), or \n<\n 0 for an error" - }, - "description": "

Call the credentials callback for this transport

\n", - "comments": "", - "group": "transport" - }, - "git_transport_smart_proxy_options": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 279, - "lineto": 279, - "args": [ - { - "name": "out", - "type": "git_proxy_options *", - "comment": "options struct to fill" - }, - { - "name": "transport", - "type": "git_transport *", - "comment": "the transport to extract the data from." - } - ], - "argline": "git_proxy_options *out, git_transport *transport", - "sig": "git_proxy_options *::git_transport *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Get a copy of the proxy options

\n", - "comments": "

The url is copied and must be freed by the caller.

\n", - "group": "transport" - }, - "git_smart_subtransport_http": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 408, - "lineto": 411, - "args": [ - { - "name": "out", - "type": "git_smart_subtransport **", - "comment": "The newly created subtransport" - }, - { - "name": "owner", - "type": "git_transport *", - "comment": "The smart transport to own this subtransport" - }, - { - "name": "param", - "type": "void *", - "comment": null - } - ], - "argline": "git_smart_subtransport **out, git_transport *owner, void *param", - "sig": "git_smart_subtransport **::git_transport *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an instance of the http subtransport.

\n", - "comments": "

This subtransport also supports https.

\n", - "group": "smart" - }, - "git_smart_subtransport_git": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 420, - "lineto": 423, - "args": [ - { - "name": "out", - "type": "git_smart_subtransport **", - "comment": "The newly created subtransport" - }, - { - "name": "owner", - "type": "git_transport *", - "comment": "The smart transport to own this subtransport" - }, - { - "name": "param", - "type": "void *", - "comment": null - } - ], - "argline": "git_smart_subtransport **out, git_transport *owner, void *param", - "sig": "git_smart_subtransport **::git_transport *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an instance of the git subtransport.

\n", - "comments": "", - "group": "smart" - }, - "git_smart_subtransport_ssh": { - "type": "function", - "file": "git2/sys/transport.h", - "line": 432, - "lineto": 435, - "args": [ - { - "name": "out", - "type": "git_smart_subtransport **", - "comment": "The newly created subtransport" - }, - { - "name": "owner", - "type": "git_transport *", - "comment": "The smart transport to own this subtransport" - }, - { - "name": "param", - "type": "void *", - "comment": null - } - ], - "argline": "git_smart_subtransport **out, git_transport *owner, void *param", - "sig": "git_smart_subtransport **::git_transport *::void *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Create an instance of the ssh subtransport.

\n", - "comments": "", - "group": "smart" - }, - "git_tag_lookup": { - "type": "function", - "file": "git2/tag.h", - "line": 33, - "lineto": 34, - "args": [ - { - "name": "out", - "type": "git_tag **", - "comment": "pointer to the looked up tag" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repo to use when locating the tag." - }, - { - "name": "id", - "type": "const git_oid *", - "comment": "identity of the tag to locate." - } - ], - "argline": "git_tag **out, git_repository *repo, const git_oid *id", - "sig": "git_tag **::git_repository *::const git_oid *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Lookup a tag object from the repository.

\n", - "comments": "", - "group": "tag", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tag_lookup-84" - ] - } - }, - "git_tag_lookup_prefix": { - "type": "function", - "file": "git2/tag.h", - "line": 48, - "lineto": 49, - "args": [ - { - "name": "out", - "type": "git_tag **", - "comment": "pointer to the looked up tag" - }, - { - "name": "repo", - "type": "git_repository *", - "comment": "the repo to use when locating the tag." - }, - { - "name": "id", - "type": "const git_oid *", - "comment": "identity of the tag to locate." - }, - { - "name": "len", - "type": "size_t", - "comment": "the length of the short identifier" - } - ], - "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" - }, - "description": "

Lookup a tag object from the repository,\n given a prefix of its identifier (short id).

\n", - "comments": "", - "group": "tag" - }, - "git_tag_free": { - "type": "function", - "file": "git2/tag.h", - "line": 61, - "lineto": 61, - "args": [ - { - "name": "tag", - "type": "git_tag *", - "comment": "the tag to close" - } - ], - "argline": "git_tag *tag", - "sig": "git_tag *", - "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\n

IMPORTANT: You MUST call this method when you are through with a tag to\n release memory. Failure to do so will cause a memory leak.

\n", - "group": "tag", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tag_free-85" - ] - } - }, - "git_tag_id": { - "type": "function", - "file": "git2/tag.h", - "line": 69, - "lineto": 69, - "args": [ - { - "name": "tag", - "type": "const git_tag *", - "comment": "a previously loaded tag." - } - ], - "argline": "const git_tag *tag", - "sig": "const git_tag *", - "return": { - "type": "const git_oid *", - "comment": " object identity for the tag." - }, - "description": "

Get the id of a tag.

\n", - "comments": "", - "group": "tag" - }, - "git_tag_owner": { - "type": "function", - "file": "git2/tag.h", - "line": 77, - "lineto": 77, - "args": [ - { - "name": "tag", - "type": "const git_tag *", - "comment": "A previously loaded tag." - } - ], - "argline": "const git_tag *tag", - "sig": "const git_tag *", - "return": { - "type": "git_repository *", - "comment": " Repository that contains this tag." - }, - "description": "

Get the repository that contains the tag.

\n", - "comments": "", - "group": "tag" - }, - "git_tag_target": { - "type": "function", - "file": "git2/tag.h", - "line": 89, - "lineto": 89, - "args": [ - { - "name": "target_out", - "type": "git_object **", - "comment": "pointer where to store the target" - }, - { - "name": "tag", - "type": "const git_tag *", - "comment": "a previously loaded tag." - } - ], - "argline": "git_object **target_out, const git_tag *tag", - "sig": "git_object **::const git_tag *", - "return": { - "type": "int", - "comment": " 0 or an error code" - }, - "description": "

Get the tagged object of a tag

\n", - "comments": "

This method performs a repository lookup for the\n given object and returns it

\n", - "group": "tag", - "examples": { - "general.c": [ - "ex/v0.28.0/general.html#git_tag_target-86" - ] - } - }, - "git_tag_target_id": { - "type": "function", - "file": "git2/tag.h", - "line": 97, - "lineto": 97, - "args": [ - { - "name": "tag", - "type": "const git_tag *", - "comment": "a previously loaded tag." - } - ], - "argline": "const git_tag *tag", - "sig": "const git_tag *", - "return": { - "type": "const git_oid *", - "comment": " pointer to the OID" - }, - "description": "

Get the OID of the tagged object of a tag

\n", - "comments": "", - "group": "tag", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_target_id-35" - ] - } - }, - "git_tag_target_type": { - "type": "function", - "file": "git2/tag.h", - "line": 105, - "lineto": 105, - "args": [ - { - "name": "tag", - "type": "const git_tag *", - "comment": "a previously loaded tag." - } - ], - "argline": "const git_tag *tag", - "sig": "const git_tag *", - "return": { - "type": "git_object_t", - "comment": " type of the tagged object" - }, - "description": "

Get the type of a tag's tagged object

\n", - "comments": "", - "group": "tag", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_target_type-36" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_tag_target_type-87" - ] - } - }, - "git_tag_name": { - "type": "function", - "file": "git2/tag.h", - "line": 113, - "lineto": 113, - "args": [ - { - "name": "tag", - "type": "const git_tag *", - "comment": "a previously loaded tag." - } - ], - "argline": "const git_tag *tag", - "sig": "const git_tag *", - "return": { - "type": "const char *", - "comment": " name of the tag" - }, - "description": "

Get the name of a tag

\n", - "comments": "", - "group": "tag", - "examples": { - "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_name-37" - ], - "general.c": [ - "ex/v0.28.0/general.html#git_tag_name-88" - ], - "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_name-20" - ] - } - }, - "git_tag_tagger": { + "git_tag_tagger": { "type": "function", "file": "git2/tag.h", "line": 121, @@ -25030,7 +22426,7 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_tagger-38" + "ex/HEAD/cat-file.html#git_tag_tagger-34" ] } }, @@ -25057,14 +22453,14 @@ "group": "tag", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tag_message-39", - "ex/v0.28.0/cat-file.html#git_tag_message-40" + "ex/HEAD/cat-file.html#git_tag_message-35", + "ex/HEAD/cat-file.html#git_tag_message-36" ], "general.c": [ - "ex/v0.28.0/general.html#git_tag_message-89" + "ex/HEAD/general.html#git_tag_message-89" ], "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_message-21" + "ex/HEAD/tag.html#git_tag_message-17" ] } }, @@ -25117,11 +22513,11 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code\n\tA tag object is written to the ODB, and a proper reference\n\tis written in the /refs/tags folder, pointing to it" }, "description": "

Create a new tag in the repository from an object

\n", - "comments": "

A new reference will also be created pointing to\n this tag object. If force is true and a reference\n already exists with the given name, it'll be replaced.

\n\n

The message will not be cleaned up. This can be achieved\n through git_message_prettify().

\n\n

The tag name will be checked for validity. You must avoid\n the characters '~', '^', ':', '\n\\\n', '?', '[', and '*', and the\n sequences ".." and "\n@\n{" which have special meaning to revparse.

\n", + "comments": "

A new reference will also be created pointing to this tag object. If force is true and a reference already exists with the given name, it'll be replaced.

\n\n

The message will not be cleaned up. This can be achieved through git_message_prettify().

\n\n

The tag name will be checked for validity. You must avoid the characters '~', '^', ':', '\\', '?', '[', and '*', and the sequences ".." and "@{" which have special meaning to revparse.

\n", "group": "tag", "examples": { "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_create-22" + "ex/HEAD/tag.html#git_tag_create-18" ] } }, @@ -25169,10 +22565,10 @@ "comment": " 0 on success or an error code" }, "description": "

Create a new tag in the object database pointing to a git_object

\n", - "comments": "

The message will not be cleaned up. This can be achieved\n through git_message_prettify().

\n", + "comments": "

The message will not be cleaned up. This can be achieved through git_message_prettify().

\n", "group": "tag" }, - "git_tag_create_frombuffer": { + "git_tag_create_from_buffer": { "type": "function", "file": "git2/tag.h", "line": 220, @@ -25248,11 +22644,11 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code\n\tA proper reference is written in the /refs/tags folder,\n pointing to the provided target object" }, "description": "

Create a new lightweight tag pointing at a target object

\n", - "comments": "

A new direct reference will be created pointing to\n this target object. If force is true and a reference\n already exists with the given name, it'll be replaced.

\n\n

The tag name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", + "comments": "

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.

\n\n

The tag name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "tag", "examples": { "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_create_lightweight-23" + "ex/HEAD/tag.html#git_tag_create_lightweight-19" ] } }, @@ -25280,11 +22676,11 @@ "comment": " 0 on success, GIT_EINVALIDSPEC or an error code" }, "description": "

Delete an existing tag reference.

\n", - "comments": "

The tag name will be checked for validity.\n See git_tag_create() for rules about valid names.

\n", + "comments": "

The tag name will be checked for validity. See git_tag_create() for rules about valid names.

\n", "group": "tag", "examples": { "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_delete-24" + "ex/HEAD/tag.html#git_tag_delete-20" ] } }, @@ -25312,7 +22708,7 @@ "comment": " 0 or an error code" }, "description": "

Fill a list with all the tags in the Repository

\n", - "comments": "

The string array will be filled with the names of the\n matching tags; these values are owned by the user and\n should be free'd manually when no longer needed, using\n git_strarray_free.

\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.

\n", "group": "tag" }, "git_tag_list_match": { @@ -25344,19 +22740,19 @@ "comment": " 0 or an error code" }, "description": "

Fill a list with all the tags in the Repository\n which name match a defined pattern

\n", - "comments": "

If an empty pattern is provided, all the tags\n will be returned.

\n\n

The string array will be filled with the names of the\n matching tags; these values are owned by the user and\n should be free'd manually when no longer needed, using\n git_strarray_free.

\n", + "comments": "

If an empty pattern is provided, all the tags will be returned.

\n\n

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.

\n", "group": "tag", "examples": { "tag.c": [ - "ex/v0.28.0/tag.html#git_tag_list_match-25" + "ex/HEAD/tag.html#git_tag_list_match-21" ] } }, "git_tag_foreach": { "type": "function", "file": "git2/tag.h", - "line": 330, - "lineto": 333, + "line": 339, + "lineto": 342, "args": [ { "name": "repo", @@ -25387,8 +22783,8 @@ "git_tag_peel": { "type": "function", "file": "git2/tag.h", - "line": 346, - "lineto": 348, + "line": 355, + "lineto": 357, "args": [ { "name": "tag_target_out", @@ -25408,14 +22804,14 @@ "comment": " 0 or an error code" }, "description": "

Recursively peel a tag until a non tag git_object is found

\n", - "comments": "

The retrieved tag_target object is owned by the repository\n and should be closed with the git_object_free method.

\n", + "comments": "

The retrieved tag_target object is owned by the repository and should be closed with the git_object_free method.

\n", "group": "tag" }, "git_tag_dup": { "type": "function", "file": "git2/tag.h", - "line": 357, - "lineto": 357, + "line": 366, + "lineto": 366, "args": [ { "name": "out", @@ -25451,12 +22847,12 @@ }, { "name": "cb", - "type": "git_trace_callback", + "type": "git_trace_cb", "comment": "Function to call with trace data" } ], - "argline": "git_trace_level_t level, git_trace_callback cb", - "sig": "git_trace_level_t::git_trace_callback", + "argline": "git_trace_level_t level, git_trace_cb cb", + "sig": "git_trace_level_t::git_trace_cb", "return": { "type": "int", "comment": " 0 or an error code" @@ -25489,7 +22885,7 @@ "comment": " 0 or an error code" }, "description": "

Create a new transaction object

\n", - "comments": "

This does not lock anything, but sets up the transaction object to\n know from which repository to lock.

\n", + "comments": "

This does not lock anything, but sets up the transaction object to know from which repository to lock.

\n", "group": "transaction" }, "git_transaction_lock_ref": { @@ -25516,7 +22912,7 @@ "comment": " 0 or an error message" }, "description": "

Lock a reference

\n", - "comments": "

Lock the specified reference. This is the first step to updating a\n reference.

\n", + "comments": "

Lock the specified reference. This is the first step to updating a reference.

\n", "group": "transaction" }, "git_transaction_set_target": { @@ -25558,7 +22954,7 @@ "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" }, "description": "

Set the target of a reference

\n", - "comments": "

Set the target of the specified reference. This reference must be\n locked.

\n", + "comments": "

Set the target of the specified reference. This reference must be locked.

\n", "group": "transaction" }, "git_transaction_set_symbolic_target": { @@ -25600,7 +22996,7 @@ "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" }, "description": "

Set the target of a reference

\n", - "comments": "

Set the target of the specified reference. This reference must be\n locked.

\n", + "comments": "

Set the target of the specified reference. This reference must be locked.

\n", "group": "transaction" }, "git_transaction_set_reflog": { @@ -25632,7 +23028,7 @@ "comment": " 0, GIT_ENOTFOUND if the reference is not among the locked ones, or an error code" }, "description": "

Set the reflog of a reference

\n", - "comments": "

Set the specified reference's reflog. If this is combined with\n setting the target, that update won't be written to the reflog.

\n", + "comments": "

Set the specified reference's reflog. If this is combined with setting the target, that update won't be written to the reflog.

\n", "group": "transaction" }, "git_transaction_remove": { @@ -25681,7 +23077,7 @@ "comment": " 0 or an error code" }, "description": "

Commit the changes from the transaction

\n", - "comments": "

Perform the changes that have been queued. The updates will be made\n one by one, and the first failure will stop the processing.

\n", + "comments": "

Perform the changes that have been queued. The updates will be made one by one, and the first failure will stop the processing.

\n", "group": "transaction" }, "git_transaction_free": { @@ -25703,7 +23099,7 @@ "comment": null }, "description": "

Free the resources allocated by this transaction

\n", - "comments": "

If any references remain locked, they will be unlocked without any\n changes made to them.

\n", + "comments": "

If any references remain locked, they will be unlocked without any changes made to them.

\n", "group": "transaction" }, "git_cred_has_username": { @@ -25820,7 +23216,7 @@ }, { "name": "prompt_callback", - "type": "git_cred_ssh_interactive_callback", + "type": "git_cred_ssh_interactive_cb", "comment": "The callback method used for prompts." }, { @@ -25829,8 +23225,8 @@ "comment": "Additional data to pass to the callback." } ], - "argline": "git_cred **out, const char *username, git_cred_ssh_interactive_callback prompt_callback, void *payload", - "sig": "git_cred **::const char *::git_cred_ssh_interactive_callback::void *", + "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 *", "return": { "type": "int", "comment": " 0 for success or an error code for failure." @@ -25894,7 +23290,7 @@ }, { "name": "sign_callback", - "type": "git_cred_sign_callback", + "type": "git_cred_sign_cb", "comment": "The callback method to sign the data during the challenge." }, { @@ -25903,14 +23299,14 @@ "comment": "Additional data to pass to the callback." } ], - "argline": "git_cred **out, const char *username, const char *publickey, size_t publickey_len, git_cred_sign_callback sign_callback, void *payload", - "sig": "git_cred **::const char *::const char *::size_t::git_cred_sign_callback::void *", + "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 *", "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\n

This function and its credential type is provided for completeness\n and wraps libssh2_userauth_publickey(), which is undocumented.

\n\n

The supplied credential parameter will be internally duplicated.

\n", + "comments": "

This lets you use your own function to sign the challenge.

\n\n

This function and its credential type is provided for completeness and wraps libssh2_userauth_publickey(), which is undocumented.

\n\n

The supplied credential parameter will be internally duplicated.

\n", "group": "cred" }, "git_cred_default_new": { @@ -25959,7 +23355,7 @@ "comment": null }, "description": "

Create a credential to specify a username.

\n", - "comments": "

This is used with ssh authentication to query for the username if\n none is specified in the url.

\n", + "comments": "

This is used with ssh authentication to query for the username if none is specified in the url.

\n", "group": "cred" }, "git_cred_ssh_key_memory_new": { @@ -26023,7 +23419,7 @@ "comment": null }, "description": "

Free a credential.

\n", - "comments": "

This is only necessary if you own the object; that is, if you are a\n transport.

\n", + "comments": "

This is only necessary if you own the object; that is, if you are a transport.

\n", "group": "cred" }, "git_tree_lookup": { @@ -26059,14 +23455,14 @@ "group": "tree", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_tree_lookup-90", - "ex/v0.28.0/general.html#git_tree_lookup-91" + "ex/HEAD/general.html#git_tree_lookup-90", + "ex/HEAD/general.html#git_tree_lookup-91" ], "init.c": [ - "ex/v0.28.0/init.html#git_tree_lookup-14" + "ex/HEAD/init.html#git_tree_lookup-12" ], "merge.c": [ - "ex/v0.28.0/merge.html#git_tree_lookup-41" + "ex/HEAD/merge.html#git_tree_lookup-37" ] } }, @@ -26126,26 +23522,26 @@ "comment": null }, "description": "

Close an open tree

\n", - "comments": "

You can no longer use the git_tree pointer after this call.

\n\n

IMPORTANT: You MUST call this method when you stop using a tree to\n release memory. Failure to do so will cause a memory leak.

\n", + "comments": "

You can no longer use the git_tree pointer after this call.

\n\n

IMPORTANT: 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": { "diff.c": [ - "ex/v0.28.0/diff.html#git_tree_free-17", - "ex/v0.28.0/diff.html#git_tree_free-18" + "ex/HEAD/diff.html#git_tree_free-13", + "ex/HEAD/diff.html#git_tree_free-14" ], "general.c": [ - "ex/v0.28.0/general.html#git_tree_free-92", - "ex/v0.28.0/general.html#git_tree_free-93" + "ex/HEAD/general.html#git_tree_free-92", + "ex/HEAD/general.html#git_tree_free-93" ], "init.c": [ - "ex/v0.28.0/init.html#git_tree_free-15" + "ex/HEAD/init.html#git_tree_free-13" ], "log.c": [ - "ex/v0.28.0/log.html#git_tree_free-59", - "ex/v0.28.0/log.html#git_tree_free-60", - "ex/v0.28.0/log.html#git_tree_free-61", - "ex/v0.28.0/log.html#git_tree_free-62", - "ex/v0.28.0/log.html#git_tree_free-63" + "ex/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" ] } }, @@ -26216,10 +23612,10 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entrycount-41" + "ex/HEAD/cat-file.html#git_tree_entrycount-37" ], "general.c": [ - "ex/v0.28.0/general.html#git_tree_entrycount-94" + "ex/HEAD/general.html#git_tree_entrycount-94" ] } }, @@ -26247,11 +23643,11 @@ "comment": " the tree entry; NULL if not found" }, "description": "

Lookup a tree entry by its filename

\n", - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.

\n", + "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n", "group": "tree", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_byname-95" + "ex/HEAD/general.html#git_tree_entry_byname-95" ] } }, @@ -26279,14 +23675,14 @@ "comment": " the tree entry; NULL if not found" }, "description": "

Lookup a tree entry by its position in the tree

\n", - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.

\n", + "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n", "group": "tree", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_byindex-42" + "ex/HEAD/cat-file.html#git_tree_entry_byindex-38" ], "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_byindex-96" + "ex/HEAD/general.html#git_tree_entry_byindex-96" ] } }, @@ -26314,7 +23710,7 @@ "comment": " the tree entry; NULL if not found" }, "description": "

Lookup a tree entry by SHA value.

\n", - "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't\n have to free it, but you must not use it after the git_tree is released.

\n\n

Warning: this must examine every entry in the tree, so it is not fast.

\n", + "comments": "

This returns a git_tree_entry that is owned by the git_tree. You don't have to free it, but you must not use it after the git_tree is released.

\n\n

Warning: this must examine every entry in the tree, so it is not fast.

\n", "group": "tree" }, "git_tree_entry_bypath": { @@ -26346,7 +23742,7 @@ "comment": " 0 on success; GIT_ENOTFOUND if the path does not exist" }, "description": "

Retrieve a tree entry contained in a tree or in any of its subtrees,\n given its relative path.

\n", - "comments": "

Unlike the other lookup functions, the returned tree entry is owned by\n the user and must be freed explicitly with git_tree_entry_free().

\n", + "comments": "

Unlike the other lookup functions, the returned tree entry is owned by the user and must be freed explicitly with git_tree_entry_free().

\n", "group": "tree" }, "git_tree_entry_dup": { @@ -26373,7 +23769,7 @@ "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,\n and must be freed explicitly with git_tree_entry_free().

\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().

\n", "group": "tree" }, "git_tree_entry_free": { @@ -26395,7 +23791,7 @@ "comment": null }, "description": "

Free a user-owned tree entry

\n", - "comments": "

IMPORTANT: This function is only needed for tree entries owned by the\n user, such as the ones returned by git_tree_entry_dup() or\n git_tree_entry_bypath().

\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().

\n", "group": "tree" }, "git_tree_entry_name": { @@ -26421,11 +23817,11 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_name-43" + "ex/HEAD/cat-file.html#git_tree_entry_name-39" ], "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_name-97", - "ex/v0.28.0/general.html#git_tree_entry_name-98" + "ex/HEAD/general.html#git_tree_entry_name-97", + "ex/HEAD/general.html#git_tree_entry_name-98" ] } }, @@ -26452,7 +23848,7 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_id-44" + "ex/HEAD/cat-file.html#git_tree_entry_id-40" ] } }, @@ -26479,7 +23875,7 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_type-45" + "ex/HEAD/cat-file.html#git_tree_entry_type-41" ] } }, @@ -26506,7 +23902,7 @@ "group": "tree", "examples": { "cat-file.c": [ - "ex/v0.28.0/cat-file.html#git_tree_entry_filemode-46" + "ex/HEAD/cat-file.html#git_tree_entry_filemode-42" ] } }, @@ -26529,7 +23925,7 @@ "comment": " filemode as an integer" }, "description": "

Get the raw UNIX file attributes of a tree entry

\n", - "comments": "

This function does not perform any normalization and is only useful\n if you need to be able to recreate the original tree object.

\n", + "comments": "

This function does not perform any normalization and is only useful if you need to be able to recreate the original tree object.

\n", "group": "tree" }, "git_tree_entry_cmp": { @@ -26592,7 +23988,7 @@ "group": "tree", "examples": { "general.c": [ - "ex/v0.28.0/general.html#git_tree_entry_to_object-99" + "ex/HEAD/general.html#git_tree_entry_to_object-99" ] } }, @@ -26625,7 +24021,7 @@ "comment": " 0 on success; error code otherwise" }, "description": "

Create a new tree builder.

\n", - "comments": "

The tree builder can be used to create or modify trees in memory and\n write them as tree objects to the database.

\n\n

If the source parameter is not NULL, the tree builder will be\n initialized with the entries of the given tree.

\n\n

If the source parameter is NULL, the tree builder will start with no\n entries and will have to be filled manually.

\n", + "comments": "

The tree builder can be used to create or modify trees in memory and write them as tree objects to the database.

\n\n

If the source parameter is not NULL, the tree builder will be initialized with the entries of the given tree.

\n\n

If the source parameter is NULL, the tree builder will start with no entries and will have to be filled manually.

\n", "group": "treebuilder" }, "git_treebuilder_clear": { @@ -26691,7 +24087,7 @@ "comment": null }, "description": "

Free a tree builder

\n", - "comments": "

This will clear all the entries and free to builder.\n Failing to free the builder after you're done using it\n will result in a memory leak

\n", + "comments": "

This will clear all the entries and free to builder. Failing to free the builder after you're done using it will result in a memory leak

\n", "group": "treebuilder" }, "git_treebuilder_get": { @@ -26718,7 +24114,7 @@ "comment": " pointer to the entry; NULL if not found" }, "description": "

Get an entry from the builder from its filename

\n", - "comments": "

The returned entry is owned by the builder and should\n not be freed manually.

\n", + "comments": "

The returned entry is owned by the builder and should not be freed manually.

\n", "group": "treebuilder" }, "git_treebuilder_insert": { @@ -26760,7 +24156,7 @@ "comment": " 0 or an error code" }, "description": "

Add or update an entry to the builder

\n", - "comments": "

Insert a new entry for filename in the builder with the\n given attributes.

\n\n

If an entry named filename already exists, its attributes\n will be updated with the given ones.

\n\n

The optional pointer out can be used to retrieve a pointer to the\n newly created/updated entry. Pass NULL if you do not need it. The\n pointer may not be valid past the next operation in this\n builder. Duplicate the entry if you want to keep it.

\n\n

By default the entry that you are inserting will be checked for\n validity; that it exists in the object database and is of the\n correct type. If you do not want this behavior, set the\n GIT_OPT_ENABLE_STRICT_OBJECT_CREATION library option to false.

\n", + "comments": "

Insert a new entry for filename in the builder with the given attributes.

\n\n

If an entry named filename already exists, its attributes will be updated with the given ones.

\n\n

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.

\n\n

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.

\n", "group": "treebuilder" }, "git_treebuilder_remove": { @@ -26819,7 +24215,7 @@ "comment": null }, "description": "

Selectively remove entries in the tree

\n", - "comments": "

The filter callback will be called for each entry in the tree with a\n pointer to the entry and the provided payload; if the callback returns\n non-zero, the entry will be filtered (removed from the builder).

\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).

\n", "group": "treebuilder" }, "git_treebuilder_write": { @@ -26846,7 +24242,7 @@ "comment": " 0 or an error code" }, "description": "

Write the contents of the tree builder as a tree object

\n", - "comments": "

The tree builder will be written to the given repo, and its\n identifying SHA1 hash will be stored in the id pointer.

\n", + "comments": "

The tree builder will be written to the given repo, and its identifying SHA1 hash will be stored in the id pointer.

\n", "group": "treebuilder" }, "git_treebuilder_write_with_buffer": { @@ -26915,7 +24311,7 @@ "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\n will be automatically loaded as required, and the callback will be\n called once per entry with the current (relative) root for the entry and\n the entry data itself.

\n\n

If the callback returns a positive value, the passed entry will be\n skipped on the traversal (in pre mode). A negative value stops the walk.

\n", + "comments": "

The entries will be traversed in the specified order, children subtrees will be automatically loaded as required, and the callback will be called once per entry with the current (relative) root for the entry and the entry data itself.

\n\n

If the callback returns a positive value, the passed entry will be skipped on the traversal (in pre mode). A negative value stops the walk.

\n", "group": "tree" }, "git_tree_dup": { @@ -26984,7 +24380,7 @@ "comment": null }, "description": "

Create a tree based on another one with the specified modifications

\n", - "comments": "

Given the baseline perform the changes described in the list of\n updates and create a new tree.

\n\n

This function is optimized for common file/directory addition, removal and\n replacement in trees. It is much more efficient than reading the tree into a\n git_index and modifying that, but in exchange it is not as flexible.

\n\n

Deleting and adding the same entry is undefined behaviour, changing\n a tree to a blob or viceversa is not supported.

\n", + "comments": "

Given the baseline perform the changes described in the list of updates and create a new tree.

\n\n

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.

\n\n

Deleting and adding the same entry is undefined behaviour, changing a tree to a blob or viceversa is not supported.

\n", "group": "tree" }, "git_worktree_list": { @@ -27011,7 +24407,7 @@ "comment": " 0 or an error code" }, "description": "

List names of linked working trees

\n", - "comments": "

The returned list should be released with git_strarray_free\n when no longer needed.

\n", + "comments": "

The returned list should be released with git_strarray_free when no longer needed.

\n", "group": "worktree" }, "git_worktree_lookup": { @@ -27070,7 +24466,7 @@ "comment": null }, "description": "

Open a worktree of a given repository

\n", - "comments": "

If a repository is not the main tree but a worktree, this\n function will look up the worktree inside the parent\n repository and create a new git_worktree structure.

\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.

\n", "group": "worktree" }, "git_worktree_free": { @@ -27114,10 +24510,10 @@ "comment": " 0 when worktree is valid, error-code otherwise" }, "description": "

Check if worktree is valid

\n", - "comments": "

A valid worktree requires both the git data structures inside\n the linked parent repository and the linked working copy to be\n present.

\n", + "comments": "

A valid worktree requires both the git data structures inside the linked parent repository and the linked working copy to be present.

\n", "group": "worktree" }, - "git_worktree_add_init_options": { + "git_worktree_add_options_init": { "type": "function", "file": "git2/worktree.h", "line": 104, @@ -27141,7 +24537,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_worktree_add_options structure

\n", - "comments": "

Initializes a git_worktree_add_options with default values. Equivalent to\n creating an instance with GIT_WORKTREE_ADD_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_worktree_add_options with default values. Equivalent to creating an instance with GIT_WORKTREE_ADD_OPTIONS_INIT.

\n", "group": "worktree" }, "git_worktree_add": { @@ -27183,7 +24579,7 @@ "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\n required data structures inside the repository and check out\n the current HEAD at path

\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

\n", "group": "worktree" }, "git_worktree_lock": { @@ -27210,7 +24606,7 @@ "comment": " 0 on success, non-zero otherwise" }, "description": "

Lock worktree if not already locked

\n", - "comments": "

Lock a worktree, optionally specifying a reason why the linked\n working tree is being locked.

\n", + "comments": "

Lock a worktree, optionally specifying a reason why the linked working tree is being locked.

\n", "group": "worktree" }, "git_worktree_unlock": { @@ -27259,7 +24655,7 @@ "comment": " 0 when the working tree not locked, a value greater\n than zero if it is locked, less than zero if there was an\n error" }, "description": "

Check if worktree is locked

\n", - "comments": "

A worktree may be locked if the linked working tree is stored\n on a portable device which is not available.

\n", + "comments": "

A worktree may be locked if the linked working tree is stored on a portable device which is not available.

\n", "group": "worktree" }, "git_worktree_name": { @@ -27306,7 +24702,7 @@ "comments": "", "group": "worktree" }, - "git_worktree_prune_init_options": { + "git_worktree_prune_options_init": { "type": "function", "file": "git2/worktree.h", "line": 217, @@ -27330,7 +24726,7 @@ "comment": " Zero on success; -1 on failure." }, "description": "

Initialize git_worktree_prune_options structure

\n", - "comments": "

Initializes a git_worktree_prune_options with default values. Equivalent to\n creating an instance with GIT_WORKTREE_PRUNE_OPTIONS_INIT.

\n", + "comments": "

Initializes a git_worktree_prune_options with default values. Equivalent to creating an instance with GIT_WORKTREE_PRUNE_OPTIONS_INIT.

\n", "group": "worktree" }, "git_worktree_is_prunable": { @@ -27357,7 +24753,7 @@ "comment": null }, "description": "

Is the worktree prunable with the given options?

\n", - "comments": "

A worktree is not prunable in the following scenarios:

\n\n
    \n
  • the worktree is linking to a valid on-disk worktree. The\nvalid member will cause this check to be ignored.
  • \n
  • the worktree is locked. The locked flag will cause this\ncheck to be ignored.
  • \n
\n\n

If the worktree is not valid and not locked or if the above\n flags have been passed in, this function will return a\n positive value.

\n", + "comments": "

A worktree is not prunable in the following scenarios:

\n\n
    \n
  • the worktree is linking to a valid on-disk worktree. The valid member will cause this check to be ignored. - the worktree is locked. The locked flag will cause this check to be ignored.
  • \n
\n\n

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", "group": "worktree" }, "git_worktree_prune": { @@ -27384,7 +24780,7 @@ "comment": " 0 or an error code" }, "description": "

Prune working tree

\n", - "comments": "

Prune the working tree, that is remove the git data\n structures on disk. The repository will only be pruned of\n git_worktree_is_prunable succeeds.

\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.

\n", "group": "worktree" } }, @@ -27413,7 +24809,7 @@ "comment": null }, "description": "

When applying a patch, callback that will be made per delta (file).

\n", - "comments": "

When the callback:\n - returns \n<\n 0, the apply process will be aborted.\n - returns > 0, the delta will not be applied, but the apply process\n continues\n - returns 0, the delta is applied, and the apply process continues.

\n" + "comments": "

When the callback: - returns < 0, the apply process will be aborted. - returns > 0, the delta will not be applied, but the apply process continues - returns 0, the delta is applied, and the apply process continues.

\n" }, "git_apply_hunk_cb": { "type": "callback", @@ -27439,7 +24835,7 @@ "comment": null }, "description": "

When applying a patch, callback that will be made per hunk.

\n", - "comments": "

When the callback:\n - returns \n<\n 0, the apply process will be aborted.\n - returns > 0, the hunk will not be applied, but the apply process\n continues\n - returns 0, the hunk is applied, and the apply process continues.

\n" + "comments": "

When the callback: - returns < 0, the apply process will be aborted. - returns > 0, the hunk will not be applied, but the apply process continues - returns 0, the hunk is applied, and the apply process continues.

\n" }, "git_attr_foreach_cb": { "type": "callback", @@ -27470,13 +24866,13 @@ "comment": " 0 to continue looping, non-zero to stop. This value will be returned\n from git_attr_foreach." }, "description": "

The callback used with git_attr_foreach.

\n", - "comments": "

This callback will be invoked only once per attribute name, even if there\n are multiple rules for a given file. The highest priority rule will be\n used.

\n" + "comments": "

This callback will be invoked only once per attribute name, even if there are multiple rules for a given file. The highest priority rule will be used.

\n" }, "git_checkout_notify_cb": { "type": "callback", "file": "git2/checkout.h", - "line": 223, - "lineto": 229, + "line": 236, + "lineto": 242, "args": [ { "name": "why", @@ -27521,8 +24917,8 @@ "git_checkout_progress_cb": { "type": "callback", "file": "git2/checkout.h", - "line": 232, - "lineto": 236, + "line": 245, + "lineto": 249, "args": [ { "name": "path", @@ -27557,8 +24953,8 @@ "git_checkout_perfdata_cb": { "type": "callback", "file": "git2/checkout.h", - "line": 239, - "lineto": 241, + "line": 252, + "lineto": 254, "args": [ { "name": "perfdata", @@ -27619,7 +25015,7 @@ "comment": " 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code" }, "description": "

The signature of a function matching git_remote_create, with an additional\n void* as a callback payload.

\n", - "comments": "

Callers of git_clone may provide a function matching this signature to override\n the remote creation and customization process during a clone operation.

\n" + "comments": "

Callers of git_clone may provide a function matching this signature to override the remote creation and customization process during a clone operation.

\n" }, "git_repository_create_cb": { "type": "callback", @@ -27655,7 +25051,7 @@ "comment": " 0, or a negative value to indicate error" }, "description": "

The signature of a function matchin git_repository_init, with an\n aditional void * as callback payload.

\n", - "comments": "

Callers of git_clone my provide a function matching this signature\n to override the repository creation and customization process\n during a clone operation.

\n" + "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_config_foreach_cb": { "type": "callback", @@ -27683,6 +25079,32 @@ "description": "

A config enumeration callback

\n", "comments": "" }, + "git_headlist_cb": { + "type": "callback", + "file": "git2/deprecated.h", + "line": 409, + "lineto": 409, + "args": [ + { + "name": "rhead", + "type": "git_remote_head *", + "comment": null + }, + { + "name": "payload", + "type": "void *", + "comment": null + } + ], + "argline": "git_remote_head *rhead, void *payload", + "sig": "git_remote_head *::void *", + "return": { + "type": "int", + "comment": null + }, + "description": "

Callback for listing the remote heads

\n", + "comments": "" + }, "git_diff_notify_cb": { "type": "callback", "file": "git2/diff.h", @@ -27717,7 +25139,7 @@ "comment": null }, "description": "

Diff notification callback function.

\n", - "comments": "

The callback will be called for each file, just before the git_diff_delta\n gets inserted into the diff.

\n\n

When the callback:\n - returns \n<\n 0, the diff process will be aborted.\n - returns > 0, the delta will not be inserted into the diff, but the\n diff process continues.\n - returns 0, the delta is inserted into the diff, and the diff process\n continues.

\n" + "comments": "

The callback will be called for each file, just before the git_diff_delta gets inserted into the diff.

\n\n

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", @@ -27882,7 +25304,7 @@ "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\n of text. This uses some extra GIT_DIFF_LINE_... constants for output\n of lines of file and hunk headers.

\n" + "comments": "

When printing a diff, callback that will be made to output each line of text. This uses some extra GIT_DIFF_LINE_... constants for output of lines of file and hunk headers.

\n" }, "git_index_matched_path_cb": { "type": "callback", @@ -27915,30 +25337,30 @@ "description": "

Callback for APIs that add/remove/update files matching pathspec

\n", "comments": "" }, - "git_headlist_cb": { + "git_indexer_progress_cb": { "type": "callback", - "file": "git2/net.h", - "line": 55, - "lineto": 55, + "file": "git2/indexer.h", + "line": 57, + "lineto": 57, "args": [ { - "name": "rhead", - "type": "git_remote_head *", - "comment": null + "name": "stats", + "type": "const git_indexer_progress *", + "comment": "Structure containing information about the state of the tran sfer" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload provided by caller" } ], - "argline": "git_remote_head *rhead, void *payload", - "sig": "git_remote_head *::void *", + "argline": "const git_indexer_progress *stats, void *payload", + "sig": "const git_indexer_progress *::void *", "return": { "type": "int", "comment": null }, - "description": "

Callback for listing the remote heads

\n", + "description": "

Type for progress callbacks during indexing. Return a value less\n than zero to cancel the indexing or download.

\n", "comments": "" }, "git_note_foreach_cb": { @@ -27970,13 +25392,13 @@ "comment": null }, "description": "

Callback for git_note_foreach.

\n", - "comments": "

Receives:\n - blob_id: Oid of the blob containing the message\n - annotated_object_id: Oid of the git object being annotated\n - payload: Payload data passed to git_note_foreach

\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

\n" }, "git_odb_foreach_cb": { "type": "callback", "file": "git2/odb.h", - "line": 27, - "lineto": 27, + "line": 28, + "lineto": 28, "args": [ { "name": "id", @@ -28001,39 +25423,39 @@ "git_packbuilder_foreach_cb": { "type": "callback", "file": "git2/pack.h", - "line": 181, - "lineto": 181, + "line": 192, + "lineto": 192, "args": [ { "name": "buf", "type": "void *", - "comment": null + "comment": "A pointer to the object's data" }, { "name": "size", "type": "size_t", - "comment": null + "comment": "The size of the underlying object" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload passed to git_packbuilder_foreach" } ], "argline": "void *buf, size_t size, void *payload", "sig": "void *::size_t::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "

Callback used to iterate over packed objects

\n", "comments": "" }, "git_packbuilder_progress": { "type": "callback", "file": "git2/pack.h", - "line": 210, - "lineto": 214, + "line": 221, + "lineto": 225, "args": [ { "name": "stage", @@ -28042,12 +25464,12 @@ }, { "name": "current", - "type": "int", + "type": "uint32_t", "comment": null }, { "name": "total", - "type": "int", + "type": "uint32_t", "comment": null }, { @@ -28056,8 +25478,8 @@ "comment": null } ], - "argline": "int stage, int current, int total, void *payload", - "sig": "int::int::int::void *", + "argline": "int stage, uint32_t current, uint32_t total, void *payload", + "sig": "int::uint32_t::uint32_t::void *", "return": { "type": "int", "comment": null @@ -28068,56 +25490,56 @@ "git_reference_foreach_cb": { "type": "callback", "file": "git2/refs.h", - "line": 425, - "lineto": 425, + "line": 434, + "lineto": 434, "args": [ { "name": "reference", "type": "git_reference *", - "comment": null + "comment": "The reference object" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload passed to git_reference_foreach" } ], "argline": "git_reference *reference, void *payload", "sig": "git_reference *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "

Callback used to iterate over references

\n", "comments": "" }, "git_reference_foreach_name_cb": { "type": "callback", "file": "git2/refs.h", - "line": 426, - "lineto": 426, + "line": 445, + "lineto": 445, "args": [ { "name": "name", "type": "const char *", - "comment": null + "comment": "The reference name" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload passed to git_reference_foreach_name" } ], "argline": "const char *name, void *payload", "sig": "const char *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "

Callback used to iterate over reference names

\n", "comments": "" }, - "git_push_transfer_progress": { + "git_push_transfer_progress_cb": { "type": "callback", "file": "git2/remote.h", "line": 425, @@ -28156,8 +25578,8 @@ "git_push_negotiation": { "type": "callback", "file": "git2/remote.h", - "line": 460, - "lineto": 460, + "line": 461, + "lineto": 461, "args": [ { "name": "updates", @@ -28187,8 +25609,8 @@ "git_push_update_reference_cb": { "type": "callback", "file": "git2/remote.h", - "line": 474, - "lineto": 474, + "line": 475, + "lineto": 475, "args": [ { "name": "refname", @@ -28213,73 +25635,109 @@ "comment": " 0 on success, otherwise an error" }, "description": "

Callback used to inform of the update status from the remote.

\n", - "comments": "

Called for each updated reference on push. If status is\n not NULL, the update was rejected by the remote server\n and status contains the reason given.

\n" + "comments": "

Called for each updated reference on push. If status is not NULL, the update was rejected by the remote server and status contains the reason given.

\n" + }, + "git_url_resolve_cb": { + "type": "callback", + "file": "git2/remote.h", + "line": 489, + "lineto": 489, + "args": [ + { + "name": "url_resolved", + "type": "git_buf *", + "comment": "The buffer to write the resolved URL to" + }, + { + "name": "url", + "type": "const char *", + "comment": "The URL to resolve" + }, + { + "name": "direction", + "type": "int", + "comment": "GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH" + }, + { + "name": "payload", + "type": "void *", + "comment": "Payload provided by the caller" + } + ], + "argline": "git_buf *url_resolved, const char *url, int direction, void *payload", + "sig": "git_buf *::const char *::int::void *", + "return": { + "type": "int", + "comment": " 0 on success, GIT_PASSTHROUGH or an error" + }, + "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_repository_fetchhead_foreach_cb": { "type": "callback", "file": "git2/repository.h", - "line": 643, - "lineto": 647, + "line": 655, + "lineto": 659, "args": [ { "name": "ref_name", "type": "const char *", - "comment": null + "comment": "The reference name" }, { "name": "remote_url", "type": "const char *", - "comment": null + "comment": "The remote URL" }, { "name": "oid", "type": "const git_oid *", - "comment": null + "comment": "The reference target OID" }, { "name": "is_merge", "type": "unsigned int", - "comment": null + "comment": "Was the reference the result of a merge" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload passed to git_repository_fetchhead_foreach" } ], "argline": "const char *ref_name, const char *remote_url, const git_oid *oid, unsigned int is_merge, void *payload", "sig": "const char *::const char *::const git_oid *::unsigned int::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "

Callback used to iterate over each FETCH_HEAD entry

\n", "comments": "" }, "git_repository_mergehead_foreach_cb": { "type": "callback", "file": "git2/repository.h", - "line": 665, - "lineto": 666, + "line": 686, + "lineto": 687, "args": [ { "name": "oid", "type": "const git_oid *", - "comment": null + "comment": "The merge OID" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload passed to git_repository_mergehead_foreach" } ], "argline": "const git_oid *oid, void *payload", "sig": "const git_oid *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "

Callback used to iterate over each MERGE_HEAD entry

\n", "comments": "" }, "git_revwalk_hide_cb": { @@ -28432,374 +25890,38 @@ "description": "

Function pointer to receive each submodule

\n", "comments": "" }, - "git_filter_init_fn": { - "type": "callback", - "file": "git2/sys/filter.h", - "line": 141, - "lineto": 141, - "args": [ - { - "name": "self", - "type": "git_filter *", - "comment": null - } - ], - "argline": "git_filter *self", - "sig": "git_filter *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Initialize callback on filter

\n", - "comments": "

Specified as filter.initialize, this is an optional callback invoked\n before a filter is first used. It will be called once at most.

\n\n

If non-NULL, the filter's initialize callback will be invoked right\n before the first use of the filter, so you can defer expensive\n initialization operations (in case libgit2 is being used in a way that\n doesn't need the filter).

\n" - }, - "git_filter_shutdown_fn": { - "type": "callback", - "file": "git2/sys/filter.h", - "line": 153, - "lineto": 153, - "args": [ - { - "name": "self", - "type": "git_filter *", - "comment": null - } - ], - "argline": "git_filter *self", - "sig": "git_filter *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Shutdown callback on filter

\n", - "comments": "

Specified as filter.shutdown, this is an optional callback invoked\n when the filter is unregistered or when libgit2 is shutting down. It\n will be called once at most and should release resources as needed.\n This may be called even if the initialize callback was not made.

\n\n

Typically this function will free the git_filter object itself.

\n" - }, - "git_filter_check_fn": { - "type": "callback", - "file": "git2/sys/filter.h", - "line": 175, - "lineto": 179, - "args": [ - { - "name": "self", - "type": "git_filter *", - "comment": null - }, - { - "name": "payload", - "type": "void **", - "comment": null - }, - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - }, - { - "name": "attr_values", - "type": "const char **", - "comment": null - } - ], - "argline": "git_filter *self, void **payload, const git_filter_source *src, const char **attr_values", - "sig": "git_filter *::void **::const git_filter_source *::const char **", - "return": { - "type": "int", - "comment": null - }, - "description": "

Callback to decide if a given source needs this filter

\n", - "comments": "

Specified as filter.check, this is an optional callback that checks\n if filtering is needed for a given source.

\n\n

It should return 0 if the filter should be applied (i.e. success),\n GIT_PASSTHROUGH if the filter should not be applied, or an error code\n to fail out of the filter processing pipeline and return to the caller.

\n\n

The attr_values will be set to the values of any attributes given in\n the filter definition. See git_filter below for more detail.

\n\n

The payload will be a pointer to a reference payload for the filter.\n This will start as NULL, but check can assign to this pointer for\n later use by the apply callback. Note that the value should be heap\n allocated (not stack), so that it doesn't go away before the apply\n callback can use it. If a filter allocates and assigns a value to the\n payload, it will need a cleanup callback to free the payload.

\n" - }, - "git_filter_apply_fn": { - "type": "callback", - "file": "git2/sys/filter.h", - "line": 193, - "lineto": 198, - "args": [ - { - "name": "self", - "type": "git_filter *", - "comment": null - }, - { - "name": "payload", - "type": "void **", - "comment": null - }, - { - "name": "to", - "type": "git_buf *", - "comment": null - }, - { - "name": "from", - "type": "const git_buf *", - "comment": null - }, - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - } - ], - "argline": "git_filter *self, void **payload, git_buf *to, const git_buf *from, const git_filter_source *src", - "sig": "git_filter *::void **::git_buf *::const git_buf *::const git_filter_source *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Callback to actually perform the data filtering

\n", - "comments": "

Specified as filter.apply, this is the callback that actually filters\n data. If it successfully writes the output, it should return 0. Like\n check, it can return GIT_PASSTHROUGH to indicate that the filter\n doesn't want to run. Other error codes will stop filter processing and\n return to the caller.

\n\n

The payload value will refer to any payload that was set by the\n check callback. It may be read from or written to as needed.

\n" - }, - "git_filter_stream_fn": { - "type": "callback", - "file": "git2/sys/filter.h", - "line": 200, - "lineto": 205, - "args": [ - { - "name": "out", - "type": "git_writestream **", - "comment": null - }, - { - "name": "self", - "type": "git_filter *", - "comment": null - }, - { - "name": "payload", - "type": "void **", - "comment": null - }, - { - "name": "src", - "type": "const git_filter_source *", - "comment": null - }, - { - "name": "next", - "type": "git_writestream *", - "comment": null - } - ], - "argline": "git_writestream **out, git_filter *self, void **payload, const git_filter_source *src, git_writestream *next", - "sig": "git_writestream **::git_filter *::void **::const git_filter_source *::git_writestream *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "" - }, - "git_filter_cleanup_fn": { - "type": "callback", - "file": "git2/sys/filter.h", - "line": 215, - "lineto": 217, - "args": [ - { - "name": "self", - "type": "git_filter *", - "comment": null - }, - { - "name": "payload", - "type": "void *", - "comment": null - } - ], - "argline": "git_filter *self, void *payload", - "sig": "git_filter *::void *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Callback to clean up after filtering has been applied

\n", - "comments": "

Specified as filter.cleanup, this is an optional callback invoked\n after the filter has been applied. If the check or apply callbacks\n allocated a payload to keep per-source filter state, use this\n callback to free that payload and release resources as required.

\n" - }, - "git_merge_driver_init_fn": { - "type": "callback", - "file": "git2/sys/merge.h", - "line": 76, - "lineto": 76, - "args": [ - { - "name": "self", - "type": "git_merge_driver *", - "comment": null - } - ], - "argline": "git_merge_driver *self", - "sig": "git_merge_driver *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Initialize callback on merge driver

\n", - "comments": "

Specified as driver.initialize, this is an optional callback invoked\n before a merge driver is first used. It will be called once at most\n per library lifetime.

\n\n

If non-NULL, the merge driver's initialize callback will be invoked\n right before the first use of the driver, so you can defer expensive\n initialization operations (in case libgit2 is being used in a way that\n doesn't need the merge driver).

\n" - }, - "git_merge_driver_shutdown_fn": { - "type": "callback", - "file": "git2/sys/merge.h", - "line": 88, - "lineto": 88, - "args": [ - { - "name": "self", - "type": "git_merge_driver *", - "comment": null - } - ], - "argline": "git_merge_driver *self", - "sig": "git_merge_driver *", - "return": { - "type": "void", - "comment": null - }, - "description": "

Shutdown callback on merge driver

\n", - "comments": "

Specified as driver.shutdown, this is an optional callback invoked\n when the merge driver is unregistered or when libgit2 is shutting down.\n It will be called once at most and should release resources as needed.\n This may be called even if the initialize callback was not made.

\n\n

Typically this function will free the git_merge_driver object itself.

\n" - }, - "git_merge_driver_apply_fn": { - "type": "callback", - "file": "git2/sys/merge.h", - "line": 108, - "lineto": 114, - "args": [ - { - "name": "self", - "type": "git_merge_driver *", - "comment": null - }, - { - "name": "path_out", - "type": "const char **", - "comment": null - }, - { - "name": "mode_out", - "type": "int *", - "comment": null - }, - { - "name": "merged_out", - "type": "git_buf *", - "comment": null - }, - { - "name": "filter_name", - "type": "const char *", - "comment": null - }, - { - "name": "src", - "type": "const git_merge_driver_source *", - "comment": null - } - ], - "argline": "git_merge_driver *self, const char **path_out, int *mode_out, git_buf *merged_out, const char *filter_name, const git_merge_driver_source *src", - "sig": "git_merge_driver *::const char **::int *::git_buf *::const char *::const git_merge_driver_source *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Callback to perform the merge.

\n", - "comments": "

Specified as driver.apply, this is the callback that actually does the\n merge. If it can successfully perform a merge, it should populate\n path_out with a pointer to the filename to accept, mode_out with\n the resultant mode, and merged_out with the buffer of the merged file\n and then return 0. If the driver returns GIT_PASSTHROUGH, then the\n default merge driver should instead be run. It can also return\n GIT_EMERGECONFLICT if the driver is not able to produce a merge result,\n and the file will remain conflicted. Any other errors will fail and\n return to the caller.

\n\n

The filter_name contains the name of the filter that was invoked, as\n specified by the file's attributes.

\n\n

The src contains the data about the file to be merged.

\n" - }, - "git_stream_cb": { - "type": "callback", - "file": "git2/sys/stream.h", - "line": 117, - "lineto": 117, - "args": [ - { - "name": "out", - "type": "git_stream **", - "comment": null - }, - { - "name": "host", - "type": "const char *", - "comment": null - }, - { - "name": "port", - "type": "const char *", - "comment": null - } - ], - "argline": "git_stream **out, const char *host, const char *port", - "sig": "git_stream **::const char *::const char *", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "" - }, - "git_smart_subtransport_cb": { - "type": "callback", - "file": "git2/sys/transport.h", - "line": 364, - "lineto": 367, - "args": [ - { - "name": "out", - "type": "git_smart_subtransport **", - "comment": null - }, - { - "name": "owner", - "type": "git_transport *", - "comment": null - }, - { - "name": "param", - "type": "void *", - "comment": null - } - ], - "argline": "git_smart_subtransport **out, git_transport *owner, void *param", - "sig": "git_smart_subtransport **::git_transport *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "

A function which creates a new subtransport for the smart transport

\n", - "comments": "" - }, "git_tag_foreach_cb": { "type": "callback", "file": "git2/tag.h", - "line": 321, - "lineto": 321, + "line": 330, + "lineto": 330, "args": [ { "name": "name", "type": "const char *", - "comment": null + "comment": "The tag name" }, { "name": "oid", "type": "git_oid *", - "comment": null + "comment": "The tag's OID" }, { "name": "payload", "type": "void *", - "comment": null + "comment": "Payload passed to git_tag_foreach" } ], "argline": "const char *name, git_oid *oid, void *payload", "sig": "const char *::git_oid *::void *", "return": { "type": "int", - "comment": null + "comment": " non-zero to terminate the iteration" }, - "description": "", + "description": "

Callback used to iterate over tag names

\n", "comments": "" }, - "git_trace_callback": { + "git_trace_cb": { "type": "callback", "file": "git2/trace.h", "line": 52, @@ -28856,108 +25978,6 @@ "description": "

Signature of a function which creates a transport

\n", "comments": "" }, - "git_cred_sign_callback": { - "type": "callback", - "file": "git2/transport.h", - "line": 168, - "lineto": 168, - "args": [ - { - "name": "session", - "type": "LIBSSH2_SESSION *", - "comment": null - }, - { - "name": "sig", - "type": "unsigned char **", - "comment": null - }, - { - "name": "sig_len", - "type": "size_t *", - "comment": null - }, - { - "name": "data", - "type": "const unsigned char *", - "comment": null - }, - { - "name": "data_len", - "type": "size_t", - "comment": null - }, - { - "name": "abstract", - "type": "void **", - "comment": null - } - ], - "argline": "LIBSSH2_SESSION *session, unsigned char **sig, size_t *sig_len, const unsigned char *data, size_t data_len, void **abstract", - "sig": "LIBSSH2_SESSION *::unsigned char **::size_t *::const unsigned char *::size_t::void **", - "return": { - "type": "int", - "comment": null - }, - "description": "", - "comments": "" - }, - "git_cred_ssh_interactive_callback": { - "type": "callback", - "file": "git2/transport.h", - "line": 169, - "lineto": 169, - "args": [ - { - "name": "name", - "type": "const char *", - "comment": null - }, - { - "name": "name_len", - "type": "int", - "comment": null - }, - { - "name": "instruction", - "type": "const char *", - "comment": null - }, - { - "name": "instruction_len", - "type": "int", - "comment": null - }, - { - "name": "num_prompts", - "type": "int", - "comment": null - }, - { - "name": "prompts", - "type": "const LIBSSH2_USERAUTH_KBDINT_PROMPT *", - "comment": null - }, - { - "name": "responses", - "type": "LIBSSH2_USERAUTH_KBDINT_RESPONSE *", - "comment": null - }, - { - "name": "abstract", - "type": "void **", - "comment": null - } - ], - "argline": "const char *name, int name_len, const char *instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT *prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE *responses, void **abstract", - "sig": "const char *::int::const char *::int::int::const LIBSSH2_USERAUTH_KBDINT_PROMPT *::LIBSSH2_USERAUTH_KBDINT_RESPONSE *::void **", - "return": { - "type": "void", - "comment": null - }, - "description": "", - "comments": "" - }, "git_cred_acquire_cb": { "type": "callback", "file": "git2/transport.h", @@ -29023,7 +26043,7 @@ "comment": null }, "description": "

Callback for git_treebuilder_filter

\n", - "comments": "

The return value is treated as a boolean, with zero indicating that the\n entry should be left alone and any non-zero value meaning that the\n entry should be removed from the treebuilder list (i.e. filtered out).

\n" + "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", @@ -29056,37 +26076,11 @@ "description": "

Callback for the tree traversal method

\n", "comments": "" }, - "git_transfer_progress_cb": { - "type": "callback", - "file": "git2/types.h", - "line": 275, - "lineto": 275, - "args": [ - { - "name": "stats", - "type": "const git_transfer_progress *", - "comment": "Structure containing information about the state of the transfer" - }, - { - "name": "payload", - "type": "void *", - "comment": "Payload provided by caller" - } - ], - "argline": "const git_transfer_progress *stats, void *payload", - "sig": "const git_transfer_progress *::void *", - "return": { - "type": "int", - "comment": null - }, - "description": "

Type for progress callbacks during indexing. Return a value less than zero\n to cancel the transfer.

\n", - "comments": "" - }, "git_transport_message_cb": { "type": "callback", "file": "git2/types.h", - "line": 285, - "lineto": 285, + "line": 255, + "lineto": 255, "args": [ { "name": "str", @@ -29116,8 +26110,8 @@ "git_transport_certificate_check_cb": { "type": "callback", "file": "git2/types.h", - "line": 338, - "lineto": 338, + "line": 308, + "lineto": 308, "args": [ { "name": "cert", @@ -29152,202 +26146,6 @@ }, "globals": {}, "types": [ - [ - "LIBSSH2_SESSION", - { - "decl": "LIBSSH2_SESSION", - "type": "struct", - "value": "LIBSSH2_SESSION", - "file": "git2/transport.h", - "line": 163, - "lineto": 163, - "tdef": "typedef", - "description": "", - "comments": "", - "used": { - "returns": [], - "needs": [ - "git_cred_sign_callback" - ] - } - } - ], - [ - "LIBSSH2_USERAUTH_KBDINT_PROMPT", - { - "decl": "LIBSSH2_USERAUTH_KBDINT_PROMPT", - "type": "struct", - "value": "LIBSSH2_USERAUTH_KBDINT_PROMPT", - "file": "git2/transport.h", - "line": 164, - "lineto": 164, - "tdef": "typedef", - "description": "", - "comments": "", - "used": { - "returns": [], - "needs": [ - "git_cred_ssh_interactive_callback" - ] - } - } - ], - [ - "LIBSSH2_USERAUTH_KBDINT_RESPONSE", - { - "decl": "LIBSSH2_USERAUTH_KBDINT_RESPONSE", - "type": "struct", - "value": "LIBSSH2_USERAUTH_KBDINT_RESPONSE", - "file": "git2/transport.h", - "line": 165, - "lineto": 165, - "tdef": "typedef", - "description": "", - "comments": "", - "used": { - "returns": [], - "needs": [ - "git_cred_ssh_interactive_callback" - ] - } - } - ], - [ - "_LIBSSH2_SESSION", - { - "decl": [], - "type": "struct", - "value": "_LIBSSH2_SESSION", - "file": "git2/transport.h", - "line": 163, - "lineto": 163, - "tdef": null, - "description": "", - "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "_LIBSSH2_USERAUTH_KBDINT_PROMPT", - { - "decl": [], - "type": "struct", - "value": "_LIBSSH2_USERAUTH_KBDINT_PROMPT", - "file": "git2/transport.h", - "line": 164, - "lineto": 164, - "tdef": null, - "description": "", - "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "_LIBSSH2_USERAUTH_KBDINT_RESPONSE", - { - "decl": [], - "type": "struct", - "value": "_LIBSSH2_USERAUTH_KBDINT_RESPONSE", - "file": "git2/transport.h", - "line": 165, - "lineto": 165, - "tdef": null, - "description": "", - "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_allocator", - { - "decl": [ - "void *(*)(size_t, const char *, int) gmalloc", - "void *(*)(size_t, size_t, const char *, int) gcalloc", - "char *(*)(const char *, const char *, int) gstrdup", - "char *(*)(const char *, size_t, const char *, int) gstrndup", - "char *(*)(const char *, size_t, const char *, int) gsubstrdup", - "void *(*)(void *, size_t, const char *, int) grealloc", - "void *(*)(void *, size_t, size_t, const char *, int) greallocarray", - "void *(*)(size_t, size_t, const char *, int) gmallocarray", - "void (*)(void *) gfree" - ], - "type": "struct", - "value": "git_allocator", - "file": "git2/sys/alloc.h", - "line": 23, - "lineto": 73, - "block": "void *(*)(size_t, const char *, int) gmalloc\nvoid *(*)(size_t, size_t, const char *, int) gcalloc\nchar *(*)(const char *, const char *, int) gstrdup\nchar *(*)(const char *, size_t, const char *, int) gstrndup\nchar *(*)(const char *, size_t, const char *, int) gsubstrdup\nvoid *(*)(void *, size_t, const char *, int) grealloc\nvoid *(*)(void *, size_t, size_t, const char *, int) greallocarray\nvoid *(*)(size_t, size_t, const char *, int) gmallocarray\nvoid (*)(void *) gfree", - "tdef": "typedef", - "description": " An instance for a custom memory allocator", - "comments": "

Setting the pointers of this structure allows the developer to implement\n custom memory allocators. The global memory allocator can be set by using\n "GIT_OPT_SET_ALLOCATOR" with the git_libgit2_opts function. Keep in mind\n that all fields need to be set to a proper function.

\n", - "fields": [ - { - "type": "void *(*)(size_t, const char *, int)", - "name": "gmalloc", - "comments": "" - }, - { - "type": "void *(*)(size_t, size_t, const char *, int)", - "name": "gcalloc", - "comments": "" - }, - { - "type": "char *(*)(const char *, const char *, int)", - "name": "gstrdup", - "comments": "" - }, - { - "type": "char *(*)(const char *, size_t, const char *, int)", - "name": "gstrndup", - "comments": "" - }, - { - "type": "char *(*)(const char *, size_t, const char *, int)", - "name": "gsubstrdup", - "comments": "" - }, - { - "type": "void *(*)(void *, size_t, const char *, int)", - "name": "grealloc", - "comments": "" - }, - { - "type": "void *(*)(void *, size_t, size_t, const char *, int)", - "name": "greallocarray", - "comments": "" - }, - { - "type": "void *(*)(size_t, size_t, const char *, int)", - "name": "gmallocarray", - "comments": "" - }, - { - "type": "void (*)(void *)", - "name": "gfree", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_stdalloc_init_allocator", - "git_win32_crtdbg_init_allocator" - ] - } - } - ], [ "git_annotated_commit", { @@ -29360,7 +26158,6 @@ "tdef": "typedef", "description": " Annotated commits, the input to merge and rebase. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -29392,11 +26189,11 @@ ], "type": "enum", "file": "git2/apply.h", - "line": 92, - "lineto": 110, + "line": 95, + "lineto": 113, "block": "GIT_APPLY_LOCATION_WORKDIR\nGIT_APPLY_LOCATION_INDEX\nGIT_APPLY_LOCATION_BOTH", "tdef": "typedef", - "description": "", + "description": " Possible application locations for git_apply ", "comments": "", "fields": [ { @@ -29443,7 +26240,7 @@ "block": "unsigned int version\ngit_apply_delta_cb delta_cb\ngit_apply_hunk_cb hunk_cb\nvoid * payload", "tdef": "typedef", "description": " Apply options structure", - "comments": "

Initialize with GIT_APPLY_OPTIONS_INIT. Alternatively, you can\n use git_apply_init_options.

\n", + "comments": "

Initialize with GIT_APPLY_OPTIONS_INIT. Alternatively, you can use git_apply_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -29476,44 +26273,44 @@ } ], [ - "git_attr_t", + "git_attr_value_t", { "decl": [ - "GIT_ATTR_UNSPECIFIED_T", - "GIT_ATTR_TRUE_T", - "GIT_ATTR_FALSE_T", - "GIT_ATTR_VALUE_T" + "GIT_ATTR_VALUE_UNSPECIFIED", + "GIT_ATTR_VALUE_TRUE", + "GIT_ATTR_VALUE_FALSE", + "GIT_ATTR_VALUE_STRING" ], "type": "enum", "file": "git2/attr.h", "line": 82, "lineto": 87, - "block": "GIT_ATTR_UNSPECIFIED_T\nGIT_ATTR_TRUE_T\nGIT_ATTR_FALSE_T\nGIT_ATTR_VALUE_T", + "block": "GIT_ATTR_VALUE_UNSPECIFIED\nGIT_ATTR_VALUE_TRUE\nGIT_ATTR_VALUE_FALSE\nGIT_ATTR_VALUE_STRING", "tdef": "typedef", "description": " Possible states for an attribute", "comments": "", "fields": [ { "type": "int", - "name": "GIT_ATTR_UNSPECIFIED_T", + "name": "GIT_ATTR_VALUE_UNSPECIFIED", "comments": "

The attribute has been left unspecified

\n", "value": 0 }, { "type": "int", - "name": "GIT_ATTR_TRUE_T", + "name": "GIT_ATTR_VALUE_TRUE", "comments": "

The attribute has been set

\n", "value": 1 }, { "type": "int", - "name": "GIT_ATTR_FALSE_T", + "name": "GIT_ATTR_VALUE_FALSE", "comments": "

The attribute has been unset

\n", "value": 2 }, { "type": "int", - "name": "GIT_ATTR_VALUE_T", + "name": "GIT_ATTR_VALUE_STRING", "comments": "

This attribute has a value

\n", "value": 3 } @@ -29538,7 +26335,6 @@ "tdef": "typedef", "description": " Opaque structure to hold blame results ", "comments": "", - "fields": [], "used": { "returns": [ "git_blame_get_hunk_byindex", @@ -29550,7 +26346,9 @@ "git_blame_free", "git_blame_get_hunk_byindex", "git_blame_get_hunk_byline", - "git_blame_init_options" + "git_blame_get_hunk_count", + "git_blame_init_options", + "git_blame_options_init" ] } } @@ -29647,7 +26445,7 @@ "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": "
    \n
  • lines_in_hunk is the number of lines in this hunk
  • \n
  • final_commit_id is the OID of the commit where this line was last\nchanged.
  • \n
  • final_start_line_number is the 1-based line number where this hunk\nbegins, in the final version of the file
  • \n
  • final_signature is the author of final_commit_id. If\nGIT_BLAME_USE_MAILMAP has been specified, it will contain the canonical\nreal name and email address.
  • \n
  • orig_commit_id is the OID of the commit where this hunk was found. This\nwill usually be the same as final_commit_id, except when\nGIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES has been specified.
  • \n
  • orig_path is the path to the file where this hunk originated, as of the\ncommit specified by orig_commit_id.
  • \n
  • orig_start_line_number is the 1-based line number where this hunk begins\nin the file named by orig_path in the commit specified by\norig_commit_id.
  • \n
  • orig_signature is the author of orig_commit_id. If\nGIT_BLAME_USE_MAILMAP has been specified, it will contain the canonical\nreal name and email address.
  • \n
  • boundary is 1 iff the hunk has been tracked to a boundary commit (the\nroot, or the commit specified in git_blame_options.oldest_commit)
  • \n
\n", + "comments": "
    \n
  • 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)
  • \n
\n", "fields": [ { "type": "size_t", @@ -29709,8 +26507,8 @@ { "decl": [ "unsigned int version", - "int flags", - "int min_match_characters", + "uint32_t flags", + "uint16_t min_match_characters", "git_oid newest_commit", "git_oid oldest_commit", "size_t min_line", @@ -29721,10 +26519,10 @@ "file": "git2/blame.h", "line": 59, "lineto": 88, - "block": "unsigned int version\nint flags\nint min_match_characters\ngit_oid newest_commit\ngit_oid oldest_commit\nsize_t min_line\nsize_t max_line", + "block": "unsigned int version\nuint32_t flags\nuint16_t min_match_characters\ngit_oid newest_commit\ngit_oid oldest_commit\nsize_t min_line\nsize_t max_line", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Blame options structure", + "comments": "

Initialize with GIT_BLAME_OPTIONS_INIT. Alternatively, you can use git_blame_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -29732,14 +26530,14 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " A combination of `git_blame_flag_t` " }, { - "type": "int", + "type": "uint16_t", "name": "min_match_characters", - "comments": "" + "comments": " The lower bound on the number of alphanumeric\n characters that must be detected as moving/copying within a file for it to\n associate those lines with the parent commit. The default value is 20.\n This value only takes effect if any of the `GIT_BLAME_TRACK_COPIES_*`\n flags are specified." }, { "type": "git_oid", @@ -29766,7 +26564,8 @@ "returns": [], "needs": [ "git_blame_file", - "git_blame_init_options" + "git_blame_init_options", + "git_blame_options_init" ] } } @@ -29783,7 +26582,6 @@ "tdef": "typedef", "description": " In-memory representation of a blob object. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -29820,7 +26618,6 @@ "tdef": "typedef", "description": " Iterator type for branches ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -29893,7 +26690,7 @@ "block": "char * ptr\nsize_t asize\nsize_t size", "tdef": "typedef", "description": " A data buffer for exporting data from libgit2", - "comments": "

Sometimes libgit2 wants to return an allocated data buffer to the\n caller and have the caller take responsibility for freeing that memory.\n This can be awkward if the caller does not have easy access to the same\n allocation functions that libgit2 is using. In those cases, libgit2\n will fill in a git_buf and the caller can use git_buf_dispose() to\n release it when they are done.

\n\n

A git_buf may also be used for the caller to pass in a reference to\n a block of memory they hold. In this case, libgit2 will not resize or\n free the memory, but will read from it as needed.

\n\n

A git_buf is a public structure with three fields:

\n\n
    \n
  • ptr points to the start of the allocated memory. If it is NULL,\nthen the git_buf is considered empty and libgit2 will feel free\nto overwrite it with new data.

  • \n
  • size holds the size (in bytes) of the data that is actually used.

  • \n
  • asize holds the known total amount of allocated memory if the ptr\nwas allocated by libgit2. It may be larger than size. If ptr\nwas not allocated by libgit2 and should not be resized and/or freed,\nthen asize will be set to zero.

  • \n
\n\n

Some APIs may occasionally do something slightly unusual with a buffer,\n such as setting ptr to a value that was passed in by the user. In\n those cases, the behavior will be clearly documented by the API.

\n", + "comments": "

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.

\n\n

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.

\n\n

A git_buf is a public structure with three fields:

\n\n
    \n
  • ptr points to the start of the allocated memory. If it is NULL, then the git_buf is considered empty and libgit2 will feel free to overwrite it with new data.

  • \n
  • size holds the size (in bytes) of the data that is actually used.

  • \n
  • asize holds the known total amount of allocated memory if the ptr was allocated by libgit2. It may be larger than size. If ptr was not allocated by libgit2 and should not be resized and/or freed, then asize will be set to zero.

  • \n
\n\n

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.

\n", "fields": [ { "type": "char *", @@ -29939,13 +26736,10 @@ "git_diff_format_email", "git_diff_stats_to_buf", "git_diff_to_buf", - "git_filter_apply_fn", "git_filter_list_apply_to_blob", "git_filter_list_apply_to_data", "git_filter_list_apply_to_file", "git_filter_list_stream_data", - "git_mempack_dump", - "git_merge_driver_apply_fn", "git_message_prettify", "git_note_default_ref", "git_object_short_id", @@ -29959,6 +26753,7 @@ "git_repository_message", "git_submodule_resolve_url", "git_treebuilder_write_with_buffer", + "git_url_resolve_cb", "git_worktree_is_locked" ] } @@ -29973,8 +26768,8 @@ "type": "struct", "value": "git_cert", "file": "git2/types.h", - "line": 319, - "lineto": 324, + "line": 289, + "lineto": 294, "block": "git_cert_t cert_type", "tdef": "typedef", "description": " Parent type for `git_cert_hostkey` and `git_cert_x509`.", @@ -29989,8 +26784,7 @@ "used": { "returns": [], "needs": [ - "git_transport_certificate_check_cb", - "git_transport_smart_certificate_check" + "git_transport_certificate_check_cb" ] } } @@ -30087,8 +26881,8 @@ ], "type": "enum", "file": "git2/types.h", - "line": 291, - "lineto": 314, + "line": 261, + "lineto": 284, "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", @@ -30179,12 +26973,12 @@ ], "type": "enum", "file": "git2/checkout.h", - "line": 205, - "lineto": 214, + "line": 217, + "lineto": 226, "block": "GIT_CHECKOUT_NOTIFY_NONE\nGIT_CHECKOUT_NOTIFY_CONFLICT\nGIT_CHECKOUT_NOTIFY_DIRTY\nGIT_CHECKOUT_NOTIFY_UPDATED\nGIT_CHECKOUT_NOTIFY_UNTRACKED\nGIT_CHECKOUT_NOTIFY_IGNORED\nGIT_CHECKOUT_NOTIFY_ALL", "tdef": "typedef", "description": " Checkout notification flags", - "comments": "

Checkout will invoke an options notification callback (notify_cb) for\n certain cases - you pick which ones via notify_flags:

\n\n
    \n
  • GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.

  • \n
  • GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that\ndo not need an update but no longer match the baseline. Core git\ndisplays these files when checkout runs, but won't stop the checkout.

  • \n
  • GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.

  • \n
  • GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.

  • \n
  • GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.

  • \n
\n\n

Returning a non-zero value from this callback will cancel the checkout.\n The non-zero return value will be propagated back and returned by the\n git_checkout_... call.

\n\n

Notification callbacks are made prior to modifying any files on disk,\n so canceling on any notification will still happen prior to any files\n being modified.

\n", + "comments": "

Checkout will invoke an options notification callback (notify_cb) for certain cases - you pick which ones via notify_flags:

\n\n
    \n
  • GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.

  • \n
  • 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.

  • \n
  • GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.

  • \n
  • GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.

  • \n
  • GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.

  • \n
\n\n

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\n

Notification 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", @@ -30265,12 +27059,12 @@ "type": "struct", "value": "git_checkout_options", "file": "git2/checkout.h", - "line": 250, - "lineto": 294, + "line": 263, + "lineto": 307, "block": "unsigned int version\nunsigned int checkout_strategy\nint disable_filters\nunsigned int dir_mode\nunsigned int file_mode\nint file_open_flags\nunsigned int notify_flags\ngit_checkout_notify_cb notify_cb\nvoid * notify_payload\ngit_checkout_progress_cb progress_cb\nvoid * progress_payload\ngit_strarray paths\ngit_tree * baseline\ngit_index * baseline_index\nconst char * target_directory\nconst char * ancestor_label\nconst char * our_label\nconst char * their_label\ngit_checkout_perfdata_cb perfdata_cb\nvoid * perfdata_payload", "tdef": "typedef", "description": " Checkout options structure", - "comments": "

Initialize with GIT_CHECKOUT_OPTIONS_INIT. Alternatively, you can\n use git_checkout_init_options.

\n", + "comments": "

Initialize with GIT_CHECKOUT_OPTIONS_INIT. Alternatively, you can use git_checkout_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -30378,7 +27172,7 @@ "needs": [ "git_checkout_head", "git_checkout_index", - "git_checkout_init_options", + "git_checkout_options_init", "git_checkout_tree", "git_merge", "git_reset", @@ -30398,11 +27192,11 @@ "type": "struct", "value": "git_checkout_perfdata", "file": "git2/checkout.h", - "line": 216, - "lineto": 220, + "line": 229, + "lineto": 233, "block": "size_t mkdir_calls\nsize_t stat_calls\nsize_t chmod_calls", "tdef": "typedef", - "description": "", + "description": " Checkout performance-reporting structure ", "comments": "", "fields": [ { @@ -30459,11 +27253,11 @@ "type": "enum", "file": "git2/checkout.h", "line": 106, - "lineto": 177, + "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", "tdef": "typedef", "description": " Checkout behavior flags", - "comments": "

In libgit2, checkout is used to update the working directory and index\n to match a target tree. Unlike git checkout, it does not move the HEAD\n commit for you - use git_repository_set_head or the like to do that.

\n\n

Checkout looks at (up to) four things: the "target" tree you want to\n check out, the "baseline" tree of what was checked out previously, the\n working directory for actual files, and the index for staged changes.

\n\n

You give checkout one of three strategies for update:

\n\n
    \n
  • GIT_CHECKOUT_NONE is a dry-run strategy that checks for conflicts,\netc., but doesn't make any actual changes.

  • \n
  • GIT_CHECKOUT_FORCE is at the opposite extreme, taking any action to\nmake the working directory match the target (including potentially\ndiscarding modified files).

  • \n
  • GIT_CHECKOUT_SAFE is between these two options, it will only make\nmodifications that will not lose changes.

    \n\n
                     |  target == baseline   |  target != baseline  |\n
    \n\n

    ---------------------|-----------------------|----------------------|\n workdir == baseline | no action | create, update, or |\n | | delete file |\n---------------------|-----------------------|----------------------|\n workdir exists and | no action | conflict (notify |\n is != baseline | notify dirty MODIFIED | and cancel checkout) |\n---------------------|-----------------------|----------------------|\n workdir missing, | notify dirty DELETED | create file |\n baseline present | | |\n---------------------|-----------------------|----------------------|

  • \n
\n\n

To emulate git checkout, use GIT_CHECKOUT_SAFE with a checkout\n notification callback (see below) that displays information about dirty\n files. The default behavior will cancel checkout on conflicts.

\n\n

To emulate git checkout-index, use GIT_CHECKOUT_SAFE with a\n notification callback that cancels the operation if a dirty-but-existing\n file is found in the working directory. This core git command isn't\n quite "force" but is sensitive about some types of changes.

\n\n

To emulate git checkout -f, use GIT_CHECKOUT_FORCE.

\n\n

There are some additional flags to modify the behavior of checkout:

\n\n
    \n
  • GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates\neven if there are conflicts (instead of cancelling the checkout).

  • \n
  • GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not\nin target, baseline, or index, and not ignored) from the working dir.

  • \n
  • GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also\nuntracked) from the working directory as well.

  • \n
  • GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that\nalready exist. Files will not be created nor deleted. This just skips\napplying adds, deletes, and typechanges.

  • \n
  • GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the\nupdated files' information to the index.

  • \n
  • Normally, checkout will reload the index and git attributes from disk\nbefore any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.

  • \n
  • Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips\nfiles with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and\nGIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the\nstage 2 ("ours") or stage 3 ("theirs") version of files in the index.

  • \n
  • GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being\noverwritten. Normally, files that are ignored in the working directory\nare not considered "precious" and may be overwritten if the checkout\ntarget contains that file.

  • \n
  • GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing\nfiles or folders that fold to the same name on case insensitive\nfilesystems. This can cause files to retain their existing names\nand write through existing symbolic links.

  • \n
\n", + "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.

\n\n

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\n

You give checkout one of three strategies for update:

\n\n
    \n
  • GIT_CHECKOUT_NONE is a dry-run strategy that checks for conflicts, etc., but doesn't make any actual changes.

  • \n
  • GIT_CHECKOUT_FORCE is at the opposite extreme, taking any action to make the working directory match the target (including potentially discarding modified files).

  • \n
  • GIT_CHECKOUT_SAFE is between these two options, it will only make modifications that will not lose changes.

    \n\n
                     |  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
  • \n
\n\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.

\n\n

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.

\n\n

To emulate git checkout -f, use GIT_CHECKOUT_FORCE.

\n\n

There are some additional flags to modify the behavior of checkout:

\n\n
    \n
  • GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates even if there are conflicts (instead of cancelling the checkout).

  • \n
  • GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not in target, baseline, or index, and not ignored) from the working dir.

  • \n
  • GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also untracked) from the working directory as well.

  • \n
  • 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.

  • \n
  • GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the updated files' information to the index.

  • \n
  • Normally, checkout will reload the index and git attributes from disk before any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.

  • \n
  • 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.

  • \n
  • 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.

  • \n
  • 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.

  • \n
\n", "fields": [ { "type": "int", @@ -30474,13 +27268,13 @@ { "type": "int", "name": "GIT_CHECKOUT_SAFE", - "comments": "

Allow safe updates that cannot overwrite uncommitted data

\n", + "comments": "

Allow safe updates that cannot overwrite uncommitted data.\n If the uncommitted changes don't conflict with the checked out files,\n the checkout will still proceed, leaving the changes intact.

\n\n

Mutually exclusive with GIT_CHECKOUT_FORCE.\n GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE.

\n", "value": 1 }, { "type": "int", "name": "GIT_CHECKOUT_FORCE", - "comments": "

Allow all updates to force working directory to look like index

\n", + "comments": "

Allow all updates to force working directory to look like index.

\n\n

Mutually exclusive with GIT_CHECKOUT_SAFE.\n GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE.

\n", "value": 2 }, { @@ -30648,7 +27442,7 @@ "returns": [], "needs": [ "git_cherrypick", - "git_cherrypick_init_options" + "git_cherrypick_options_init" ] } } @@ -30725,7 +27519,7 @@ "block": "unsigned int version\ngit_checkout_options checkout_opts\ngit_fetch_options fetch_opts\nint bare\ngit_clone_local_t local\nconst char * checkout_branch\ngit_repository_create_cb repository_cb\nvoid * repository_cb_payload\ngit_remote_create_cb remote_cb\nvoid * remote_cb_payload", "tdef": "typedef", "description": " Clone options structure", - "comments": "

Initialize with GIT_CLONE_OPTIONS_INIT. Alternatively, you can\n use git_clone_init_options.

\n", + "comments": "

Initialize with GIT_CLONE_OPTIONS_INIT. Alternatively, you can use git_clone_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -30782,7 +27576,7 @@ "returns": [], "needs": [ "git_clone", - "git_clone_init_options" + "git_clone_options_init" ] } } @@ -30799,7 +27593,6 @@ "tdef": "typedef", "description": " Parsed representation of a commit object. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -30814,7 +27607,6 @@ "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", "git_commit_dup", "git_commit_free", "git_commit_header_field", @@ -30859,11 +27651,9 @@ "tdef": "typedef", "description": " Memory representation of a set of config files ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ - "git_config_add_backend", "git_config_add_file_ondisk", "git_config_backend_foreach_match", "git_config_delete_entry", @@ -30882,7 +27672,6 @@ "git_config_get_path", "git_config_get_string", "git_config_get_string_buf", - "git_config_init_backend", "git_config_iterator_free", "git_config_iterator_glob_new", "git_config_iterator_new", @@ -30901,8 +27690,7 @@ "git_config_set_string", "git_config_snapshot", "git_repository_config", - "git_repository_config_snapshot", - "git_repository_set_config" + "git_repository_config_snapshot" ] } } @@ -30916,88 +27704,13 @@ "file": "git2/types.h", "line": 148, "lineto": 148, - "block": "unsigned int version\nint readonly\nstruct git_config * cfg\nint (*)(struct git_config_backend *, git_config_level_t, const git_repository *) open\nint (*)(struct git_config_backend *, const char *, git_config_entry **) get\nint (*)(struct git_config_backend *, const char *, const char *) set\nint (*)(git_config_backend *, const char *, const char *, const char *) set_multivar\nint (*)(struct git_config_backend *, const char *) del\nint (*)(struct git_config_backend *, const char *, const char *) del_multivar\nint (*)(git_config_iterator **, struct git_config_backend *) iterator\nint (*)(struct git_config_backend **, struct git_config_backend *) snapshot\nint (*)(struct git_config_backend *) lock\nint (*)(struct git_config_backend *, int) unlock\nvoid (*)(struct git_config_backend *) free", "tdef": "typedef", "description": " Interface to access a configuration file ", "comments": "", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "int", - "name": "readonly", - "comments": " True if this backend is for a snapshot " - }, - { - "type": "struct git_config *", - "name": "cfg", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, git_config_level_t, const git_repository *)", - "name": "open", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *, git_config_entry **)", - "name": "get", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *, const char *)", - "name": "set", - "comments": "" - }, - { - "type": "int (*)(git_config_backend *, const char *, const char *, const char *)", - "name": "set_multivar", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *)", - "name": "del", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, const char *, const char *)", - "name": "del_multivar", - "comments": "" - }, - { - "type": "int (*)(git_config_iterator **, struct git_config_backend *)", - "name": "iterator", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend **, struct git_config_backend *)", - "name": "snapshot", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *)", - "name": "lock", - "comments": "" - }, - { - "type": "int (*)(struct git_config_backend *, int)", - "name": "unlock", - "comments": "" - }, - { - "type": "void (*)(struct git_config_backend *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ - "git_config_add_backend", - "git_config_backend_foreach_match", - "git_config_init_backend" + "git_config_backend_foreach_match" ] } } @@ -31077,28 +27790,6 @@ "tdef": "typedef", "description": " An opaque structure for a configuration iterator", "comments": "", - "fields": [ - { - "type": "git_config_backend *", - "name": "backend", - "comments": "" - }, - { - "type": "unsigned int", - "name": "flags", - "comments": "" - }, - { - "type": "int (*)(git_config_entry **, git_config_iterator *)", - "name": "next", - "comments": "" - }, - { - "type": "void (*)(git_config_iterator *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ @@ -31130,7 +27821,7 @@ "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", "tdef": "typedef", "description": " Priority level of a config file.\n These priority levels correspond to the natural escalation logic\n (from higher to lower) when searching for config entries in git.git.", - "comments": "

git_config_open_default() and git_repository_config() honor those\n priority levels as well.

\n", + "comments": "

git_config_open_default() and git_repository_config() honor those priority levels as well.

\n", "fields": [ { "type": "int", @@ -31178,7 +27869,6 @@ "used": { "returns": [], "needs": [ - "git_config_add_backend", "git_config_add_file_ondisk", "git_config_open_level" ] @@ -31188,13 +27878,16 @@ [ "git_cred", { - "decl": "git_cred", + "decl": [ + "git_credtype_t credtype", + "void (*)(git_cred *) free" + ], "type": "struct", "value": "git_cred", "file": "git2/transport.h", - "line": 140, - "lineto": 140, - "tdef": "typedef", + "line": 145, + "lineto": 148, + "tdef": null, "description": " The base structure for all credential types", "comments": "", "fields": [ @@ -31209,6 +27902,7 @@ "comments": "" } ], + "block": "git_credtype_t credtype\nvoid (*)(git_cred *) free", "used": { "returns": [], "needs": [ @@ -31223,8 +27917,7 @@ "git_cred_ssh_key_new", "git_cred_username_new", "git_cred_userpass", - "git_cred_userpass_plaintext_new", - "git_transport_smart_credentials" + "git_cred_userpass_plaintext_new" ] } } @@ -31255,7 +27948,7 @@ "char * username", "char * publickey", "size_t publickey_len", - "git_cred_sign_callback sign_callback", + "git_cred_sign_cb sign_callback", "void * payload" ], "type": "struct", @@ -31263,7 +27956,7 @@ "file": "git2/transport.h", "line": 195, "lineto": 202, - "block": "git_cred parent\nchar * username\nchar * publickey\nsize_t publickey_len\ngit_cred_sign_callback sign_callback\nvoid * payload", + "block": "git_cred parent\nchar * username\nchar * publickey\nsize_t publickey_len\ngit_cred_sign_cb sign_callback\nvoid * payload", "tdef": "typedef", "description": " A key with a custom signature function", "comments": "", @@ -31289,7 +27982,7 @@ "comments": "" }, { - "type": "git_cred_sign_callback", + "type": "git_cred_sign_cb", "name": "sign_callback", "comments": "" }, @@ -31311,7 +28004,7 @@ "decl": [ "git_cred parent", "char * username", - "git_cred_ssh_interactive_callback prompt_callback", + "git_cred_ssh_interactive_cb prompt_callback", "void * payload" ], "type": "struct", @@ -31319,7 +28012,7 @@ "file": "git2/transport.h", "line": 185, "lineto": 190, - "block": "git_cred parent\nchar * username\ngit_cred_ssh_interactive_callback prompt_callback\nvoid * payload", + "block": "git_cred parent\nchar * username\ngit_cred_ssh_interactive_cb prompt_callback\nvoid * payload", "tdef": "typedef", "description": " Keyboard-interactive based ssh authentication", "comments": "", @@ -31335,7 +28028,7 @@ "comments": "" }, { - "type": "git_cred_ssh_interactive_callback", + "type": "git_cred_ssh_interactive_cb", "name": "prompt_callback", "comments": "" }, @@ -31532,7 +28225,7 @@ "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", "tdef": "typedef", "description": " Supported credential types", - "comments": "

This represents the various types of authentication methods supported by\n the library.

\n", + "comments": "

This represents the various types of authentication methods supported by the library.

\n", "fields": [ { "type": "int", @@ -31698,7 +28391,7 @@ "block": "GIT_DELTA_UNMODIFIED\nGIT_DELTA_ADDED\nGIT_DELTA_DELETED\nGIT_DELTA_MODIFIED\nGIT_DELTA_RENAMED\nGIT_DELTA_COPIED\nGIT_DELTA_IGNORED\nGIT_DELTA_UNTRACKED\nGIT_DELTA_TYPECHANGE\nGIT_DELTA_UNREADABLE\nGIT_DELTA_CONFLICTED", "tdef": "typedef", "description": " What type of change is described by a git_diff_delta?", - "comments": "

GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run\n git_diff_find_similar() on the diff object.

\n\n

GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE\n in the option flags (otherwise type changes will be split into ADDED /\n DELETED pairs).

\n", + "comments": "

GIT_DELTA_RENAMED and GIT_DELTA_COPIED will only show up if you run git_diff_find_similar() on the diff object.

\n\n

GIT_DELTA_TYPECHANGE only shows up given GIT_DIFF_INCLUDE_TYPECHANGE in the option flags (otherwise type changes will be split into ADDED / DELETED pairs).

\n", "fields": [ { "type": "int", @@ -31793,7 +28486,7 @@ "block": "unsigned int version\nunsigned int abbreviated_size\nint always_use_long_format\nconst char * dirty_suffix", "tdef": "typedef", "description": " Describe format options structure", - "comments": "

Initialize with GIT_DESCRIBE_FORMAT_OPTIONS_INIT. Alternatively, you can\n use git_describe_format_init_options.

\n", + "comments": "

Initialize with GIT_DESCRIBE_FORMAT_OPTIONS_INIT. Alternatively, you can use git_describe_format_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -31820,7 +28513,7 @@ "returns": [], "needs": [ "git_describe_format", - "git_describe_init_format_options" + "git_describe_format_options_init" ] } } @@ -31844,7 +28537,7 @@ "block": "unsigned int version\nunsigned int max_candidates_tags\nunsigned int describe_strategy\nconst char * pattern\nint only_follow_first_parent\nint show_commit_oid_as_fallback", "tdef": "typedef", "description": " Describe options structure", - "comments": "

Initialize with GIT_DESCRIBE_OPTIONS_INIT. Alternatively, you can\n use git_describe_init_options.

\n", + "comments": "

Initialize with GIT_DESCRIBE_OPTIONS_INIT. Alternatively, you can use git_describe_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -31881,7 +28574,7 @@ "returns": [], "needs": [ "git_describe_commit", - "git_describe_init_options", + "git_describe_options_init", "git_describe_workdir" ] } @@ -31899,7 +28592,6 @@ "tdef": "typedef", "description": " A struct that stores the result of a describe operation.", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -31926,7 +28618,7 @@ "block": "GIT_DESCRIBE_DEFAULT\nGIT_DESCRIBE_TAGS\nGIT_DESCRIBE_ALL", "tdef": "typedef", "description": " Reference lookup strategy", - "comments": "

These behave like the --tags and --all options to git-describe,\n namely they say to look for any reference in either refs/tags/ or\n refs/ respectively.

\n", + "comments": "

These behave like the --tags and --all options to git-describe, namely they say to look for any reference in either refs/tags/ or refs/ respectively.

\n", "fields": [ { "type": "int", @@ -31964,8 +28656,7 @@ "lineto": 193, "tdef": "typedef", "description": " The diff object that contains all individual file deltas.", - "comments": "

A diff represents the cumulative list of differences between two\n snapshots of a repository (possibly filtered by a set of file name\n patterns).

\n\n

Calculating diffs is generally done in two phases: building a list of\n diffs then traversing it. This makes is easier to share logic across\n the various types of diffs (tree vs tree, workdir vs index, etc.), and\n also allows you to insert optional diff post-processing phases,\n such as rename detection, in between the steps. When you are done with\n a diff object, it must be freed.

\n\n

This is an opaque structure which will be allocated by one of the diff\n generator functions below (such as git_diff_tree_to_tree). You are\n responsible for releasing the object memory when done, using the\n git_diff_free() function.

\n", - "fields": [], + "comments": "

A diff represents the cumulative list of differences between two snapshots of a repository (possibly filtered by a set of file name patterns).

\n\n

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\n

This 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.

\n", "used": { "returns": [ "git_diff_get_delta", @@ -31984,31 +28675,28 @@ "git_diff_buffers", "git_diff_commit_as_email", "git_diff_file_cb", - "git_diff_find_init_options", + "git_diff_find_options_init", "git_diff_find_similar", "git_diff_foreach", "git_diff_format_email", - "git_diff_format_email_init_options", + "git_diff_format_email_options_init", "git_diff_free", "git_diff_from_buffer", "git_diff_get_delta", - "git_diff_get_perfdata", "git_diff_get_stats", "git_diff_hunk_cb", "git_diff_index_to_index", "git_diff_index_to_workdir", - "git_diff_init_options", "git_diff_is_sorted_icase", "git_diff_line_cb", "git_diff_merge", "git_diff_notify_cb", "git_diff_num_deltas", "git_diff_num_deltas_of_type", + "git_diff_options_init", "git_diff_patchid", - "git_diff_patchid_init_options", + "git_diff_patchid_options_init", "git_diff_print", - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle", "git_diff_progress_cb", "git_diff_stats_deletions", "git_diff_stats_files_changed", @@ -32027,8 +28715,7 @@ "git_patch_get_hunk", "git_patch_get_line_in_hunk", "git_patch_print", - "git_pathspec_match_diff", - "git_status_list_get_perfdata" + "git_pathspec_match_diff" ] } } @@ -32049,7 +28736,7 @@ "block": "unsigned int contains_data\ngit_diff_binary_file old_file\ngit_diff_binary_file new_file", "tdef": "typedef", "description": " Structure describing the binary contents of a diff.", - "comments": "

A binary file / delta is a file (or pair) for which no text diffs\n should be generated. A diff can contain delta entries that are\n binary, but no diff content will be output for those files. There is\n a base heuristic for binary detection and you can further tune the\n behavior with git attributes or diff flags and option settings.

\n", + "comments": "

A binary file / delta is a file (or pair) for which no text diffs should be generated. A diff can contain delta entries that are binary, but no diff content will be output for those files. There is a base heuristic for binary detection and you can further tune the behavior with git attributes or diff flags and option settings.

\n", "fields": [ { "type": "unsigned int", @@ -32172,9 +28859,9 @@ { "decl": [ "git_delta_t status", - "int flags", - "int similarity", - "int nfiles", + "uint32_t flags", + "uint16_t similarity", + "uint16_t nfiles", "git_diff_file old_file", "git_diff_file new_file" ], @@ -32183,10 +28870,10 @@ "file": "git2/diff.h", "line": 309, "lineto": 316, - "block": "git_delta_t status\nint flags\nint similarity\nint nfiles\ngit_diff_file old_file\ngit_diff_file new_file", + "block": "git_delta_t status\nuint32_t flags\nuint16_t similarity\nuint16_t nfiles\ngit_diff_file old_file\ngit_diff_file new_file", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Description of changes to one entry.", + "comments": "

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.

\n\n

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\n

The 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.

\n\n

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\n

Under 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.

\n\n

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.

\n\n

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)).

\n", "fields": [ { "type": "git_delta_t", @@ -32194,19 +28881,19 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " git_diff_flag_t values " }, { - "type": "int", + "type": "uint16_t", "name": "similarity", - "comments": "" + "comments": " for RENAMED and COPIED, value 0-100 " }, { - "type": "int", + "type": "uint16_t", "name": "nfiles", - "comments": "" + "comments": " number of files in this delta " }, { "type": "git_diff_file", @@ -32231,9 +28918,7 @@ "git_diff_file_cb", "git_diff_hunk_cb", "git_diff_line_cb", - "git_diff_notify_cb", - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle" + "git_diff_notify_cb" ] } } @@ -32245,19 +28930,19 @@ "git_oid id", "const char * path", "git_off_t size", - "int flags", - "int mode", - "int id_abbrev" + "uint32_t flags", + "uint16_t mode", + "uint16_t id_abbrev" ], "type": "struct", "value": "git_diff_file", "file": "git2/diff.h", "line": 260, "lineto": 267, - "block": "git_oid id\nconst char * path\ngit_off_t size\nint flags\nint mode\nint id_abbrev", + "block": "git_oid id\nconst char * path\ngit_off_t size\nuint32_t flags\nuint16_t mode\nuint16_t id_abbrev", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Description of one side of a delta.", + "comments": "

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\n

The 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.

\n\n

path is the NUL-terminated path to the entry relative to the working directory of the repository.

\n\n

size is the size of the entry in bytes.

\n\n

flags is a combination of the git_diff_flag_t types

\n\n

mode is, roughly, the stat() st_mode value for the item. This will be restricted to one of the git_filemode_t values.

\n\n

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.

\n", "fields": [ { "type": "git_oid", @@ -32275,17 +28960,17 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "flags", "comments": "" }, { - "type": "int", + "type": "uint16_t", "name": "mode", "comments": "" }, { - "type": "int", + "type": "uint16_t", "name": "id_abbrev", "comments": "" } @@ -32307,11 +28992,11 @@ { "decl": [ "unsigned int version", - "int flags", - "int rename_threshold", - "int rename_from_rewrite_threshold", - "int copy_threshold", - "int break_rewrite_threshold", + "uint32_t flags", + "uint16_t rename_threshold", + "uint16_t rename_from_rewrite_threshold", + "uint16_t copy_threshold", + "uint16_t break_rewrite_threshold", "size_t rename_limit", "git_diff_similarity_metric * metric" ], @@ -32320,10 +29005,10 @@ "file": "git2/diff.h", "line": 718, "lineto": 772, - "block": "unsigned int version\nint flags\nint rename_threshold\nint rename_from_rewrite_threshold\nint copy_threshold\nint break_rewrite_threshold\nsize_t rename_limit\ngit_diff_similarity_metric * metric", + "block": "unsigned int version\nuint32_t flags\nuint16_t rename_threshold\nuint16_t rename_from_rewrite_threshold\nuint16_t copy_threshold\nuint16_t break_rewrite_threshold\nsize_t rename_limit\ngit_diff_similarity_metric * metric", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Control behavior of rename and copy detection", + "comments": "

These options mostly mimic parameters that can be passed to git-diff.

\n", "fields": [ { "type": "unsigned int", @@ -32331,29 +29016,29 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " Combination of git_diff_find_t values (default GIT_DIFF_FIND_BY_CONFIG).\n NOTE: if you don't explicitly set this, `diff.renames` could be set\n to false, resulting in `git_diff_find_similar` doing nothing." }, { - "type": "int", + "type": "uint16_t", "name": "rename_threshold", - "comments": "" + "comments": " Threshold above which similar files will be considered renames.\n This is equivalent to the -M option. Defaults to 50." }, { - "type": "int", + "type": "uint16_t", "name": "rename_from_rewrite_threshold", - "comments": "" + "comments": " Threshold below which similar files will be eligible to be a rename source.\n This is equivalent to the first part of the -B option. Defaults to 50." }, { - "type": "int", + "type": "uint16_t", "name": "copy_threshold", - "comments": "" + "comments": " Threshold above which similar files will be considered copies.\n This is equivalent to the -C option. Defaults to 50." }, { - "type": "int", + "type": "uint16_t", "name": "break_rewrite_threshold", - "comments": "" + "comments": " 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." }, { "type": "size_t", @@ -32369,7 +29054,7 @@ "used": { "returns": [], "needs": [ - "git_diff_find_init_options", + "git_diff_find_options_init", "git_diff_find_similar" ] } @@ -32524,7 +29209,7 @@ "block": "GIT_DIFF_FLAG_BINARY\nGIT_DIFF_FLAG_NOT_BINARY\nGIT_DIFF_FLAG_VALID_ID\nGIT_DIFF_FLAG_EXISTS", "tdef": "typedef", "description": " Flags for the delta object and the file objects on each side.", - "comments": "

These flags are used for both the flags value of the git_diff_delta\n and the flags for the git_diff_file objects representing the old and\n new sides of the delta. Values outside of this public range should be\n considered reserved for internal or future use.

\n", + "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.

\n", "fields": [ { "type": "int", @@ -32662,7 +29347,7 @@ "returns": [], "needs": [ "git_diff_format_email", - "git_diff_format_email_init_options" + "git_diff_format_email_options_init" ] } } @@ -32745,7 +29430,7 @@ "block": "int old_start\nint old_lines\nint new_start\nint new_lines\nsize_t header_len\nchar [128] header", "tdef": "typedef", "description": " Structure describing a hunk of a diff.", - "comments": "

A hunk is a span of modified lines in a delta along with some stable\n surrounding context. You can configure the amount of context and other\n properties of how hunks are generated. Each hunk also comes with a\n header that described where it starts and ends in both the old and new\n versions in the delta.

\n", + "comments": "

A hunk is a span of modified lines in a delta along with some stable surrounding context. You can configure the amount of context and other properties of how hunks are generated. Each hunk also comes with a header that described where it starts and ends in both the old and new versions in the delta.

\n", "fields": [ { "type": "int", @@ -32788,8 +29473,6 @@ "git_diff_foreach", "git_diff_hunk_cb", "git_diff_line_cb", - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle", "git_patch_get_hunk" ] } @@ -32815,7 +29498,7 @@ "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.", - "comments": "

A line is a range of characters inside a hunk. It could be a context\n line (i.e. in both old and new versions), an added line (i.e. only in\n the new version), or a removed line (i.e. only in the old version).\n Unfortunately, we don't know anything about the encoding of data in the\n file being diffed, so we cannot tell you much about the line content.\n Line data will not be NUL-byte terminated, however, because it will be\n just a span of bytes inside the larger file.

\n", + "comments": "

A line is a range of characters inside a hunk. It could be a context line (i.e. in both old and new versions), an added line (i.e. only in the new version), or a removed line (i.e. only in the old version). Unfortunately, we don't know anything about the encoding of data in the file being diffed, so we cannot tell you much about the line content. Line data will not be NUL-byte terminated, however, because it will be just a span of bytes inside the larger file.

\n", "fields": [ { "type": "char", @@ -32862,8 +29545,6 @@ "git_diff_foreach", "git_diff_line_cb", "git_diff_print", - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle", "git_patch_get_line_in_hunk", "git_patch_print" ] @@ -32891,7 +29572,7 @@ "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.", - "comments": "

These values describe where a line came from and will be passed to\n the git_diff_line_cb when iterating over a diff. There are some\n special origin constants at the end that are used for the text\n output callbacks to demarcate lines that are actually part of\n the file or hunk headers.

\n", + "comments": "

These values describe where a line came from and will be passed to the git_diff_line_cb when iterating over a diff. There are some special origin constants at the end that are used for the text output callbacks to demarcate lines that are actually part of the file or hunk headers.

\n", "fields": [ { "type": "int", @@ -33190,15 +29871,15 @@ { "decl": [ "unsigned int version", - "int flags", + "uint32_t flags", "git_submodule_ignore_t ignore_submodules", "git_strarray pathspec", "git_diff_notify_cb notify_cb", "git_diff_progress_cb progress_cb", "void * payload", - "int context_lines", - "int interhunk_lines", - "int id_abbrev", + "uint32_t context_lines", + "uint32_t interhunk_lines", + "uint16_t id_abbrev", "git_off_t max_size", "const char * old_prefix", "const char * new_prefix" @@ -33208,10 +29889,10 @@ "file": "git2/diff.h", "line": 361, "lineto": 433, - "block": "unsigned int version\nint flags\ngit_submodule_ignore_t ignore_submodules\ngit_strarray pathspec\ngit_diff_notify_cb notify_cb\ngit_diff_progress_cb progress_cb\nvoid * payload\nint context_lines\nint interhunk_lines\nint id_abbrev\ngit_off_t max_size\nconst char * old_prefix\nconst char * new_prefix", + "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", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Structure describing options about how the diff should be executed.", + "comments": "

Setting all values of the structure to zero will yield the default values. Similarly, passing NULL for the options structure will give the defaults. The default values are marked below.

\n", "fields": [ { "type": "unsigned int", @@ -33219,9 +29900,9 @@ "comments": " version for the struct " }, { - "type": "int", + "type": "uint32_t", "name": "flags", - "comments": "" + "comments": " A combination of `git_diff_option_t` values above.\n Defaults to GIT_DIFF_NORMAL" }, { "type": "git_submodule_ignore_t", @@ -33249,19 +29930,19 @@ "comments": " The payload to pass to the callback functions. " }, { - "type": "int", + "type": "uint32_t", "name": "context_lines", - "comments": "" + "comments": " The number of unchanged lines that define the boundary of a hunk\n (and to display before and after). Defaults to 3." }, { - "type": "int", + "type": "uint32_t", "name": "interhunk_lines", - "comments": "" + "comments": " The maximum number of unchanged lines between hunk boundaries before\n the hunks will be merged into one. Defaults to 0." }, { - "type": "int", + "type": "uint16_t", "name": "id_abbrev", - "comments": "" + "comments": " The abbreviation length to use when formatting object ids.\n Defaults to the value of 'core.abbrev' from the config, or 7 if unset." }, { "type": "git_off_t", @@ -33288,7 +29969,7 @@ "git_diff_commit_as_email", "git_diff_index_to_index", "git_diff_index_to_workdir", - "git_diff_init_options", + "git_diff_options_init", "git_diff_tree_to_index", "git_diff_tree_to_tree", "git_diff_tree_to_workdir", @@ -33314,7 +29995,7 @@ "block": "unsigned int version", "tdef": "typedef", "description": " Patch ID options structure", - "comments": "

Initialize with GIT_PATCHID_OPTIONS_INIT. Alternatively, you can\n use git_patchid_init_options.

\n", + "comments": "

Initialize with GIT_PATCHID_OPTIONS_INIT. Alternatively, you can use git_diff_patchid_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -33326,50 +30007,7 @@ "returns": [], "needs": [ "git_diff_patchid", - "git_diff_patchid_init_options" - ] - } - } - ], - [ - "git_diff_perfdata", - { - "decl": [ - "unsigned int version", - "size_t stat_calls", - "size_t oid_calculations" - ], - "type": "struct", - "value": "git_diff_perfdata", - "file": "git2/sys/diff.h", - "line": 67, - "lineto": 71, - "block": "unsigned int version\nsize_t stat_calls\nsize_t oid_calculations", - "tdef": "typedef", - "description": " Performance data from diffing", - "comments": "", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "size_t", - "name": "stat_calls", - "comments": " Number of stat() calls performed " - }, - { - "type": "size_t", - "name": "oid_calculations", - "comments": " Number of ID calculations " - } - ], - "used": { - "returns": [], - "needs": [ - "git_diff_get_perfdata", - "git_status_list_get_perfdata" + "git_diff_patchid_options_init" ] } } @@ -33438,7 +30076,6 @@ "tdef": "typedef", "description": " This is an opaque structure which is allocated by `git_diff_get_stats`.\n You are responsible for releasing the object memory when done, using the\n `git_diff_stats_free()` function.", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -33524,7 +30161,7 @@ "block": "GIT_DIRECTION_FETCH\nGIT_DIRECTION_PUSH", "tdef": "typedef", "description": " Direction of the connection.", - "comments": "

We need this because we need to know whether we should call\n git-upload-pack or git-receive-pack on the remote end when get_refs\n gets called.

\n", + "comments": "

We need this because we need to know whether we should call git-upload-pack or git-receive-pack on the remote end when get_refs gets called.

\n", "fields": [ { "type": "int", @@ -33564,7 +30201,7 @@ "block": "char * message\nint klass", "tdef": "typedef", "description": " Structure to store extra details of the last error that occurred.", - "comments": "

This is kept on a per-thread basis if GIT_THREADS was defined when the\n library was build, otherwise one is kept globally for the library

\n", + "comments": "

This is kept on a per-thread basis if GIT_THREADS was defined when the library was build, otherwise one is kept globally for the library

\n", "fields": [ { "type": "char *", @@ -34087,8 +30724,8 @@ ], "type": "enum", "file": "git2/common.h", - "line": 130, - "lineto": 153, + "line": 127, + "lineto": 150, "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", @@ -34140,12 +30777,12 @@ "type": "struct", "value": "git_fetch_options", "file": "git2/remote.h", - "line": 629, - "lineto": 666, + "line": 651, + "lineto": 688, "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", "tdef": "typedef", "description": " Fetch options structure.", - "comments": "

Zero out for defaults. Initialize with GIT_FETCH_OPTIONS_INIT macro to\n correctly set the version field. E.g.

\n\n
    git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;\n
\n", + "comments": "

Zero out for defaults. Initialize with GIT_FETCH_OPTIONS_INIT macro to correctly set the version field. E.g.

\n\n
    git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;\n
\n", "fields": [ { "type": "int", @@ -34186,7 +30823,7 @@ "used": { "returns": [], "needs": [ - "git_fetch_init_options", + "git_fetch_options_init", "git_remote_download", "git_remote_fetch" ] @@ -34203,11 +30840,11 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 581, - "lineto": 594, + "line": 603, + "lineto": 616, "block": "GIT_FETCH_PRUNE_UNSPECIFIED\nGIT_FETCH_PRUNE\nGIT_FETCH_NO_PRUNE", "tdef": "typedef", - "description": "", + "description": " Acceptable prune settings when fetching ", "comments": "", "fields": [ { @@ -34314,79 +30951,19 @@ "lineto": 61, "tdef": "typedef", "description": " A filter that can transform file data", - "comments": "

This represents a filter that can be used to transform or even replace\n file data. Libgit2 includes one built in filter and it is possible to\n write your own (see git2/sys/filter.h for information on that).

\n\n

The two builtin filters are:

\n\n
    \n
  • "crlf" which uses the complex rules with the "text", "eol", and\n"crlf" file attributes to decide how to convert between LF and CRLF\nline endings
  • \n
  • "ident" which replaces "$Id$" in a blob with "$Id: \n$" upon\ncheckout and replaced "$Id: \n$" with "$Id$" on checkin.
  • \n
\n", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": " The `version` field should be set to `GIT_FILTER_VERSION`. " - }, - { - "type": "const char *", - "name": "attributes", - "comments": " A whitespace-separated list of attribute names to check for this\n filter (e.g. \"eol crlf text\"). If the attribute name is bare, it\n will be simply loaded and passed to the `check` callback. If it\n has a value (i.e. \"name=value\"), the attribute must match that\n value for the filter to be applied. The value may be a wildcard\n (eg, \"name=*\"), in which case the filter will be invoked for any\n value for the given attribute name. See the attribute parameter\n of the `check` callback for the attribute value that was specified." - }, - { - "type": "git_filter_init_fn", - "name": "initialize", - "comments": " Called when the filter is first used for any file. " - }, - { - "type": "git_filter_shutdown_fn", - "name": "shutdown", - "comments": " Called when the filter is removed or unregistered from the system. " - }, - { - "type": "git_filter_check_fn", - "name": "check", - "comments": " Called to determine whether the filter should be invoked for a\n given file. If this function returns `GIT_PASSTHROUGH` then the\n `apply` function will not be invoked and the contents will be passed\n through unmodified." - }, - { - "type": "git_filter_apply_fn", - "name": "apply", - "comments": " Called to actually apply the filter to file contents. If this\n function returns `GIT_PASSTHROUGH` then the contents will be passed\n through unmodified." - }, - { - "type": "git_filter_stream_fn", - "name": "stream", - "comments": " Called to apply the filter in a streaming manner. If this is not\n specified then the system will call `apply` with the whole buffer." - }, - { - "type": "git_filter_cleanup_fn", - "name": "cleanup", - "comments": " Called when the system is done filtering for a file. " - } - ], + "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\n

The two builtin filters are:

\n\n
    \n
  • "crlf" which uses the complex rules with the "text", "eol", and "crlf" file attributes to decide how to convert between LF and CRLF line endings * "ident" which replaces "$Id$" in a blob with "$Id: $" upon checkout and replaced "$Id: $" with "$Id$" on checkin.
  • \n
\n", "used": { - "returns": [ - "git_filter_lookup", - "git_filter_source_mode" - ], + "returns": [], "needs": [ - "git_filter_apply_fn", - "git_filter_check_fn", - "git_filter_cleanup_fn", - "git_filter_init", - "git_filter_init_fn", "git_filter_list_apply_to_blob", "git_filter_list_apply_to_data", "git_filter_list_apply_to_file", "git_filter_list_contains", "git_filter_list_free", - "git_filter_list_length", "git_filter_list_load", - "git_filter_list_new", - "git_filter_list_push", "git_filter_list_stream_blob", "git_filter_list_stream_data", - "git_filter_list_stream_file", - "git_filter_register", - "git_filter_shutdown_fn", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_path", - "git_filter_source_repo", - "git_filter_stream_fn" + "git_filter_list_stream_file" ] } } @@ -34437,8 +31014,7 @@ "lineto": 73, "tdef": "typedef", "description": " List of filters to be applied", - "comments": "

This represents a list of filters to be applied to a file / blob. You\n can build the list with one call, apply it with another, and dispose it\n with a third. In typical usage, there are not many occasions where a\n git_filter_list is needed directly since the library will generally\n handle conversions for you, but it can be convenient to be able to\n build and apply the list sometimes.

\n", - "fields": [], + "comments": "

This represents a list of filters to be applied to a file / blob. You can build the list with one call, apply it with another, and dispose it with a third. In typical usage, there are not many occasions where a git_filter_list is needed directly since the library will generally handle conversions for you, but it can be convenient to be able to build and apply the list sometimes.

\n", "used": { "returns": [], "needs": [ @@ -34447,10 +31023,7 @@ "git_filter_list_apply_to_file", "git_filter_list_contains", "git_filter_list_free", - "git_filter_list_length", "git_filter_list_load", - "git_filter_list_new", - "git_filter_list_push", "git_filter_list_stream_blob", "git_filter_list_stream_data", "git_filter_list_stream_file" @@ -34502,12 +31075,9 @@ } ], "used": { - "returns": [ - "git_filter_source_mode" - ], + "returns": [], "needs": [ - "git_filter_list_load", - "git_filter_list_new" + "git_filter_list_load" ] } } @@ -34524,42 +31094,9 @@ "tdef": "typedef", "description": " A filter source represents a file/blob to be processed", "comments": "", - "fields": [], - "used": { - "returns": [], - "needs": [ - "git_filter_apply_fn", - "git_filter_check_fn", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_path", - "git_filter_source_repo", - "git_filter_stream_fn" - ] - } - } - ], - [ - "git_hashsig", - { - "decl": "git_hashsig", - "type": "struct", - "value": "git_hashsig", - "file": "git2/sys/hashsig.h", - "line": 17, - "lineto": 17, - "tdef": "typedef", - "description": " Similarity signature of arbitrary text content based on line hashes", - "comments": "", - "fields": [], "used": { "returns": [], - "needs": [ - "git_hashsig_compare", - "git_hashsig_create", - "git_hashsig_create_fromfile", - "git_hashsig_free" - ] + "needs": [] } } ], @@ -34579,7 +31116,7 @@ "block": "GIT_HASHSIG_NORMAL\nGIT_HASHSIG_IGNORE_WHITESPACE\nGIT_HASHSIG_SMART_WHITESPACE\nGIT_HASHSIG_ALLOW_SMALL_FILES", "tdef": "typedef", "description": " Options for hashsig computation", - "comments": "

The options GIT_HASHSIG_NORMAL, GIT_HASHSIG_IGNORE_WHITESPACE,\n GIT_HASHSIG_SMART_WHITESPACE are exclusive and should not be combined.

\n", + "comments": "

The options GIT_HASHSIG_NORMAL, GIT_HASHSIG_IGNORE_WHITESPACE, GIT_HASHSIG_SMART_WHITESPACE are exclusive and should not be combined.

\n", "fields": [ { "type": "int", @@ -34608,10 +31145,7 @@ ], "used": { "returns": [], - "needs": [ - "git_hashsig_create", - "git_hashsig_create_fromfile" - ] + "needs": [] } } ], @@ -34627,17 +31161,11 @@ "tdef": "typedef", "description": " Memory representation of an index file. ", "comments": "", - "fields": [], "used": { "returns": [ "git_index_get_byindex", "git_index_get_bypath", - "git_index_name_get_byindex", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_ours", - "git_merge_driver_source_theirs" + "git_remote_stats" ], "needs": [ "git_apply_to_tree", @@ -34649,7 +31177,7 @@ "git_index_add", "git_index_add_all", "git_index_add_bypath", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_caps", "git_index_checksum", "git_index_clear", @@ -34672,10 +31200,6 @@ "git_index_iterator_free", "git_index_iterator_new", "git_index_iterator_next", - "git_index_name_add", - "git_index_name_clear", - "git_index_name_entrycount", - "git_index_name_get_byindex", "git_index_new", "git_index_open", "git_index_owner", @@ -34686,13 +31210,6 @@ "git_index_remove_all", "git_index_remove_bypath", "git_index_remove_directory", - "git_index_reuc_add", - "git_index_reuc_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_index_reuc_remove", "git_index_set_caps", "git_index_set_version", "git_index_update_all", @@ -34704,15 +31221,17 @@ "git_indexer_commit", "git_indexer_free", "git_indexer_hash", - "git_indexer_init_options", "git_indexer_new", + "git_indexer_options_init", + "git_indexer_progress_cb", "git_merge_commits", "git_merge_file_from_index", "git_merge_trees", + "git_odb_write_pack", + "git_packbuilder_write", "git_pathspec_match_index", "git_rebase_inmemory_index", "git_repository_index", - "git_repository_set_index", "git_revert_commit" ] } @@ -34828,7 +31347,6 @@ "tdef": "typedef", "description": " An iterator for conflicts in the index. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -34845,15 +31363,15 @@ "decl": [ "git_index_time ctime", "git_index_time mtime", - "int dev", - "int ino", - "int mode", - "int uid", - "int gid", - "int file_size", + "uint32_t dev", + "uint32_t ino", + "uint32_t mode", + "uint32_t uid", + "uint32_t gid", + "uint32_t file_size", "git_oid id", - "int flags", - "int flags_extended", + "uint16_t flags", + "uint16_t flags_extended", "const char * path" ], "type": "struct", @@ -34861,10 +31379,10 @@ "file": "git2/index.h", "line": 53, "lineto": 70, - "block": "git_index_time ctime\ngit_index_time mtime\nint dev\nint ino\nint mode\nint uid\nint gid\nint file_size\ngit_oid id\nint flags\nint flags_extended\nconst char * path", + "block": "git_index_time ctime\ngit_index_time mtime\nuint32_t dev\nuint32_t ino\nuint32_t mode\nuint32_t uid\nuint32_t gid\nuint32_t file_size\ngit_oid id\nuint16_t flags\nuint16_t flags_extended\nconst char * path", "tdef": "typedef", - "description": "", - "comments": "", + "description": " In-memory representation of a file entry in the index.", + "comments": "

This is a public structure that represents a file entry in the index. The meaning of the fields corresponds to core Git's documentation (in "Documentation/technical/index-format.txt").

\n\n

The 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.

\n\n

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.

\n\n

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", @@ -34877,32 +31395,32 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "dev", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "ino", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "mode", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "uid", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "gid", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "file_size", "comments": "" }, @@ -34912,12 +31430,12 @@ "comments": "" }, { - "type": "int", + "type": "uint16_t", "name": "flags", "comments": "" }, { - "type": "int", + "type": "uint16_t", "name": "flags_extended", "comments": "" }, @@ -34930,14 +31448,11 @@ "used": { "returns": [ "git_index_get_byindex", - "git_index_get_bypath", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_ours", - "git_merge_driver_source_theirs" + "git_index_get_bypath" ], "needs": [ "git_index_add", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_conflict_add", "git_index_conflict_get", "git_index_conflict_next", @@ -34965,7 +31480,7 @@ "block": "GIT_INDEX_ENTRY_INTENT_TO_ADD\nGIT_INDEX_ENTRY_SKIP_WORKTREE\nGIT_INDEX_ENTRY_EXTENDED_FLAGS\nGIT_INDEX_ENTRY_UPTODATE", "tdef": "typedef", "description": " Bitmasks for on-disk fields of `git_index_entry`'s `flags_extended`", - "comments": "

In memory, the flags_extended fields are divided into two parts: the\n fields that are read from and written to disk, and other fields that\n in-memory only and used by libgit2. Only the flags in\n GIT_INDEX_ENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

Thee first three bitmasks match the three fields in the\n git_index_entry flags_extended value that belong on disk. You\n can use them to interpret the data in the flags_extended.

\n\n

The rest of the bitmasks match the other fields in the git_index_entry\n flags_extended value that are only used in-memory by libgit2.\n You can use them to interpret the data in the flags_extended.

\n", + "comments": "

In memory, the flags_extended fields are divided into two parts: the fields that are read from and written to disk, and other fields that in-memory only and used by libgit2. Only the flags in GIT_INDEX_ENTRY_EXTENDED_FLAGS will get saved on-disk.

\n\n

Thee first three bitmasks match the three fields in the git_index_entry flags_extended value that belong on disk. You can use them to interpret the data in the flags_extended.

\n\n

The rest of the bitmasks match the other fields in the git_index_entry flags_extended value that are only used in-memory by libgit2. You can use them to interpret the data in the flags_extended.

\n", "fields": [ { "type": "int", @@ -35045,7 +31560,6 @@ "tdef": "typedef", "description": " An iterator for entries in the index. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -35056,91 +31570,6 @@ } } ], - [ - "git_index_name_entry", - { - "decl": [ - "char * ancestor", - "char * ours", - "char * theirs" - ], - "type": "struct", - "value": "git_index_name_entry", - "file": "git2/sys/index.h", - "line": 23, - "lineto": 27, - "block": "char * ancestor\nchar * ours\nchar * theirs", - "tdef": "typedef", - "description": " Representation of a rename conflict entry in the index. ", - "comments": "", - "fields": [ - { - "type": "char *", - "name": "ancestor", - "comments": "" - }, - { - "type": "char *", - "name": "ours", - "comments": "" - }, - { - "type": "char *", - "name": "theirs", - "comments": "" - } - ], - "used": { - "returns": [ - "git_index_name_get_byindex" - ], - "needs": [] - } - } - ], - [ - "git_index_reuc_entry", - { - "decl": [ - "int [3] mode", - "git_oid [3] oid", - "char * path" - ], - "type": "struct", - "value": "git_index_reuc_entry", - "file": "git2/sys/index.h", - "line": 30, - "lineto": 34, - "block": "int [3] mode\ngit_oid [3] oid\nchar * path", - "tdef": "typedef", - "description": "", - "comments": "", - "fields": [ - { - "type": "int [3]", - "name": "mode", - "comments": "" - }, - { - "type": "git_oid [3]", - "name": "oid", - "comments": "" - }, - { - "type": "char *", - "name": "path", - "comments": "" - } - ], - "used": { - "returns": [ - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath" - ], - "needs": [] - } - } - ], [ "git_index_stage_t", { @@ -35153,11 +31582,11 @@ ], "type": "enum", "file": "git2/index.h", - "line": 146, - "lineto": 166, + "line": 147, + "lineto": 167, "block": "GIT_INDEX_STAGE_ANY\nGIT_INDEX_STAGE_NORMAL\nGIT_INDEX_STAGE_ANCESTOR\nGIT_INDEX_STAGE_OURS\nGIT_INDEX_STAGE_THEIRS", "tdef": "typedef", - "description": "", + "description": " Git index stage states ", "comments": "", "fields": [ { @@ -35201,26 +31630,26 @@ "git_index_time", { "decl": [ - "int seconds", - "int nanoseconds" + "int32_t seconds", + "uint32_t nanoseconds" ], "type": "struct", "value": "git_index_time", "file": "git2/index.h", "line": 26, "lineto": 30, - "block": "int seconds\nint nanoseconds", + "block": "int32_t seconds\nuint32_t nanoseconds", "tdef": "typedef", - "description": "", + "description": " Time structure used in a git index entry ", "comments": "", "fields": [ { - "type": "int", + "type": "int32_t", "name": "seconds", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "nanoseconds", "comments": "" } @@ -35238,21 +31667,25 @@ "type": "struct", "value": "git_indexer", "file": "git2/indexer.h", - "line": 16, - "lineto": 16, + "line": 17, + "lineto": 17, "tdef": "typedef", - "description": "", + "description": " A git indexer object ", "comments": "", - "fields": [], "used": { - "returns": [], + "returns": [ + "git_remote_stats" + ], "needs": [ "git_indexer_append", "git_indexer_commit", "git_indexer_free", "git_indexer_hash", - "git_indexer_init_options", - "git_indexer_new" + "git_indexer_new", + "git_indexer_options_init", + "git_indexer_progress_cb", + "git_odb_write_pack", + "git_packbuilder_write" ] } } @@ -35262,18 +31695,18 @@ { "decl": [ "unsigned int version", - "git_transfer_progress_cb progress_cb", + "git_indexer_progress_cb progress_cb", "void * progress_cb_payload", "unsigned char verify" ], "type": "struct", "value": "git_indexer_options", "file": "git2/indexer.h", - "line": 18, - "lineto": 28, - "block": "unsigned int version\ngit_transfer_progress_cb progress_cb\nvoid * progress_cb_payload\nunsigned char verify", + "line": 62, + "lineto": 72, + "block": "unsigned int version\ngit_indexer_progress_cb progress_cb\nvoid * progress_cb_payload\nunsigned char verify", "tdef": "typedef", - "description": "", + "description": " Options for indexer configuration", "comments": "", "fields": [ { @@ -35282,7 +31715,7 @@ "comments": "" }, { - "type": "git_transfer_progress_cb", + "type": "git_indexer_progress_cb", "name": "progress_cb", "comments": " progress_cb function to call with progress information " }, @@ -35300,28 +31733,81 @@ "used": { "returns": [], "needs": [ - "git_indexer_init_options", - "git_indexer_new" + "git_indexer_new", + "git_indexer_options_init" ] } } ], [ - "git_iterator", + "git_indexer_progress", { - "decl": [], + "decl": [ + "unsigned int total_objects", + "unsigned int indexed_objects", + "unsigned int received_objects", + "unsigned int local_objects", + "unsigned int total_deltas", + "unsigned int indexed_deltas", + "size_t received_bytes" + ], "type": "struct", - "value": "git_iterator", - "file": "git2/notes.h", - "line": 35, - "lineto": 35, - "tdef": null, - "description": "", + "value": "git_indexer_progress", + "file": "git2/indexer.h", + "line": 24, + "lineto": 48, + "block": "unsigned int total_objects\nunsigned int indexed_objects\nunsigned int received_objects\nunsigned int local_objects\nunsigned int total_deltas\nunsigned int indexed_deltas\nsize_t received_bytes", + "tdef": "typedef", + "description": " This structure is used to provide callers information about the\n progress of indexing a packfile, either directly or part of a\n fetch or clone that downloads a packfile.", "comments": "", - "fields": [], + "fields": [ + { + "type": "unsigned int", + "name": "total_objects", + "comments": " number of objects in the packfile being indexed " + }, + { + "type": "unsigned int", + "name": "indexed_objects", + "comments": " received objects that have been hashed " + }, + { + "type": "unsigned int", + "name": "received_objects", + "comments": " received_objects: objects which have been downloaded " + }, + { + "type": "unsigned int", + "name": "local_objects", + "comments": " locally-available objects that have been injected in order\n to fix a thin pack" + }, + { + "type": "unsigned int", + "name": "total_deltas", + "comments": " number of deltas in the packfile being indexed " + }, + { + "type": "unsigned int", + "name": "indexed_deltas", + "comments": " received deltas that have been indexed " + }, + { + "type": "size_t", + "name": "received_bytes", + "comments": " size of the packfile received up to now " + } + ], "used": { - "returns": [], - "needs": [] + "returns": [ + "git_remote_stats" + ], + "needs": [ + "git_indexer_append", + "git_indexer_commit", + "git_indexer_progress_cb", + "git_odb_write_pack", + "git_packbuilder_write" + ] } } ], @@ -35355,16 +31841,17 @@ "GIT_OPT_SET_ALLOCATOR", "GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY", "GIT_OPT_GET_PACK_MAX_OBJECTS", - "GIT_OPT_SET_PACK_MAX_OBJECTS" + "GIT_OPT_SET_PACK_MAX_OBJECTS", + "GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS" ], "type": "enum", "file": "git2/common.h", - "line": 181, - "lineto": 209, - "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", + "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", "tdef": "typedef", "description": " Global library options", - "comments": "

These are used to select which global option to set or get and are\n used in git_libgit2_opts().

\n", + "comments": "

These are used to select which global option to set or get and are used in git_libgit2_opts().

\n", "fields": [ { "type": "int", @@ -35527,6 +32014,12 @@ "name": "GIT_OPT_SET_PACK_MAX_OBJECTS", "comments": "", "value": 26 + }, + { + "type": "int", + "name": "GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS", + "comments": "", + "value": 27 } ], "used": { @@ -35542,12 +32035,11 @@ "type": "struct", "value": "git_mailmap", "file": "git2/types.h", - "line": 442, - "lineto": 442, + "line": 412, + "lineto": 412, "tdef": "typedef", "description": " Representation of .mailmap file state. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -35576,8 +32068,8 @@ ], "type": "enum", "file": "git2/merge.h", - "line": 320, - "lineto": 349, + "line": 316, + "lineto": 345, "block": "GIT_MERGE_ANALYSIS_NONE\nGIT_MERGE_ANALYSIS_NORMAL\nGIT_MERGE_ANALYSIS_UP_TO_DATE\nGIT_MERGE_ANALYSIS_FASTFORWARD\nGIT_MERGE_ANALYSIS_UNBORN", "tdef": "typedef", "description": " The results of `git_merge_analysis` indicate the merge opportunities.", @@ -35623,58 +32115,6 @@ } } ], - [ - "git_merge_driver", - { - "decl": "git_merge_driver", - "type": "struct", - "value": "git_merge_driver", - "file": "git2/sys/merge.h", - "line": 24, - "lineto": 24, - "tdef": "typedef", - "description": " \n\n git2/sys/merge.h\n ", - "comments": "

@\n{

\n", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": " The `version` should be set to `GIT_MERGE_DRIVER_VERSION`. " - }, - { - "type": "git_merge_driver_init_fn", - "name": "initialize", - "comments": " Called when the merge driver is first used for any file. " - }, - { - "type": "git_merge_driver_shutdown_fn", - "name": "shutdown", - "comments": " Called when the merge driver is unregistered from the system. " - }, - { - "type": "git_merge_driver_apply_fn", - "name": "apply", - "comments": " Called to merge the contents of a conflict. If this function\n returns `GIT_PASSTHROUGH` then the default (`text`) merge driver\n will instead be invoked. If this function returns\n `GIT_EMERGECONFLICT` then the file will remain conflicted." - } - ], - "used": { - "returns": [ - "git_merge_driver_lookup" - ], - "needs": [ - "git_merge_driver_apply_fn", - "git_merge_driver_init_fn", - "git_merge_driver_register", - "git_merge_driver_shutdown_fn", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_file_options", - "git_merge_driver_source_ours", - "git_merge_driver_source_repo", - "git_merge_driver_source_theirs" - ] - } - } - ], [ "git_merge_driver_source", { @@ -35687,17 +32127,9 @@ "tdef": "typedef", "description": " A merge driver source represents the file to be merged", "comments": "", - "fields": [], "used": { "returns": [], - "needs": [ - "git_merge_driver_apply_fn", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_file_options", - "git_merge_driver_source_ours", - "git_merge_driver_source_repo", - "git_merge_driver_source_theirs" - ] + "needs": [] } } ], @@ -35884,7 +32316,7 @@ "returns": [], "needs": [ "git_merge_file", - "git_merge_file_init_input" + "git_merge_file_input_init" ] } } @@ -35948,13 +32380,11 @@ } ], "used": { - "returns": [ - "git_merge_driver_source_file_options" - ], + "returns": [], "needs": [ "git_merge_file", "git_merge_file_from_index", - "git_merge_file_init_options" + "git_merge_file_options_init" ] } } @@ -35972,8 +32402,8 @@ "type": "struct", "value": "git_merge_file_result", "file": "git2/merge.h", - "line": 222, - "lineto": 243, + "line": 220, + "lineto": 241, "block": "unsigned int automergeable\nconst char * path\nunsigned int mode\nconst char * ptr\nsize_t len", "tdef": "typedef", "description": " Information about file-level merging", @@ -36081,8 +32511,8 @@ "type": "struct", "value": "git_merge_options", "file": "git2/merge.h", - "line": 248, - "lineto": 297, + "line": 246, + "lineto": 295, "block": "unsigned int version\ngit_merge_flag_t flags\nunsigned int rename_threshold\nunsigned int target_limit\ngit_diff_similarity_metric * metric\nunsigned int recursion_limit\nconst char * default_driver\ngit_merge_file_favor_t file_favor\ngit_merge_file_flag_t file_flags", "tdef": "typedef", "description": " Merging options", @@ -36140,7 +32570,7 @@ "git_cherrypick_commit", "git_merge", "git_merge_commits", - "git_merge_init_options", + "git_merge_options_init", "git_merge_trees", "git_revert_commit" ] @@ -36157,8 +32587,8 @@ ], "type": "enum", "file": "git2/merge.h", - "line": 354, - "lineto": 372, + "line": 350, + "lineto": 368, "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.", @@ -36245,7 +32675,7 @@ "block": "git_message_trailer * trailers\nsize_t count\nchar * _trailer_block", "tdef": "typedef", "description": " Represents an array of git message trailers.", - "comments": "

Struct members under the private comment are private, subject to change\n and should not be used by callers.

\n", + "comments": "

Struct members under the private comment are private, subject to change and should not be used by callers.

\n", "fields": [ { "type": "git_message_trailer *", @@ -36284,7 +32714,6 @@ "tdef": "typedef", "description": " Representation of a git note ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -36339,7 +32768,6 @@ "tdef": "typedef", "description": " Representation of a generic object in a repository ", "comments": "", - "fields": [], "used": { "returns": [ "git_object_string2type", @@ -36351,7 +32779,6 @@ "needs": [ "git_checkout_tree", "git_describe_commit", - "git_object__size", "git_object_dup", "git_object_free", "git_object_id", @@ -36361,6 +32788,7 @@ "git_object_owner", "git_object_peel", "git_object_short_id", + "git_object_size", "git_object_type", "git_object_type2string", "git_object_typeisloose", @@ -36466,11 +32894,11 @@ "git_tree_entry_type" ], "needs": [ - "git_object__size", "git_object_lookup", "git_object_lookup_bypath", "git_object_lookup_prefix", "git_object_peel", + "git_object_size", "git_object_type2string", "git_object_typeisloose", "git_odb_hash", @@ -36497,19 +32925,14 @@ "tdef": "typedef", "description": " An open object database handle. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ "git_indexer_new", - "git_mempack_dump", - "git_mempack_new", - "git_mempack_reset", "git_odb_add_alternate", "git_odb_add_backend", "git_odb_add_disk_alternate", "git_odb_backend_loose", - "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", "git_odb_exists", @@ -36518,7 +32941,6 @@ "git_odb_foreach", "git_odb_free", "git_odb_get_backend", - "git_odb_init_backend", "git_odb_new", "git_odb_num_backends", "git_odb_object_data", @@ -36541,7 +32963,6 @@ "git_odb_write", "git_odb_write_pack", "git_repository_odb", - "git_repository_set_odb", "git_repository_wrap_odb" ] } @@ -36556,101 +32977,18 @@ "file": "git2/types.h", "line": 85, "lineto": 85, - "block": "unsigned int version\ngit_odb * odb\nint (*)(void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *) read\nint (*)(git_oid *, void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *, size_t) read_prefix\nint (*)(size_t *, git_object_t *, git_odb_backend *, const git_oid *) read_header\nint (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_object_t) write\nint (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_object_t) writestream\nint (*)(git_odb_stream **, size_t *, git_object_t *, git_odb_backend *, const git_oid *) readstream\nint (*)(git_odb_backend *, const git_oid *) exists\nint (*)(git_oid *, git_odb_backend *, const git_oid *, size_t) exists_prefix\nint (*)(git_odb_backend *) refresh\nint (*)(git_odb_backend *, git_odb_foreach_cb, void *) foreach\nint (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *) writepack\nint (*)(git_odb_backend *, const git_oid *) freshen\nvoid (*)(git_odb_backend *) free", "tdef": "typedef", "description": " A custom backend in an ODB ", "comments": "", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "git_odb *", - "name": "odb", - "comments": "" - }, - { - "type": "int (*)(void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *)", - "name": "read", - "comments": "" - }, - { - "type": "int (*)(git_oid *, void **, size_t *, git_object_t *, git_odb_backend *, const git_oid *, size_t)", - "name": "read_prefix", - "comments": "" - }, - { - "type": "int (*)(size_t *, git_object_t *, git_odb_backend *, const git_oid *)", - "name": "read_header", - "comments": "" - }, - { - "type": "int (*)(git_odb_backend *, const git_oid *, const void *, size_t, git_object_t)", - "name": "write", - "comments": "" - }, - { - "type": "int (*)(git_odb_stream **, git_odb_backend *, git_off_t, git_object_t)", - "name": "writestream", - "comments": "" - }, - { - "type": "int (*)(git_odb_stream **, size_t *, git_object_t *, git_odb_backend *, const git_oid *)", - "name": "readstream", - "comments": "" - }, - { - "type": "int (*)(git_odb_backend *, const git_oid *)", - "name": "exists", - "comments": "" - }, - { - "type": "int (*)(git_oid *, git_odb_backend *, const git_oid *, size_t)", - "name": "exists_prefix", - "comments": "" - }, - { - "type": "int (*)(git_odb_backend *)", - "name": "refresh", - "comments": "" - }, - { - "type": "int (*)(git_odb_backend *, git_odb_foreach_cb, void *)", - "name": "foreach", - "comments": "" - }, - { - "type": "int (*)(git_odb_writepack **, git_odb_backend *, git_odb *, git_transfer_progress_cb, void *)", - "name": "writepack", - "comments": "" - }, - { - "type": "int (*)(git_odb_backend *, const git_oid *)", - "name": "freshen", - "comments": "" - }, - { - "type": "void (*)(git_odb_backend *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ - "git_mempack_dump", - "git_mempack_new", - "git_mempack_reset", "git_odb_add_alternate", "git_odb_add_backend", "git_odb_backend_loose", - "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", - "git_odb_get_backend", - "git_odb_init_backend" + "git_odb_get_backend" ] } } @@ -36666,8 +33004,8 @@ "type": "struct", "value": "git_odb_expand_id", "file": "git2/odb.h", - "line": 180, - "lineto": 195, + "line": 181, + "lineto": 196, "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.", @@ -36709,7 +33047,6 @@ "tdef": "typedef", "description": " An object read from the ODB ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -36808,8 +33145,8 @@ ], "type": "enum", "file": "git2/odb_backend.h", - "line": 70, - "lineto": 74, + "line": 71, + "lineto": 75, "block": "GIT_STREAM_RDONLY\nGIT_STREAM_WRONLY\nGIT_STREAM_RW", "tdef": "typedef", "description": " Streaming mode ", @@ -36849,7 +33186,7 @@ "file": "git2/types.h", "line": 94, "lineto": 94, - "block": "git_odb_backend * backend\nint (*)(git_odb_writepack *, const void *, size_t, git_transfer_progress *) append\nint (*)(git_odb_writepack *, git_transfer_progress *) commit\nvoid (*)(git_odb_writepack *) free", + "block": "git_odb_backend * backend\nint (*)(git_odb_writepack *, const void *, size_t, git_indexer_progress *) append\nint (*)(git_odb_writepack *, git_indexer_progress *) commit\nvoid (*)(git_odb_writepack *) free", "tdef": "typedef", "description": " A stream to write a packfile to the ODB ", "comments": "", @@ -36860,12 +33197,12 @@ "comments": "" }, { - "type": "int (*)(git_odb_writepack *, const void *, size_t, git_transfer_progress *)", + "type": "int (*)(git_odb_writepack *, const void *, size_t, git_indexer_progress *)", "name": "append", "comments": "" }, { - "type": "int (*)(git_odb_writepack *, git_transfer_progress *)", + "type": "int (*)(git_odb_writepack *, git_indexer_progress *)", "name": "commit", "comments": "" }, @@ -36912,7 +33249,6 @@ "git_commit_id", "git_commit_parent_id", "git_commit_tree_id", - "git_filter_source_id", "git_index_checksum", "git_indexer_hash", "git_note_id", @@ -36920,6 +33256,8 @@ "git_odb_object_id", "git_oid_shorten_new", "git_packbuilder_hash", + "git_rebase_onto_id", + "git_rebase_orig_head_id", "git_reference_target", "git_reference_target_peel", "git_reflog_entry_id_new", @@ -36935,16 +33273,15 @@ "needs": [ "git_annotated_commit_from_fetchhead", "git_annotated_commit_lookup", - "git_blob_create_frombuffer", - "git_blob_create_fromdisk", - "git_blob_create_fromstream_commit", + "git_blob_create_from_buffer", + "git_blob_create_from_disk", + "git_blob_create_from_stream_commit", + "git_blob_create_from_workdir", "git_blob_create_fromworkdir", "git_blob_lookup", "git_blob_lookup_prefix", "git_commit_amend", "git_commit_create", - "git_commit_create_from_callback", - "git_commit_create_from_ids", "git_commit_create_v", "git_commit_create_with_signature", "git_commit_extract_signature", @@ -36953,7 +33290,6 @@ "git_diff_patchid", "git_graph_ahead_behind", "git_graph_descendant_of", - "git_index_reuc_add", "git_index_write_tree", "git_index_write_tree_to", "git_merge_base", @@ -36990,6 +33326,7 @@ "git_oid_fromstr", "git_oid_fromstrn", "git_oid_fromstrp", + "git_oid_is_zero", "git_oid_iszero", "git_oid_ncmp", "git_oid_nfmt", @@ -37006,7 +33343,6 @@ "git_packbuilder_insert_recur", "git_packbuilder_insert_tree", "git_rebase_commit", - "git_reference__alloc", "git_reference_create", "git_reference_create_matching", "git_reference_name_to_id", @@ -37024,7 +33360,7 @@ "git_stash_save", "git_tag_annotation_create", "git_tag_create", - "git_tag_create_frombuffer", + "git_tag_create_from_buffer", "git_tag_create_lightweight", "git_tag_foreach_cb", "git_tag_lookup", @@ -37053,7 +33389,6 @@ "tdef": "typedef", "description": " OID Shortener object", "comments": "", - "fields": [], "used": { "returns": [ "git_oid_shorten_new" @@ -37115,7 +33450,6 @@ "tdef": "typedef", "description": " Representation of a git packbuilder ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -37147,8 +33481,8 @@ ], "type": "enum", "file": "git2/pack.h", - "line": 51, - "lineto": 54, + "line": 52, + "lineto": 55, "block": "GIT_PACKBUILDER_ADDING_OBJECTS\nGIT_PACKBUILDER_DELTAFICATION", "tdef": "typedef", "description": " Stages that are reported by the packbuilder progress callback.", @@ -37184,8 +33518,7 @@ "lineto": 29, "tdef": "typedef", "description": " The diff patch is used to store all the text diffs for a delta.", - "comments": "

You can easily loop over the content of patches and get information about\n them.

\n", - "fields": [], + "comments": "

You can easily loop over the content of patches and get information about them.

\n", "used": { "returns": [], "needs": [ @@ -37245,53 +33578,7 @@ ], "used": { "returns": [], - "needs": [ - "git_path_is_gitfile" - ] - } - } - ], - [ - "git_path_gitfile", - { - "decl": [ - "GIT_PATH_GITFILE_GITIGNORE", - "GIT_PATH_GITFILE_GITMODULES", - "GIT_PATH_GITFILE_GITATTRIBUTES" - ], - "type": "enum", - "file": "git2/sys/path.h", - "line": 21, - "lineto": 28, - "block": "GIT_PATH_GITFILE_GITIGNORE\nGIT_PATH_GITFILE_GITMODULES\nGIT_PATH_GITFILE_GITATTRIBUTES", - "tdef": "typedef", - "description": " The kinds of git-specific files we know about.", - "comments": "

The order needs to stay the same to not break the gitfiles\n array in path.c

\n", - "fields": [ - { - "type": "int", - "name": "GIT_PATH_GITFILE_GITIGNORE", - "comments": "

Check for the .gitignore file

\n", - "value": 0 - }, - { - "type": "int", - "name": "GIT_PATH_GITFILE_GITMODULES", - "comments": "

Check for the .gitmodules file

\n", - "value": 1 - }, - { - "type": "int", - "name": "GIT_PATH_GITFILE_GITATTRIBUTES", - "comments": "

Check for the .gitattributes file

\n", - "value": 2 - } - ], - "used": { - "returns": [], - "needs": [ - "git_path_is_gitfile" - ] + "needs": [] } } ], @@ -37307,7 +33594,6 @@ "tdef": "typedef", "description": " Compiled pathspec", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -37410,7 +33696,6 @@ "tdef": "typedef", "description": " List of filenames matching a pathspec", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -37447,7 +33732,7 @@ "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", "tdef": "typedef", "description": " Options for connecting through a proxy", - "comments": "

Note that not all types may be supported, depending on the platform\n and compilation options.

\n", + "comments": "

Note that not all types may be supported, depending on the platform and compilation options.

\n", "fields": [ { "type": "unsigned int", @@ -37483,9 +33768,8 @@ "used": { "returns": [], "needs": [ - "git_proxy_init_options", - "git_remote_connect", - "git_transport_smart_proxy_options" + "git_proxy_options_init", + "git_remote_connect" ] } } @@ -37544,12 +33828,11 @@ "tdef": "typedef", "description": " Preparation for a push operation. Can be used to configure what to\n push and the level of parallelism of the packfile builder.", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ - "git_push_init_options", "git_push_negotiation", + "git_push_options_init", "git_remote_push", "git_remote_upload" ] @@ -37569,8 +33852,8 @@ "type": "struct", "value": "git_push_options", "file": "git2/remote.h", - "line": 690, - "lineto": 717, + "line": 712, + "lineto": 739, "block": "unsigned int version\nunsigned int pb_parallelism\ngit_remote_callbacks callbacks\ngit_proxy_options proxy_opts\ngit_strarray custom_headers", "tdef": "typedef", "description": " Controls the behavior of a git_push object.", @@ -37605,7 +33888,7 @@ "used": { "returns": [], "needs": [ - "git_push_init_options", + "git_push_options_init", "git_remote_push", "git_remote_upload" ] @@ -37624,8 +33907,8 @@ "type": "struct", "value": "git_push_update", "file": "git2/remote.h", - "line": 433, - "lineto": 450, + "line": 434, + "lineto": 451, "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", @@ -37672,7 +33955,6 @@ "tdef": "typedef", "description": " Representation of a rebase ", "comments": "", - "fields": [], "used": { "returns": [ "git_rebase_operation_byindex" @@ -37683,13 +33965,17 @@ "git_rebase_finish", "git_rebase_free", "git_rebase_init", - "git_rebase_init_options", "git_rebase_inmemory_index", "git_rebase_next", + "git_rebase_onto_id", + "git_rebase_onto_name", "git_rebase_open", "git_rebase_operation_byindex", "git_rebase_operation_current", - "git_rebase_operation_entrycount" + "git_rebase_operation_entrycount", + "git_rebase_options_init", + "git_rebase_orig_head_id", + "git_rebase_orig_head_name" ] } } @@ -37710,7 +33996,7 @@ "block": "git_rebase_operation_t type\nconst git_oid id\nconst char * exec", "tdef": "typedef", "description": " A rebase operation", - "comments": "

Describes a single instruction/operation to be performed during the\n rebase.

\n", + "comments": "

Describes a single instruction/operation to be performed during the rebase.

\n", "fields": [ { "type": "git_rebase_operation_t", @@ -37857,8 +34143,8 @@ "returns": [], "needs": [ "git_rebase_init", - "git_rebase_init_options", - "git_rebase_open" + "git_rebase_open", + "git_rebase_options_init" ] } } @@ -37875,19 +34161,14 @@ "tdef": "typedef", "description": " An open refs database handle. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ - "git_refdb_backend_fs", "git_refdb_compress", "git_refdb_free", - "git_refdb_init_backend", "git_refdb_new", "git_refdb_open", - "git_refdb_set_backend", - "git_repository_refdb", - "git_repository_set_refdb" + "git_repository_refdb" ] } } @@ -37901,104 +34182,12 @@ "file": "git2/types.h", "line": 100, "lineto": 100, - "block": "unsigned int version\nint (*)(int *, git_refdb_backend *, const char *) exists\nint (*)(git_reference **, git_refdb_backend *, const char *) lookup\nint (*)(git_reference_iterator **, struct git_refdb_backend *, const char *) iterator\nint (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *) write\nint (*)(git_reference **, git_refdb_backend *, const char *, const char *, int, const git_signature *, const char *) rename\nint (*)(git_refdb_backend *, const char *, const git_oid *, const char *) del\nint (*)(git_refdb_backend *) compress\nint (*)(git_refdb_backend *, const char *) has_log\nint (*)(git_refdb_backend *, const char *) ensure_log\nvoid (*)(git_refdb_backend *) free\nint (*)(git_reflog **, git_refdb_backend *, const char *) reflog_read\nint (*)(git_refdb_backend *, git_reflog *) reflog_write\nint (*)(git_refdb_backend *, const char *, const char *) reflog_rename\nint (*)(git_refdb_backend *, const char *) reflog_delete\nint (*)(void **, git_refdb_backend *, const char *) lock\nint (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *) unlock", "tdef": "typedef", "description": " A custom backend for refs ", "comments": "", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": "" - }, - { - "type": "int (*)(int *, git_refdb_backend *, const char *)", - "name": "exists", - "comments": "" - }, - { - "type": "int (*)(git_reference **, git_refdb_backend *, const char *)", - "name": "lookup", - "comments": "" - }, - { - "type": "int (*)(git_reference_iterator **, struct git_refdb_backend *, const char *)", - "name": "iterator", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const git_reference *, int, const git_signature *, const char *, const git_oid *, const char *)", - "name": "write", - "comments": "" - }, - { - "type": "int (*)(git_reference **, git_refdb_backend *, const char *, const char *, int, const git_signature *, const char *)", - "name": "rename", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *, const git_oid *, const char *)", - "name": "del", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *)", - "name": "compress", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *)", - "name": "has_log", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *)", - "name": "ensure_log", - "comments": "" - }, - { - "type": "void (*)(git_refdb_backend *)", - "name": "free", - "comments": "" - }, - { - "type": "int (*)(git_reflog **, git_refdb_backend *, const char *)", - "name": "reflog_read", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, git_reflog *)", - "name": "reflog_write", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *, const char *)", - "name": "reflog_rename", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, const char *)", - "name": "reflog_delete", - "comments": "" - }, - { - "type": "int (*)(void **, git_refdb_backend *, const char *)", - "name": "lock", - "comments": "" - }, - { - "type": "int (*)(git_refdb_backend *, void *, int, int, const git_reference *, const git_signature *, const char *)", - "name": "unlock", - "comments": "" - } - ], "used": { "returns": [], - "needs": [ - "git_refdb_backend_fs", - "git_refdb_init_backend", - "git_refdb_set_backend" - ] + "needs": [] } } ], @@ -38014,11 +34203,8 @@ "tdef": "typedef", "description": " In-memory representation of a reference. ", "comments": "", - "fields": [], "used": { "returns": [ - "git_reference__alloc", - "git_reference__alloc_symbolic", "git_reference_type" ], "needs": [ @@ -38088,8 +34274,8 @@ ], "type": "enum", "file": "git2/refs.h", - "line": 639, - "lineto": 668, + "line": 658, + "lineto": 687, "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", @@ -38135,32 +34321,9 @@ "file": "git2/types.h", "line": 180, "lineto": 180, - "block": "git_refdb * db\nint (*)(git_reference **, git_reference_iterator *) next\nint (*)(const char **, git_reference_iterator *) next_name\nvoid (*)(git_reference_iterator *) free", "tdef": "typedef", "description": " Iterator for references ", "comments": "", - "fields": [ - { - "type": "git_refdb *", - "name": "db", - "comments": "" - }, - { - "type": "int (*)(git_reference **, git_reference_iterator *)", - "name": "next", - "comments": "" - }, - { - "type": "int (*)(const char **, git_reference_iterator *)", - "name": "next_name", - "comments": "" - }, - { - "type": "void (*)(git_reference_iterator *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ @@ -38236,16 +34399,13 @@ "tdef": "typedef", "description": " Representation of a reference log ", "comments": "", - "fields": [], "used": { "returns": [ - "git_reflog_entry__alloc", "git_reflog_entry_byindex" ], "needs": [ "git_reflog_append", "git_reflog_drop", - "git_reflog_entry__free", "git_reflog_entry_byindex", "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -38272,14 +34432,11 @@ "tdef": "typedef", "description": " Representation of a reference log entry ", "comments": "", - "fields": [], "used": { "returns": [ - "git_reflog_entry__alloc", "git_reflog_entry_byindex" ], "needs": [ - "git_reflog_entry__free", "git_reflog_entry_committer", "git_reflog_entry_id_new", "git_reflog_entry_id_old", @@ -38300,7 +34457,6 @@ "tdef": "typedef", "description": " A refspec specifies the mapping between remote and local reference\n names when fetch or pushing.", "comments": "", - "fields": [], "used": { "returns": [ "git_remote_get_refspec" @@ -38333,7 +34489,6 @@ "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).", "comments": "", - "fields": [], "used": { "returns": [ "git_remote_autotag" @@ -38347,7 +34502,7 @@ "git_remote_create_anonymous", "git_remote_create_cb", "git_remote_create_detached", - "git_remote_create_init_options", + "git_remote_create_options_init", "git_remote_create_with_fetchspec", "git_remote_create_with_opts", "git_remote_default_branch", @@ -38375,12 +34530,7 @@ "git_remote_update_tips", "git_remote_upload", "git_remote_url", - "git_transport_cb", - "git_transport_dummy", - "git_transport_local", - "git_transport_new", - "git_transport_smart", - "git_transport_ssh_with_paths" + "git_transport_cb" ] } } @@ -38396,8 +34546,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 601, - "lineto": 619, + "line": 623, + "lineto": 641, "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", @@ -38442,16 +34592,31 @@ [ "git_remote_callbacks", { - "decl": "git_remote_callbacks", + "decl": [ + "unsigned int version", + "git_transport_message_cb sideband_progress", + "int (*)(git_remote_completion_t, void *) completion", + "git_cred_acquire_cb credentials", + "git_transport_certificate_check_cb certificate_check", + "git_indexer_progress_cb transfer_progress", + "int (*)(const char *, const git_oid *, const git_oid *, void *) update_tips", + "git_packbuilder_progress pack_progress", + "git_push_transfer_progress_cb push_transfer_progress", + "git_push_update_reference_cb push_update_reference", + "git_push_negotiation push_negotiation", + "git_transport_cb transport", + "void * payload", + "git_url_resolve_cb resolve_url" + ], "type": "struct", "value": "git_remote_callbacks", - "file": "git2/types.h", - "line": 245, - "lineto": 245, - "block": "unsigned int version\ngit_transport_message_cb sideband_progress\nint (*)(git_remote_completion_type, void *) completion\ngit_cred_acquire_cb credentials\ngit_transport_certificate_check_cb certificate_check\ngit_transfer_progress_cb transfer_progress\nint (*)(const char *, const git_oid *, const git_oid *, void *) update_tips\ngit_packbuilder_progress pack_progress\ngit_push_transfer_progress push_transfer_progress\ngit_push_update_reference_cb push_update_reference\ngit_push_negotiation push_negotiation\ngit_transport_cb transport\nvoid * payload", - "tdef": "typedef", - "description": "", - "comments": "", + "file": "git2/remote.h", + "line": 497, + "lineto": 585, + "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", + "tdef": null, + "description": " The callback settings structure", + "comments": "

Set the callbacks to be called by the remote when informing the user about the progress of the network operations.

\n", "fields": [ { "type": "unsigned int", @@ -38464,7 +34629,7 @@ "comments": " Textual progress from the remote. Text send over the\n progress side-band will be passed to this function (this is\n the 'counting objects' output)." }, { - "type": "int (*)(git_remote_completion_type, void *)", + "type": "int (*)(git_remote_completion_t, void *)", "name": "completion", "comments": "" }, @@ -38479,7 +34644,7 @@ "comments": " If cert verification fails, this will be called to let the\n user make the final decision of whether to allow the\n connection to proceed. Returns 0 to allow the connection\n or a negative value to indicate an error." }, { - "type": "git_transfer_progress_cb", + "type": "git_indexer_progress_cb", "name": "transfer_progress", "comments": " During the download of new data, this will be regularly\n called with the current count of progress done by the\n indexer." }, @@ -38494,7 +34659,7 @@ "comments": " Function to call with progress information during pack\n building. Be aware that this is called inline with pack\n building operations, so performance may be affected." }, { - "type": "git_push_transfer_progress", + "type": "git_push_transfer_progress_cb", "name": "push_transfer_progress", "comments": " Function to call with progress information during the\n upload portion of a push. Be aware that this is called\n inline with pack building operations, so performance may be\n affected." }, @@ -38517,6 +34682,11 @@ "type": "void *", "name": "payload", "comments": " This will be passed to each of the callbacks in this struct\n as the last parameter." + }, + { + "type": "git_url_resolve_cb", + "name": "resolve_url", + "comments": " Resolve URL before connecting to remote.\n The returned URL will be used to connect to the remote instead." } ], "used": { @@ -38531,7 +34701,7 @@ } ], [ - "git_remote_completion_type", + "git_remote_completion_t", { "decl": [ "GIT_REMOTE_COMPLETION_DOWNLOAD", @@ -38625,7 +34795,7 @@ "block": "unsigned int version\ngit_repository * repository\nconst char * name\nconst char * fetchspec\nunsigned int flags", "tdef": "typedef", "description": " Remote creation options structure", - "comments": "

Initialize with GIT_REMOTE_CREATE_OPTIONS_INIT. Alternatively, you can\n use git_remote_create_init_options.

\n", + "comments": "

Initialize with GIT_REMOTE_CREATE_OPTIONS_INIT. Alternatively, you can use git_remote_create_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -38656,7 +34826,7 @@ "used": { "returns": [], "needs": [ - "git_remote_create_init_options", + "git_remote_create_options_init", "git_remote_create_with_opts" ] } @@ -38665,15 +34835,21 @@ [ "git_remote_head", { - "decl": "git_remote_head", + "decl": [ + "int local", + "git_oid oid", + "git_oid loid", + "char * name", + "char * symref_target" + ], "type": "struct", "value": "git_remote_head", - "file": "git2/types.h", - "line": 244, - "lineto": 244, + "file": "git2/net.h", + "line": 40, + "lineto": 50, "block": "int local\ngit_oid oid\ngit_oid loid\nchar * name\nchar * symref_target", - "tdef": "typedef", - "description": "", + "tdef": null, + "description": " Description of a reference advertised by a remote server, given out\n on `ls` calls.", "comments": "", "fields": [ { @@ -38723,14 +34899,11 @@ "tdef": "typedef", "description": " Representation of an existing git repository,\n including all its object contents", "comments": "", - "fields": [], "used": { "returns": [ "git_blob_owner", "git_commit_owner", - "git_filter_source_repo", "git_index_owner", - "git_merge_driver_source_repo", "git_object_owner", "git_reference_owner", "git_remote_owner", @@ -38752,9 +34925,10 @@ "git_attr_get", "git_attr_get_many", "git_blame_file", - "git_blob_create_frombuffer", - "git_blob_create_fromdisk", - "git_blob_create_fromstream", + "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", @@ -38773,14 +34947,11 @@ "git_clone", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", - "git_commit_create_from_ids", "git_commit_create_v", "git_commit_create_with_signature", "git_commit_extract_signature", "git_commit_lookup", "git_commit_lookup_prefix", - "git_config_add_backend", "git_config_add_file_ondisk", "git_describe_workdir", "git_diff_commit_as_email", @@ -38792,7 +34963,6 @@ "git_diff_tree_to_workdir_with_index", "git_filter_list_apply_to_file", "git_filter_list_load", - "git_filter_list_new", "git_filter_list_stream_file", "git_graph_ahead_behind", "git_graph_descendant_of", @@ -38801,7 +34971,6 @@ "git_ignore_path_is_ignored", "git_index_write_tree_to", "git_mailmap_from_repository", - "git_mempack_dump", "git_merge", "git_merge_analysis", "git_merge_analysis_for_ref", @@ -38828,7 +34997,6 @@ "git_pathspec_match_workdir", "git_rebase_init", "git_rebase_open", - "git_refdb_backend_fs", "git_refdb_new", "git_refdb_open", "git_reference_create", @@ -38863,7 +35031,6 @@ "git_remote_set_autotag", "git_remote_set_pushurl", "git_remote_set_url", - "git_repository__cleanup", "git_repository_commondir", "git_repository_config", "git_repository_config_snapshot", @@ -38882,7 +35049,7 @@ "git_repository_index", "git_repository_init", "git_repository_init_ext", - "git_repository_init_init_options", + "git_repository_init_options_init", "git_repository_is_bare", "git_repository_is_empty", "git_repository_is_shallow", @@ -38891,7 +35058,6 @@ "git_repository_mergehead_foreach", "git_repository_message", "git_repository_message_remove", - "git_repository_new", "git_repository_odb", "git_repository_open", "git_repository_open_bare", @@ -38899,22 +35065,14 @@ "git_repository_open_from_worktree", "git_repository_path", "git_repository_refdb", - "git_repository_reinit_filesystem", - "git_repository_set_bare", - "git_repository_set_config", "git_repository_set_head", "git_repository_set_head_detached", "git_repository_set_head_detached_from_annotated", "git_repository_set_ident", - "git_repository_set_index", "git_repository_set_namespace", - "git_repository_set_odb", - "git_repository_set_refdb", "git_repository_set_workdir", "git_repository_state", "git_repository_state_cleanup", - "git_repository_submodule_cache_all", - "git_repository_submodule_cache_clear", "git_repository_workdir", "git_repository_wrap_odb", "git_reset", @@ -38951,7 +35109,7 @@ "git_submodule_status", "git_tag_annotation_create", "git_tag_create", - "git_tag_create_frombuffer", + "git_tag_create_from_buffer", "git_tag_create_lightweight", "git_tag_delete", "git_tag_foreach", @@ -38992,7 +35150,7 @@ "block": "GIT_REPOSITORY_INIT_BARE\nGIT_REPOSITORY_INIT_NO_REINIT\nGIT_REPOSITORY_INIT_NO_DOTGIT_DIR\nGIT_REPOSITORY_INIT_MKDIR\nGIT_REPOSITORY_INIT_MKPATH\nGIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE\nGIT_REPOSITORY_INIT_RELATIVE_GITLINK", "tdef": "typedef", "description": " Option flags for `git_repository_init_ext`.", - "comments": "

These flags configure extra behaviors to git_repository_init_ext.\n In every case, the default behavior is the zero value (i.e. flag is\n not set). Just OR the flag values together for the flags parameter\n when initializing a new repo. Details of individual values are:

\n\n
    \n
  • BARE - Create a bare repository with no working directory.
  • \n
  • NO_REINIT - Return an GIT_EEXISTS error if the repo_path appears to\n already be an git repository.
  • \n
  • NO_DOTGIT_DIR - Normally a "/.git/" will be appended to the repo\n path for non-bare repos (if it is not already there), but\n passing this flag prevents that behavior.
  • \n
  • MKDIR - Make the repo_path (and workdir_path) as needed. Init is\n always willing to create the ".git" directory even without this\n flag. This flag tells init to create the trailing component of\n the repo and workdir paths as needed.
  • \n
  • MKPATH - Recursively make all components of the repo and workdir\n paths as necessary.
  • \n
  • EXTERNAL_TEMPLATE - libgit2 normally uses internal templates to\n initialize a new repo. This flags enables external templates,\n looking the "template_path" from the options if set, or the\n init.templatedir global config if not, or falling back on\n "/usr/share/git-core/templates" if it exists.
  • \n
  • GIT_REPOSITORY_INIT_RELATIVE_GITLINK - If an alternate workdir is\n specified, use relative paths for the gitdir and core.worktree.
  • \n
\n", + "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:

\n\n
    \n
  • BARE - Create a bare repository with no working directory. * NO_REINIT - Return an GIT_EEXISTS error if the repo_path appears to already be an git repository. * NO_DOTGIT_DIR - Normally a "/.git/" will be appended to the repo path for non-bare repos (if it is not already there), but passing this flag prevents that behavior. * MKDIR - Make the repo_path (and workdir_path) as needed. Init is always willing to create the ".git" directory even without this flag. This flag tells init to create the trailing component of the repo and workdir paths as needed. * MKPATH - Recursively make all components of the repo and workdir paths as necessary. * EXTERNAL_TEMPLATE - libgit2 normally uses internal templates to initialize a new repo. This flags enables external templates, looking the "template_path" from the options if set, or the 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.
  • \n
\n", "fields": [ { "type": "int", @@ -39058,7 +35216,7 @@ "block": "GIT_REPOSITORY_INIT_SHARED_UMASK\nGIT_REPOSITORY_INIT_SHARED_GROUP\nGIT_REPOSITORY_INIT_SHARED_ALL", "tdef": "typedef", "description": " Mode options for `git_repository_init_ext`.", - "comments": "

Set the mode field of the git_repository_init_options structure\n either to the custom mode that you would like, or to one of the\n following modes:

\n\n
    \n
  • SHARED_UMASK - Use permissions configured by umask - the default.
  • \n
  • SHARED_GROUP - Use "--shared=group" behavior, chmod'ing the new repo\n to be group writable and "g+sx" for sticky group assignment.
  • \n
  • SHARED_ALL - Use "--shared=all" behavior, adding world readability.
  • \n
  • Anything else - Set to custom value.
  • \n
\n", + "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:

\n\n
    \n
  • SHARED_UMASK - Use permissions configured by umask - the default. * SHARED_GROUP - Use "--shared=group" behavior, chmod'ing the new repo to be group writable and "g+sx" for sticky group assignment. * SHARED_ALL - Use "--shared=all" behavior, adding world readability. * Anything else - Set to custom value.
  • \n
\n", "fields": [ { "type": "int", @@ -39090,8 +35248,8 @@ { "decl": [ "unsigned int version", - "int flags", - "int mode", + "uint32_t flags", + "uint32_t mode", "const char * workdir_path", "const char * description", "const char * template_path", @@ -39103,10 +35261,10 @@ "file": "git2/repository.h", "line": 302, "lineto": 311, - "block": "unsigned int version\nint flags\nint mode\nconst char * workdir_path\nconst char * description\nconst char * template_path\nconst char * initial_head\nconst char * origin_url", + "block": "unsigned int version\nuint32_t flags\nuint32_t mode\nconst char * workdir_path\nconst char * description\nconst char * template_path\nconst char * initial_head\nconst char * origin_url", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Extended options structure for `git_repository_init_ext`.", + "comments": "

This contains extra options for git_repository_init_ext that enable additional initialization features. The fields are:

\n\n
    \n
  • flags - Combination of GIT_REPOSITORY_INIT flags above. * mode - Set to one of the standard GIT_REPOSITORY_INIT_SHARED_... constants above, or to a custom value that you would like. * workdir_path - The path to the working dir or NULL for default (i.e. repo_path parent on non-bare repos). IF THIS IS RELATIVE PATH, IT WILL BE EVALUATED RELATIVE TO THE REPO_PATH. If this is not the "natural" working directory, a .git gitlink file will be created here linking to the repo_path. * description - If set, this will be used to initialize the "description" file in the repository, instead of using the template content. * template_path - When GIT_REPOSITORY_INIT_EXTERNAL_TEMPLATE is set, this contains the path to use for the template directory. If this is NULL, the config or default directory options will be used instead. * initial_head - The name of the head to point HEAD at. If NULL, then this will be treated as "master" and the HEAD ref will be set to "refs/heads/master". If this begins with "refs/" it will be used verbatim; otherwise "refs/heads/" will be prefixed. * origin_url - If this is non-NULL, then after the rest of the repository initialization is completed, an "origin" remote will be added pointing to this URL.
  • \n
\n", "fields": [ { "type": "unsigned int", @@ -39114,12 +35272,12 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "flags", "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "mode", "comments": "" }, @@ -39153,7 +35311,7 @@ "returns": [], "needs": [ "git_repository_init_ext", - "git_repository_init_init_options" + "git_repository_init_options_init" ] } } @@ -39354,12 +35512,12 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 799, - "lineto": 812, + "line": 820, + "lineto": 833, "block": "GIT_REPOSITORY_STATE_NONE\nGIT_REPOSITORY_STATE_MERGE\nGIT_REPOSITORY_STATE_REVERT\nGIT_REPOSITORY_STATE_REVERT_SEQUENCE\nGIT_REPOSITORY_STATE_CHERRYPICK\nGIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE\nGIT_REPOSITORY_STATE_BISECT\nGIT_REPOSITORY_STATE_REBASE\nGIT_REPOSITORY_STATE_REBASE_INTERACTIVE\nGIT_REPOSITORY_STATE_REBASE_MERGE\nGIT_REPOSITORY_STATE_APPLY_MAILBOX\nGIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE", "tdef": "typedef", "description": " Repository state", - "comments": "

These values represent possible states for the repository to be in,\n based on the current operation which is ongoing.

\n", + "comments": "

These values represent possible states for the repository to be in, based on the current operation which is ongoing.

\n", "fields": [ { "type": "int", @@ -39529,7 +35687,7 @@ "returns": [], "needs": [ "git_revert", - "git_revert_init_options" + "git_revert_options_init" ] } } @@ -39630,7 +35788,6 @@ "tdef": "typedef", "description": " Representation of an in-progress walk through the commits in a repo ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -39705,8 +35862,6 @@ "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", - "git_commit_create_from_ids", "git_commit_create_v", "git_mailmap_resolve_signature", "git_note_commit_create", @@ -39780,126 +35935,6 @@ } } ], - [ - "git_smart_subtransport", - { - "decl": "git_smart_subtransport", - "type": "struct", - "value": "git_smart_subtransport", - "file": "git2/sys/transport.h", - "line": 294, - "lineto": 294, - "tdef": "typedef", - "description": " An implementation of a subtransport which carries data for the\n smart transport", - "comments": "", - "fields": [ - { - "type": "int (*)(git_smart_subtransport_stream **, git_smart_subtransport *, const char *, git_smart_service_t)", - "name": "action", - "comments": "" - }, - { - "type": "int (*)(git_smart_subtransport *)", - "name": "close", - "comments": "" - }, - { - "type": "void (*)(git_smart_subtransport *)", - "name": "free", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_smart_subtransport_cb", - "git_smart_subtransport_git", - "git_smart_subtransport_http", - "git_smart_subtransport_ssh" - ] - } - } - ], - [ - "git_smart_subtransport_definition", - { - "decl": [ - "git_smart_subtransport_cb callback", - "unsigned int rpc", - "void * param" - ], - "type": "struct", - "value": "git_smart_subtransport_definition", - "file": "git2/sys/transport.h", - "line": 383, - "lineto": 395, - "block": "git_smart_subtransport_cb callback\nunsigned int rpc\nvoid * param", - "tdef": "typedef", - "description": " Definition for a \"subtransport\"", - "comments": "

The smart transport knows how to speak the git protocol, but it has no\n knowledge of how to establish a connection between it and another endpoint,\n or how to move data back and forth. For this, a subtransport interface is\n declared, and the smart transport delegates this work to the subtransports.

\n\n

Three subtransports are provided by libgit2: ssh, git, http(s).

\n\n

Subtransports can either be RPC = 0 (persistent connection) or RPC = 1\n (request/response). The smart transport handles the differences in its own\n logic. The git subtransport is RPC = 0, while http is RPC = 1.

\n", - "fields": [ - { - "type": "git_smart_subtransport_cb", - "name": "callback", - "comments": " The function to use to create the git_smart_subtransport " - }, - { - "type": "unsigned int", - "name": "rpc", - "comments": " True if the protocol is stateless; false otherwise. For example,\n http:// is stateless, but git:// is not." - }, - { - "type": "void *", - "name": "param", - "comments": " User-specified parameter passed to the callback " - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], - [ - "git_smart_subtransport_stream", - { - "decl": "git_smart_subtransport_stream", - "type": "struct", - "value": "git_smart_subtransport_stream", - "file": "git2/sys/transport.h", - "line": 295, - "lineto": 295, - "tdef": "typedef", - "description": " A stream used by the smart transport to read and write data\n from a subtransport.", - "comments": "

This provides a customization point in case you need to\n support some other communication method.

\n", - "fields": [ - { - "type": "git_smart_subtransport *", - "name": "subtransport", - "comments": " The owning subtransport " - }, - { - "type": "int (*)(git_smart_subtransport_stream *, char *, size_t, size_t *)", - "name": "read", - "comments": "" - }, - { - "type": "int (*)(git_smart_subtransport_stream *, const char *, size_t)", - "name": "write", - "comments": "" - }, - { - "type": "void (*)(git_smart_subtransport_stream *)", - "name": "free", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_sort_t", { @@ -40002,7 +36037,7 @@ "block": "unsigned int version\ngit_stash_apply_flags flags\ngit_checkout_options checkout_options\ngit_stash_apply_progress_cb progress_cb\nvoid * progress_payload", "tdef": "typedef", "description": " Stash application options structure", - "comments": "

Initialize with GIT_STASH_APPLY_OPTIONS_INIT. Alternatively, you can\n use git_stash_apply_init_options.

\n", + "comments": "

Initialize with GIT_STASH_APPLY_OPTIONS_INIT. Alternatively, you can use git_stash_apply_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -40034,7 +36069,7 @@ "returns": [], "needs": [ "git_stash_apply", - "git_stash_apply_init_options", + "git_stash_apply_options_init", "git_stash_pop" ] } @@ -40184,7 +36219,7 @@ "block": "git_status_t status\ngit_diff_delta * head_to_index\ngit_diff_delta * index_to_workdir", "tdef": "typedef", "description": " A status entry, providing the differences between the file as it exists\n in HEAD and the index, and providing the differences between the index\n and the working directory.", - "comments": "

The status value provides the status flags for this file.

\n\n

The head_to_index value provides detailed information about the\n differences between the file in HEAD and the file in the index.

\n\n

The index_to_workdir value provides detailed information about the\n differences between the file in the index and the file in the\n working directory.

\n", + "comments": "

The status value provides the status flags for this file.

\n\n

The head_to_index value provides detailed information about the differences between the file in HEAD and the file in the index.

\n\n

The index_to_workdir value provides detailed information about the differences between the file in the index and the file in the working directory.

\n", "fields": [ { "type": "git_status_t", @@ -40222,14 +36257,12 @@ "tdef": "typedef", "description": " Representation of a status collection ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ "git_status_byindex", "git_status_list_entrycount", "git_status_list_free", - "git_status_list_get_perfdata", "git_status_list_new" ] } @@ -40263,7 +36296,7 @@ "block": "GIT_STATUS_OPT_INCLUDE_UNTRACKED\nGIT_STATUS_OPT_INCLUDE_IGNORED\nGIT_STATUS_OPT_INCLUDE_UNMODIFIED\nGIT_STATUS_OPT_EXCLUDE_SUBMODULES\nGIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS\nGIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH\nGIT_STATUS_OPT_RECURSE_IGNORED_DIRS\nGIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX\nGIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR\nGIT_STATUS_OPT_SORT_CASE_SENSITIVELY\nGIT_STATUS_OPT_SORT_CASE_INSENSITIVELY\nGIT_STATUS_OPT_RENAMES_FROM_REWRITES\nGIT_STATUS_OPT_NO_REFRESH\nGIT_STATUS_OPT_UPDATE_INDEX\nGIT_STATUS_OPT_INCLUDE_UNREADABLE\nGIT_STATUS_OPT_INCLUDE_UNREADABLE_AS_UNTRACKED", "tdef": "typedef", "description": " Flags to control status callbacks", - "comments": "
    \n
  • GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made\non untracked files. These will only be made if the workdir files are\nincluded in the status "show" option.
  • \n
  • GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files get callbacks.\nAgain, these callbacks will only be made if the workdir files are\nincluded in the status "show" option.
  • \n
  • GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be\nmade even on unmodified files.
  • \n
  • GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that submodules should be\nskipped. This only applies if there are no pending typechanges to\nthe submodule (either from or to another type).
  • \n
  • GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that all files in\nuntracked directories should be included. Normally if an entire\ndirectory is new, then just the top-level directory is included (with\na trailing slash on the entry name). This flag says to include all\nof the individual files in the directory instead.
  • \n
  • GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path\nshould be treated as a literal path, and not as a pathspec pattern.
  • \n
  • GIT_STATUS_OPT_RECURSE_IGNORED_DIRS indicates that the contents of\nignored directories should be included in the status. This is like\ndoing git ls-files -o -i --exclude-standard with core git.
  • \n
  • GIT_STATUS_OPT_RENAMES_HEAD_TO_INDEX indicates that rename detection\nshould be processed between the head and the index and enables\nthe GIT_STATUS_INDEX_RENAMED as a possible status flag.
  • \n
  • GIT_STATUS_OPT_RENAMES_INDEX_TO_WORKDIR indicates that rename\ndetection should be run between the index and the working directory\nand enabled GIT_STATUS_WT_RENAMED as a possible status flag.
  • \n
  • GIT_STATUS_OPT_SORT_CASE_SENSITIVELY overrides the native case\nsensitivity for the file system and forces the output to be in\ncase-sensitive order
  • \n
  • GIT_STATUS_OPT_SORT_CASE_INSENSITIVELY overrides the native case\nsensitivity for the file system and forces the output to be in\ncase-insensitive order
  • \n
  • GIT_STATUS_OPT_RENAMES_FROM_REWRITES indicates that rename detection\nshould include rewritten files
  • \n
  • GIT_STATUS_OPT_NO_REFRESH bypasses the default status behavior of\ndoing a "soft" index reload (i.e. reloading the index data if the\nfile on disk has been modified outside libgit2).
  • \n
  • GIT_STATUS_OPT_UPDATE_INDEX tells libgit2 to refresh the stat cache\nin the index for files that are unchanged but have out of date stat\ninformation in the index. It will result in less work being done on\nsubsequent calls to get status. This is mutually exclusive with the\nNO_REFRESH option.
  • \n
\n\n

Calling git_status_foreach() is like calling the extended version\n with: GIT_STATUS_OPT_INCLUDE_IGNORED, GIT_STATUS_OPT_INCLUDE_UNTRACKED,\n and GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS. Those options are bundled\n together as GIT_STATUS_OPT_DEFAULTS if you want them as a baseline.

\n", + "comments": "
    \n
  • GIT_STATUS_OPT_INCLUDE_UNTRACKED says that callbacks should be made on untracked files. These will only be made if the workdir files are included in the status "show" option. - GIT_STATUS_OPT_INCLUDE_IGNORED says that ignored files get callbacks. Again, these callbacks will only be made if the workdir files are included in the status "show" option. - GIT_STATUS_OPT_INCLUDE_UNMODIFIED indicates that callback should be made even on unmodified files. - GIT_STATUS_OPT_EXCLUDE_SUBMODULES indicates that submodules should be skipped. This only applies if there are no pending typechanges to the submodule (either from or to another type). - GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS indicates that all files in untracked directories should be included. Normally if an entire directory is new, then just the top-level directory is included (with a trailing slash on the entry name). This flag says to include all of the individual files in the directory instead. - GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH indicates that the given path should be treated as a literal path, and not as a pathspec pattern. - GIT_STATUS_OPT_RECURSE_IGNORED_DIRS indicates that the contents of ignored directories should be included in the status. This is like doing 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.
  • \n
\n\n

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.

\n", "fields": [ { "type": "int", @@ -40386,7 +36419,7 @@ "block": "unsigned int version\ngit_status_show_t show\nunsigned int flags\ngit_strarray pathspec\ngit_tree * baseline", "tdef": "typedef", "description": " Options to control how `git_status_foreach_ext()` will issue callbacks.", - "comments": "

This structure is set so that zeroing it out will give you relatively\n sane defaults.

\n\n

The show value is one of the git_status_show_t constants that\n control which files to scan and in what order.

\n\n

The flags value is an OR'ed combination of the git_status_opt_t\n values above.

\n\n

The pathspec is an array of path patterns to match (using\n fnmatch-style matching), or just an array of paths to match exactly if\n GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH is specified in the flags.

\n\n

The baseline is the tree to be used for comparison to the working directory\n and index; defaults to HEAD.

\n", + "comments": "

This structure is set so that zeroing it out will give you relatively sane defaults.

\n\n

The show value is one of the git_status_show_t constants that control which files to scan and in what order.

\n\n

The flags value is an OR'ed combination of the git_status_opt_t values above.

\n\n

The pathspec is an array of path patterns to match (using fnmatch-style matching), or just an array of paths to match exactly if GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH is specified in the flags.

\n\n

The baseline is the tree to be used for comparison to the working directory and index; defaults to HEAD.

\n", "fields": [ { "type": "unsigned int", @@ -40418,8 +36451,8 @@ "returns": [], "needs": [ "git_status_foreach_ext", - "git_status_init_options", - "git_status_list_new" + "git_status_list_new", + "git_status_options_init" ] } } @@ -40439,7 +36472,7 @@ "block": "GIT_STATUS_SHOW_INDEX_AND_WORKDIR\nGIT_STATUS_SHOW_INDEX_ONLY\nGIT_STATUS_SHOW_WORKDIR_ONLY", "tdef": "typedef", "description": " Select the files on which to report status.", - "comments": "

With git_status_foreach_ext, this will control which changes get\n callbacks. With git_status_list_new, these will control which\n changes are included in the list.

\n\n
    \n
  • GIT_STATUS_SHOW_INDEX_AND_WORKDIR is the default. This roughly\nmatches git status --porcelain regarding which files are\nincluded and in what order.
  • \n
  • GIT_STATUS_SHOW_INDEX_ONLY only gives status based on HEAD to index\ncomparison, not looking at working directory changes.
  • \n
  • GIT_STATUS_SHOW_WORKDIR_ONLY only gives status based on index to\nworking directory comparison, not comparing the index to the HEAD.
  • \n
\n", + "comments": "

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.

\n\n
    \n
  • GIT_STATUS_SHOW_INDEX_AND_WORKDIR is the default. This roughly matches 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.
  • \n
\n", "fields": [ { "type": "int", @@ -40492,7 +36525,7 @@ "block": "GIT_STATUS_CURRENT\nGIT_STATUS_INDEX_NEW\nGIT_STATUS_INDEX_MODIFIED\nGIT_STATUS_INDEX_DELETED\nGIT_STATUS_INDEX_RENAMED\nGIT_STATUS_INDEX_TYPECHANGE\nGIT_STATUS_WT_NEW\nGIT_STATUS_WT_MODIFIED\nGIT_STATUS_WT_DELETED\nGIT_STATUS_WT_TYPECHANGE\nGIT_STATUS_WT_RENAMED\nGIT_STATUS_WT_UNREADABLE\nGIT_STATUS_IGNORED\nGIT_STATUS_CONFLICTED", "tdef": "typedef", "description": " Status flags for a single file.", - "comments": "

A combination of these values will be returned to indicate the status of\n a file. Status compares the working directory, the index, and the\n current HEAD of the repository. The GIT_STATUS_INDEX set of flags\n represents the status of file in the index relative to the HEAD, and the\n GIT_STATUS_WT set of flags represent the status of the file in the\n working directory relative to the index.

\n", + "comments": "

A combination of these values will be returned to indicate the status of a file. Status compares the working directory, the index, and the current HEAD of the repository. The GIT_STATUS_INDEX set of flags represents the status of file in the index relative to the HEAD, and the GIT_STATUS_WT set of flags represent the status of the file in the working directory relative to the index.

\n", "fields": [ { "type": "int", @@ -40640,128 +36673,6 @@ } } ], - [ - "git_stream", - { - "decl": [ - "int version", - "int encrypted", - "int proxy_support", - "int (*)(struct git_stream *) connect", - "int (*)(git_cert **, struct git_stream *) certificate", - "int (*)(struct git_stream *, const git_proxy_options *) set_proxy", - "int ((int *))(struct git_stream *, void *, size_t) ssize_t", - "int (*)(struct git_stream *) close", - "void (*)(struct git_stream *) free" - ], - "type": "struct", - "value": "git_stream", - "file": "git2/sys/stream.h", - "line": 29, - "lineto": 41, - "block": "int version\nint encrypted\nint proxy_support\nint (*)(struct git_stream *) connect\nint (*)(git_cert **, struct git_stream *) certificate\nint (*)(struct git_stream *, const git_proxy_options *) set_proxy\nint ((int *))(struct git_stream *, void *, size_t) ssize_t\nint (*)(struct git_stream *) close\nvoid (*)(struct git_stream *) free", - "tdef": "typedef", - "description": "", - "comments": "", - "fields": [ - { - "type": "int", - "name": "version", - "comments": "" - }, - { - "type": "int", - "name": "encrypted", - "comments": "" - }, - { - "type": "int", - "name": "proxy_support", - "comments": "" - }, - { - "type": "int (*)(struct git_stream *)", - "name": "connect", - "comments": "" - }, - { - "type": "int (*)(git_cert **, struct git_stream *)", - "name": "certificate", - "comments": "" - }, - { - "type": "int (*)(struct git_stream *, const git_proxy_options *)", - "name": "set_proxy", - "comments": "" - }, - { - "type": "int ((int *))(struct git_stream *, void *, size_t)", - "name": "ssize_t", - "comments": "" - }, - { - "type": "int (*)(struct git_stream *)", - "name": "close", - "comments": "" - }, - { - "type": "void (*)(struct git_stream *)", - "name": "free", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_stream_cb", - "git_stream_register", - "git_stream_register_tls" - ] - } - } - ], - [ - "git_stream_registration", - { - "decl": [ - "int version", - "int (*)(git_stream **, const char *, const char *) init", - "int (*)(git_stream **, git_stream *, const char *) wrap" - ], - "type": "struct", - "value": "git_stream_registration", - "file": "git2/sys/stream.h", - "line": 43, - "lineto": 72, - "block": "int version\nint (*)(git_stream **, const char *, const char *) init\nint (*)(git_stream **, git_stream *, const char *) wrap", - "tdef": "typedef", - "description": "", - "comments": "", - "fields": [ - { - "type": "int", - "name": "version", - "comments": " The `version` field should be set to `GIT_STREAM_VERSION`. " - }, - { - "type": "int (*)(git_stream **, const char *, const char *)", - "name": "init", - "comments": "" - }, - { - "type": "int (*)(git_stream **, git_stream *, const char *)", - "name": "wrap", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_stream_register" - ] - } - } - ], [ "git_stream_t", { @@ -40793,9 +36704,7 @@ ], "used": { "returns": [], - "needs": [ - "git_stream_register" - ] + "needs": [] } } ], @@ -40806,12 +36715,11 @@ "type": "struct", "value": "git_submodule", "file": "git2/types.h", - "line": 343, - "lineto": 343, + "line": 313, + "lineto": 313, "tdef": "typedef", "description": " Opaque structure representing a submodule.", "comments": "", - "fields": [], "used": { "returns": [ "git_submodule_fetch_recurse_submodules", @@ -40845,7 +36753,7 @@ "git_submodule_status", "git_submodule_sync", "git_submodule_update", - "git_submodule_update_init_options", + "git_submodule_update_options_init", "git_submodule_update_strategy", "git_submodule_url", "git_submodule_wd_id" @@ -40865,12 +36773,12 @@ ], "type": "enum", "file": "git2/types.h", - "line": 407, - "lineto": 414, + "line": 377, + "lineto": 384, "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", - "comments": "

These values represent settings for the submodule.$name.ignore\n configuration value which says how deeply to look at the working\n directory when getting submodule status.

\n\n

You can override this value in memory on a per-submodule basis with\n git_submodule_set_ignore() and can write the changed value to disk\n with git_submodule_save(). If you have overwritten the value, you\n can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_UNSPECIFIED: use the submodule's configuration
  • \n
  • GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an\nuntracked file, will mark the submodule as dirty. Ignored files are\nstill ignored, of course.
  • \n
  • GIT_SUBMODULE_IGNORE_UNTRACKED: ignore untracked files; only changes\nto tracked files, or the index or the HEAD commit will matter.
  • \n
  • GIT_SUBMODULE_IGNORE_DIRTY: ignore changes in the working directory,\nonly considering changes if the HEAD of submodule has moved from the\nvalue in the superproject.
  • \n
  • GIT_SUBMODULE_IGNORE_ALL: never check if the submodule is dirty
  • \n
  • GIT_SUBMODULE_IGNORE_DEFAULT: not used except as static initializer\nwhen we don't want any particular ignore rule to be specified.
  • \n
\n", + "comments": "

These values represent settings for the submodule.$name.ignore configuration value which says how deeply to look at the working directory when getting submodule status.

\n\n

You can override this value in memory on a per-submodule basis with git_submodule_set_ignore() and can write the changed value to disk with git_submodule_save(). If you have overwritten the value, you can revert to the on disk value by using GIT_SUBMODULE_IGNORE_RESET.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_IGNORE_UNSPECIFIED: use the submodule's configuration - GIT_SUBMODULE_IGNORE_NONE: don't ignore any change - i.e. even an untracked file, will mark the submodule as dirty. Ignored files are still ignored, of course. - GIT_SUBMODULE_IGNORE_UNTRACKED: ignore untracked files; only changes to tracked files, or the index or the HEAD commit will matter. - GIT_SUBMODULE_IGNORE_DIRTY: ignore changes in the working directory, only considering changes if the HEAD of submodule has moved from the value in the superproject. - GIT_SUBMODULE_IGNORE_ALL: never check if the submodule is dirty - GIT_SUBMODULE_IGNORE_DEFAULT: not used except as static initializer when we don't want any particular ignore rule to be specified.
  • \n
\n", "fields": [ { "type": "int", @@ -40924,12 +36832,12 @@ ], "type": "enum", "file": "git2/types.h", - "line": 426, - "lineto": 430, + "line": 396, + "lineto": 400, "block": "GIT_SUBMODULE_RECURSE_NO\nGIT_SUBMODULE_RECURSE_YES\nGIT_SUBMODULE_RECURSE_ONDEMAND", "tdef": "typedef", "description": " Options for submodule recurse.", - "comments": "

Represent the value of submodule.$name.fetchRecurseSubmodules

\n\n
    \n
  • GIT_SUBMODULE_RECURSE_NO - do no recurse into submodules
  • \n
  • GIT_SUBMODULE_RECURSE_YES - recurse into submodules
  • \n
  • GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when\n commit not already in local clone
  • \n
\n", + "comments": "

Represent the value of submodule.$name.fetchRecurseSubmodules

\n\n
    \n
  • GIT_SUBMODULE_RECURSE_NO - do no recurse into submodules * GIT_SUBMODULE_RECURSE_YES - recurse into submodules * GIT_SUBMODULE_RECURSE_ONDEMAND - recurse into submodules only when commit not already in local clone
  • \n
\n", "fields": [ { "type": "int", @@ -40986,7 +36894,7 @@ "block": "GIT_SUBMODULE_STATUS_IN_HEAD\nGIT_SUBMODULE_STATUS_IN_INDEX\nGIT_SUBMODULE_STATUS_IN_CONFIG\nGIT_SUBMODULE_STATUS_IN_WD\nGIT_SUBMODULE_STATUS_INDEX_ADDED\nGIT_SUBMODULE_STATUS_INDEX_DELETED\nGIT_SUBMODULE_STATUS_INDEX_MODIFIED\nGIT_SUBMODULE_STATUS_WD_UNINITIALIZED\nGIT_SUBMODULE_STATUS_WD_ADDED\nGIT_SUBMODULE_STATUS_WD_DELETED\nGIT_SUBMODULE_STATUS_WD_MODIFIED\nGIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED\nGIT_SUBMODULE_STATUS_WD_WD_MODIFIED\nGIT_SUBMODULE_STATUS_WD_UNTRACKED", "tdef": "typedef", "description": " Return codes for submodule status.", - "comments": "

A combination of these flags will be returned to describe the status of a\n submodule. Depending on the "ignore" property of the submodule, some of\n the flags may never be returned because they indicate changes that are\n supposed to be ignored.

\n\n

Submodule info is contained in 4 places: the HEAD tree, the index, config\n files (both .git/config and .gitmodules), and the working directory. Any\n or all of those places might be missing information about the submodule\n depending on what state the repo is in. We consider all four places to\n build the combination of status flags.

\n\n

There are four values that are not really status, but give basic info\n about what sources of submodule data are available. These will be\n returned even if ignore is set to "ALL".

\n\n
    \n
  • IN_HEAD - superproject head contains submodule
  • \n
  • IN_INDEX - superproject index contains submodule
  • \n
  • IN_CONFIG - superproject gitmodules has submodule
  • \n
  • IN_WD - superproject workdir has submodule
  • \n
\n\n

The following values will be returned so long as ignore is not "ALL".

\n\n
    \n
  • INDEX_ADDED - in index, not in head
  • \n
  • INDEX_DELETED - in head, not in index
  • \n
  • INDEX_MODIFIED - index and head don't match
  • \n
  • WD_UNINITIALIZED - workdir contains empty directory
  • \n
  • WD_ADDED - in workdir, not index
  • \n
  • WD_DELETED - in index, not workdir
  • \n
  • WD_MODIFIED - index and workdir head don't match
  • \n
\n\n

The following can only be returned if ignore is "NONE" or "UNTRACKED".

\n\n
    \n
  • WD_INDEX_MODIFIED - submodule workdir index is dirty
  • \n
  • WD_WD_MODIFIED - submodule workdir has modified files
  • \n
\n\n

Lastly, the following will only be returned for ignore "NONE".

\n\n
    \n
  • WD_UNTRACKED - wd contains untracked files
  • \n
\n", + "comments": "

A combination of these flags will be returned to describe the status of a submodule. Depending on the "ignore" property of the submodule, some of the flags may never be returned because they indicate changes that are supposed to be ignored.

\n\n

Submodule info is contained in 4 places: the HEAD tree, the index, config files (both .git/config and .gitmodules), and the working directory. Any or all of those places might be missing information about the submodule depending on what state the repo is in. We consider all four places to build the combination of status flags.

\n\n

There are four values that are not really status, but give basic info about what sources of submodule data are available. These will be returned even if ignore is set to "ALL".

\n\n
    \n
  • IN_HEAD - superproject head contains submodule * IN_INDEX - superproject index contains submodule * IN_CONFIG - superproject gitmodules has submodule * IN_WD - superproject workdir has submodule
  • \n
\n\n

The following values will be returned so long as ignore is not "ALL".

\n\n
    \n
  • INDEX_ADDED - in index, not in head * INDEX_DELETED - in head, not in index * INDEX_MODIFIED - index and head don't match * WD_UNINITIALIZED - workdir contains empty directory * WD_ADDED - in workdir, not index * WD_DELETED - in index, not workdir * WD_MODIFIED - index and workdir head don't match
  • \n
\n\n

The following can only be returned if ignore is "NONE" or "UNTRACKED".

\n\n
    \n
  • WD_INDEX_MODIFIED - submodule workdir index is dirty * WD_WD_MODIFIED - submodule workdir has modified files
  • \n
\n\n

Lastly, the following will only be returned for ignore "NONE".

\n\n
    \n
  • WD_UNTRACKED - wd contains untracked files
  • \n
\n", "fields": [ { "type": "int", @@ -41096,7 +37004,7 @@ "block": "unsigned int version\ngit_checkout_options checkout_opts\ngit_fetch_options fetch_opts\nint allow_fetch", "tdef": "typedef", "description": " Submodule update options structure", - "comments": "

Initialize with GIT_SUBMODULE_UPDATE_OPTIONS_INIT. Alternatively, you can\n use git_submodule_update_init_options.

\n", + "comments": "

Initialize with GIT_SUBMODULE_UPDATE_OPTIONS_INIT. Alternatively, you can use git_submodule_update_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -41123,7 +37031,7 @@ "returns": [], "needs": [ "git_submodule_update", - "git_submodule_update_init_options" + "git_submodule_update_options_init" ] } } @@ -41140,12 +37048,12 @@ ], "type": "enum", "file": "git2/types.h", - "line": 371, - "lineto": 378, + "line": 341, + "lineto": 348, "block": "GIT_SUBMODULE_UPDATE_CHECKOUT\nGIT_SUBMODULE_UPDATE_REBASE\nGIT_SUBMODULE_UPDATE_MERGE\nGIT_SUBMODULE_UPDATE_NONE\nGIT_SUBMODULE_UPDATE_DEFAULT", "tdef": "typedef", "description": " Submodule update values", - "comments": "

These values represent settings for the submodule.$name.update\n configuration value which says how to handle git submodule update for\n this submodule. The value is usually set in the ".gitmodules" file and\n copied to ".git/config" when the submodule is initialized.

\n\n

You can override this setting on a per-submodule basis with\n git_submodule_set_update() and write the changed value to disk using\n git_submodule_save(). If you have overwritten the value, you can\n revert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_UPDATE_CHECKOUT: the default; when a submodule is\nupdated, checkout the new detached HEAD to the submodule directory.
  • \n
  • GIT_SUBMODULE_UPDATE_REBASE: update by rebasing the current checked\nout branch onto the commit from the superproject.
  • \n
  • GIT_SUBMODULE_UPDATE_MERGE: update by merging the commit in the\nsuperproject into the current checkout out branch of the submodule.
  • \n
  • GIT_SUBMODULE_UPDATE_NONE: do not update this submodule even when\nthe commit in the superproject is updated.
  • \n
  • GIT_SUBMODULE_UPDATE_DEFAULT: not used except as static initializer\nwhen we don't want any particular update rule to be specified.
  • \n
\n", + "comments": "

These values represent settings for the submodule.$name.update configuration value which says how to handle git submodule update for this submodule. The value is usually set in the ".gitmodules" file and copied to ".git/config" when the submodule is initialized.

\n\n

You can override this setting on a per-submodule basis with git_submodule_set_update() and write the changed value to disk using git_submodule_save(). If you have overwritten the value, you can revert it by passing GIT_SUBMODULE_UPDATE_RESET to the set function.

\n\n

The values are:

\n\n
    \n
  • GIT_SUBMODULE_UPDATE_CHECKOUT: the default; when a submodule is updated, checkout the new detached HEAD to the submodule directory. - GIT_SUBMODULE_UPDATE_REBASE: update by rebasing the current checked out branch onto the commit from the superproject. - GIT_SUBMODULE_UPDATE_MERGE: update by merging the commit in the superproject into the current checkout out branch of the submodule. - GIT_SUBMODULE_UPDATE_NONE: do not update this submodule even when the commit in the superproject is updated. - GIT_SUBMODULE_UPDATE_DEFAULT: not used except as static initializer when we don't want any particular update rule to be specified.
  • \n
\n", "fields": [ { "type": "int", @@ -41200,7 +37108,6 @@ "tdef": "typedef", "description": " Parsed representation of a tag object. ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -41333,7 +37240,7 @@ "used": { "returns": [], "needs": [ - "git_trace_callback", + "git_trace_cb", "git_trace_set" ] } @@ -41351,7 +37258,6 @@ "tdef": "typedef", "description": " Transactional interface to references ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -41368,78 +37274,6 @@ } } ], - [ - "git_transfer_progress", - { - "decl": [ - "unsigned int total_objects", - "unsigned int indexed_objects", - "unsigned int received_objects", - "unsigned int local_objects", - "unsigned int total_deltas", - "unsigned int indexed_deltas", - "size_t received_bytes" - ], - "type": "struct", - "value": "git_transfer_progress", - "file": "git2/types.h", - "line": 258, - "lineto": 266, - "block": "unsigned int total_objects\nunsigned int indexed_objects\nunsigned int received_objects\nunsigned int local_objects\nunsigned int total_deltas\nunsigned int indexed_deltas\nsize_t received_bytes", - "tdef": "typedef", - "description": " This is passed as the first argument to the callback to allow the\n user to see the progress.", - "comments": "
    \n
  • total_objects: number of objects in the packfile being downloaded
  • \n
  • indexed_objects: received objects that have been hashed
  • \n
  • received_objects: objects which have been downloaded
  • \n
  • local_objects: locally-available objects that have been injected\nin order to fix a thin pack.
  • \n
  • received-bytes: size of the packfile received up to now
  • \n
\n", - "fields": [ - { - "type": "unsigned int", - "name": "total_objects", - "comments": "" - }, - { - "type": "unsigned int", - "name": "indexed_objects", - "comments": "" - }, - { - "type": "unsigned int", - "name": "received_objects", - "comments": "" - }, - { - "type": "unsigned int", - "name": "local_objects", - "comments": "" - }, - { - "type": "unsigned int", - "name": "total_deltas", - "comments": "" - }, - { - "type": "unsigned int", - "name": "indexed_deltas", - "comments": "" - }, - { - "type": "size_t", - "name": "received_bytes", - "comments": "" - } - ], - "used": { - "returns": [ - "git_remote_stats" - ], - "needs": [ - "git_indexer_append", - "git_indexer_commit", - "git_odb_write_pack", - "git_packbuilder_write", - "git_transfer_progress_cb" - ] - } - } - ], [ "git_transport", { @@ -41449,127 +37283,17 @@ "file": "git2/types.h", "line": 235, "lineto": 235, - "block": "unsigned int version\nint (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *) set_callbacks\nint (*)(git_transport *, const git_strarray *) set_custom_headers\nint (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int) connect\nint (*)(const git_remote_head ***, size_t *, git_transport *) ls\nint (*)(git_transport *, git_push *, const git_remote_callbacks *) push\nint (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t) negotiate_fetch\nint (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *) download_pack\nint (*)(git_transport *) is_connected\nint (*)(git_transport *, int *) read_flags\nvoid (*)(git_transport *) cancel\nint (*)(git_transport *) close\nvoid (*)(git_transport *) free", "tdef": "typedef", "description": " Interface which represents a transport to communicate with a\n remote.", "comments": "", - "fields": [ - { - "type": "unsigned int", - "name": "version", - "comments": " The struct version " - }, - { - "type": "int (*)(git_transport *, git_transport_message_cb, git_transport_message_cb, git_transport_certificate_check_cb, void *)", - "name": "set_callbacks", - "comments": "" - }, - { - "type": "int (*)(git_transport *, const git_strarray *)", - "name": "set_custom_headers", - "comments": "" - }, - { - "type": "int (*)(git_transport *, const char *, git_cred_acquire_cb, void *, const git_proxy_options *, int, int)", - "name": "connect", - "comments": "" - }, - { - "type": "int (*)(const git_remote_head ***, size_t *, git_transport *)", - "name": "ls", - "comments": "" - }, - { - "type": "int (*)(git_transport *, git_push *, const git_remote_callbacks *)", - "name": "push", - "comments": "" - }, - { - "type": "int (*)(git_transport *, git_repository *, const git_remote_head *const *, size_t)", - "name": "negotiate_fetch", - "comments": "" - }, - { - "type": "int (*)(git_transport *, git_repository *, git_transfer_progress *, git_transfer_progress_cb, void *)", - "name": "download_pack", - "comments": "" - }, - { - "type": "int (*)(git_transport *)", - "name": "is_connected", - "comments": "" - }, - { - "type": "int (*)(git_transport *, int *)", - "name": "read_flags", - "comments": "" - }, - { - "type": "void (*)(git_transport *)", - "name": "cancel", - "comments": "" - }, - { - "type": "int (*)(git_transport *)", - "name": "close", - "comments": "" - }, - { - "type": "void (*)(git_transport *)", - "name": "free", - "comments": "" - } - ], "used": { "returns": [], "needs": [ - "git_smart_subtransport_cb", - "git_smart_subtransport_git", - "git_smart_subtransport_http", - "git_smart_subtransport_ssh", - "git_transport_cb", - "git_transport_dummy", - "git_transport_init", - "git_transport_local", - "git_transport_new", - "git_transport_register", - "git_transport_smart", - "git_transport_smart_certificate_check", - "git_transport_smart_credentials", - "git_transport_smart_proxy_options", - "git_transport_ssh_with_paths" + "git_transport_cb" ] } } ], - [ - "git_transport_flags_t", - { - "decl": [ - "GIT_TRANSPORTFLAGS_NONE" - ], - "type": "enum", - "file": "git2/sys/transport.h", - "line": 31, - "lineto": 33, - "block": "GIT_TRANSPORTFLAGS_NONE", - "tdef": "typedef", - "description": " Flags to pass to transport", - "comments": "

Currently unused.

\n", - "fields": [ - { - "type": "int", - "name": "GIT_TRANSPORTFLAGS_NONE", - "comments": "", - "value": 0 - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_tree", { @@ -41582,7 +37306,6 @@ "tdef": "typedef", "description": " Representation of a tree object. ", "comments": "", - "fields": [], "used": { "returns": [ "git_tree_entry_byid", @@ -41654,7 +37377,6 @@ "tdef": "typedef", "description": " Representation of each one of the entries in a tree object. ", "comments": "", - "fields": [], "used": { "returns": [ "git_tree_entry_byid", @@ -41775,7 +37497,6 @@ "tdef": "typedef", "description": " Constructor for in-memory trees ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ @@ -41842,13 +37563,12 @@ "tdef": "typedef", "description": " Representation of a working tree ", "comments": "", - "fields": [], "used": { "returns": [], "needs": [ "git_repository_open_from_worktree", "git_worktree_add", - "git_worktree_add_init_options", + "git_worktree_add_options_init", "git_worktree_free", "git_worktree_is_locked", "git_worktree_is_prunable", @@ -41858,7 +37578,7 @@ "git_worktree_open_from_repository", "git_worktree_path", "git_worktree_prune", - "git_worktree_prune_init_options", + "git_worktree_prune_options_init", "git_worktree_unlock", "git_worktree_validate" ] @@ -41881,7 +37601,7 @@ "block": "unsigned int version\nint lock\ngit_reference * ref", "tdef": "typedef", "description": " Worktree add options structure", - "comments": "

Initialize with GIT_WORKTREE_ADD_OPTIONS_INIT. Alternatively, you can\n use git_worktree_add_init_options.

\n", + "comments": "

Initialize with GIT_WORKTREE_ADD_OPTIONS_INIT. Alternatively, you can use git_worktree_add_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -41903,7 +37623,7 @@ "returns": [], "needs": [ "git_worktree_add", - "git_worktree_add_init_options" + "git_worktree_add_options_init" ] } } @@ -41913,17 +37633,17 @@ { "decl": [ "unsigned int version", - "int flags" + "uint32_t flags" ], "type": "struct", "value": "git_worktree_prune_options", "file": "git2/worktree.h", "line": 198, "lineto": 202, - "block": "unsigned int version\nint flags", + "block": "unsigned int version\nuint32_t flags", "tdef": "typedef", - "description": "", - "comments": "", + "description": " Worktree prune options structure", + "comments": "

Initialize with GIT_WORKTREE_PRUNE_OPTIONS_INIT. Alternatively, you can use git_worktree_prune_options_init.

\n", "fields": [ { "type": "unsigned int", @@ -41931,7 +37651,7 @@ "comments": "" }, { - "type": "int", + "type": "uint32_t", "name": "flags", "comments": "" } @@ -41941,7 +37661,7 @@ "needs": [ "git_worktree_is_prunable", "git_worktree_prune", - "git_worktree_prune_init_options" + "git_worktree_prune_options_init" ] } } @@ -41991,13 +37711,17 @@ [ "git_writestream", { - "decl": "git_writestream", + "decl": [ + "int (*)(git_writestream *, const char *, size_t) write", + "int (*)(git_writestream *) close", + "void (*)(git_writestream *) free" + ], "type": "struct", "value": "git_writestream", "file": "git2/types.h", - "line": 432, - "lineto": 432, - "tdef": "typedef", + "line": 405, + "lineto": 409, + "tdef": null, "description": " A type to write in a streaming fashion, for example, for filters. ", "comments": "", "fields": [ @@ -42017,52 +37741,18 @@ "comments": "" } ], + "block": "int (*)(git_writestream *, const char *, size_t) write\nint (*)(git_writestream *) close\nvoid (*)(git_writestream *) free", "used": { "returns": [], "needs": [ - "git_blob_create_fromstream", - "git_blob_create_fromstream_commit", + "git_blob_create_from_stream", + "git_blob_create_from_stream_commit", "git_filter_list_stream_blob", "git_filter_list_stream_data", - "git_filter_list_stream_file", - "git_filter_stream_fn" + "git_filter_list_stream_file" ] } } - ], - [ - "imaxdiv_t", - { - "decl": [ - "intmax_t quot", - "intmax_t rem" - ], - "type": "struct", - "value": "imaxdiv_t", - "file": "git2/inttypes.h", - "line": 51, - "lineto": 54, - "block": "intmax_t quot\nintmax_t rem", - "tdef": "typedef", - "description": "", - "comments": "", - "fields": [ - { - "type": "intmax_t", - "name": "quot", - "comments": "" - }, - { - "type": "intmax_t", - "name": "rem", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [] - } - } ] ], "prefix": "include", @@ -42106,16 +37796,18 @@ "git_blame_get_hunk_byindex", "git_blame_get_hunk_byline", "git_blame_get_hunk_count", - "git_blame_init_options" + "git_blame_init_options", + "git_blame_options_init" ] ], [ "blob", [ - "git_blob_create_frombuffer", - "git_blob_create_fromdisk", - "git_blob_create_fromstream", - "git_blob_create_fromstream_commit", + "git_blob_create_from_buffer", + "git_blob_create_from_disk", + "git_blob_create_from_stream", + "git_blob_create_from_stream_commit", + "git_blob_create_from_workdir", "git_blob_create_fromworkdir", "git_blob_dup", "git_blob_filtered_content", @@ -42166,7 +37858,7 @@ [ "git_checkout_head", "git_checkout_index", - "git_checkout_init_options", + "git_checkout_options_init", "git_checkout_tree" ] ], @@ -42175,14 +37867,14 @@ [ "git_cherrypick", "git_cherrypick_commit", - "git_cherrypick_init_options" + "git_cherrypick_options_init" ] ], [ "clone", [ "git_clone", - "git_clone_init_options" + "git_clone_options_init" ] ], [ @@ -42196,8 +37888,6 @@ "git_commit_committer_with_mailmap", "git_commit_create", "git_commit_create_buffer", - "git_commit_create_from_callback", - "git_commit_create_from_ids", "git_commit_create_v", "git_commit_create_with_signature", "git_commit_dup", @@ -42226,7 +37916,6 @@ [ "config", [ - "git_config_add_backend", "git_config_add_file_ondisk", "git_config_backend_foreach_match", "git_config_delete_entry", @@ -42248,7 +37937,6 @@ "git_config_get_path", "git_config_get_string", "git_config_get_string_buf", - "git_config_init_backend", "git_config_iterator_free", "git_config_iterator_glob_new", "git_config_iterator_new", @@ -42294,8 +37982,8 @@ [ "git_describe_commit", "git_describe_format", - "git_describe_init_format_options", - "git_describe_init_options", + "git_describe_format_options_init", + "git_describe_options_init", "git_describe_result_free", "git_describe_workdir" ] @@ -42307,28 +37995,25 @@ "git_diff_blobs", "git_diff_buffers", "git_diff_commit_as_email", - "git_diff_find_init_options", + "git_diff_find_options_init", "git_diff_find_similar", "git_diff_foreach", "git_diff_format_email", - "git_diff_format_email_init_options", + "git_diff_format_email_options_init", "git_diff_free", "git_diff_from_buffer", "git_diff_get_delta", - "git_diff_get_perfdata", "git_diff_get_stats", "git_diff_index_to_index", "git_diff_index_to_workdir", - "git_diff_init_options", "git_diff_is_sorted_icase", "git_diff_merge", "git_diff_num_deltas", "git_diff_num_deltas_of_type", + "git_diff_options_init", "git_diff_patchid", - "git_diff_patchid_init_options", + "git_diff_patchid_options_init", "git_diff_print", - "git_diff_print_callback__to_buf", - "git_diff_print_callback__to_file_handle", "git_diff_stats_deletions", "git_diff_stats_files_changed", "git_diff_stats_free", @@ -42354,34 +38039,21 @@ [ "fetch", [ - "git_fetch_init_options" + "git_fetch_options_init" ] ], [ "filter", [ - "git_filter_init", "git_filter_list_apply_to_blob", "git_filter_list_apply_to_data", "git_filter_list_apply_to_file", "git_filter_list_contains", "git_filter_list_free", - "git_filter_list_length", "git_filter_list_load", - "git_filter_list_new", - "git_filter_list_push", "git_filter_list_stream_blob", "git_filter_list_stream_data", - "git_filter_list_stream_file", - "git_filter_lookup", - "git_filter_register", - "git_filter_source_filemode", - "git_filter_source_flags", - "git_filter_source_id", - "git_filter_source_mode", - "git_filter_source_path", - "git_filter_source_repo", - "git_filter_unregister" + "git_filter_list_stream_file" ] ], [ @@ -42400,15 +38072,6 @@ "git_graph_descendant_of" ] ], - [ - "hashsig", - [ - "git_hashsig_compare", - "git_hashsig_create", - "git_hashsig_create_fromfile", - "git_hashsig_free" - ] - ], [ "ignore", [ @@ -42417,19 +38080,13 @@ "git_ignore_path_is_ignored" ] ], - [ - "imaxdiv", - [ - "imaxdiv" - ] - ], [ "index", [ "git_index_add", "git_index_add_all", "git_index_add_bypath", - "git_index_add_frombuffer", + "git_index_add_from_buffer", "git_index_caps", "git_index_checksum", "git_index_clear", @@ -42452,10 +38109,6 @@ "git_index_iterator_free", "git_index_iterator_new", "git_index_iterator_next", - "git_index_name_add", - "git_index_name_clear", - "git_index_name_entrycount", - "git_index_name_get_byindex", "git_index_new", "git_index_open", "git_index_owner", @@ -42466,13 +38119,6 @@ "git_index_remove_all", "git_index_remove_bypath", "git_index_remove_directory", - "git_index_reuc_add", - "git_index_reuc_clear", - "git_index_reuc_entrycount", - "git_index_reuc_find", - "git_index_reuc_get_byindex", - "git_index_reuc_get_bypath", - "git_index_reuc_remove", "git_index_set_caps", "git_index_set_version", "git_index_update_all", @@ -42489,8 +38135,8 @@ "git_indexer_commit", "git_indexer_free", "git_indexer_hash", - "git_indexer_init_options", - "git_indexer_new" + "git_indexer_new", + "git_indexer_options_init" ] ], [ @@ -42515,14 +38161,6 @@ "git_mailmap_resolve_signature" ] ], - [ - "mempack", - [ - "git_mempack_dump", - "git_mempack_new", - "git_mempack_reset" - ] - ], [ "merge", [ @@ -42535,20 +38173,12 @@ "git_merge_bases", "git_merge_bases_many", "git_merge_commits", - "git_merge_driver_lookup", - "git_merge_driver_register", - "git_merge_driver_source_ancestor", - "git_merge_driver_source_file_options", - "git_merge_driver_source_ours", - "git_merge_driver_source_repo", - "git_merge_driver_source_theirs", - "git_merge_driver_unregister", "git_merge_file", "git_merge_file_from_index", - "git_merge_file_init_input", - "git_merge_file_init_options", + "git_merge_file_input_init", + "git_merge_file_options_init", "git_merge_file_result_free", - "git_merge_init_options", + "git_merge_options_init", "git_merge_trees" ] ], @@ -42585,7 +38215,6 @@ [ "object", [ - "git_object__size", "git_object_dup", "git_object_free", "git_object_id", @@ -42595,6 +38224,7 @@ "git_object_owner", "git_object_peel", "git_object_short_id", + "git_object_size", "git_object_string2type", "git_object_type", "git_object_type2string", @@ -42608,7 +38238,6 @@ "git_odb_add_backend", "git_odb_add_disk_alternate", "git_odb_backend_loose", - "git_odb_backend_malloc", "git_odb_backend_one_pack", "git_odb_backend_pack", "git_odb_exists", @@ -42619,7 +38248,6 @@ "git_odb_get_backend", "git_odb_hash", "git_odb_hashfile", - "git_odb_init_backend", "git_odb_new", "git_odb_num_backends", "git_odb_object_data", @@ -42654,6 +38282,7 @@ "git_oid_fromstr", "git_oid_fromstrn", "git_oid_fromstrp", + "git_oid_is_zero", "git_oid_iszero", "git_oid_ncmp", "git_oid_nfmt", @@ -42673,12 +38302,6 @@ "git_oidarray_free" ] ], - [ - "openssl", - [ - "git_openssl_set_locking" - ] - ], [ "packbuilder", [ @@ -42718,12 +38341,6 @@ "git_patch_to_buf" ] ], - [ - "path", - [ - "git_path_is_gitfile" - ] - ], [ "pathspec", [ @@ -42745,13 +38362,13 @@ [ "proxy", [ - "git_proxy_init_options" + "git_proxy_options_init" ] ], [ "push", [ - "git_push_init_options" + "git_push_options_init" ] ], [ @@ -42762,32 +38379,31 @@ "git_rebase_finish", "git_rebase_free", "git_rebase_init", - "git_rebase_init_options", "git_rebase_inmemory_index", "git_rebase_next", + "git_rebase_onto_id", + "git_rebase_onto_name", "git_rebase_open", "git_rebase_operation_byindex", "git_rebase_operation_current", - "git_rebase_operation_entrycount" + "git_rebase_operation_entrycount", + "git_rebase_options_init", + "git_rebase_orig_head_id", + "git_rebase_orig_head_name" ] ], [ "refdb", [ - "git_refdb_backend_fs", "git_refdb_compress", "git_refdb_free", - "git_refdb_init_backend", "git_refdb_new", - "git_refdb_open", - "git_refdb_set_backend" + "git_refdb_open" ] ], [ "reference", [ - "git_reference__alloc", - "git_reference__alloc_symbolic", "git_reference_cmp", "git_reference_create", "git_reference_create_matching", @@ -42837,8 +38453,6 @@ "git_reflog_append", "git_reflog_delete", "git_reflog_drop", - "git_reflog_entry__alloc", - "git_reflog_entry__free", "git_reflog_entry_byindex", "git_reflog_entry_committer", "git_reflog_entry_id_new", @@ -42878,7 +38492,7 @@ "git_remote_create", "git_remote_create_anonymous", "git_remote_create_detached", - "git_remote_create_init_options", + "git_remote_create_options_init", "git_remote_create_with_fetchspec", "git_remote_create_with_opts", "git_remote_default_branch", @@ -42917,7 +38531,6 @@ [ "repository", [ - "git_repository__cleanup", "git_repository_commondir", "git_repository_config", "git_repository_config_snapshot", @@ -42936,7 +38549,7 @@ "git_repository_index", "git_repository_init", "git_repository_init_ext", - "git_repository_init_init_options", + "git_repository_init_options_init", "git_repository_is_bare", "git_repository_is_empty", "git_repository_is_shallow", @@ -42945,7 +38558,6 @@ "git_repository_mergehead_foreach", "git_repository_message", "git_repository_message_remove", - "git_repository_new", "git_repository_odb", "git_repository_open", "git_repository_open_bare", @@ -42953,22 +38565,14 @@ "git_repository_open_from_worktree", "git_repository_path", "git_repository_refdb", - "git_repository_reinit_filesystem", - "git_repository_set_bare", - "git_repository_set_config", "git_repository_set_head", "git_repository_set_head_detached", "git_repository_set_head_detached_from_annotated", "git_repository_set_ident", - "git_repository_set_index", "git_repository_set_namespace", - "git_repository_set_odb", - "git_repository_set_refdb", "git_repository_set_workdir", "git_repository_state", "git_repository_state_cleanup", - "git_repository_submodule_cache_all", - "git_repository_submodule_cache_clear", "git_repository_workdir", "git_repository_wrap_odb" ] @@ -42986,7 +38590,7 @@ [ "git_revert", "git_revert_commit", - "git_revert_init_options" + "git_revert_options_init" ] ], [ @@ -43030,19 +38634,11 @@ "git_signature_now" ] ], - [ - "smart", - [ - "git_smart_subtransport_git", - "git_smart_subtransport_http", - "git_smart_subtransport_ssh" - ] - ], [ "stash", [ "git_stash_apply", - "git_stash_apply_init_options", + "git_stash_apply_options_init", "git_stash_drop", "git_stash_foreach", "git_stash_pop", @@ -43056,20 +38652,13 @@ "git_status_file", "git_status_foreach", "git_status_foreach_ext", - "git_status_init_options", "git_status_list_entrycount", "git_status_list_free", - "git_status_list_get_perfdata", "git_status_list_new", + "git_status_options_init", "git_status_should_ignore" ] ], - [ - "stdalloc", - [ - "git_stdalloc_init_allocator" - ] - ], [ "strarray", [ @@ -43077,13 +38666,6 @@ "git_strarray_free" ] ], - [ - "stream", - [ - "git_stream_register", - "git_stream_register_tls" - ] - ], [ "submodule", [ @@ -43115,7 +38697,7 @@ "git_submodule_status", "git_submodule_sync", "git_submodule_update", - "git_submodule_update_init_options", + "git_submodule_update_options_init", "git_submodule_update_strategy", "git_submodule_url", "git_submodule_wd_id" @@ -43126,7 +38708,7 @@ [ "git_tag_annotation_create", "git_tag_create", - "git_tag_create_frombuffer", + "git_tag_create_from_buffer", "git_tag_create_lightweight", "git_tag_delete", "git_tag_dup", @@ -43147,12 +38729,6 @@ "git_tag_target_type" ] ], - [ - "time", - [ - "git_time_monotonic" - ] - ], [ "trace", [ @@ -43172,22 +38748,6 @@ "git_transaction_set_target" ] ], - [ - "transport", - [ - "git_transport_dummy", - "git_transport_init", - "git_transport_local", - "git_transport_new", - "git_transport_register", - "git_transport_smart", - "git_transport_smart_certificate_check", - "git_transport_smart_credentials", - "git_transport_smart_proxy_options", - "git_transport_ssh_with_paths", - "git_transport_unregister" - ] - ], [ "tree", [ @@ -43230,17 +38790,11 @@ "git_treebuilder_write_with_buffer" ] ], - [ - "win32", - [ - "git_win32_crtdbg_init_allocator" - ] - ], [ "worktree", [ "git_worktree_add", - "git_worktree_add_init_options", + "git_worktree_add_options_init", "git_worktree_free", "git_worktree_is_locked", "git_worktree_is_prunable", @@ -43251,7 +38805,7 @@ "git_worktree_open_from_repository", "git_worktree_path", "git_worktree_prune", - "git_worktree_prune_init_options", + "git_worktree_prune_options_init", "git_worktree_unlock", "git_worktree_validate" ] @@ -43260,103 +38814,99 @@ "examples": [ [ "add.c", - "ex/v0.28.0/add.html" + "ex/HEAD/add.html" ], [ "blame.c", - "ex/v0.28.0/blame.html" + "ex/HEAD/blame.html" ], [ "cat-file.c", - "ex/v0.28.0/cat-file.html" + "ex/HEAD/cat-file.html" ], [ "checkout.c", - "ex/v0.28.0/checkout.html" + "ex/HEAD/checkout.html" + ], + [ + "clone.c", + "ex/HEAD/clone.html" ], [ "common.c", - "ex/v0.28.0/common.html" + "ex/HEAD/common.html" ], [ "describe.c", - "ex/v0.28.0/describe.html" + "ex/HEAD/describe.html" ], [ "diff.c", - "ex/v0.28.0/diff.html" - ], - [ - "for-each-ref.c", - "ex/v0.28.0/for-each-ref.html" + "ex/HEAD/diff.html" ], [ - "general.c", - "ex/v0.28.0/general.html" - ], - [ - "init.c", - "ex/v0.28.0/init.html" + "fetch.c", + "ex/HEAD/fetch.html" ], [ - "log.c", - "ex/v0.28.0/log.html" + "for-each-ref.c", + "ex/HEAD/for-each-ref.html" ], [ - "ls-files.c", - "ex/v0.28.0/ls-files.html" + "general.c", + "ex/HEAD/general.html" ], [ - "merge.c", - "ex/v0.28.0/merge.html" + "index-pack.c", + "ex/HEAD/index-pack.html" ], [ - "network/clone.c", - "ex/v0.28.0/network/clone.html" + "init.c", + "ex/HEAD/init.html" ], [ - "network/common.c", - "ex/v0.28.0/network/common.html" + "lg2.c", + "ex/HEAD/lg2.html" ], [ - "network/fetch.c", - "ex/v0.28.0/network/fetch.html" + "log.c", + "ex/HEAD/log.html" ], [ - "network/git2.c", - "ex/v0.28.0/network/git2.html" + "ls-files.c", + "ex/HEAD/ls-files.html" ], [ - "network/index-pack.c", - "ex/v0.28.0/network/index-pack.html" + "ls-remote.c", + "ex/HEAD/ls-remote.html" ], [ - "network/ls-remote.c", - "ex/v0.28.0/network/ls-remote.html" + "merge.c", + "ex/HEAD/merge.html" ], [ "remote.c", - "ex/v0.28.0/remote.html" + "ex/HEAD/remote.html" ], [ "rev-list.c", - "ex/v0.28.0/rev-list.html" + "ex/HEAD/rev-list.html" ], [ "rev-parse.c", - "ex/v0.28.0/rev-parse.html" + "ex/HEAD/rev-parse.html" ], [ - "showindex.c", - "ex/v0.28.0/showindex.html" + "show-index.c", + "ex/HEAD/show-index.html" ], [ "status.c", - "ex/v0.28.0/status.html" + "ex/HEAD/status.html" ], [ "tag.c", - "ex/v0.28.0/tag.html" + "ex/HEAD/tag.html" ] ] } From 8d44cab68ef5b861ee5d55f2fe6c999f0714023e Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 24 Jun 2019 10:12:15 -0700 Subject: [PATCH 107/145] Supplement missing documentation --- generate/input/descriptor.json | 45 +- generate/input/libgit2-supplement.json | 651 ++++++++++++++++++++++--- 2 files changed, 613 insertions(+), 83 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 7db3b4c05..0e15fb204 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1539,7 +1539,20 @@ }, "hashsig": { "selfFreeing": true, + "freeFunctionName": "git_hashsig_free", "functions": { + "git_hashsig_create": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, + "git_hashsig_create_fromfile": { + "isAsync": true, + "return": { + "isErrorCode": true + } + }, "git_hashsig_free": { "ignore": true } @@ -2527,9 +2540,7 @@ } }, "openssl": { - "cDependencies": [ - "git2/sys/openssl.h" - ] + "ignore": true }, "packbuilder": { "selfFreeing": true, @@ -3247,6 +3258,9 @@ "../include/remote.h" ], "functions": { + "git_repository__cleanup": { + "isAsync": true + }, "git_repository_config": { "args": { "out": { @@ -3366,6 +3380,16 @@ }, "git_repository_set_refdb": { "ignore": true + }, + "git_repository_submodule_cache_all": { + "return": { + "isErrorCode": true + } + }, + "git_repository_submodule_cache_clear": { + "return": { + "isErrorCode": true + } } } }, @@ -3619,6 +3643,21 @@ "git_status_list_free": { "ignore": true }, + "git_status_list_get_perfdata": { + "isAsync": false, + "args": { + "out": { + "isReturn": true, + "shouldAlloc": true + }, + "status": { + "isSelf": true + } + }, + "return": { + "isErrorCode": true + } + }, "git_status_list_new": { "isAsync": true, "args": { diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 1b3e66a21..d22df8cbb 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -141,6 +141,23 @@ "isErrorCode": true } }, + "git_diff_get_perfdata": { + "file": "sys/diff.h", + "args": [ + { + "name": "out", + "type": "git_diff_perfdata *" + }, + { + "name": "diff", + "type": "const git_diff *" + } + ], + "return": { + "type": "int" + }, + "group": "diff" + }, "git_filter_list_load": { "isManual": true, "cFile": "generate/templates/manual/filter_list/load.cc", @@ -150,7 +167,7 @@ }, "git_filter_source_filemode": { "type": "function", - "file": "filter.h", + "file": "sys/filter.h", "args": [ { "name": "src", @@ -164,7 +181,7 @@ }, "git_filter_source_flags": { "type": "function", - "file": "filter.h", + "file": "sys/filter.h", "args": [ { "name": "src", @@ -176,6 +193,48 @@ }, "group": "filter_source" }, + "git_filter_source_id": { + "type": "function", + "file": "sys/filter.h", + "args": [ + { + "name": "src", + "type": "const git_filter_source *" + } + ], + "return": { + "type": "const git_oid *" + }, + "group": "filter_source" + }, + "git_filter_source_mode": { + "type": "function", + "file": "sys/filter.h", + "args": [ + { + "name": "src", + "type": "const git_filter_source *" + } + ], + "return": { + "type": "git_filter_mode_t" + }, + "group": "filter_source" + }, + "git_filter_source_path": { + "type": "function", + "file": "sys/filter.h", + "args": [ + { + "name": "src", + "type": "const git_filter_source *" + } + ], + "return": { + "type": "const char *" + }, + "group": "filter_source" + }, "git_filter_source_repo": { "args": [ { @@ -198,6 +257,290 @@ "isErrorCode": true } }, + "git_hashsig_compare": { + "type": "function", + "file": "sys/hashsig.h", + "args": [ + { + "name": "a", + "type": "const git_hashsig *" + }, + { + "name": "b", + "type": "const git_hashsig *" + } + ], + "return": { + "type": "int" + }, + "group": "hashsig" + }, + "git_hashsig_create": { + "type": "function", + "file": "sys/hashsig.h", + "args": [ + { + "name": "out", + "type": "git_hashsig **" + }, + { + "name": "buf", + "type": "const char *" + }, + { + "name": "buflen", + "type": "size_t" + }, + { + "name": "opts", + "type": "git_hashsig_option_t" + } + ], + "return": { + "type": "int" + }, + "group": "hashsig" + }, + "git_hashsig_create_fromfile": { + "type": "function", + "file": "sys/hashsig.h", + "args": [ + { + "name": "out", + "type": "git_hashsig **" + }, + { + "name": "path", + "type": "const char *" + }, + { + "name": "opts", + "type": "git_hashsig_option_t" + } + ], + "return": { + "type": "int" + }, + "group": "hashsig" + }, + "git_index_name_add": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + }, + { + "name": "ancestor", + "type": "const char *" + }, + { + "name": "ours", + "type": "const char *" + }, + { + "name": "theirs", + "type": "const char *" + } + ], + "return": { + "type": "int" + }, + "group": "index_name_entry" + }, + "git_index_name_clear": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + } + ], + "return": { + "type": "void" + }, + "group": "index_name_entry" + }, + "git_index_name_entrycount": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + } + ], + "return": { + "type": "size_t" + }, + "group": "index_name_entry" + }, + "git_index_name_get_byindex": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + }, + { + "name": "n", + "type": "size_t" + } + ], + "return": { + "type": "const git_index_name_entry *" + }, + "group": "index_name_entry" + }, + "git_index_reuc_add": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + }, + { + "name": "path", + "type": "const char *" + }, + { + "name": "ancestor_mode", + "type": "int" + }, + { + "name": "ancestor_id", + "type": "const git_oid *" + }, + { + "name": "our_mode", + "type": "int" + }, + { + "name": "our_id", + "type": "const git_oid *" + }, + { + "name": "their_mode", + "type": "int" + }, + { + "name": "their_id", + "type": "const git_oid *" + } + ], + "return": { + "type": "int" + }, + "group": "index_reuc_entry" + }, + "git_index_reuc_clear": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + } + ], + "return": { + "type": "const git_index_reuc_entry *" + }, + "group": "index_reuc_entry" + }, + "git_index_reuc_entrycount": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + } + ], + "return": { + "type": "size_t" + }, + "group": "index_reuc_entry" + }, + "git_index_reuc_find": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "at_pos", + "type": "size_t *" + }, + { + "name": "index", + "type": "git_index *" + }, + { + "name": "path", + "type": "const char *" + } + ], + "return": { + "type": "int" + }, + "group": "index_reuc_entry" + }, + "git_index_reuc_get_byindex": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + }, + { + "name": "n", + "type": "size_t" + } + ], + "return": { + "type": "const git_index_reuc_entry *" + }, + "group": "index_reuc_entry" + }, + "git_index_reuc_get_bypath": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + }, + { + "name": "path", + "type": "const char *" + } + ], + "return": { + "type": "const git_index_reuc_entry *" + }, + "group": "index_reuc_entry" + }, + "git_index_reuc_remove": { + "type": "function", + "file": "sys/index.h", + "args": [ + { + "name": "index", + "type": "git_index *" + }, + { + "name": "n", + "type": "size_t" + } + ], + "return": { + "type": "const git_index_reuc_entry *" + }, + "group": "index_reuc_entry" + }, "git_patch_convenient_from_diff": { "args": [ { @@ -220,6 +563,32 @@ "isErrorCode": true } }, + "git_path_is_gitfile": { + "type": "function", + "file": "sys/path.h", + "args": [ + { + "name": "path", + "type": "const char *" + }, + { + "name": "pathlen", + "type": "size_t" + }, + { + "name": "gitfile", + "type": "git_path_gitfile" + }, + { + "name": "fs", + "type": "git_path_fs" + } + ], + "return": { + "type": "int" + }, + "group": "path" + }, "git_rebase_next": { "type": "function", "file": "rebase.h", @@ -260,6 +629,20 @@ "isErrorCode": true } }, + "git_repository__cleanup": { + "type": "function", + "file": "sys/repository.h", + "args": [ + { + "name": "repo", + "type": "git_repository *" + } + ], + "return": { + "type": "void" + }, + "group": "repository" + }, "git_repository_get_references": { "args": [ { @@ -348,6 +731,52 @@ "isErrorCode": true } }, + "git_repository_set_index": { + "type": "function", + "file": "sys/repository.h", + "args": [ + { + "name": "repo", + "type": "git_repository *" + }, + { + "name": "index", + "type": "git_index *" + } + ], + "return": { + "type": "void" + }, + "group": "repository" + }, + "git_repository_submodule_cache_all": { + "type": "function", + "file": "sys/repository.h", + "args": [ + { + "name": "repo", + "type": "git_repository *" + } + ], + "return": { + "type": "int" + }, + "group": "repository" + }, + "git_repository_submodule_cache_clear": { + "type": "function", + "file": "sys/repository.h", + "args": [ + { + "name": "repo", + "type": "git_repository *" + } + ], + "return": { + "type": "int" + }, + "group": "repository" + }, "git_reset": { "type": "function", "file": "reset.h", @@ -485,6 +914,23 @@ "type": "int" }, "group": "stash" + }, + "git_status_list_get_perfdata": { + "file": "sys/diff.h", + "args": [ + { + "name": "out", + "type": "git_diff_perfdata *" + }, + { + "name": "status", + "type": "const git_status_list *" + } + ], + "return": { + "type": "int" + }, + "group": "status_list" } }, "groups": [ @@ -803,6 +1249,27 @@ } } ], + [ + "git_diff_perfdata", + { + "type": "struct", + "fields": [ + { + "type": "unsigned int", + "name": "version", + "ignore": true + }, + { + "type": "size_t", + "name": "stat_calls" + }, + { + "type": "size_t", + "name": "oid_calculations" + } + ] + } + ], [ "git_filter", { @@ -839,45 +1306,6 @@ ] } ], - [ - "git_status_entry", - { - "fields": [ - { - "type": "git_status_t", - "name": "status" - }, - { - "type": "git_diff_delta *", - "name": "head_to_index" - }, - { - "type": "git_diff_delta *", - "name": "index_to_workdir" - } - ] - } - ], - [ - "git_diff_perfdata", - { - "type": "struct", - "fields": [ - { - "type": "unsigned int", - "name": "version" - }, - { - "type": "size_t", - "name": "stat_calls" - }, - { - "type": "size_t", - "name": "oid_calculations" - } - ] - } - ], [ "git_fetch_options", { @@ -943,6 +1371,46 @@ ] } ], + [ + "git_index_name_entry", + { + "type": "struct", + "fields": [ + { + "type": "char *", + "name": "ancestor" + }, + { + "type": "char *", + "name": "ours" + }, + { + "type": "char *", + "name": "theirs" + } + ] + } + ], + [ + "git_index_reuc_entry", + { + "type": "struct", + "fields": [ + { + "type": "uint32_t [3]", + "name": "mode" + }, + { + "type": "git_oid [3]", + "name": "oid" + }, + { + "type": "char *", + "name": "path" + } + ] + } + ], [ "git_off_t", { @@ -1115,6 +1583,29 @@ } } ], + [ + "git_path_gitfile", + { + "type": "enum", + "fields": [ + { + "type": "int", + "name": "GIT_PATH_GITFILE_GITIGNORE", + "value": 0 + }, + { + "type": "int", + "name": "GIT_PATH_GITFILE_GITMODULES", + "value": 1 + }, + { + "type": "int", + "name": "GIT_PATH_GITFILE_GITATTRIBUTES", + "value": 1 + } + ] + } + ], [ "git_stash_apply_progress_t", { @@ -1164,7 +1655,7 @@ } ], [ - "git_status_options", + "git_stash_apply_options", { "type": "struct", "fields": [ @@ -1173,29 +1664,32 @@ "name": "version" }, { - "type": "git_status_show_t", - "name": "show" + "type": "git_stash_apply_flags", + "name": "flags" }, { - "type": "git_status_opt_t", - "name": "flags" + "type": "git_checkout_options", + "name": "checkout_options" }, { - "type": "git_strarray", - "name": "pathspec" + "type": "git_stash_apply_progress_cb", + "name": "progress_cb" + }, + { + "type": "void *", + "name": "progress_payload" } ], "used": { "needs": [ - "git_status_init_options", - "git_status_foreach_ext", - "git_status_list_new" + "git_stash_apply_init_options", + "git_checkout_init_options" ] } } ], [ - "git_stash_apply_options", + "git_status_options", { "type": "struct", "fields": [ @@ -1204,26 +1698,23 @@ "name": "version" }, { - "type": "git_stash_apply_flags", - "name": "flags" - }, - { - "type": "git_checkout_options", - "name": "checkout_options" + "type": "git_status_show_t", + "name": "show" }, { - "type": "git_stash_apply_progress_cb", - "name": "progress_cb" + "type": "git_status_opt_t", + "name": "flags" }, { - "type": "void *", - "name": "progress_payload" + "type": "git_strarray", + "name": "pathspec" } ], "used": { "needs": [ - "git_stash_apply_init_options", - "git_checkout_init_options" + "git_status_init_options", + "git_status_foreach_ext", + "git_status_list_new" ] } } @@ -1256,6 +1747,22 @@ ] } ], + [ + "git_worktree_prune_options", + { + "type": "struct", + "fields": [ + { + "type": "unsigned int", + "name": "version" + }, + { + "type": "uint32_t", + "name": "flags" + } + ] + } + ], [ "git_worktree_prune_t", { @@ -1278,22 +1785,6 @@ } ] } - ], - [ - "git_worktree_prune_options", - { - "type": "struct", - "fields": [ - { - "type": "unsigned int", - "name": "version" - }, - { - "type": "uint32_t", - "name": "flags" - } - ] - } ] ] }, From eb463b8002c7c0f3135f358cb515087d24432272 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 24 Jun 2019 10:12:46 -0700 Subject: [PATCH 108/145] Remove supplements that are no longer needed --- generate/input/libgit2-supplement.json | 88 -------------------------- 1 file changed, 88 deletions(-) diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index d22df8cbb..5bd03f158 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -86,20 +86,6 @@ }, "new" : { "functions": { - "git_blame_get_hunk_count": { - "type": "function", - "file": "blame.h", - "args": [ - { - "name": "blame", - "type": "git_blame *" - } - ], - "return": { - "type": "int" - }, - "group": "blame" - }, "git_clone": { "isManual": true, "cFile": "generate/templates/manual/clone/clone.cc", @@ -589,24 +575,6 @@ }, "group": "path" }, - "git_rebase_next": { - "type": "function", - "file": "rebase.h", - "args": [ - { - "name": "out", - "type": "git_rebase_operation **" - }, - { - "name": "rebase", - "type": "git_rebase *" - } - ], - "return": { - "type": "int" - }, - "group": "rebase" - }, "git_remote_reference_list": { "args": [ { @@ -777,32 +745,6 @@ }, "group": "repository" }, - "git_reset": { - "type": "function", - "file": "reset.h", - "args": [ - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "target", - "type": "git_object *" - }, - { - "name": "reset_type", - "type": "git_reset_t" - }, - { - "name": "checkout_opts", - "type": "git_checkout_options *" - } - ], - "return": { - "type": "int" - }, - "group": "reset" - }, "git_revwalk_commit_walk": { "args": [ { @@ -885,36 +827,6 @@ "isErrorCode": true } }, - "git_stash_save": { - "type": "function", - "file": "stash.h", - "args": [ - { - "name": "out", - "type": "git_oid *" - }, - { - "name": "repo", - "type": "git_repository *" - }, - { - "name": "stasher", - "type": "const git_signature *" - }, - { - "name": "message", - "type": "const char *" - }, - { - "name": "flags", - "type": "unsigned int" - } - ], - "return": { - "type": "int" - }, - "group": "stash" - }, "git_status_list_get_perfdata": { "file": "sys/diff.h", "args": [ From be6cc4331775179f02bca5d51b923e11aff319fe Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 24 Jun 2019 13:35:39 -0700 Subject: [PATCH 109/145] Address major changes to constructors, fix missing methods/structs --- generate/input/callbacks.json | 101 +++++++++++++------------ generate/input/descriptor.json | 101 ++++++++++++++++++++++--- generate/input/libgit2-supplement.json | 45 +++++++++-- generate/scripts/helpers.js | 9 ++- 4 files changed, 187 insertions(+), 69 deletions(-) diff --git a/generate/input/callbacks.json b/generate/input/callbacks.json index cb9f10079..0d8720b79 100644 --- a/generate/input/callbacks.json +++ b/generate/input/callbacks.json @@ -476,6 +476,25 @@ "error": -1 } }, + "git_indexer_progress_cb": { + "args": [ + { + "name": "stats", + "cType": "const git_indexer_progress *" + }, + { + "name": "payload", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": 0, + "success": 0, + "error": -1, + "throttle": 100 + } + }, "git_note_foreach_cb": { "args": [ { @@ -532,6 +551,28 @@ "error": -1 } }, + "git_push_update_reference_cb": { + "args": [ + { + "name": "refname", + "cType": "const char *" + }, + { + "name": "status", + "cType": "const char *" + }, + { + "name": "data", + "cType": "void *" + } + ], + "return": { + "type": "int", + "noResults": 1, + "success": 0, + "error": -1 + } + }, "git_remote_create_cb": { "args": [ { @@ -692,29 +733,6 @@ "error": -1 } }, - "git_smart_subtransport_cb": { - "args": [ - { - "name": "out", - "cType": "git_smart_subtransport **", - "isReturn": true - }, - { - "name": "owner", - "cType": "git_transport*" - }, - { - "name": "param", - "cType": "void *" - } - ], - "return": { - "type": "int", - "noResults": 0, - "success": 0, - "error": -1 - } - }, "git_stash_apply_progress_cb": { "args": [ { @@ -826,26 +844,7 @@ "error": -1 } }, - "git_transfer_progress_cb": { - "args": [ - { - "name": "stats", - "cType": "const git_transfer_progress *" - }, - { - "name": "payload", - "cType": "void *" - } - ], - "return": { - "type": "int", - "noResults": 0, - "success": 0, - "error": -1, - "throttle": 100 - } - }, - "git_push_transfer_progress": { + "git_push_transfer_progress_cb": { "args": [ { "name": "current", @@ -983,24 +982,28 @@ "error": -1 } }, - "git_push_update_reference_cb": { + "git_url_resolve_cb": { "args": [ { - "name": "refname", - "cType": "const char *" + "name": "url_resolved", + "cType": "git_buf *" }, { - "name": "status", + "name": "url", "cType": "const char *" }, { - "name": "data", + "name": "direction", + "cType": "int" + }, + { + "name": "payload", "cType": "void *" } ], "return": { "type": "int", - "noResults": 1, + "noResults": -30, "success": 0, "error": -1 } diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 0e15fb204..0d34b7a3d 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -183,6 +183,9 @@ }, "git_blame_init_options": { "ignore": true + }, + "git_blame_options_init": { + "ignore": true } } }, @@ -200,7 +203,7 @@ "singletonCppClassName": "GitRepository" }, "functions": { - "git_blob_create_frombuffer": { + "git_blob_create_from_buffer": { "isAsync": true, "args": { "id": { @@ -215,7 +218,7 @@ "isErrorCode": true } }, - "git_blob_create_fromworkdir": { + "git_blob_create_from_workdir": { "isAsync": true, "args": { "id": { @@ -226,7 +229,10 @@ "isErrorCode": true } }, - "git_blob_create_fromdisk": { + "git_blob_create_fromworkdir": { + "ignore": true + }, + "git_blob_create_from_disk": { "isAsync": true, "args": { "id": { @@ -237,10 +243,10 @@ "isErrorCode": true } }, - "git_blob_create_fromstream": { + "git_blob_create_from_stream": { "ignore": true }, - "git_blob_create_fromstream_commit": { + "git_blob_create_from_stream_commit": { "ignore": true }, "git_blob_filtered_content": { @@ -486,6 +492,9 @@ "git_checkout_init_options": { "ignore": true }, + "git_checkout_options_init": { + "ignore": true + }, "git_checkout_tree": { "args": { "treeish": { @@ -512,6 +521,9 @@ }, "git_cherrypick_init_options": { "ignore": true + }, + "git_cherrypick_options_init": { + "ignore": true } } }, @@ -526,6 +538,9 @@ }, "git_clone_init_options": { "ignore": true + }, + "git_clone_options_init": { + "ignore": true } } }, @@ -1129,6 +1144,9 @@ "git_diff_find_init_options": { "ignore": true }, + "git_diff_find_options_init": { + "ignore": true + }, "git_diff_find_similar": { "args": { "diff": { @@ -1154,6 +1172,9 @@ "git_diff_format_email_init_options": { "ignore": true }, + "git_diff_format_email_options_init": { + "ignore": true + }, "git_diff_free": { "ignore": true }, @@ -1227,9 +1248,15 @@ "git_diff_num_deltas_of_type": { "ignore": true }, + "git_diff_options_init": { + "ignore": true + }, "git_diff_patchid_init_options": { "ignore": true }, + "git_diff_patchid_options_init": { + "ignore": true + }, "git_diff_print": { "ignore": true }, @@ -1384,6 +1411,9 @@ "functions": { "git_fetch_init_options": { "ignore": true + }, + "git_fetch_options_init": { + "ignore": true } } }, @@ -1951,7 +1981,8 @@ "git_index_reuc_clear": { "cppFunctionName": "Clear", "jsFunctionName": "clear", - "isAsync": true + "isAsync": true, + "isPrototypeMethod": false }, "git_index_reuc_entrycount": { "cppFunctionName": "Entrycount", @@ -1985,6 +2016,7 @@ "cppFunctionName": "Remove", "jsFunctionName": "remove", "isAsync": true, + "isPrototypeMethod": false, "return": { "isErrorCode": true } @@ -2177,12 +2209,24 @@ "git_merge_file_from_index": { "ignore": true }, + "git_merge_file_input_init": { + "ignore": true + }, + "git_merge_file_init_input": { + "ignore": true + }, "git_merge_file_init_options": { "ignore": true }, + "git_merge_file_options_init": { + "ignore": true + }, "git_merge_init_options": { "ignore": true }, + "git_merge_options_init": { + "ignore": true + }, "git_merge_trees": { "args": { "ancestor_tree": { @@ -2744,6 +2788,9 @@ "functions": { "git_proxy_init_options": { "ignore": true + }, + "git_proxy_options_init": { + "ignore": true } } }, @@ -2751,6 +2798,7 @@ "ignore": true }, "rebase": { + "hasConstructor": false, "selfFreeing": true, "functions": { "git_rebase_abort": { @@ -2857,6 +2905,9 @@ "return": { "ownedByThis": true } + }, + "git_rebase_options_init": { + "ignore": true } } }, @@ -3071,6 +3122,12 @@ } } }, + "git_remote_create_init_options": { + "ignore": true + }, + "git_remote_create_options_init": { + "ignore": true + }, "git_remote_create_with_opts": { "args": { "opts": { @@ -3250,6 +3307,7 @@ "selfFreeing": true }, "repository": { + "hasConstructor": false, "selfFreeing": true, "isSingleton": true, "dependencies": [ @@ -3313,6 +3371,9 @@ "git_repository_init_init_options": { "ignore": true }, + "git_repository_init_options_init": { + "ignore": true + }, "git_repository_mergehead_foreach": { "isAsync": true, "return": { @@ -3416,6 +3477,9 @@ }, "git_revert_init_options": { "ignore": true + }, + "git_revert_options_init": { + "ignore": true } } }, @@ -3560,6 +3624,12 @@ "isErrorCode": true } }, + "git_stash_apply_init_options": { + "ignore": true + }, + "git_stash_apply_options_init": { + "ignore": true + }, "git_stash_drop": { "isAsync": true, "return": { @@ -3572,9 +3642,6 @@ "isErrorCode": true } }, - "git_stash_apply_init_options": { - "ignore": true - }, "git_stash_pop": { "isAsync": true, "return": { @@ -3634,6 +3701,9 @@ }, "git_status_init_options": { "ignore": true + }, + "git_status_options_init": { + "ignore": true } } }, @@ -3695,6 +3765,7 @@ "ignore": true }, "submodule": { + "hasConstructor": false, "selfFreeing": true, "ownerFn": { "name": "git_submodule_owner", @@ -3842,6 +3913,9 @@ }, "git_submodule_update_init_options": { "ignore": true + }, + "git_submodule_update_options_init": { + "ignore": true } } }, @@ -3877,8 +3951,7 @@ }, "isAsync": true }, - "git_tag_create_frombuffer": { - "jsFunctionName": "createFromBuffer", + "git_tag_create_from_buffer": { "args": { "oid": { "isReturn": true @@ -4243,6 +4316,9 @@ "git_worktree_add_init_options": { "ignore": true }, + "git_worktree_add_options_init": { + "ignore": true + }, "git_worktree_free": { "ignore": true }, @@ -4262,6 +4338,9 @@ }, "git_worktree_prune_init_options": { "ignore": true + }, + "git_worktree_prune_options_init": { + "ignore": true } }, "dependencies": [ diff --git a/generate/input/libgit2-supplement.json b/generate/input/libgit2-supplement.json index 5bd03f158..e6f5c4d05 100644 --- a/generate/input/libgit2-supplement.json +++ b/generate/input/libgit2-supplement.json @@ -433,7 +433,7 @@ } ], "return": { - "type": "const git_index_reuc_entry *" + "type": "void" }, "group": "index_reuc_entry" }, @@ -523,7 +523,7 @@ } ], "return": { - "type": "const git_index_reuc_entry *" + "type": "int" }, "group": "index_reuc_entry" }, @@ -868,6 +868,12 @@ "git_config_next" ] ], + [ + "diff", + [ + "git_diff_get_perfdata" + ] + ], [ "diff_stats", [ @@ -899,6 +905,14 @@ "git_filter_source_flags" ] ], + [ + "hashsig", + [ + "git_hashsig_compare", + "git_hashsig_create", + "git_hashsig_create_fromfile" + ] + ], [ "index_conflict_iterator", [ @@ -976,6 +990,12 @@ "git_patch_convenient_from_diff" ] ], + [ + "path", + [ + "git_path_is_gitfile" + ] + ], [ "pathspec_match_list", [ @@ -1005,10 +1025,14 @@ [ "repository", [ + "git_repository__cleanup", "git_repository_get_references", "git_repository_get_submodules", "git_repository_get_remotes", - "git_repository_refresh_references" + "git_repository_refresh_references", + "git_repository_set_index", + "git_repository_submodule_cache_all", + "git_repository_submodule_cache_clear" ] ], [ @@ -1283,6 +1307,13 @@ ] } ], + [ + "git_hashsig", + { + "type": "struct", + "fields": [] + } + ], [ "git_index_name_entry", { @@ -1400,11 +1431,11 @@ "name": "certificate_check" }, { - "type": "git_transfer_progress_cb", + "type": "git_indexer_progress_cb", "name": "transfer_progress" }, { - "type": "git_push_transfer_progress", + "type": "git_push_transfer_progress_cb", "name": "push_transfer_progress", "isCallback": true }, @@ -1420,6 +1451,10 @@ { "type": "void *", "name": "payload" + }, + { + "type": "git_url_resolve_cb", + "name": "resolve_url" } ], "used": { diff --git a/generate/scripts/helpers.js b/generate/scripts/helpers.js index f8e02f807..3a8daaaa2 100644 --- a/generate/scripts/helpers.js +++ b/generate/scripts/helpers.js @@ -69,12 +69,13 @@ var Helpers = { }, isConstructorFunction: function(cType, fnName) { - var initFnName = cType.split('_'); + var deprecatedInitFnName = cType.split("_"); + deprecatedInitFnName.splice(-1, 0, "init"); + deprecatedInitFnName = deprecatedInitFnName.join("_"); - initFnName.splice(-1, 0, "init"); - initFnName = initFnName.join('_'); + var initFnName = cType + "_init"; - return initFnName === fnName; + return initFnName === fnName || deprecatedInitFnName === fnName; }, hasConstructor: function(type, normalizedType) { From 148503fdaac5c95b0dd5483fd047c77b4127de11 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 25 Jun 2019 16:02:01 -0700 Subject: [PATCH 110/145] Update libgit2.gyp / binding.gyp with new libraries / code --- generate/input/descriptor.json | 20 ++- generate/templates/templates/binding.gyp | 11 ++ vendor/libgit2.gyp | 190 +++++++++++++++++++---- 3 files changed, 191 insertions(+), 30 deletions(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 0d34b7a3d..5306e16b2 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -1417,6 +1417,11 @@ } } }, + "fetch_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "filter": { "selfFreeing": false, "hasConstructor": true, @@ -1652,6 +1657,9 @@ "git_index_add_frombuffer": { "ignore": true }, + "git_index_add_from_buffer": { + "ignore": true + }, "git_index_checksum": { "return": { "ownedByThis": true @@ -2797,6 +2805,11 @@ "push": { "ignore": true }, + "push_options": { + "dependencies": [ + "../include/str_array_converter.h" + ] + }, "rebase": { "hasConstructor": false, "selfFreeing": true, @@ -2881,11 +2894,15 @@ } }, "git_rebase_next": { + "isAsync": true, "args": { "operation": { "isReturn": true, "ownedByThis": true } + }, + "return": { + "isErrorCode": true } }, "git_rebase_open": { @@ -4058,9 +4075,6 @@ }, "time": { "dupFunction": "git_time_dup", - "dependencies": [ - "git2/sys/time.h" - ], "functions": { "git_time_sign": { "ignore": true diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index 3d2d80a0d..cd1b763d5 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -94,6 +94,9 @@ ], [ "OS=='mac'", { + "libraries": [ + "-liconv", + ], "conditions": [ ["<(is_electron) == 1", { "include_dirs": [ @@ -153,8 +156,16 @@ ] } ], + ["OS=='mac' or OS=='linux' or OS.endswith('bsd') or <(is_IBMi) == 1", { + "libraries": [ + " Date: Tue, 25 Jun 2019 16:18:58 -0700 Subject: [PATCH 111/145] Openssl streams should always be included --- vendor/libgit2.gyp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index f21ba123c..87c459a09 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -178,6 +178,8 @@ "libgit2/src/oidmap.h", "libgit2/src/streams/mbedtls.c", "libgit2/src/streams/mbedtls.h", + "libgit2/src/streams/openssl.c", + "libgit2/src/streams/openssl.h", "libgit2/src/streams/registry.c", "libgit2/src/streams/registry.h", "libgit2/src/pack-objects.c", @@ -380,10 +382,6 @@ "GIT_OPENSSL", "GIT_USE_STAT_MTIM", "GIT_REGEX_PCRE" - ], - "sources": [ - "libgit2/src/streams/openssl.c", - "libgit2/src/streams/openssl.h" ] }], ["<(is_IBMi) == 1", { From 77d3d39e7317f8861f46d537101e45b9d77516ee Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 25 Jun 2019 16:53:47 -0700 Subject: [PATCH 112/145] futimens is not available before osx 10.13 --- vendor/libgit2.gyp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index 87c459a09..ca7d288a2 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -348,7 +348,6 @@ ], "include_dirs": ["libgit2/deps/ntlmclient"], "defines": [ - "GIT_USE_FUTIMENS", "GIT_NTLM", "GIT_GSSAPI" ], @@ -380,8 +379,9 @@ ], "defines": [ "GIT_OPENSSL", - "GIT_USE_STAT_MTIM", - "GIT_REGEX_PCRE" + "GIT_REGEX_PCRE", + "GIT_USE_FUTIMENS", + "GIT_USE_STAT_MTIM" ] }], ["<(is_IBMi) == 1", { From ba19611bbcd95fe6e570ddcb91e61ca0739ee222 Mon Sep 17 00:00:00 2001 From: Simone Fumagalli Date: Wed, 26 Jun 2019 11:38:33 +0200 Subject: [PATCH 113/145] Fixed typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4194aa64d..d7d1aa830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -91,7 +91,7 @@ - Fixed bug where repeated uses of extractSignature would fail because of the use of regex.prototype.match - Added support for building on IBM i (PASE) machines - Fixed bug where signingCb in rebases would not return error codes to LibGit2 if the signingCb threw or rejected -- Expoed AnnotatedCommit methods: +- Exposed AnnotatedCommit methods: - AnnotatedCommit.prototype.ref - Exposed Apply methods: - Apply.apply applies a diff to the repository From 6f665bc5439c2e853fb48dbaadaae577949b854a Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Wed, 26 Jun 2019 17:00:21 -0700 Subject: [PATCH 114/145] Update README.md with additional library dependencies --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ddd922d4c..c547e32e7 100644 --- a/README.md +++ b/README.md @@ -76,10 +76,17 @@ In Ubuntu: sudo apt-get install libssl-dev ``` -Additionally, you need `curl-config` on your system. You need one of these packages: - * libcurl4-gnutls-dev - * libcurl4-nss-dev - * libcurl4-openssl-dev +You will need the following libraries installed on your linux machine: + - libpcre + - libpcreposix + - libkrb5 + - libk5crypto + - libcom_err + +When building locally, you will also need development packages for kerberos and pcre, so both of these utilities must be present on your machine: + - pcre-config + - krb5-config + If you are still encountering problems while installing, you should try the [Building from source](http://www.nodegit.org/guides/install/from-source/) From a769e9accaac295ad5d5ea7a15147934fde0d5d8 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Wed, 26 Jun 2019 17:33:04 -0700 Subject: [PATCH 115/145] Bump to v0.25.0-alpha.13 --- CHANGELOG.md | 104 ++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 106 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7d1aa830..fe70b64ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,109 @@ # Change Log +## v0.25.0-alpha.13 [(2019-06-26)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.13) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.12...v0.25.0-alpha.13) + +#### Summary of changes +- Turn on GIT_USE_NSEC on all platforms +- Use Iconv on OSX for better internationalization support. +- Bump libgit2 to bring in: + - NTLM proxy support + - Negotiate/Kerberos proxy support + - Various git config fixes + - Various git ignore fixes + - Various libgit2 performance improvements + - Windows/Linux now use PCRE for regex, OSX uses regcomp_l, this should address collation issues in diffing +- Fixed bug with Repository.prototype.refreshReferences dying on corrupted reference. We now ignore corrupted references + +#### Merged PRs into NodeGit +- [refresh_references.cc: skip refs that can't be directly resolved #1689](https://github.com/nodegit/nodegit/pull/1689) +- [Bump libgit2 to fork of latest master #1690](https://github.com/nodegit/nodegit/pull/1690) + +#### Merged PRs into LibGit2 +- [errors: use lowercase](https://github.com/libgit2/libgit2/pull/5137) +- [largefile tests: only write 2GB on 32-bit platforms](https://github.com/libgit2/libgit2/pull/5136) +- [Fix broken link in README](https://github.com/libgit2/libgit2/pull/5129) +- [net: remove unused `git_headlist_cb`](https://github.com/libgit2/libgit2/pull/5122) +- [cmake: default NTLM client to off if no HTTPS support](https://github.com/libgit2/libgit2/pull/5124) +- [attr: rename constants and macros for consistency](https://github.com/libgit2/libgit2/pull/5119) +- [Change API instances of `fromnoun` to `from_noun` (with an underscore)](https://github.com/libgit2/libgit2/pull/5117) +- [object: rename git_object__size to git_object_size](https://github.com/libgit2/libgit2/pull/5118) +- [Replace fnmatch with wildmatch](https://github.com/libgit2/libgit2/pull/5110) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/5111) +- [Removal of `p_fallocate`](https://github.com/libgit2/libgit2/pull/5114) +- [Modularize our TLS & hash detection](https://github.com/libgit2/libgit2/pull/5055) +- [tests: merge::analysis: use test variants to avoid duplicated test suites](https://github.com/libgit2/libgit2/pull/5109) +- [Rename options initialization functions](https://github.com/libgit2/libgit2/pull/5101) +- [deps: ntlmclient: disable implicit fallthrough warnings](https://github.com/libgit2/libgit2/pull/5112) +- [gitignore with escapes](https://github.com/libgit2/libgit2/pull/5097) +- [Handle URLs with a colon after host but no port](https://github.com/libgit2/libgit2/pull/5108) +- [Merge analysis support for bare repos](https://github.com/libgit2/libgit2/pull/5022) +- [Add memleak check docs](https://github.com/libgit2/libgit2/pull/5104) +- [Data-driven tests](https://github.com/libgit2/libgit2/pull/5098) +- [sha1dc: update to fix endianess issues on AIX/HP-UX](https://github.com/libgit2/libgit2/pull/5107) +- [Add NTLM support for HTTP(s) servers and proxies](https://github.com/libgit2/libgit2/pull/5052) +- [Callback type names should be suffixed with `_cb`](https://github.com/libgit2/libgit2/pull/5102) +- [tests: checkout: fix symlink.git being created outside of sandbox](https://github.com/libgit2/libgit2/pull/5099) +- [ignore: handle escaped trailing whitespace](https://github.com/libgit2/libgit2/pull/5095) +- [Ignore: only treat one leading slash as a root identifier](https://github.com/libgit2/libgit2/pull/5074) +- [online tests: use gitlab for auth failures](https://github.com/libgit2/libgit2/pull/5094) +- [Ignore files: don't ignore whitespace](https://github.com/libgit2/libgit2/pull/5076) +- [cache: fix cache eviction using deallocated key](https://github.com/libgit2/libgit2/pull/5088) +- [SECURITY.md: split out security-relevant bits from readme](https://github.com/libgit2/libgit2/pull/5085) +- [Restore NetBSD support](https://github.com/libgit2/libgit2/pull/5086) +- [repository: fix garbage return value](https://github.com/libgit2/libgit2/pull/5084) +- [cmake: disable fallthrough warnings for PCRE](https://github.com/libgit2/libgit2/pull/5083) +- [Configuration parsing: validate section headers with quotes](https://github.com/libgit2/libgit2/pull/5073) +- [Loosen restriction on wildcard "*" refspecs](https://github.com/libgit2/libgit2/pull/5060) +- [Use PCRE for our fallback regex engine when regcomp_l is unavailable](https://github.com/libgit2/libgit2/pull/4935) +- [Remote URL last-chance resolution](https://github.com/libgit2/libgit2/pull/5062) +- [Skip UTF8 BOM in ignore files](https://github.com/libgit2/libgit2/pull/5075) +- [We've already added `ZLIB_LIBRARIES` to `LIBGIT2_LIBS` so don't also add the `z` library](https://github.com/libgit2/libgit2/pull/5080) +- [Define SYMBOLIC_LINK_FLAG_DIRECTORY if required](https://github.com/libgit2/libgit2/pull/5077) +- [Support symlinks for directories in win32](https://github.com/libgit2/libgit2/pull/5065) +- [rebase: orig_head and onto accessors](https://github.com/libgit2/libgit2/pull/5057) +- [cmake: correctly detect if system provides `regcomp`](https://github.com/libgit2/libgit2/pull/5063) +- [Correctly write to missing locked global config](https://github.com/libgit2/libgit2/pull/5023) +- [[RFC] util: introduce GIT_DOWNCAST macro](https://github.com/libgit2/libgit2/pull/4561) +- [examples: implement SSH authentication](https://github.com/libgit2/libgit2/pull/5051) +- [git_repository_init: stop traversing at windows root](https://github.com/libgit2/libgit2/pull/5050) +- [config_file: check result of git_array_alloc](https://github.com/libgit2/libgit2/pull/5053) +- [patch_parse.c: Handle CRLF in parse_header_start](https://github.com/libgit2/libgit2/pull/5027) +- [fix typo](https://github.com/libgit2/libgit2/pull/5045) +- [sha1: don't inline `git_hash_global_init` for win32](https://github.com/libgit2/libgit2/pull/5039) +- [ignore: treat paths with trailing "/" as directories](https://github.com/libgit2/libgit2/pull/5040) +- [Test that largefiles can be read through the tree API](https://github.com/libgit2/libgit2/pull/4874) +- [Tests for symlinked user config](https://github.com/libgit2/libgit2/pull/5034) +- [patch_parse: fix parsing addition/deletion of file with space](https://github.com/libgit2/libgit2/pull/5035) +- [Optimize string comparisons](https://github.com/libgit2/libgit2/pull/5018) +- [Negation of subdir ignore causes other subdirs to be unignored](https://github.com/libgit2/libgit2/pull/5020) +- [xdiff: fix typo](https://github.com/libgit2/libgit2/pull/5024) +- [docs: clarify relation of safe and forced checkout strategy](https://github.com/libgit2/libgit2/pull/5032) +- [Each hash implementation should define `git_hash_global_init`](https://github.com/libgit2/libgit2/pull/5026) +- [[Doc] Update URL to git2-rs](https://github.com/libgit2/libgit2/pull/5012) +- [remote: Rename git_remote_completion_type to _t](https://github.com/libgit2/libgit2/pull/5008) +- [odb: provide a free function for custom backends](https://github.com/libgit2/libgit2/pull/5005) +- [Have git_branch_lookup accept GIT_BRANCH_ALL](https://github.com/libgit2/libgit2/pull/5000) +- [Rename git_transfer_progress to git_indexer_progress](https://github.com/libgit2/libgit2/pull/4997) +- [High-level map APIs](https://github.com/libgit2/libgit2/pull/4901) +- [refdb_fs: fix loose/packed refs lookup racing with repacks](https://github.com/libgit2/libgit2/pull/4984) +- [Allocator restructuring](https://github.com/libgit2/libgit2/pull/4998) +- [cache: fix misnaming of `git_cache_free`](https://github.com/libgit2/libgit2/pull/4992) +- [examples: produce single cgit2 binary](https://github.com/libgit2/libgit2/pull/4956) +- [Remove public 'inttypes.h' header](https://github.com/libgit2/libgit2/pull/4991) +- [Prevent reading out of bounds memory](https://github.com/libgit2/libgit2/pull/4996) +- [Fix a memory leak in odb_otype_fast()](https://github.com/libgit2/libgit2/pull/4987) +- [Make stdalloc__reallocarray call stdalloc__realloc](https://github.com/libgit2/libgit2/pull/4986) +- [Remove `git_time_monotonic`](https://github.com/libgit2/libgit2/pull/4990) +- [Fix a _very_ improbable memory leak in git_odb_new()](https://github.com/libgit2/libgit2/pull/4988) +- [ci: publish documentation on merge](https://github.com/libgit2/libgit2/pull/4989) +- [Enable creation of worktree from bare repo's default branch](https://github.com/libgit2/libgit2/pull/4982) +- [Allow bypassing check for '.keep' file](https://github.com/libgit2/libgit2/pull/4965) +- [Release v0.28.1](https://github.com/libgit2/libgit2/pull/4983) + + + ## v0.25.0-alpha.12 [(2019-06-03)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.12) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.11...v0.25.0-alpha.12) diff --git a/package-lock.json b/package-lock.json index 679a52b8d..b9bb5b4f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.12", + "version": "0.25.0-alpha.13", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1a237dba0..7850b1255 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.12", + "version": "0.25.0-alpha.13", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 3d4eed17a1f7c3c0487db00fd6c2cdc85ad8b228 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Fri, 28 Jun 2019 10:13:40 -0700 Subject: [PATCH 116/145] Use builtin regex library for linux for better portability CentOS 7 seems to segfault when built against its system PCRE library --- vendor/libgit2.gyp | 101 +++++++++++++++++++++++++++++---------------- 1 file changed, 65 insertions(+), 36 deletions(-) diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index ca7d288a2..e15ffc247 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -370,16 +370,18 @@ " Date: Fri, 28 Jun 2019 15:45:14 -0700 Subject: [PATCH 117/145] Remove pcre-config from binding.gyp --- generate/templates/templates/binding.gyp | 3 --- 1 file changed, 3 deletions(-) diff --git a/generate/templates/templates/binding.gyp b/generate/templates/templates/binding.gyp index cd1b763d5..1b23ed2fd 100644 --- a/generate/templates/templates/binding.gyp +++ b/generate/templates/templates/binding.gyp @@ -163,9 +163,6 @@ }], [ "OS=='linux' or OS.endswith('bsd') or <(is_IBMi) == 1", { - "libraries": [ - " Date: Fri, 28 Jun 2019 13:47:27 -0700 Subject: [PATCH 118/145] Bump to v0.25.0-alpha.14 --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe70b64ae..85c7163e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## v0.25.0-alpha.14 [(2019-07-01)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.14) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.13...v0.25.0-alpha.14) + +#### Summary of changes +- Always use builtin regex for linux for portability + +#### Merged PRs into NodeGit +- [Use builtin regex library for linux for better portability #1693](https://github.com/nodegit/nodegit/pull/1693) +- [Remove pcre-config from binding.gyp #1694](https://github.com/nodegit/nodegit/pull/1694) + ## v0.25.0-alpha.13 [(2019-06-26)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.13) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.12...v0.25.0-alpha.13) diff --git a/package-lock.json b/package-lock.json index b9bb5b4f4..04529b8d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.13", + "version": "0.25.0-alpha.14", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7850b1255..a2ab166b5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.13", + "version": "0.25.0-alpha.14", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From c7d9e100516d00ec91ba99d5285d1b0fc9a70444 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 09:23:44 +0100 Subject: [PATCH 119/145] :arrow_up: Make templates compatible with Node 12 --- generate/templates/manual/clone/clone.cc | 24 ++++++------- .../manual/commit/extract_signature.cc | 14 ++++---- generate/templates/manual/filter_list/load.cc | 36 +++++++++---------- .../templates/manual/filter_source/repo.cc | 6 ++-- .../manual/patches/convenient_patches.cc | 8 ++--- generate/templates/manual/remote/ls.cc | 2 +- .../manual/repository/get_references.cc | 4 +-- .../manual/repository/get_remotes.cc | 4 +-- .../manual/repository/get_submodules.cc | 4 +-- .../manual/repository/refresh_references.cc | 12 +++---- .../templates/manual/revwalk/commit_walk.cc | 4 +-- .../templates/manual/revwalk/fast_walk.cc | 12 +++---- .../manual/revwalk/file_history_walk.cc | 12 +++---- .../templates/manual/src/filter_registry.cc | 24 ++++++------- .../templates/manual/src/git_buf_converter.cc | 2 +- .../templates/manual/src/nodegit_wrapper.cc | 2 +- .../manual/src/promise_completion.cc | 14 ++++---- .../manual/src/str_array_converter.cc | 2 +- generate/templates/partials/async_function.cc | 14 ++++---- .../templates/partials/callback_helpers.cc | 4 +-- .../templates/partials/convert_from_v8.cc | 14 ++++---- generate/templates/partials/convert_to_v8.cc | 8 ++--- .../templates/partials/field_accessors.cc | 10 +++--- generate/templates/partials/sync_function.cc | 2 +- .../templates/templates/struct_content.cc | 4 +-- 25 files changed, 121 insertions(+), 121 deletions(-) diff --git a/generate/templates/manual/clone/clone.cc b/generate/templates/manual/clone/clone.cc index 144be221d..2cab928bf 100644 --- a/generate/templates/manual/clone/clone.cc +++ b/generate/templates/manual/clone/clone.cc @@ -33,7 +33,7 @@ NAN_METHOD(GitClone::Clone) { // start convert_from_v8 block const char *from_url = NULL; - String::Utf8Value url(info[0]->ToString()); + Nan::Utf8String url(Nan::To(info[0]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character // C-strings expect: from_url = (const char *)malloc(url.length() + 1); @@ -50,7 +50,7 @@ NAN_METHOD(GitClone::Clone) { // start convert_from_v8 block const char *from_local_path = NULL; - String::Utf8Value local_path(info[1]->ToString()); + Nan::Utf8String local_path(Nan::To(info[1]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character // C-strings expect: from_local_path = (const char *)malloc(local_path.length() + 1); @@ -67,7 +67,7 @@ NAN_METHOD(GitClone::Clone) { // start convert_from_v8 block const git_clone_options *from_options = NULL; if (info[2]->IsObject()) { - from_options = Nan::ObjectWrap::Unwrap(info[2]->ToObject()) + from_options = Nan::ObjectWrap::Unwrap(Nan::To(info[2]).ToLocalChecked()) ->GetValue(); } else { from_options = 0; @@ -80,11 +80,11 @@ NAN_METHOD(GitClone::Clone) { CloneWorker *worker = new CloneWorker(baton, callback); if (!info[0]->IsUndefined() && !info[0]->IsNull()) - worker->SaveToPersistent("url", info[0]->ToObject()); + worker->SaveToPersistent("url", Nan::To(info[0]).ToLocalChecked()); if (!info[1]->IsUndefined() && !info[1]->IsNull()) - worker->SaveToPersistent("local_path", info[1]->ToObject()); + worker->SaveToPersistent("local_path", Nan::To(info[1]).ToLocalChecked()); if (!info[2]->IsUndefined() && !info[2]->IsNull()) - worker->SaveToPersistent("options", info[2]->ToObject()); + worker->SaveToPersistent("options", Nan::To(info[2]).ToLocalChecked()); AsyncLibgit2QueueWorker(worker); return; @@ -140,9 +140,9 @@ void GitClone::CloneWorker::HandleOKCallback() { if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method clone has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method clone has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), @@ -168,13 +168,13 @@ void GitClone::CloneWorker::HandleOKCallback() { continue; } - v8::Local nodeObj = node->ToObject(); + v8::Local nodeObj = Nan::To(node).ToLocalChecked(); v8::Local checkValue = GetPrivate( nodeObj, Nan::New("NodeGitPromiseError").ToLocalChecked()); if (!checkValue.IsEmpty() && !checkValue->IsNull() && !checkValue->IsUndefined()) { - v8::Local argv[1] = {checkValue->ToObject()}; + v8::Local argv[1] = {Nan::To(checkValue).ToLocalChecked()}; callback->Call(1, argv, async_resource); callbackFired = true; break; @@ -184,7 +184,7 @@ void GitClone::CloneWorker::HandleOKCallback() { for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = - properties->Get(propIndex)->ToString(); + Nan::To(properties->Get(propIndex)).ToLocalChecked(); v8::Local nodeToQueue = nodeObj->Get(propName); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); @@ -194,7 +194,7 @@ void GitClone::CloneWorker::HandleOKCallback() { if (!callbackFired) { v8::Local err = - Nan::Error("Method clone has thrown an error.")->ToObject(); + Nan::To(Nan::Error("Method clone has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), diff --git a/generate/templates/manual/commit/extract_signature.cc b/generate/templates/manual/commit/extract_signature.cc index c17749539..ebcb78fe0 100644 --- a/generate/templates/manual/commit/extract_signature.cc +++ b/generate/templates/manual/commit/extract_signature.cc @@ -28,11 +28,11 @@ NAN_METHOD(GitCommit::ExtractSignature) baton->error = NULL; baton->signature = GIT_BUF_INIT_CONST(NULL, 0); baton->signed_data = GIT_BUF_INIT_CONST(NULL, 0); - baton->repo = Nan::ObjectWrap::Unwrap(info[0]->ToObject())->GetValue(); + baton->repo = Nan::ObjectWrap::Unwrap(Nan::To(info[0]).ToLocalChecked())->GetValue(); // baton->commit_id if (info[1]->IsString()) { - String::Utf8Value oidString(info[1]->ToString()); + Nan::Utf8String oidString(Nan::To(info[1]).ToLocalChecked()); baton->commit_id = (git_oid *)malloc(sizeof(git_oid)); if (git_oid_fromstr(baton->commit_id, (const char *)strdup(*oidString)) != GIT_OK) { free(baton->commit_id); @@ -44,12 +44,12 @@ NAN_METHOD(GitCommit::ExtractSignature) } } } else { - baton->commit_id = Nan::ObjectWrap::Unwrap(info[1]->ToObject())->GetValue(); + baton->commit_id = Nan::ObjectWrap::Unwrap(Nan::To(info[1]).ToLocalChecked())->GetValue(); } // baton->field if (info[2]->IsString()) { - String::Utf8Value field(info[2]->ToString()); + Nan::Utf8String field(Nan::To(info[2]).ToLocalChecked()); baton->field = (char *)malloc(field.length() + 1); memcpy((void *)baton->field, *field, field.length()); baton->field[field.length()] = 0; @@ -65,8 +65,8 @@ NAN_METHOD(GitCommit::ExtractSignature) } ExtractSignatureWorker *worker = new ExtractSignatureWorker(baton, callback); - worker->SaveToPersistent("repo", info[0]->ToObject()); - worker->SaveToPersistent("commit_id", info[1]->ToObject()); + worker->SaveToPersistent("repo", Nan::To(info[0]).ToLocalChecked()); + worker->SaveToPersistent("commit_id", Nan::To(info[1]).ToLocalChecked()); Nan::AsyncQueueWorker(worker); return; } @@ -132,7 +132,7 @@ void GitCommit::ExtractSignatureWorker::HandleOKCallback() } else if (baton->error_code < 0) { - Local err = Nan::Error("Extract Signature has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Extract Signature has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Commit.extractSignature").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/filter_list/load.cc b/generate/templates/manual/filter_list/load.cc index 6075fd59c..9a3e1ba25 100644 --- a/generate/templates/manual/filter_list/load.cc +++ b/generate/templates/manual/filter_list/load.cc @@ -47,14 +47,14 @@ NAN_METHOD(GitFilterList::Load) { // start convert_from_v8 block git_repository *from_repo = NULL; from_repo = - Nan::ObjectWrap::Unwrap(info[0]->ToObject())->GetValue(); + Nan::ObjectWrap::Unwrap(Nan::To(info[0]).ToLocalChecked())->GetValue(); // end convert_from_v8 block baton->repo = from_repo; // start convert_from_v8 block git_blob *from_blob = NULL; if (info[1]->IsObject()) { from_blob = - Nan::ObjectWrap::Unwrap(info[1]->ToObject())->GetValue(); + Nan::ObjectWrap::Unwrap(Nan::To(info[1]).ToLocalChecked())->GetValue(); } else { from_blob = 0; } @@ -63,7 +63,7 @@ NAN_METHOD(GitFilterList::Load) { // start convert_from_v8 block const char *from_path = NULL; - String::Utf8Value path(info[2]->ToString()); + Nan::Utf8String path(Nan::To(info[2]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character // C-strings expect: from_path = (const char *)malloc(path.length() + 1); @@ -93,15 +93,15 @@ NAN_METHOD(GitFilterList::Load) { LoadWorker *worker = new LoadWorker(baton, callback); if (!info[0]->IsUndefined() && !info[0]->IsNull()) - worker->SaveToPersistent("repo", info[0]->ToObject()); + worker->SaveToPersistent("repo", Nan::To(info[0]).ToLocalChecked()); if (!info[1]->IsUndefined() && !info[1]->IsNull()) - worker->SaveToPersistent("blob", info[1]->ToObject()); + worker->SaveToPersistent("blob", Nan::To(info[1]).ToLocalChecked()); if (!info[2]->IsUndefined() && !info[2]->IsNull()) - worker->SaveToPersistent("path", info[2]->ToObject()); + worker->SaveToPersistent("path", Nan::To(info[2]).ToLocalChecked()); if (!info[3]->IsUndefined() && !info[3]->IsNull()) - worker->SaveToPersistent("mode", info[3]->ToObject()); + worker->SaveToPersistent("mode", Nan::To(info[3]).ToLocalChecked()); if (!info[4]->IsUndefined() && !info[4]->IsNull()) - worker->SaveToPersistent("flags", info[4]->ToObject()); + worker->SaveToPersistent("flags", Nan::To(info[4]).ToLocalChecked()); AsyncLibgit2QueueWorker(worker); return; @@ -139,12 +139,12 @@ void GitFilterList::LoadWorker::HandleOKCallback() { Nan::Set( owners, Nan::New(0), - this->GetFromPersistent("repo")->ToObject() + Nan::To(this->GetFromPersistent("repo")).ToLocalChecked() ); for (uint32_t index = 0; index < propertyNames->Length(); ++index) { - v8::Local propertyName = propertyNames->Get(index)->ToString(); - String::Utf8Value propertyNameAsUtf8Value(propertyName); + v8::Local propertyName = Nan::To(propertyNames->Get(index)).ToLocalChecked(); + Nan::Utf8String propertyNameAsUtf8Value(propertyName); const char *propertyNameAsCString = *propertyNameAsUtf8Value; bool isNotMethodOnRegistry = strcmp("register", propertyNameAsCString) @@ -158,7 +158,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { } } - to = GitFilterList::New(baton->filters, true, owners->ToObject()); + to = GitFilterList::New(baton->filters, true, Nan::To(owners).ToLocalChecked()); } else { to = Nan::Null(); } @@ -172,9 +172,9 @@ void GitFilterList::LoadWorker::HandleOKCallback() { if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method load has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method load has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), @@ -202,13 +202,13 @@ void GitFilterList::LoadWorker::HandleOKCallback() { continue; } - v8::Local nodeObj = node->ToObject(); + v8::Local nodeObj = Nan::To(node).ToLocalChecked(); v8::Local checkValue = GetPrivate( nodeObj, Nan::New("NodeGitPromiseError").ToLocalChecked()); if (!checkValue.IsEmpty() && !checkValue->IsNull() && !checkValue->IsUndefined()) { - v8::Local argv[1] = {checkValue->ToObject()}; + v8::Local argv[1] = {Nan::To(checkValue).ToLocalChecked()}; callback->Call(1, argv, async_resource); callbackFired = true; break; @@ -218,7 +218,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = - properties->Get(propIndex)->ToString(); + Nan::To(properties->Get(propIndex)).ToLocalChecked(); v8::Local nodeToQueue = nodeObj->Get(propName); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); @@ -228,7 +228,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { if (!callbackFired) { v8::Local err = - Nan::Error("Method load has thrown an error.")->ToObject(); + Nan::To(Nan::Error("Method load has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), diff --git a/generate/templates/manual/filter_source/repo.cc b/generate/templates/manual/filter_source/repo.cc index cf9c1a833..f35fb33a4 100644 --- a/generate/templates/manual/filter_source/repo.cc +++ b/generate/templates/manual/filter_source/repo.cc @@ -60,9 +60,9 @@ void GitFilterSource::RepoWorker::HandleOKCallback() { if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method repo has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method repo has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), @@ -74,7 +74,7 @@ void GitFilterSource::RepoWorker::HandleOKCallback() { free((void *)baton->error); } else if (baton->error_code < 0) { v8::Local err = - Nan::Error("Method repo has thrown an error.")->ToObject(); + Nan::To(Nan::Error("Method repo has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), diff --git a/generate/templates/manual/patches/convenient_patches.cc b/generate/templates/manual/patches/convenient_patches.cc index cc108a8ae..ef9322a43 100644 --- a/generate/templates/manual/patches/convenient_patches.cc +++ b/generate/templates/manual/patches/convenient_patches.cc @@ -12,7 +12,7 @@ NAN_METHOD(GitPatch::ConvenientFromDiff) { baton->error_code = GIT_OK; baton->error = NULL; - baton->diff = Nan::ObjectWrap::Unwrap(info[0]->ToObject())->GetValue(); + baton->diff = Nan::ObjectWrap::Unwrap(Nan::To(info[0]).ToLocalChecked())->GetValue(); baton->out = new std::vector; baton->out->reserve(git_diff_num_deltas(baton->diff)); @@ -97,9 +97,9 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { if (baton->error) { Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method convenientFromDiff has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method convenientFromDiff has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); @@ -118,7 +118,7 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { } if (baton->error_code < 0) { - Local err = Nan::Error("method convenientFromDiff has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("method convenientFromDiff has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/remote/ls.cc b/generate/templates/manual/remote/ls.cc index f81728256..9fccf4af3 100644 --- a/generate/templates/manual/remote/ls.cc +++ b/generate/templates/manual/remote/ls.cc @@ -85,7 +85,7 @@ void GitRemote::ReferenceListWorker::HandleOKCallback() } else if (baton->error_code < 0) { - Local err = Nan::Error("Reference List has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Reference List has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Remote.referenceList").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/repository/get_references.cc b/generate/templates/manual/repository/get_references.cc index d0e4fd987..910352b52 100644 --- a/generate/templates/manual/repository/get_references.cc +++ b/generate/templates/manual/repository/get_references.cc @@ -90,7 +90,7 @@ void GitRepository::GetReferencesWorker::HandleOKCallback() GitRefs::New( reference, true, - GitRepository::New(git_reference_owner(reference), true)->ToObject() + Nan::To(GitRepository::New(git_reference_owner(reference), true)).ToLocalChecked() ) ); } @@ -118,7 +118,7 @@ void GitRepository::GetReferencesWorker::HandleOKCallback() } else if (baton->error_code < 0) { - Local err = Nan::Error("Repository getReferences has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Repository getReferences has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getReferences").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/repository/get_remotes.cc b/generate/templates/manual/repository/get_remotes.cc index e16f1131c..457ea3ebe 100644 --- a/generate/templates/manual/repository/get_remotes.cc +++ b/generate/templates/manual/repository/get_remotes.cc @@ -91,7 +91,7 @@ void GitRepository::GetRemotesWorker::HandleOKCallback() GitRemote::New( remote, true, - GitRepository::New(git_remote_owner(remote), true)->ToObject() + Nan::To(GitRepository::New(git_remote_owner(remote), true)).ToLocalChecked() ) ); } @@ -119,7 +119,7 @@ void GitRepository::GetRemotesWorker::HandleOKCallback() } else if (baton->error_code < 0) { - Local err = Nan::Error("Repository refreshRemotes has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Repository refreshRemotes has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshRemotes").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/repository/get_submodules.cc b/generate/templates/manual/repository/get_submodules.cc index d51d0a0fd..0d73424b1 100644 --- a/generate/templates/manual/repository/get_submodules.cc +++ b/generate/templates/manual/repository/get_submodules.cc @@ -72,7 +72,7 @@ void GitRepository::GetSubmodulesWorker::HandleOKCallback() GitSubmodule::New( submodule, true, - GitRepository::New(git_submodule_owner(submodule), true)->ToObject() + Nan::To(GitRepository::New(git_submodule_owner(submodule), true)).ToLocalChecked() ) ); } @@ -100,7 +100,7 @@ void GitRepository::GetSubmodulesWorker::HandleOKCallback() } else if (baton->error_code < 0) { - Local err = Nan::Error("Repository getSubmodules has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Repository getSubmodules has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getSubmodules").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index 65548812c..8db164fb5 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -206,7 +206,7 @@ class RefreshedRefModel { // the destructor didn't double free, but that still segfaulted internally in Node. v8::Local buffer = Nan::CopyBuffer(tagOdbBuffer, tagOdbBufferLength).ToLocalChecked(); v8::Local toStringProp = Nan::Get(buffer, Nan::New("toString").ToLocalChecked()).ToLocalChecked(); - v8::Local jsTagOdbObjectString = Nan::CallAsFunction(toStringProp->ToObject(), buffer, 0, NULL).ToLocalChecked()->ToObject(); + v8::Local jsTagOdbObjectString = Nan::To(Nan::CallAsFunction(Nan::To(toStringProp).ToLocalChecked(), buffer, 0, NULL).ToLocalChecked()).ToLocalChecked(); v8::Local _signatureRegexesBySignatureType = Nan::New(signatureRegexesBySignatureType); v8::Local signatureRegexes = v8::Local::Cast(Nan::Get(_signatureRegexesBySignatureType, signatureType).ToLocalChecked()); @@ -217,9 +217,9 @@ class RefreshedRefModel { }; v8::Local matchProp = Nan::Get(jsTagOdbObjectString, Nan::New("match").ToLocalChecked()).ToLocalChecked(); - v8::Local match = Nan::CallAsFunction(matchProp->ToObject(), jsTagOdbObjectString, 1, argv).ToLocalChecked(); + v8::Local match = Nan::CallAsFunction(Nan::To(matchProp).ToLocalChecked(), jsTagOdbObjectString, 1, argv).ToLocalChecked(); if (match->IsArray()) { - jsTagSignature = Nan::Get(match->ToObject(), 0).ToLocalChecked(); + jsTagSignature = Nan::Get(Nan::To(match).ToLocalChecked(), 0).ToLocalChecked(); break; } } @@ -379,7 +379,7 @@ NAN_METHOD(GitRepository::RefreshReferences) return Nan::ThrowError("Signature type must be \"gpgsig\" or \"x509\"."); } - v8::Local signatureTypeParam = info[0]->ToString(); + v8::Local signatureTypeParam = Nan::To(info[0]).ToLocalChecked(); if ( Nan::Equals(signatureTypeParam, Nan::New("gpgsig").ToLocalChecked()) != Nan::Just(true) && Nan::Equals(signatureTypeParam, Nan::New("x509").ToLocalChecked()) != Nan::Just(true) @@ -611,7 +611,7 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() Nan::New(refreshData->headRefFullName).ToLocalChecked() ); - v8::Local signatureType = GetFromPersistent("signatureType")->ToString(); + v8::Local signatureType = Nan::To(GetFromPersistent("signatureType")).ToLocalChecked(); unsigned int numRefs = refreshData->refs.size(); v8::Local refs = Nan::New(numRefs); @@ -672,7 +672,7 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() } else if (baton->error_code < 0) { - Local err = Nan::Error("Repository refreshReferences has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Repository refreshReferences has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshReferences").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/revwalk/commit_walk.cc b/generate/templates/manual/revwalk/commit_walk.cc index af0ff112a..1c7bed6fc 100644 --- a/generate/templates/manual/revwalk/commit_walk.cc +++ b/generate/templates/manual/revwalk/commit_walk.cc @@ -87,7 +87,7 @@ void GitRevwalk::CommitWalkWorker::HandleOKCallback() { GitCommit::New( commit, true, - GitRepository::New(git_commit_owner(commit), true)->ToObject() + Nan::To(GitRepository::New(git_commit_owner(commit), true)).ToLocalChecked() ) ); } @@ -110,7 +110,7 @@ void GitRevwalk::CommitWalkWorker::HandleOKCallback() { free((void *)baton->error); } else if (baton->error_code < 0) { - Local err = Nan::Error("Revwalk commitWalk has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Revwalk commitWalk has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.commitWalk").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/revwalk/fast_walk.cc b/generate/templates/manual/revwalk/fast_walk.cc index fbf5c09b5..619f8c6c8 100644 --- a/generate/templates/manual/revwalk/fast_walk.cc +++ b/generate/templates/manual/revwalk/fast_walk.cc @@ -90,9 +90,9 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() { Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method fastWalk has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method fastWalk has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); @@ -131,13 +131,13 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() continue; } - Local nodeObj = node->ToObject(); + Local nodeObj = Nan::To(node).ToLocalChecked(); Local checkValue = GetPrivate(nodeObj, Nan::New("NodeGitPromiseError").ToLocalChecked()); if (!checkValue.IsEmpty() && !checkValue->IsNull() && !checkValue->IsUndefined()) { Local argv[1] = { - checkValue->ToObject() + Nan::To(checkValue).ToLocalChecked() }; callback->Call(1, argv, async_resource); callbackFired = true; @@ -147,7 +147,7 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() Local properties = nodeObj->GetPropertyNames(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { - Local propName = properties->Get(propIndex)->ToString(); + Local propName = Nan::To(properties->Get(propIndex)).ToLocalChecked(); Local nodeToQueue = nodeObj->Get(propName); if (!nodeToQueue->IsUndefined()) { @@ -158,7 +158,7 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() if (!callbackFired) { - Local err = Nan::Error("Method next has thrown an error.")->ToObject(); + Local err = Nan::To(Nan::Error("Method next has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); Local argv[1] = { diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index 49c23445e..f7cec692a 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -34,10 +34,10 @@ class FileHistoryEvent { Nan::Set( owners, Nan::New(owners->Length()), - GitRepository::New( + Nan::To(GitRepository::New( git_commit_owner(commit), true - )->ToObject() + )).ToLocalChecked() ); Nan::Set(historyEntry, Nan::New("commit").ToLocalChecked(), GitCommit::New(commit, true, owners)); commit = NULL; @@ -196,7 +196,7 @@ NAN_METHOD(GitRevwalk::FileHistoryWalk) baton->error_code = GIT_OK; baton->error = NULL; - String::Utf8Value from_js_file_path(info[0]->ToString()); + Nan::Utf8String from_js_file_path(Nan::To(info[0]).ToLocalChecked()); baton->file_path = strdup(*from_js_file_path); baton->max_count = Nan::To(info[1]).FromJust(); baton->out = new std::vector; @@ -444,9 +444,9 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method fileHistoryWalk has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method fileHistoryWalk has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); @@ -464,7 +464,7 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() } if (baton->error_code < 0) { - v8::Local err = Nan::Error("Method next has thrown an error.")->ToObject(); + v8::Local err = Nan::To(Nan::Error("Method next has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); v8::Local argv[1] = { diff --git a/generate/templates/manual/src/filter_registry.cc b/generate/templates/manual/src/filter_registry.cc index 410255289..62de8f80a 100644 --- a/generate/templates/manual/src/filter_registry.cc +++ b/generate/templates/manual/src/filter_registry.cc @@ -54,8 +54,8 @@ NAN_METHOD(GitFilterRegistry::GitFilterRegister) { FilterRegisterBaton *baton = new FilterRegisterBaton; - baton->filter = Nan::ObjectWrap::Unwrap(info[1]->ToObject())->GetValue(); - String::Utf8Value name(info[0]->ToString()); + baton->filter = Nan::ObjectWrap::Unwrap(Nan::To(info[1]).ToLocalChecked())->GetValue(); + Nan::Utf8String name(Nan::To(info[0]).ToLocalChecked()); baton->filter_name = (char *)malloc(name.length() + 1); memcpy((void *)baton->filter_name, *name, name.length()); @@ -64,13 +64,13 @@ NAN_METHOD(GitFilterRegistry::GitFilterRegister) { baton->error_code = GIT_OK; baton->filter_priority = Nan::To(info[2]).FromJust(); - Nan::New(GitFilterRegistry::persistentHandle)->Set(info[0]->ToString(), info[1]->ToObject()); + Nan::New(GitFilterRegistry::persistentHandle)->Set(Nan::To(Nan::To(info[0]).ToLocalChecked(), info[1]).ToLocalChecked()); Nan::Callback *callback = new Nan::Callback(Local::Cast(info[3])); RegisterWorker *worker = new RegisterWorker(baton, callback); - worker->SaveToPersistent("filter_name", info[0]->ToObject()); - worker->SaveToPersistent("filter_priority", info[2]->ToObject()); + worker->SaveToPersistent("filter_name", Nan::To(info[0]).ToLocalChecked()); + worker->SaveToPersistent("filter_priority", Nan::To(info[2]).ToLocalChecked()); AsyncLibgit2QueueWorker(worker); return; @@ -102,9 +102,9 @@ void GitFilterRegistry::RegisterWorker::HandleOKCallback() { else if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method register has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); @@ -117,7 +117,7 @@ void GitFilterRegistry::RegisterWorker::HandleOKCallback() { free((void *)baton->error); } else if (baton->error_code < 0) { - v8::Local err = Nan::Error("Method register has thrown an error.")->ToObject(); + v8::Local err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); v8::Local argv[1] = { @@ -144,7 +144,7 @@ NAN_METHOD(GitFilterRegistry::GitFilterUnregister) { } FilterUnregisterBaton *baton = new FilterUnregisterBaton; - String::Utf8Value name(info[0]->ToString()); + Nan::Utf8String name(Nan::To(info[0]).ToLocalChecked()); baton->filter_name = (char *)malloc(name.length() + 1); memcpy((void *)baton->filter_name, *name, name.length()); @@ -188,9 +188,9 @@ void GitFilterRegistry::UnregisterWorker::HandleOKCallback() { else if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method register has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); @@ -203,7 +203,7 @@ void GitFilterRegistry::UnregisterWorker::HandleOKCallback() { free((void *)baton->error); } else if (baton->error_code < 0) { - v8::Local err = Nan::Error("Method unregister has thrown an error.")->ToObject(); + v8::Local err = Nan::To(Nan::Error("Method unregister has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); v8::Local argv[1] = { diff --git a/generate/templates/manual/src/git_buf_converter.cc b/generate/templates/manual/src/git_buf_converter.cc index 0c1969504..1413168af 100644 --- a/generate/templates/manual/src/git_buf_converter.cc +++ b/generate/templates/manual/src/git_buf_converter.cc @@ -10,7 +10,7 @@ using namespace node; git_buf *GitBufConverter::Convert(Local val) { if (val->IsString() || val->IsStringObject()) { - v8::String::Utf8Value param1(val->ToString()); + v8::String::Utf8Value param1(Nan::To(val).ToLocalChecked()); std::string v8String = std::string(*param1); const size_t size = sizeof(git_buf); diff --git a/generate/templates/manual/src/nodegit_wrapper.cc b/generate/templates/manual/src/nodegit_wrapper.cc index 26ead60da..e9fb8ebdb 100644 --- a/generate/templates/manual/src/nodegit_wrapper.cc +++ b/generate/templates/manual/src/nodegit_wrapper.cc @@ -67,7 +67,7 @@ NAN_METHOD(NodeGitWrapper::JSNewFunction) { instance = new cppClass(static_cast( Local::Cast(info[0])->Value()), Nan::To(info[1]).FromJust(), - info.Length() >= 3 && !info[2].IsEmpty() && info[2]->IsObject() ? info[2]->ToObject() : Local() + info.Length() >= 3 && !Nan::To(info[2].IsEmpty() && info[2]->IsObject() ? info[2]).ToLocalChecked() : Local() ); } diff --git a/generate/templates/manual/src/promise_completion.cc b/generate/templates/manual/src/promise_completion.cc index fd34dfa77..88bde47da 100644 --- a/generate/templates/manual/src/promise_completion.cc +++ b/generate/templates/manual/src/promise_completion.cc @@ -9,10 +9,10 @@ Nan::Persistent PromiseCompletion::promiseRejected; void PromiseCompletion::InitializeComponent() { v8::Local newTemplate = Nan::New(New); newTemplate->InstanceTemplate()->SetInternalFieldCount(1); - newFn.Reset(newTemplate->GetFunction()); + newFn.Reset(Nan::GetFunction(newTemplate).ToLocalChecked()); - promiseFulfilled.Reset(Nan::New(PromiseFulfilled)->GetFunction()); - promiseRejected.Reset(Nan::New(PromiseRejected)->GetFunction()); + promiseFulfilled.Reset(Nan::GetFunction(Nan::New(PromiseFulfilled)).ToLocalChecked()); + promiseRejected.Reset(Nan::GetFunction(Nan::New(PromiseRejected)).ToLocalChecked()); } bool PromiseCompletion::ForwardIfPromise(v8::Local result, AsyncBaton *baton, Callback callback) @@ -21,7 +21,7 @@ bool PromiseCompletion::ForwardIfPromise(v8::Local result, AsyncBaton // check if the result is a promise if (!result.IsEmpty() && result->IsObject()) { - Nan::MaybeLocal maybeThenProp = Nan::Get(result->ToObject(), Nan::New("then").ToLocalChecked()); + Nan::MaybeLocal maybeThenProp = Nan::Get(Nan::To(result).ToLocalChecked(), Nan::New("then").ToLocalChecked()); if (!maybeThenProp.IsEmpty()) { v8::Local thenProp = maybeThenProp.ToLocalChecked(); if(thenProp->IsFunction()) { @@ -54,7 +54,7 @@ void PromiseCompletion::Setup(v8::Local thenFn, v8::Localcallback = callback; this->baton = baton; - v8::Local promise = result->ToObject(); + v8::Local promise = Nan::To(result).ToLocalChecked(); v8::Local thisHandle = handle(); @@ -78,7 +78,7 @@ v8::Local PromiseCompletion::Bind(Nan::Persistent &func v8::Local argv[1] = { object }; - return scope.Escape(bind->Call(Nan::New(function), 1, argv)); + return scope.Escape(Nan::Call(bind, Nan::To(Nan::New(function)).ToLocalChecked(), 1, argv)); } // calls the callback stored in the PromiseCompletion, passing the baton that @@ -90,7 +90,7 @@ void PromiseCompletion::CallCallback(bool isFulfilled, const Nan::FunctionCallba resultOfPromise = info[0]; } - PromiseCompletion *promiseCompletion = ObjectWrap::Unwrap(info.This()->ToObject()); + PromiseCompletion *promiseCompletion = ObjectWrap::Unwrap(Nan::To(info.This()).ToLocalChecked()); (*promiseCompletion->callback)(isFulfilled, promiseCompletion->baton, resultOfPromise); } diff --git a/generate/templates/manual/src/str_array_converter.cc b/generate/templates/manual/src/str_array_converter.cc index c66f901c3..ed0e93e2b 100644 --- a/generate/templates/manual/src/str_array_converter.cc +++ b/generate/templates/manual/src/str_array_converter.cc @@ -17,7 +17,7 @@ git_strarray *StrArrayConverter::Convert(Local val) { return ConvertArray(Array::Cast(*val)); } else if (val->IsString() || val->IsStringObject()) { - return ConvertString(val->ToString()); + return ConvertString(Nan::To(val).ToLocalChecked()); } else { return NULL; diff --git a/generate/templates/partials/async_function.cc b/generate/templates/partials/async_function.cc index 2fe854bec..ea7c43037 100644 --- a/generate/templates/partials/async_function.cc +++ b/generate/templates/partials/async_function.cc @@ -69,7 +69,7 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { worker->SaveToPersistent("{{ arg.name }}", info.This()); {%elsif not arg.isCallbackFunction %} if (!info[{{ arg.jsArg }}]->IsUndefined() && !info[{{ arg.jsArg }}]->IsNull()) - worker->SaveToPersistent("{{ arg.name }}", info[{{ arg.jsArg }}]->ToObject()); + worker->SaveToPersistent("{{ arg.name }}", Nan::To(info[{{ arg.jsArg }}]).ToLocalChecked()); {%endif%} {%endif%} {%endeach%} @@ -163,9 +163,9 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { if (baton->error) { v8::Local err; if (baton->error->message) { - err = Nan::Error(baton->error->message)->ToObject(); + err = Nan::To(Nan::Error(baton->error->message)).ToLocalChecked(); } else { - err = Nan::Error("Method {{ jsFunctionName }} has thrown an error.")->ToObject(); + err = Nan::To(Nan::Error("Method {{ jsFunctionName }} has thrown an error.")).ToLocalChecked(); } err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); @@ -205,12 +205,12 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { continue; } - v8::Local nodeObj = node->ToObject(); + v8::Local nodeObj = Nan::To(node).ToLocalChecked(); v8::Local checkValue = GetPrivate(nodeObj, Nan::New("NodeGitPromiseError").ToLocalChecked()); if (!checkValue.IsEmpty() && !checkValue->IsNull() && !checkValue->IsUndefined()) { v8::Local argv[1] = { - checkValue->ToObject() + Nan::To(checkValue).ToLocalChecked() }; callback->Call(1, argv, async_resource); callbackFired = true; @@ -219,7 +219,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { v8::Local properties = nodeObj->GetPropertyNames(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { - v8::Local propName = properties->Get(propIndex)->ToString(); + v8::Local propName = Nan::To(properties->Get(propIndex)).ToLocalChecked(); v8::Local nodeToQueue = nodeObj->Get(propName); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); @@ -228,7 +228,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { } if (!callbackFired) { - v8::Local err = Nan::Error("Method {{ jsFunctionName }} has thrown an error.")->ToObject(); + v8::Local err = Nan::To(Nan::Error("Method {{ jsFunctionName }} has thrown an error.")).ToLocalChecked(); err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); v8::Local argv[1] = { diff --git a/generate/templates/partials/callback_helpers.cc b/generate/templates/partials/callback_helpers.cc index 7a40aed25..c3810371c 100644 --- a/generate/templates/partials/callback_helpers.cc +++ b/generate/templates/partials/callback_helpers.cc @@ -66,7 +66,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_async(void } else if (!result->IsNull() && !result->IsUndefined()) { {% if _return.isOutParam %} - {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(result->ToObject()); + {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(Nan::To(result).ToLocalChecked()); wrapper->selfFreeing = false; *baton->{{ _return.name }} = wrapper->GetValue(); @@ -100,7 +100,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}_{{ cbFunction.name }}_promiseComp } else if (!result->IsNull() && !result->IsUndefined()) { {% if _return.isOutParam %} - {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(result->ToObject()); + {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(Nan::To(result).ToLocalChecked()); wrapper->selfFreeing = false; *baton->{{ _return.name }} = wrapper->GetValue(); diff --git a/generate/templates/partials/convert_from_v8.cc b/generate/templates/partials/convert_from_v8.cc index c1486d5a6..4f6a146d4 100644 --- a/generate/templates/partials/convert_from_v8.cc +++ b/generate/templates/partials/convert_from_v8.cc @@ -19,7 +19,7 @@ {%endif%} {%if cppClassName == 'String'%} - String::Utf8Value {{ name }}(info[{{ jsArg }}]->ToString()); + Nan::Utf8String {{ name }}(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character C-strings expect: from_{{ name }} = ({{ cType }}) malloc({{ name }}.length() + 1); // copy the characters from the nodejs string into our C-string (used instead of strdup or strcpy because nulls in @@ -36,7 +36,7 @@ from_{{ name }} = GitBufConverter::Convert(info[{{ jsArg }}]); {%elsif cppClassName == 'Wrapper'%} - String::Utf8Value {{ name }}(info[{{ jsArg }}]->ToString()); + Nan::Utf8String {{ name }}(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character C-strings expect: from_{{ name }} = ({{ cType }}) malloc({{ name }}.length() + 1); // copy the characters from the nodejs string into our C-string (used instead of strdup or strcpy because nulls in @@ -53,12 +53,12 @@ {%-- // FIXME: should recursively call convertFromv8. --%} - from_{{ name }}[i] = Nan::ObjectWrap::Unwrap<{{ arrayElementCppClassName }}>(tmp_{{ name }}->Get(Nan::New(static_cast(i)))->ToObject())->GetValue(); + from_{{ name }}[i] = Nan::ObjectWrap::Unwrap<{{ arrayElementCppClassName }}>(Nan::To(tmp_{{ name }}->Get(Nan::New(static_cast(i)))).ToLocalChecked())->GetValue(); } {%elsif cppClassName == 'Function'%} {%elsif cppClassName == 'Buffer'%} - from_{{ name }} = Buffer::Data(info[{{ jsArg }}]->ToObject()); + from_{{ name }} = Buffer::Data(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); {%elsif cppClassName|isV8Value %} {%if cType|isPointer %} @@ -69,7 +69,7 @@ {%elsif cppClassName == 'GitOid'%} if (info[{{ jsArg }}]->IsString()) { // Try and parse in a string to a git_oid - String::Utf8Value oidString(info[{{ jsArg }}]->ToString()); + Nan::Utf8String oidString(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); git_oid *oidOut = (git_oid *)malloc(sizeof(git_oid)); if (git_oid_fromstr(oidOut, (const char *) strdup(*oidString)) != GIT_OK) { @@ -89,10 +89,10 @@ {%endif%} } else { - {%if cType|isDoublePointer %}*{%endif%}from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetValue(); + {%if cType|isDoublePointer %}*{%endif%}from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(Nan::To(info[{{ jsArg }}]).ToLocalChecked())->GetValue(); } {%else%} - {%if cType|isDoublePointer %}*{%endif%}from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info[{{ jsArg }}]->ToObject())->GetValue(); + {%if cType|isDoublePointer %}*{%endif%}from_{{ name }} = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(Nan::To(info[{{ jsArg }}]).ToLocalChecked())->GetValue(); {%endif%} {%if isBoolean %} diff --git a/generate/templates/partials/convert_to_v8.cc b/generate/templates/partials/convert_to_v8.cc index 1227932a6..a7a251938 100644 --- a/generate/templates/partials/convert_to_v8.cc +++ b/generate/templates/partials/convert_to_v8.cc @@ -79,11 +79,11 @@ {% if isAsync %} {% each ownedBy as owner %} {%-- If the owner of this object is "this" in an async method, it will be stored in the persistent handle by name. --%} - Nan::Set(owners, Nan::New(owners->Length()), this->GetFromPersistent("{{= owner =}}")->ToObject()); + Nan::Set(owners, Nan::New(owners->Length()), Nan::To(this->GetFromPersistent("{{= owner =}}")).ToLocalChecked()); {% endeach %} {% else %} {% each ownedByIndices as ownedByIndex %} - Nan::Set(owners, Nan::New(owners->Length()), info[{{= ownedByIndex =}}]->ToObject()); + Nan::Set(owners, Nan::New(owners->Length()), Nan::To(info[{{= ownedByIndex =}}]).ToLocalChecked()); {% endeach %} {% endif %} {% endif %} @@ -96,10 +96,10 @@ Nan::Set( owners, Nan::New(owners->Length()), - {{= ownerFn.singletonCppClassName =}}::New( + Nan::To({{= ownerFn.singletonCppClassName =}}::New( {{= ownerFn.name =}}({{ cType|asElementPointer parsedName }}), true - )->ToObject() + )).ToLocalChecked() ); {% endif %} {% endif %} diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index 222034150..8ed8858fa 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -39,11 +39,11 @@ } {% elsif field.isLibgitType %} - v8::Local {{ field.name }}(value->ToObject()); + v8::Local {{ field.name }}(Nan::To(value).ToLocalChecked()); wrapper->{{ field.name }}.Reset({{ field.name }}); - wrapper->raw->{{ field.name }} = {% if not field.cType | isPointer %}*{% endif %}{% if field.cppClassName == 'GitStrarray' %}StrArrayConverter::Convert({{ field.name }}->ToObject()){% else %}Nan::ObjectWrap::Unwrap<{{ field.cppClassName }}>({{ field.name }}->ToObject())->GetValue(){% endif %}; + wrapper->raw->{{ field.name }} = {% if not field.cType | isPointer %}*{% endif %}{% if field.cppClassName == 'GitStrarray' %}StrArrayConverter::Convert(Nan::To({{ field.name }}).ToLocalChecked())){% else %}Nan::ObjectWrap::Unwrap<{{ field.cppClassName }}>(Nan::To({{ field.name }}).ToLocalChecked())->GetValue(){% endif %}; {% elsif field.isCallbackFunction %} Nan::Callback *callback = NULL; @@ -92,7 +92,7 @@ if (wrapper->GetValue()->{{ field.name }}) { } - String::Utf8Value str(value); + Nan::Utf8String str(value); wrapper->GetValue()->{{ field.name }} = strdup(*str); {% elsif field.isCppClassIntType %} @@ -225,7 +225,7 @@ } else if (!result->IsNull() && !result->IsUndefined()) { {% if _return.isOutParam %} - {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(result->ToObject()); + {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(Nan::To(result).ToLocalChecked()); wrapper->selfFreeing = false; *baton->{{ _return.name }} = wrapper->GetValue(); @@ -261,7 +261,7 @@ } else if (!result->IsNull() && !result->IsUndefined()) { {% if _return.isOutParam %} - {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(result->ToObject()); + {{ _return.cppClassName }}* wrapper = Nan::ObjectWrap::Unwrap<{{ _return.cppClassName }}>(Nan::To(result).ToLocalChecked()); wrapper->selfFreeing = false; *baton->{{ _return.name }} = wrapper->GetValue(); diff --git a/generate/templates/partials/sync_function.cc b/generate/templates/partials/sync_function.cc index 89bb2e2dc..4a76463ed 100644 --- a/generate/templates/partials/sync_function.cc +++ b/generate/templates/partials/sync_function.cc @@ -17,7 +17,7 @@ NAN_METHOD({{ cppClassName }}::{{ cppFunctionName }}) { {%if not arg.isReturn %} {%partial convertFromV8 arg %} {%if arg.saveArg %} - v8::Local {{ arg.name }}(info[{{ arg.jsArg }}]->ToObject()); + v8::Local {{ arg.name }}(Nan::To(info[{{ arg.jsArg }}]).ToLocalChecked()); {{ cppClassName }} *thisObj = Nan::ObjectWrap::Unwrap<{{ cppClassName }}>(info.This()); thisObj->{{ cppFunctionName }}_{{ arg.name }}.Reset({{ arg.name }}); diff --git a/generate/templates/templates/struct_content.cc b/generate/templates/templates/struct_content.cc index 0c7b9e4f1..0450447ac 100644 --- a/generate/templates/templates/struct_content.cc +++ b/generate/templates/templates/struct_content.cc @@ -80,10 +80,10 @@ void {{ cppClassName }}::ConstructFields() { {% if not field.ignore %} {% if not field.isEnum %} {% if field.hasConstructor |or field.isLibgitType %} - v8::Local {{ field.name }}Temp = {{ field.cppClassName }}::New( + v8::Local {{ field.name }}Temp = Nan::To({{ field.cppClassName }}::New( {%if not field.cType|isPointer %}&{%endif%}this->raw->{{ field.name }}, false - )->ToObject(); + )).ToLocalChecked(); this->{{ field.name }}.Reset({{ field.name }}Temp); {% elsif field.isCallbackFunction %} From 59bad990829711ee4e499ed27892ecb6cef5900a Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 09:52:45 +0100 Subject: [PATCH 120/145] :arrow_up: GetPropertyNames also needs to be changed for Node 12 --- generate/templates/manual/clone/clone.cc | 2 +- generate/templates/manual/filter_list/load.cc | 4 ++-- generate/templates/manual/revwalk/fast_walk.cc | 2 +- generate/templates/partials/async_function.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/generate/templates/manual/clone/clone.cc b/generate/templates/manual/clone/clone.cc index 2cab928bf..19c44af21 100644 --- a/generate/templates/manual/clone/clone.cc +++ b/generate/templates/manual/clone/clone.cc @@ -180,7 +180,7 @@ void GitClone::CloneWorker::HandleOKCallback() { break; } - v8::Local properties = nodeObj->GetPropertyNames(); + v8::Local properties = Nan::GetPropertyNames(nodeObj).ToLocalChecked(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = diff --git a/generate/templates/manual/filter_list/load.cc b/generate/templates/manual/filter_list/load.cc index 9a3e1ba25..9075b5ead 100644 --- a/generate/templates/manual/filter_list/load.cc +++ b/generate/templates/manual/filter_list/load.cc @@ -134,7 +134,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { // GitFilterList baton->filters v8::Local owners = Nan::New(0); v8::Local filterRegistry = Nan::New(GitFilterRegistry::persistentHandle); - v8::Local propertyNames = filterRegistry->GetPropertyNames(); + v8::Local propertyNames = Nan::GetPropertyNames(filterRegistry).ToLocalChecked(); Nan::Set( owners, @@ -214,7 +214,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { break; } - v8::Local properties = nodeObj->GetPropertyNames(); + v8::Local properties = Nan::GetPropertyNames(nodeObj).ToLocalChecked(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = diff --git a/generate/templates/manual/revwalk/fast_walk.cc b/generate/templates/manual/revwalk/fast_walk.cc index 619f8c6c8..bf4f70710 100644 --- a/generate/templates/manual/revwalk/fast_walk.cc +++ b/generate/templates/manual/revwalk/fast_walk.cc @@ -144,7 +144,7 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() break; } - Local properties = nodeObj->GetPropertyNames(); + Local properties = Nan::GetPropertyNames(nodeObj).ToLocalChecked(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { Local propName = Nan::To(properties->Get(propIndex)).ToLocalChecked(); diff --git a/generate/templates/partials/async_function.cc b/generate/templates/partials/async_function.cc index ea7c43037..8cd11d0f9 100644 --- a/generate/templates/partials/async_function.cc +++ b/generate/templates/partials/async_function.cc @@ -217,7 +217,7 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { break; } - v8::Local properties = nodeObj->GetPropertyNames(); + v8::Local properties = Nan::GetPropertyNames(nodeObj).ToLocalChecked(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = Nan::To(properties->Get(propIndex)).ToLocalChecked(); v8::Local nodeToQueue = nodeObj->Get(propName); From eb2df373ec490679b2b9aa69e26b5d85f56feadf Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 09:56:59 +0100 Subject: [PATCH 121/145] :art: Extra space for Utf8Strings to line up better --- generate/templates/manual/clone/clone.cc | 4 ++-- generate/templates/manual/commit/extract_signature.cc | 4 ++-- generate/templates/manual/filter_list/load.cc | 4 ++-- generate/templates/manual/revwalk/file_history_walk.cc | 2 +- generate/templates/manual/src/filter_registry.cc | 4 ++-- generate/templates/manual/src/str_array_converter.cc | 4 ++-- generate/templates/partials/convert_from_v8.cc | 6 +++--- generate/templates/partials/field_accessors.cc | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/generate/templates/manual/clone/clone.cc b/generate/templates/manual/clone/clone.cc index 19c44af21..e0921e700 100644 --- a/generate/templates/manual/clone/clone.cc +++ b/generate/templates/manual/clone/clone.cc @@ -33,7 +33,7 @@ NAN_METHOD(GitClone::Clone) { // start convert_from_v8 block const char *from_url = NULL; - Nan::Utf8String url(Nan::To(info[0]).ToLocalChecked()); + Nan::Utf8String url(Nan::To(info[0]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character // C-strings expect: from_url = (const char *)malloc(url.length() + 1); @@ -50,7 +50,7 @@ NAN_METHOD(GitClone::Clone) { // start convert_from_v8 block const char *from_local_path = NULL; - Nan::Utf8String local_path(Nan::To(info[1]).ToLocalChecked()); + Nan::Utf8String local_path(Nan::To(info[1]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character // C-strings expect: from_local_path = (const char *)malloc(local_path.length() + 1); diff --git a/generate/templates/manual/commit/extract_signature.cc b/generate/templates/manual/commit/extract_signature.cc index ebcb78fe0..a5bd9f8b1 100644 --- a/generate/templates/manual/commit/extract_signature.cc +++ b/generate/templates/manual/commit/extract_signature.cc @@ -32,7 +32,7 @@ NAN_METHOD(GitCommit::ExtractSignature) // baton->commit_id if (info[1]->IsString()) { - Nan::Utf8String oidString(Nan::To(info[1]).ToLocalChecked()); + Nan::Utf8String oidString(Nan::To(info[1]).ToLocalChecked()); baton->commit_id = (git_oid *)malloc(sizeof(git_oid)); if (git_oid_fromstr(baton->commit_id, (const char *)strdup(*oidString)) != GIT_OK) { free(baton->commit_id); @@ -49,7 +49,7 @@ NAN_METHOD(GitCommit::ExtractSignature) // baton->field if (info[2]->IsString()) { - Nan::Utf8String field(Nan::To(info[2]).ToLocalChecked()); + Nan::Utf8String field(Nan::To(info[2]).ToLocalChecked()); baton->field = (char *)malloc(field.length() + 1); memcpy((void *)baton->field, *field, field.length()); baton->field[field.length()] = 0; diff --git a/generate/templates/manual/filter_list/load.cc b/generate/templates/manual/filter_list/load.cc index 9075b5ead..082cfe212 100644 --- a/generate/templates/manual/filter_list/load.cc +++ b/generate/templates/manual/filter_list/load.cc @@ -63,7 +63,7 @@ NAN_METHOD(GitFilterList::Load) { // start convert_from_v8 block const char *from_path = NULL; - Nan::Utf8String path(Nan::To(info[2]).ToLocalChecked()); + Nan::Utf8String path(Nan::To(info[2]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character // C-strings expect: from_path = (const char *)malloc(path.length() + 1); @@ -144,7 +144,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { for (uint32_t index = 0; index < propertyNames->Length(); ++index) { v8::Local propertyName = Nan::To(propertyNames->Get(index)).ToLocalChecked(); - Nan::Utf8String propertyNameAsUtf8Value(propertyName); + Nan::Utf8String propertyNameAsUtf8Value(propertyName); const char *propertyNameAsCString = *propertyNameAsUtf8Value; bool isNotMethodOnRegistry = strcmp("register", propertyNameAsCString) diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index f7cec692a..a3d9764d6 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -196,7 +196,7 @@ NAN_METHOD(GitRevwalk::FileHistoryWalk) baton->error_code = GIT_OK; baton->error = NULL; - Nan::Utf8String from_js_file_path(Nan::To(info[0]).ToLocalChecked()); + Nan::Utf8String from_js_file_path(Nan::To(info[0]).ToLocalChecked()); baton->file_path = strdup(*from_js_file_path); baton->max_count = Nan::To(info[1]).FromJust(); baton->out = new std::vector; diff --git a/generate/templates/manual/src/filter_registry.cc b/generate/templates/manual/src/filter_registry.cc index 62de8f80a..bf69012d4 100644 --- a/generate/templates/manual/src/filter_registry.cc +++ b/generate/templates/manual/src/filter_registry.cc @@ -55,7 +55,7 @@ NAN_METHOD(GitFilterRegistry::GitFilterRegister) { FilterRegisterBaton *baton = new FilterRegisterBaton; baton->filter = Nan::ObjectWrap::Unwrap(Nan::To(info[1]).ToLocalChecked())->GetValue(); - Nan::Utf8String name(Nan::To(info[0]).ToLocalChecked()); + Nan::Utf8String name(Nan::To(info[0]).ToLocalChecked()); baton->filter_name = (char *)malloc(name.length() + 1); memcpy((void *)baton->filter_name, *name, name.length()); @@ -144,7 +144,7 @@ NAN_METHOD(GitFilterRegistry::GitFilterUnregister) { } FilterUnregisterBaton *baton = new FilterUnregisterBaton; - Nan::Utf8String name(Nan::To(info[0]).ToLocalChecked()); + Nan::Utf8String name(Nan::To(info[0]).ToLocalChecked()); baton->filter_name = (char *)malloc(name.length() + 1); memcpy((void *)baton->filter_name, *name, name.length()); diff --git a/generate/templates/manual/src/str_array_converter.cc b/generate/templates/manual/src/str_array_converter.cc index ed0e93e2b..56e7d7dda 100644 --- a/generate/templates/manual/src/str_array_converter.cc +++ b/generate/templates/manual/src/str_array_converter.cc @@ -37,7 +37,7 @@ git_strarray *StrArrayConverter::ConvertArray(Array *val) { git_strarray *result = AllocStrArray(val->Length()); for(size_t i = 0; i < result->count; i++) { - Nan::Utf8String entry(val->Get(i)); + Nan::Utf8String entry(val->Get(i)); result->strings[i] = strdup(*entry); } @@ -46,7 +46,7 @@ git_strarray *StrArrayConverter::ConvertArray(Array *val) { git_strarray* StrArrayConverter::ConvertString(Local val) { char *strings[1]; - Nan::Utf8String utf8String(val); + Nan::Utf8String utf8String(val); strings[0] = *utf8String; diff --git a/generate/templates/partials/convert_from_v8.cc b/generate/templates/partials/convert_from_v8.cc index 4f6a146d4..a3ea193a5 100644 --- a/generate/templates/partials/convert_from_v8.cc +++ b/generate/templates/partials/convert_from_v8.cc @@ -19,7 +19,7 @@ {%endif%} {%if cppClassName == 'String'%} - Nan::Utf8String {{ name }}(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); + Nan::Utf8String {{ name }}(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character C-strings expect: from_{{ name }} = ({{ cType }}) malloc({{ name }}.length() + 1); // copy the characters from the nodejs string into our C-string (used instead of strdup or strcpy because nulls in @@ -36,7 +36,7 @@ from_{{ name }} = GitBufConverter::Convert(info[{{ jsArg }}]); {%elsif cppClassName == 'Wrapper'%} - Nan::Utf8String {{ name }}(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); + Nan::Utf8String {{ name }}(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); // malloc with one extra byte so we can add the terminating null character C-strings expect: from_{{ name }} = ({{ cType }}) malloc({{ name }}.length() + 1); // copy the characters from the nodejs string into our C-string (used instead of strdup or strcpy because nulls in @@ -69,7 +69,7 @@ {%elsif cppClassName == 'GitOid'%} if (info[{{ jsArg }}]->IsString()) { // Try and parse in a string to a git_oid - Nan::Utf8String oidString(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); + Nan::Utf8String oidString(Nan::To(info[{{ jsArg }}]).ToLocalChecked()); git_oid *oidOut = (git_oid *)malloc(sizeof(git_oid)); if (git_oid_fromstr(oidOut, (const char *) strdup(*oidString)) != GIT_OK) { diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index 8ed8858fa..c805d8d13 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -92,7 +92,7 @@ if (wrapper->GetValue()->{{ field.name }}) { } - Nan::Utf8String str(value); + Nan::Utf8String str(value); wrapper->GetValue()->{{ field.name }} = strdup(*str); {% elsif field.isCppClassIntType %} From 8e723ef46635b912c5d47a3b389f075a58547fe4 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 10:03:55 +0100 Subject: [PATCH 122/145] :arrow_up: BooleanValue also needs changing for Node 12 --- generate/templates/manual/src/str_array_converter.cc | 2 +- generate/templates/partials/field_accessors.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generate/templates/manual/src/str_array_converter.cc b/generate/templates/manual/src/str_array_converter.cc index 56e7d7dda..afca4bd06 100644 --- a/generate/templates/manual/src/str_array_converter.cc +++ b/generate/templates/manual/src/str_array_converter.cc @@ -10,7 +10,7 @@ using namespace v8; using namespace node; git_strarray *StrArrayConverter::Convert(Local val) { - if (!val->BooleanValue()) { + if (!Nan::To(val).FromJust()) { return NULL; } else if (val->IsArray()) { diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index c805d8d13..fd785828c 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -72,7 +72,7 @@ Nan::MaybeLocal maybeObjectWaitForResult = Nan::Get(object, Nan::New("waitForResult").ToLocalChecked()); if(!maybeObjectWaitForResult.IsEmpty()) { Local objectWaitForResult = maybeObjectWaitForResult.ToLocalChecked(); - waitForResult = (bool)objectWaitForResult->BooleanValue(); + waitForResult = Nan::To(objectWaitForResult).FromJust(); } } } From 77b615a6ebd0f910a816b76142eabea830dc9a2e Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 10:10:06 +0100 Subject: [PATCH 123/145] :arrow_up: Minor amends for a few manual templates --- generate/templates/manual/src/filter_registry.cc | 2 +- generate/templates/manual/src/git_buf_converter.cc | 2 +- generate/templates/manual/src/nodegit_wrapper.cc | 2 +- generate/templates/partials/field_accessors.cc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generate/templates/manual/src/filter_registry.cc b/generate/templates/manual/src/filter_registry.cc index bf69012d4..59124ab41 100644 --- a/generate/templates/manual/src/filter_registry.cc +++ b/generate/templates/manual/src/filter_registry.cc @@ -64,7 +64,7 @@ NAN_METHOD(GitFilterRegistry::GitFilterRegister) { baton->error_code = GIT_OK; baton->filter_priority = Nan::To(info[2]).FromJust(); - Nan::New(GitFilterRegistry::persistentHandle)->Set(Nan::To(Nan::To(info[0]).ToLocalChecked(), info[1]).ToLocalChecked()); + Nan::New(GitFilterRegistry::persistentHandle)->Set(Nan::To(info[0]).ToLocalChecked(), Nan::To(info[1]).ToLocalChecked()); Nan::Callback *callback = new Nan::Callback(Local::Cast(info[3])); RegisterWorker *worker = new RegisterWorker(baton, callback); diff --git a/generate/templates/manual/src/git_buf_converter.cc b/generate/templates/manual/src/git_buf_converter.cc index 1413168af..1558d39fe 100644 --- a/generate/templates/manual/src/git_buf_converter.cc +++ b/generate/templates/manual/src/git_buf_converter.cc @@ -10,7 +10,7 @@ using namespace node; git_buf *GitBufConverter::Convert(Local val) { if (val->IsString() || val->IsStringObject()) { - v8::String::Utf8Value param1(Nan::To(val).ToLocalChecked()); + Nan::Utf8String param1(Nan::To(val).ToLocalChecked()); std::string v8String = std::string(*param1); const size_t size = sizeof(git_buf); diff --git a/generate/templates/manual/src/nodegit_wrapper.cc b/generate/templates/manual/src/nodegit_wrapper.cc index e9fb8ebdb..69aed4f94 100644 --- a/generate/templates/manual/src/nodegit_wrapper.cc +++ b/generate/templates/manual/src/nodegit_wrapper.cc @@ -67,7 +67,7 @@ NAN_METHOD(NodeGitWrapper::JSNewFunction) { instance = new cppClass(static_cast( Local::Cast(info[0])->Value()), Nan::To(info[1]).FromJust(), - info.Length() >= 3 && !Nan::To(info[2].IsEmpty() && info[2]->IsObject() ? info[2]).ToLocalChecked() : Local() + info.Length() >= 3 && !info[2].IsEmpty() && info[2]->IsObject() ? Nan::To(info[2]).ToLocalChecked() : Local() ); } diff --git a/generate/templates/partials/field_accessors.cc b/generate/templates/partials/field_accessors.cc index fd785828c..35b583bdc 100644 --- a/generate/templates/partials/field_accessors.cc +++ b/generate/templates/partials/field_accessors.cc @@ -43,7 +43,7 @@ wrapper->{{ field.name }}.Reset({{ field.name }}); - wrapper->raw->{{ field.name }} = {% if not field.cType | isPointer %}*{% endif %}{% if field.cppClassName == 'GitStrarray' %}StrArrayConverter::Convert(Nan::To({{ field.name }}).ToLocalChecked())){% else %}Nan::ObjectWrap::Unwrap<{{ field.cppClassName }}>(Nan::To({{ field.name }}).ToLocalChecked())->GetValue(){% endif %}; + wrapper->raw->{{ field.name }} = {% if not field.cType | isPointer %}*{% endif %}{% if field.cppClassName == 'GitStrarray' %}StrArrayConverter::Convert(Nan::To({{ field.name }}).ToLocalChecked()){% else %}Nan::ObjectWrap::Unwrap<{{ field.cppClassName }}>(Nan::To({{ field.name }}).ToLocalChecked())->GetValue(){% endif %}; {% elsif field.isCallbackFunction %} Nan::Callback *callback = NULL; From a470a678b4204f28b4e4de607a103ae2b254b5a1 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 10:16:26 +0100 Subject: [PATCH 124/145] :arrow_up: Nan::Call requires ToLocalChecked --- generate/templates/manual/src/promise_completion.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/templates/manual/src/promise_completion.cc b/generate/templates/manual/src/promise_completion.cc index 88bde47da..1e503ac72 100644 --- a/generate/templates/manual/src/promise_completion.cc +++ b/generate/templates/manual/src/promise_completion.cc @@ -78,7 +78,7 @@ v8::Local PromiseCompletion::Bind(Nan::Persistent &func v8::Local argv[1] = { object }; - return scope.Escape(Nan::Call(bind, Nan::To(Nan::New(function)).ToLocalChecked(), 1, argv)); + return scope.Escape(Nan::Call(bind, Nan::To(Nan::New(function)).ToLocalChecked(), 1, argv).ToLocalChecked()); } // calls the callback stored in the PromiseCompletion, passing the baton that From a10a61677a479d5e83b9d7b4ff962f2dd8439098 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Wed, 10 Jul 2019 10:25:15 +0100 Subject: [PATCH 125/145] :art: Final spacing amends for manual str_array_converter --- generate/templates/manual/src/str_array_converter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate/templates/manual/src/str_array_converter.cc b/generate/templates/manual/src/str_array_converter.cc index afca4bd06..6100fd01d 100644 --- a/generate/templates/manual/src/str_array_converter.cc +++ b/generate/templates/manual/src/str_array_converter.cc @@ -37,7 +37,7 @@ git_strarray *StrArrayConverter::ConvertArray(Array *val) { git_strarray *result = AllocStrArray(val->Length()); for(size_t i = 0; i < result->count; i++) { - Nan::Utf8String entry(val->Get(i)); + Nan::Utf8String entry(val->Get(i)); result->strings[i] = strdup(*entry); } @@ -46,7 +46,7 @@ git_strarray *StrArrayConverter::ConvertArray(Array *val) { git_strarray* StrArrayConverter::ConvertString(Local val) { char *strings[1]; - Nan::Utf8String utf8String(val); + Nan::Utf8String utf8String(val); strings[0] = *utf8String; From 4db16704391f058e11c8fd7cab00a7cfc315200f Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 12 Jul 2019 08:29:02 +0100 Subject: [PATCH 126/145] :white_check_mark: Start building for Node 12 --- .travis.yml | 1 + appveyor.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 682ca1cf9..e1d7ff047 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ env: - TARGET_ARCH="ia32" node_js: + - "12" - "10" - "8" diff --git a/appveyor.yml b/appveyor.yml index 46fc6a1b5..891225fd7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -26,6 +26,7 @@ environment: GYP_MSVS_VERSION: 2015 matrix: # Node.js + - nodejs_version: "12" - nodejs_version: "10" - nodejs_version: "8" From 9bc65c6d242bb0e3cd1350408925c79c8426bdd7 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 12 Jul 2019 09:12:50 +0100 Subject: [PATCH 127/145] :arrow_up: Update versions of nan and node-pre-gyp --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a2ab166b5..c071d62c7 100644 --- a/package.json +++ b/package.json @@ -41,9 +41,9 @@ "fs-extra": "^7.0.0", "json5": "^2.1.0", "lodash": "^4.17.11", - "nan": "^2.11.1", + "nan": "^2.14.0", "node-gyp": "^4.0.0", - "node-pre-gyp": "^0.11.0", + "node-pre-gyp": "^0.13.0", "promisify-node": "~0.3.0", "ramda": "^0.25.0", "request-promise-native": "^1.0.5", From 658936e8faa97eb555ea58f21c888e1925299861 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 12 Jul 2019 11:48:46 +0100 Subject: [PATCH 128/145] :recycle: Remove last depreciated warnings so everything is now clean --- generate/templates/manual/clone/clone.cc | 12 +++++----- .../manual/commit/extract_signature.cc | 4 ++-- generate/templates/manual/filter_list/load.cc | 16 ++++++------- .../templates/manual/filter_source/repo.cc | 8 +++---- .../manual/include/str_array_converter.h | 4 ++-- .../manual/patches/convenient_patches.cc | 8 +++---- generate/templates/manual/remote/ls.cc | 4 ++-- .../manual/repository/get_references.cc | 4 ++-- .../manual/repository/get_remotes.cc | 4 ++-- .../manual/repository/get_submodules.cc | 4 ++-- .../manual/repository/refresh_references.cc | 4 ++-- .../templates/manual/revwalk/commit_walk.cc | 4 ++-- .../templates/manual/revwalk/fast_walk.cc | 12 +++++----- .../manual/revwalk/file_history_walk.cc | 8 +++---- .../templates/manual/src/filter_registry.cc | 18 +++++++------- .../manual/src/promise_completion.cc | 2 +- .../manual/src/str_array_converter.cc | 10 ++++---- generate/templates/partials/async_function.cc | 12 +++++----- .../templates/partials/convert_from_v8.cc | 4 ++-- generate/templates/templates/nodegit.cc | 24 +++++++------------ 20 files changed, 80 insertions(+), 86 deletions(-) diff --git a/generate/templates/manual/clone/clone.cc b/generate/templates/manual/clone/clone.cc index e0921e700..6f5f79769 100644 --- a/generate/templates/manual/clone/clone.cc +++ b/generate/templates/manual/clone/clone.cc @@ -144,8 +144,8 @@ void GitClone::CloneWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method clone has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Clone.clone").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); @@ -184,8 +184,8 @@ void GitClone::CloneWorker::HandleOKCallback() { for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = - Nan::To(properties->Get(propIndex)).ToLocalChecked(); - v8::Local nodeToQueue = nodeObj->Get(propName); + Nan::To(Nan::Get(properties, propIndex).ToLocalChecked()).ToLocalChecked(); + v8::Local nodeToQueue = Nan::Get(nodeObj, propName).ToLocalChecked(); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); } @@ -195,9 +195,9 @@ void GitClone::CloneWorker::HandleOKCallback() { if (!callbackFired) { v8::Local err = Nan::To(Nan::Error("Method clone has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Clone.clone").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); diff --git a/generate/templates/manual/commit/extract_signature.cc b/generate/templates/manual/commit/extract_signature.cc index a5bd9f8b1..0fea1bc0a 100644 --- a/generate/templates/manual/commit/extract_signature.cc +++ b/generate/templates/manual/commit/extract_signature.cc @@ -133,8 +133,8 @@ void GitCommit::ExtractSignatureWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Extract Signature has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Commit.extractSignature").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Commit.extractSignature").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/filter_list/load.cc b/generate/templates/manual/filter_list/load.cc index 082cfe212..40ce79433 100644 --- a/generate/templates/manual/filter_list/load.cc +++ b/generate/templates/manual/filter_list/load.cc @@ -143,7 +143,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { ); for (uint32_t index = 0; index < propertyNames->Length(); ++index) { - v8::Local propertyName = Nan::To(propertyNames->Get(index)).ToLocalChecked(); + v8::Local propertyName = Nan::To(Nan::Get(propertyNames, index).ToLocalChecked()).ToLocalChecked(); Nan::Utf8String propertyNameAsUtf8Value(propertyName); const char *propertyNameAsCString = *propertyNameAsUtf8Value; @@ -153,7 +153,7 @@ void GitFilterList::LoadWorker::HandleOKCallback() { Nan::Set( owners, Nan::New(owners->Length()), - filterRegistry->Get(propertyName) + Nan::Get(filterRegistry, propertyName).ToLocalChecked() ); } } @@ -176,8 +176,8 @@ void GitFilterList::LoadWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method load has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterList.load").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); @@ -218,8 +218,8 @@ void GitFilterList::LoadWorker::HandleOKCallback() { for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { v8::Local propName = - Nan::To(properties->Get(propIndex)).ToLocalChecked(); - v8::Local nodeToQueue = nodeObj->Get(propName); + Nan::To(Nan::Get(properties, propIndex).ToLocalChecked()).ToLocalChecked(); + v8::Local nodeToQueue = Nan::Get(nodeObj, propName).ToLocalChecked(); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); } @@ -229,9 +229,9 @@ void GitFilterList::LoadWorker::HandleOKCallback() { if (!callbackFired) { v8::Local err = Nan::To(Nan::Error("Method load has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterList.load").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); diff --git a/generate/templates/manual/filter_source/repo.cc b/generate/templates/manual/filter_source/repo.cc index f35fb33a4..fca66a754 100644 --- a/generate/templates/manual/filter_source/repo.cc +++ b/generate/templates/manual/filter_source/repo.cc @@ -64,8 +64,8 @@ void GitFilterSource::RepoWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method repo has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterSource.repo").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); @@ -75,9 +75,9 @@ void GitFilterSource::RepoWorker::HandleOKCallback() { } else if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method repo has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterSource.repo").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); diff --git a/generate/templates/manual/include/str_array_converter.h b/generate/templates/manual/include/str_array_converter.h index 37f1bcc1d..26a82479d 100644 --- a/generate/templates/manual/include/str_array_converter.h +++ b/generate/templates/manual/include/str_array_converter.h @@ -14,8 +14,8 @@ class StrArrayConverter { static git_strarray *Convert (v8::Local val); private: - static git_strarray *ConvertArray(Array *val); - static git_strarray *ConvertString(v8::Local val); + static git_strarray *ConvertArray(v8::Local val); + static git_strarray *ConvertString(v8::Local val); static git_strarray *AllocStrArray(const size_t count); static git_strarray *ConstructStrArray(int argc, char** argv); }; diff --git a/generate/templates/manual/patches/convenient_patches.cc b/generate/templates/manual/patches/convenient_patches.cc index ef9322a43..b27b1b66e 100644 --- a/generate/templates/manual/patches/convenient_patches.cc +++ b/generate/templates/manual/patches/convenient_patches.cc @@ -101,8 +101,8 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method convenientFromDiff has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); Local argv[1] = { err }; @@ -119,8 +119,8 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("method convenientFromDiff has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/remote/ls.cc b/generate/templates/manual/remote/ls.cc index 9fccf4af3..5afcb8840 100644 --- a/generate/templates/manual/remote/ls.cc +++ b/generate/templates/manual/remote/ls.cc @@ -86,8 +86,8 @@ void GitRemote::ReferenceListWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Reference List has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Remote.referenceList").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Remote.referenceList").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/get_references.cc b/generate/templates/manual/repository/get_references.cc index 910352b52..aab66d035 100644 --- a/generate/templates/manual/repository/get_references.cc +++ b/generate/templates/manual/repository/get_references.cc @@ -119,8 +119,8 @@ void GitRepository::GetReferencesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository getReferences has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getReferences").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getReferences").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/get_remotes.cc b/generate/templates/manual/repository/get_remotes.cc index 457ea3ebe..cfb4e0b26 100644 --- a/generate/templates/manual/repository/get_remotes.cc +++ b/generate/templates/manual/repository/get_remotes.cc @@ -120,8 +120,8 @@ void GitRepository::GetRemotesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository refreshRemotes has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshRemotes").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshRemotes").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/get_submodules.cc b/generate/templates/manual/repository/get_submodules.cc index 0d73424b1..e97fa6184 100644 --- a/generate/templates/manual/repository/get_submodules.cc +++ b/generate/templates/manual/repository/get_submodules.cc @@ -101,8 +101,8 @@ void GitRepository::GetSubmodulesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository getSubmodules has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getSubmodules").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getSubmodules").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index 8db164fb5..93d85c247 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -673,8 +673,8 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository refreshReferences has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshReferences").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshReferences").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/revwalk/commit_walk.cc b/generate/templates/manual/revwalk/commit_walk.cc index 1c7bed6fc..99f011475 100644 --- a/generate/templates/manual/revwalk/commit_walk.cc +++ b/generate/templates/manual/revwalk/commit_walk.cc @@ -111,8 +111,8 @@ void GitRevwalk::CommitWalkWorker::HandleOKCallback() { free((void *)baton->error); } else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Revwalk commitWalk has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.commitWalk").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.commitWalk").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/revwalk/fast_walk.cc b/generate/templates/manual/revwalk/fast_walk.cc index bf4f70710..191bc6b4f 100644 --- a/generate/templates/manual/revwalk/fast_walk.cc +++ b/generate/templates/manual/revwalk/fast_walk.cc @@ -94,8 +94,8 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() } else { err = Nan::To(Nan::Error("Method fastWalk has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); Local argv[1] = { err }; @@ -147,8 +147,8 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() Local properties = Nan::GetPropertyNames(nodeObj).ToLocalChecked(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { - Local propName = Nan::To(properties->Get(propIndex)).ToLocalChecked(); - Local nodeToQueue = nodeObj->Get(propName); + Local propName = Nan::To(Nan::Get(properties, propIndex).ToLocalChecked()).ToLocalChecked(); + Local nodeToQueue = Nan::Get(nodeObj, propName).ToLocalChecked(); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); @@ -159,8 +159,8 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() if (!callbackFired) { Local err = Nan::To(Nan::Error("Method next has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index a3d9764d6..e55d86e9f 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -448,8 +448,8 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() } else { err = Nan::To(Nan::Error("Method fileHistoryWalk has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -465,8 +465,8 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method next has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); v8::Local argv[1] = { err }; diff --git a/generate/templates/manual/src/filter_registry.cc b/generate/templates/manual/src/filter_registry.cc index 59124ab41..4014b4abe 100644 --- a/generate/templates/manual/src/filter_registry.cc +++ b/generate/templates/manual/src/filter_registry.cc @@ -64,7 +64,7 @@ NAN_METHOD(GitFilterRegistry::GitFilterRegister) { baton->error_code = GIT_OK; baton->filter_priority = Nan::To(info[2]).FromJust(); - Nan::New(GitFilterRegistry::persistentHandle)->Set(Nan::To(info[0]).ToLocalChecked(), Nan::To(info[1]).ToLocalChecked()); + Nan::Set(Nan::New(GitFilterRegistry::persistentHandle), Nan::To(info[0]).ToLocalChecked(), Nan::To(info[1]).ToLocalChecked()); Nan::Callback *callback = new Nan::Callback(Local::Cast(info[3])); RegisterWorker *worker = new RegisterWorker(baton, callback); @@ -106,8 +106,8 @@ void GitFilterRegistry::RegisterWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -118,8 +118,8 @@ void GitFilterRegistry::RegisterWorker::HandleOKCallback() { } else if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -192,8 +192,8 @@ void GitFilterRegistry::UnregisterWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -204,8 +204,8 @@ void GitFilterRegistry::UnregisterWorker::HandleOKCallback() { } else if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method unregister has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); v8::Local argv[1] = { err }; diff --git a/generate/templates/manual/src/promise_completion.cc b/generate/templates/manual/src/promise_completion.cc index 1e503ac72..22203b41d 100644 --- a/generate/templates/manual/src/promise_completion.cc +++ b/generate/templates/manual/src/promise_completion.cc @@ -64,7 +64,7 @@ void PromiseCompletion::Setup(v8::Local thenFn, v8::Local val) { +git_strarray *StrArrayConverter::Convert(v8::Local val) { if (!Nan::To(val).FromJust()) { return NULL; } else if (val->IsArray()) { - return ConvertArray(Array::Cast(*val)); + return ConvertArray(v8::Local::Cast(val)); } else if (val->IsString() || val->IsStringObject()) { return ConvertString(Nan::To(val).ToLocalChecked()); @@ -33,18 +33,18 @@ git_strarray * StrArrayConverter::AllocStrArray(const size_t count) { return result; } -git_strarray *StrArrayConverter::ConvertArray(Array *val) { +git_strarray *StrArrayConverter::ConvertArray(v8::Local val) { git_strarray *result = AllocStrArray(val->Length()); for(size_t i = 0; i < result->count; i++) { - Nan::Utf8String entry(val->Get(i)); + Nan::Utf8String entry(Nan::Get(val, i).ToLocalChecked()); result->strings[i] = strdup(*entry); } return result; } -git_strarray* StrArrayConverter::ConvertString(Local val) { +git_strarray* StrArrayConverter::ConvertString(v8::Local val) { char *strings[1]; Nan::Utf8String utf8String(val); diff --git a/generate/templates/partials/async_function.cc b/generate/templates/partials/async_function.cc index 8cd11d0f9..f5c4c8918 100644 --- a/generate/templates/partials/async_function.cc +++ b/generate/templates/partials/async_function.cc @@ -167,8 +167,8 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method {{ jsFunctionName }} has thrown an error.")).ToLocalChecked(); } - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -219,8 +219,8 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { v8::Local properties = Nan::GetPropertyNames(nodeObj).ToLocalChecked(); for (unsigned int propIndex = 0; propIndex < properties->Length(); ++propIndex) { - v8::Local propName = Nan::To(properties->Get(propIndex)).ToLocalChecked(); - v8::Local nodeToQueue = nodeObj->Get(propName); + v8::Local propName = Nan::To(Nan::Get(properties, propIndex).ToLocalChecked()).ToLocalChecked(); + v8::Local nodeToQueue = Nan::Get(nodeObj, propName).ToLocalChecked(); if (!nodeToQueue->IsUndefined()) { workerArguments.push(nodeToQueue); } @@ -229,8 +229,8 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { if (!callbackFired) { v8::Local err = Nan::To(Nan::Error("Method {{ jsFunctionName }} has thrown an error.")).ToLocalChecked(); - err->Set(Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - err->Set(Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); + Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); v8::Local argv[1] = { err }; diff --git a/generate/templates/partials/convert_from_v8.cc b/generate/templates/partials/convert_from_v8.cc index a3ea193a5..7fc74a29b 100644 --- a/generate/templates/partials/convert_from_v8.cc +++ b/generate/templates/partials/convert_from_v8.cc @@ -47,13 +47,13 @@ memset((void *)(((char *)from_{{ name }}) + {{ name }}.length()), 0, 1); {%elsif cppClassName == 'Array'%} - Array *tmp_{{ name }} = Array::Cast(*info[{{ jsArg }}]); + v8::Local tmp_{{ name }} = v8::Local::Cast(info[{{ jsArg }}]); from_{{ name }} = ({{ cType }})malloc(tmp_{{ name }}->Length() * sizeof({{ cType|replace '**' '*' }})); for (unsigned int i = 0; i < tmp_{{ name }}->Length(); i++) { {%-- // FIXME: should recursively call convertFromv8. --%} - from_{{ name }}[i] = Nan::ObjectWrap::Unwrap<{{ arrayElementCppClassName }}>(Nan::To(tmp_{{ name }}->Get(Nan::New(static_cast(i)))).ToLocalChecked())->GetValue(); + from_{{ name }}[i] = Nan::ObjectWrap::Unwrap<{{ arrayElementCppClassName }}>(Nan::To(Nan::Get(tmp_{{ name }}, Nan::New(static_cast(i))).ToLocalChecked()).ToLocalChecked())->GetValue(); } {%elsif cppClassName == 'Function'%} {%elsif cppClassName == 'Buffer'%} diff --git a/generate/templates/templates/nodegit.cc b/generate/templates/templates/nodegit.cc index c1eddd328..a9d22ce6d 100644 --- a/generate/templates/templates/nodegit.cc +++ b/generate/templates/templates/nodegit.cc @@ -26,14 +26,11 @@ #if (NODE_MODULE_VERSION > 48) v8::Local GetPrivate(v8::Local object, v8::Local key) { - v8::Isolate* isolate = v8::Isolate::GetCurrent(); - v8::Local context = isolate->GetCurrentContext(); - v8::Local privateKey = v8::Private::ForApi(isolate, key); v8::Local value; - v8::Maybe result = object->HasPrivate(context, privateKey); + Nan::Maybe result = Nan::HasPrivate(object, key); if (!(result.IsJust() && result.FromJust())) return v8::Local(); - if (object->GetPrivate(context, privateKey).ToLocal(&value)) + if (Nan::GetPrivate(object, key).ToLocal(&value)) return value; return v8::Local(); } @@ -43,10 +40,7 @@ v8::Local value) { if (value.IsEmpty()) return; - v8::Isolate* isolate = v8::Isolate::GetCurrent(); - v8::Local context = isolate->GetCurrentContext(); - v8::Local privateKey = v8::Private::ForApi(isolate, key); - object->SetPrivate(context, privateKey, value); + Nan::SetPrivate(object, key, value); } #else v8::Local GetPrivate(v8::Local object, @@ -70,7 +64,7 @@ void LockMasterSetStatus(const FunctionCallbackInfo& info) { // convert the first argument to Status if(info.Length() >= 0 && info[0]->IsNumber()) { - v8::Local value = info[0]->ToInt32(v8::Isolate::GetCurrent()); + v8::Local value = Nan::To(info[0]).ToLocalChecked(); LockMaster::Status status = static_cast(value->Value()); if(status >= LockMaster::Disabled && status <= LockMaster::Enabled) { LockMaster::SetStatus(status); @@ -91,7 +85,7 @@ void LockMasterGetDiagnostics(const FunctionCallbackInfo& info) { // return a plain JS object with properties v8::Local result = Nan::New(); - result->Set(Nan::New("storedMutexesCount").ToLocalChecked(), Nan::New(diagnostics.storedMutexesCount)); + Nan::Set(result,Nan::New("storedMutexesCount").ToLocalChecked(), Nan::New(diagnostics.storedMutexesCount)); info.GetReturnValue().Set(result); } @@ -149,11 +143,11 @@ extern "C" void init(v8::Local target) { NODE_SET_METHOD(target, "getThreadSafetyDiagnostics", LockMasterGetDiagnostics); v8::Local threadSafety = Nan::New(); - threadSafety->Set(Nan::New("DISABLED").ToLocalChecked(), Nan::New((int)LockMaster::Disabled)); - threadSafety->Set(Nan::New("ENABLED_FOR_ASYNC_ONLY").ToLocalChecked(), Nan::New((int)LockMaster::EnabledForAsyncOnly)); - threadSafety->Set(Nan::New("ENABLED").ToLocalChecked(), Nan::New((int)LockMaster::Enabled)); + Nan::Set(threadSafety,Nan::New("DISABLED").ToLocalChecked(), Nan::New((int)LockMaster::Disabled)); + Nan::Set(threadSafety,Nan::New("ENABLED_FOR_ASYNC_ONLY").ToLocalChecked(), Nan::New((int)LockMaster::EnabledForAsyncOnly)); + Nan::Set(threadSafety,Nan::New("ENABLED").ToLocalChecked(), Nan::New((int)LockMaster::Enabled)); - target->Set(Nan::New("THREAD_SAFETY").ToLocalChecked(), threadSafety); + Nan::Set(target,Nan::New("THREAD_SAFETY").ToLocalChecked(), threadSafety); LockMaster::Initialize(); } From a0f0c608a2594e9c99dbd08e4dbd15b96b905e86 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 12 Jul 2019 11:54:10 +0100 Subject: [PATCH 129/145] :art: Minor spacing for parameters in Nan::Set --- generate/templates/manual/clone/clone.cc | 8 ++++---- .../templates/manual/commit/extract_signature.cc | 4 ++-- generate/templates/manual/filter_list/load.cc | 8 ++++---- generate/templates/manual/filter_source/repo.cc | 8 ++++---- .../manual/patches/convenient_patches.cc | 8 ++++---- generate/templates/manual/remote/ls.cc | 4 ++-- .../manual/repository/get_references.cc | 4 ++-- .../templates/manual/repository/get_remotes.cc | 4 ++-- .../manual/repository/get_submodules.cc | 4 ++-- .../manual/repository/refresh_references.cc | 4 ++-- generate/templates/manual/revwalk/commit_walk.cc | 4 ++-- generate/templates/manual/revwalk/fast_walk.cc | 8 ++++---- .../manual/revwalk/file_history_walk.cc | 8 ++++---- generate/templates/manual/src/filter_registry.cc | 16 ++++++++-------- generate/templates/partials/async_function.cc | 8 ++++---- generate/templates/templates/nodegit.cc | 10 +++++----- 16 files changed, 55 insertions(+), 55 deletions(-) diff --git a/generate/templates/manual/clone/clone.cc b/generate/templates/manual/clone/clone.cc index 6f5f79769..a7ac262dc 100644 --- a/generate/templates/manual/clone/clone.cc +++ b/generate/templates/manual/clone/clone.cc @@ -144,8 +144,8 @@ void GitClone::CloneWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method clone has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Clone.clone").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); @@ -195,9 +195,9 @@ void GitClone::CloneWorker::HandleOKCallback() { if (!callbackFired) { v8::Local err = Nan::To(Nan::Error("Method clone has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Clone.clone").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); diff --git a/generate/templates/manual/commit/extract_signature.cc b/generate/templates/manual/commit/extract_signature.cc index 0fea1bc0a..e96d0cc7f 100644 --- a/generate/templates/manual/commit/extract_signature.cc +++ b/generate/templates/manual/commit/extract_signature.cc @@ -133,8 +133,8 @@ void GitCommit::ExtractSignatureWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Extract Signature has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Commit.extractSignature").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Commit.extractSignature").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/filter_list/load.cc b/generate/templates/manual/filter_list/load.cc index 40ce79433..fd02a44e6 100644 --- a/generate/templates/manual/filter_list/load.cc +++ b/generate/templates/manual/filter_list/load.cc @@ -176,8 +176,8 @@ void GitFilterList::LoadWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method load has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterList.load").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); @@ -229,9 +229,9 @@ void GitFilterList::LoadWorker::HandleOKCallback() { if (!callbackFired) { v8::Local err = Nan::To(Nan::Error("Method load has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterList.load").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); diff --git a/generate/templates/manual/filter_source/repo.cc b/generate/templates/manual/filter_source/repo.cc index fca66a754..57c2a07f7 100644 --- a/generate/templates/manual/filter_source/repo.cc +++ b/generate/templates/manual/filter_source/repo.cc @@ -64,8 +64,8 @@ void GitFilterSource::RepoWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method repo has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterSource.repo").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); @@ -75,9 +75,9 @@ void GitFilterSource::RepoWorker::HandleOKCallback() { } else if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method repo has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterSource.repo").ToLocalChecked()); v8::Local argv[1] = {err}; callback->Call(1, argv, async_resource); diff --git a/generate/templates/manual/patches/convenient_patches.cc b/generate/templates/manual/patches/convenient_patches.cc index b27b1b66e..c2403467a 100644 --- a/generate/templates/manual/patches/convenient_patches.cc +++ b/generate/templates/manual/patches/convenient_patches.cc @@ -101,8 +101,8 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method convenientFromDiff has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); Local argv[1] = { err }; @@ -119,8 +119,8 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("method convenientFromDiff has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Patch.convenientFromDiff").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/remote/ls.cc b/generate/templates/manual/remote/ls.cc index 5afcb8840..8816e0150 100644 --- a/generate/templates/manual/remote/ls.cc +++ b/generate/templates/manual/remote/ls.cc @@ -86,8 +86,8 @@ void GitRemote::ReferenceListWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Reference List has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Remote.referenceList").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Remote.referenceList").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/get_references.cc b/generate/templates/manual/repository/get_references.cc index aab66d035..8f03d60e1 100644 --- a/generate/templates/manual/repository/get_references.cc +++ b/generate/templates/manual/repository/get_references.cc @@ -119,8 +119,8 @@ void GitRepository::GetReferencesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository getReferences has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getReferences").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getReferences").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/get_remotes.cc b/generate/templates/manual/repository/get_remotes.cc index cfb4e0b26..9cad189a2 100644 --- a/generate/templates/manual/repository/get_remotes.cc +++ b/generate/templates/manual/repository/get_remotes.cc @@ -120,8 +120,8 @@ void GitRepository::GetRemotesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository refreshRemotes has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshRemotes").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshRemotes").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/get_submodules.cc b/generate/templates/manual/repository/get_submodules.cc index e97fa6184..71de6948c 100644 --- a/generate/templates/manual/repository/get_submodules.cc +++ b/generate/templates/manual/repository/get_submodules.cc @@ -101,8 +101,8 @@ void GitRepository::GetSubmodulesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository getSubmodules has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getSubmodules").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.getSubmodules").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index 93d85c247..8d0fe36d6 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -673,8 +673,8 @@ void GitRepository::RefreshReferencesWorker::HandleOKCallback() else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Repository refreshReferences has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshReferences").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Repository.refreshReferences").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/revwalk/commit_walk.cc b/generate/templates/manual/revwalk/commit_walk.cc index 99f011475..91fe7f38c 100644 --- a/generate/templates/manual/revwalk/commit_walk.cc +++ b/generate/templates/manual/revwalk/commit_walk.cc @@ -111,8 +111,8 @@ void GitRevwalk::CommitWalkWorker::HandleOKCallback() { free((void *)baton->error); } else if (baton->error_code < 0) { Local err = Nan::To(Nan::Error("Revwalk commitWalk has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.commitWalk").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.commitWalk").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/revwalk/fast_walk.cc b/generate/templates/manual/revwalk/fast_walk.cc index 191bc6b4f..002251852 100644 --- a/generate/templates/manual/revwalk/fast_walk.cc +++ b/generate/templates/manual/revwalk/fast_walk.cc @@ -94,8 +94,8 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() } else { err = Nan::To(Nan::Error("Method fastWalk has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); Local argv[1] = { err }; @@ -159,8 +159,8 @@ void GitRevwalk::FastWalkWorker::HandleOKCallback() if (!callbackFired) { Local err = Nan::To(Nan::Error("Method next has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fastWalk").ToLocalChecked()); Local argv[1] = { err }; diff --git a/generate/templates/manual/revwalk/file_history_walk.cc b/generate/templates/manual/revwalk/file_history_walk.cc index e55d86e9f..d8d2935df 100644 --- a/generate/templates/manual/revwalk/file_history_walk.cc +++ b/generate/templates/manual/revwalk/file_history_walk.cc @@ -448,8 +448,8 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() } else { err = Nan::To(Nan::Error("Method fileHistoryWalk has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -465,8 +465,8 @@ void GitRevwalk::FileHistoryWalkWorker::HandleOKCallback() if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method next has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("Revwalk.fileHistoryWalk").ToLocalChecked()); v8::Local argv[1] = { err }; diff --git a/generate/templates/manual/src/filter_registry.cc b/generate/templates/manual/src/filter_registry.cc index 4014b4abe..67e958d03 100644 --- a/generate/templates/manual/src/filter_registry.cc +++ b/generate/templates/manual/src/filter_registry.cc @@ -106,8 +106,8 @@ void GitFilterRegistry::RegisterWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -118,8 +118,8 @@ void GitFilterRegistry::RegisterWorker::HandleOKCallback() { } else if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.register").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -192,8 +192,8 @@ void GitFilterRegistry::UnregisterWorker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method register has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -204,8 +204,8 @@ void GitFilterRegistry::UnregisterWorker::HandleOKCallback() { } else if (baton->error_code < 0) { v8::Local err = Nan::To(Nan::Error("Method unregister has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("FilterRegistry.unregister").ToLocalChecked()); v8::Local argv[1] = { err }; diff --git a/generate/templates/partials/async_function.cc b/generate/templates/partials/async_function.cc index f5c4c8918..9a1ce26fe 100644 --- a/generate/templates/partials/async_function.cc +++ b/generate/templates/partials/async_function.cc @@ -167,8 +167,8 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { } else { err = Nan::To(Nan::Error("Method {{ jsFunctionName }} has thrown an error.")).ToLocalChecked(); } - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); v8::Local argv[1] = { err }; @@ -229,8 +229,8 @@ void {{ cppClassName }}::{{ cppFunctionName }}Worker::HandleOKCallback() { if (!callbackFired) { v8::Local err = Nan::To(Nan::Error("Method {{ jsFunctionName }} has thrown an error.")).ToLocalChecked(); - Nan::Set(err,Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); - Nan::Set(err,Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); + Nan::Set(err, Nan::New("errno").ToLocalChecked(), Nan::New(baton->error_code)); + Nan::Set(err, Nan::New("errorFunction").ToLocalChecked(), Nan::New("{{ jsClassName }}.{{ jsFunctionName }}").ToLocalChecked()); v8::Local argv[1] = { err }; diff --git a/generate/templates/templates/nodegit.cc b/generate/templates/templates/nodegit.cc index a9d22ce6d..6a3fa8ef4 100644 --- a/generate/templates/templates/nodegit.cc +++ b/generate/templates/templates/nodegit.cc @@ -85,7 +85,7 @@ void LockMasterGetDiagnostics(const FunctionCallbackInfo& info) { // return a plain JS object with properties v8::Local result = Nan::New(); - Nan::Set(result,Nan::New("storedMutexesCount").ToLocalChecked(), Nan::New(diagnostics.storedMutexesCount)); + Nan::Set(result, Nan::New("storedMutexesCount").ToLocalChecked(), Nan::New(diagnostics.storedMutexesCount)); info.GetReturnValue().Set(result); } @@ -143,11 +143,11 @@ extern "C" void init(v8::Local target) { NODE_SET_METHOD(target, "getThreadSafetyDiagnostics", LockMasterGetDiagnostics); v8::Local threadSafety = Nan::New(); - Nan::Set(threadSafety,Nan::New("DISABLED").ToLocalChecked(), Nan::New((int)LockMaster::Disabled)); - Nan::Set(threadSafety,Nan::New("ENABLED_FOR_ASYNC_ONLY").ToLocalChecked(), Nan::New((int)LockMaster::EnabledForAsyncOnly)); - Nan::Set(threadSafety,Nan::New("ENABLED").ToLocalChecked(), Nan::New((int)LockMaster::Enabled)); + Nan::Set(threadSafety, Nan::New("DISABLED").ToLocalChecked(), Nan::New((int)LockMaster::Disabled)); + Nan::Set(threadSafety, Nan::New("ENABLED_FOR_ASYNC_ONLY").ToLocalChecked(), Nan::New((int)LockMaster::EnabledForAsyncOnly)); + Nan::Set(threadSafety, Nan::New("ENABLED").ToLocalChecked(), Nan::New((int)LockMaster::Enabled)); - Nan::Set(target,Nan::New("THREAD_SAFETY").ToLocalChecked(), threadSafety); + Nan::Set(target, Nan::New("THREAD_SAFETY").ToLocalChecked(), threadSafety); LockMaster::Initialize(); } From 04558820578180cae9ae9446569e70ac22eb97ee Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 12 Jul 2019 12:02:41 +0100 Subject: [PATCH 130/145] :recycle: Missed one Callback->Call without async_resource --- generate/templates/manual/patches/convenient_patches.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/templates/manual/patches/convenient_patches.cc b/generate/templates/manual/patches/convenient_patches.cc index c2403467a..542623f7e 100644 --- a/generate/templates/manual/patches/convenient_patches.cc +++ b/generate/templates/manual/patches/convenient_patches.cc @@ -129,5 +129,5 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { return; } - callback->Call(0, NULL); + Nan::Call(callback, 0, NULL); } From e82db052c4ed9f23ba0117cea08e0eed513f1b23 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Fri, 12 Jul 2019 12:12:21 +0100 Subject: [PATCH 131/145] :bug: Needs the reference to callback, not the pointer --- generate/templates/manual/patches/convenient_patches.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate/templates/manual/patches/convenient_patches.cc b/generate/templates/manual/patches/convenient_patches.cc index 542623f7e..795dca506 100644 --- a/generate/templates/manual/patches/convenient_patches.cc +++ b/generate/templates/manual/patches/convenient_patches.cc @@ -129,5 +129,5 @@ void GitPatch::ConvenientFromDiffWorker::HandleOKCallback() { return; } - Nan::Call(callback, 0, NULL); + Nan::Call(*callback, 0, NULL); } From d89446c2d6c7767a6a827cd0d92c5246787eafa3 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Fri, 12 Jul 2019 14:30:57 -0700 Subject: [PATCH 132/145] Remove NSEC It seems that since we've been building without NSEC, if you operate on a repository that had been cloned without NSEC, using NSEC to perform working directory diffs can be incredibly slow. To mitigate massive slow downs, we'll turn this off for now. It can still be enabled and recompiled on a fork of NodeGit fairly easily. --- vendor/libgit2.gyp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index e15ffc247..3f714cdd1 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -21,7 +21,11 @@ "GIT_SSH_MEMORY_CREDENTIALS", "LIBGIT2_NO_FEATURES_H", "GIT_SHA1_COLLISIONDETECT", - "GIT_USE_NSEC", + # "GIT_USE_NSEC", We've been shipping without NSEC for awhile + # Turning NSEC on should be left up to application maintainer + # There may be negative performance impacts using nodegit with + # NSEC turned on in a repository that was cloned with nodegit + # with NSEC turned off "GIT_HTTPS", # Node's util.h may be accidentally included so use this to guard # against compilation error. From 3155eaf60402ba5041bdd795742fed0f27aee793 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 15 Jul 2019 08:45:15 -0700 Subject: [PATCH 133/145] Bump to v0.25.0-alpha.15 --- CHANGELOG.md | 11 +++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c7163e7..5074972b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## v0.25.0-alpha.15 [(2019-07-15)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.15) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.14...v0.25.0-alpha.15) + +#### Summary of changes +- Removed NSEC optimization due to performance regressions in repositories that did not use NSEC optimization cloned via NodeGit. + +#### Merged PRs into NodeGit +- [Remove NSEC #1699](https://github.com/nodegit/nodegit/pull/1699) + + ## v0.25.0-alpha.14 [(2019-07-01)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.14) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.13...v0.25.0-alpha.14) diff --git a/package-lock.json b/package-lock.json index 04529b8d2..9bb1cc6ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.14", + "version": "0.25.0-alpha.15", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a2ab166b5..fa51fb6ba 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.14", + "version": "0.25.0-alpha.15", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From 134ad1a398684163fd22703216f8062538235f09 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Wed, 17 Jul 2019 12:29:05 -0700 Subject: [PATCH 134/145] Audit lodash and fix package-lock.json --- package-lock.json | 125 +++++++++++++++++----------------------------- package.json | 2 +- 2 files changed, 46 insertions(+), 81 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bb1cc6ea..943e5f4a8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1394,6 +1394,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, "requires": { "ms": "2.0.0" } @@ -3337,9 +3338,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + "version": "4.17.14", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.14.tgz", + "integrity": "sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw==" }, "log-driver": { "version": "1.2.7", @@ -3442,18 +3443,10 @@ } } }, - "minizlib": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", - "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", - "requires": { - "minipass": "^2.2.1" - } - }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -3547,12 +3540,13 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==" + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" }, "nanomatch": { "version": "1.2.13", @@ -3598,15 +3592,28 @@ } }, "needle": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.4.tgz", - "integrity": "sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz", + "integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==", "requires": { - "debug": "^2.1.2", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" }, "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", @@ -3639,9 +3646,9 @@ } }, "node-pre-gyp": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", - "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz", + "integrity": "sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==", "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", @@ -3663,25 +3670,6 @@ "abbrev": "1", "osenv": "^0.1.4" } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "tar": { - "version": "4.4.6", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.6.tgz", - "integrity": "sha512-tMkTnh9EdzxyfW+6GK6fCahagXsnYk6kE6S9Gr9pjVdys769+laCTbodXDhPAjzVtEBazRgP0gYqOjnk9dQzLg==", - "requires": { - "chownr": "^1.0.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.3", - "minizlib": "^1.1.0", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } } } }, @@ -3720,14 +3708,14 @@ } }, "npm-bundled": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.5.tgz", - "integrity": "sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==" }, "npm-packlist": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.11.tgz", - "integrity": "sha512-CxKlZ24urLkJk+9kCm48RTQ7L4hsmgSVzEk0TLGPzzyuFxD7VNgy5Sl24tOLMzQv773a/NeJ1ce1DKeacqffEA==", + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz", + "integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==", "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" @@ -4788,9 +4776,9 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -5351,38 +5339,15 @@ "dev": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-stream": { diff --git a/package.json b/package.json index 215a0ca51..bc8815c6a 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "dependencies": { "fs-extra": "^7.0.0", "json5": "^2.1.0", - "lodash": "^4.17.11", + "lodash": "^4.17.14", "nan": "^2.14.0", "node-gyp": "^4.0.0", "node-pre-gyp": "^0.13.0", From ac30e06996401c6335614709b31f0fbc476fb9bd Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 23 Jul 2019 07:58:12 -0700 Subject: [PATCH 135/145] Skip these tests on node 8 due to strange instability These code paths usually work, but are randomly failing in Node 8 environments since we updated to NaN 2.14.0. We're going to skip these tests on Node 8, because the diagnosis is very tricky. For the 3 rebase tests, as far as I can tell, they: 1. Get to rebase.commit 2. The signingCb gets called and completed 3. Freeze 4. The tests timeout 5. rebase.commit finishes executing and the rest of the promise chain completes. Increasing the timeout did not help, and exhibited the same behavior, strangely enough. --- test/tests/rebase.js | 740 ++++++++++++++++++++++--------------------- test/tests/remote.js | 204 ++++++------ 2 files changed, 478 insertions(+), 466 deletions(-) diff --git a/test/tests/rebase.js b/test/tests/rebase.js index a801e991a..87749f539 100644 --- a/test/tests/rebase.js +++ b/test/tests/rebase.js @@ -5,6 +5,8 @@ var fse = require("fs-extra"); var garbageCollect = require("../utils/garbage_collect.js"); +const isNode8 = process.versions.node.split(".")[0] === "8"; + describe("Rebase", function() { var NodeGit = require("../../"); var Checkout = NodeGit.Checkout; @@ -1537,27 +1539,28 @@ describe("Rebase", function() { }); }); - it("can sign commits during the rebase", function() { - var baseFileName = "baseNewFile.txt"; - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; + if (!isNode8) { + it("can sign commits during the rebase", function() { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; - var baseFileContent = "How do you feel about Toll Roads?"; - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create + ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create + ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - var repository = this.repository; - var ourCommit; - var ourBranch; - var theirBranch; - var rebase; + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), + return fse.writeFile(path.join(repository.workdir(), baseFileName), baseFileContent) // Load up the repository index and make our initial commit to HEAD .then(function() { @@ -1565,43 +1568,43 @@ describe("Rebase", function() { }) .then(function(oid) { assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + "b5cdc109d437c4541a13fb7509116b5f03d5039a"); return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); + ourSignature, "initial commit", oid, []); }) .then(function(commitOid) { assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + "be03abdf0353d05924c53bebeb0e5bb129cda44a"); return repository.getCommit(commitOid).then(function(commit) { ourCommit = commit; }).then(function() { return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); - }); + .then(function(branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); }) .then(function(branch) { theirBranch = branch; return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); + theirFileContent); }) .then(function() { return RepoUtils.addFileToIndex(repository, theirFileName); }) .then(function(oid) { assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); + theirSignature, "they made a commit", oid, [ourCommit]); }) .then(function(commitOid) { assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); return removeFileFromIndex(repository, theirFileName); }) @@ -1610,21 +1613,21 @@ describe("Rebase", function() { }) .then(function() { return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); + ourFileContent); }) .then(function() { return RepoUtils.addFileToIndex(repository, ourFileName); }) .then(function(oid) { assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); + return repository.createCommit(ourBranch.name(), ourSignature, + ourSignature, "we made a commit", oid, [ourCommit]); }) .then(function(commitOid) { assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); return removeFileFromIndex(repository, ourFileName); }) @@ -1655,9 +1658,9 @@ describe("Rebase", function() { var theirAnnotatedCommit = annotatedCommits[1]; assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); return NodeGit.Rebase.init(repository, ourAnnotatedCommit, theirAnnotatedCommit, null, { @@ -1667,415 +1670,416 @@ describe("Rebase", function() { signedData: "A moose was here." }) }); - }) - .then(function(newRebase) { - rebase = newRebase; + }) + .then(function(newRebase) { + rebase = newRebase; - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), + return rebase.next(); + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), + assert.equal(rebaseOperation.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - // Make sure we don't crash calling the signature CB - // after collecting garbage. - garbageCollect(); + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); - return rebase.commit(null, ourSignature); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), + return rebase.commit(null, ourSignature); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed"); - // git_rebase_operation_current returns the index of the rebase - // operation that was last applied, so after the first operation, it - // should be 0. - assert.equal(rebase.operationCurrent(), 0); + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); - return rebase.finish(ourSignature, {}); - }) - .then(function(result) { - assert.equal(result, 0); + return rebase.finish(ourSignature, {}); + }) + .then(function(result) { + assert.equal(result, 0); - return repository.getBranchCommit(ourBranchName); - }) - .then(function(commit) { - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), + return repository.getBranchCommit(ourBranchName); + }) + .then(function(commit) { + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed"); - return Promise.all([ - commit.parent(0), - NodeGit.Commit.extractSignature( - repository, - "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed", - "moose-sig" - ) - ]); - }) - .then(function([parent, { signature }]) { - // verify that we are on top of "their commit" - assert.equal(parent.id().toString(), + return Promise.all([ + commit.parent(0), + NodeGit.Commit.extractSignature( + repository, + "24250fe6bd8a782ec1aaca8b2c9a2456a90517ed", + "moose-sig" + ) + ]); + }) + .then(function([parent, { signature }]) { + // verify that we are on top of "their commit" + assert.equal(parent.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - assert.equal(signature, "A moose was here."); + assert.equal(signature, "A moose was here."); + }); }); - }); - it("can optionally skip signing commits", function() { - var baseFileName = "baseNewFile.txt"; - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; + it("can optionally skip signing commits", function() { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; - var baseFileContent = "How do you feel about Toll Roads?"; - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create - ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create - ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); + var ourSignature = NodeGit.Signature.create + ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); + var theirSignature = NodeGit.Signature.create + ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - var repository = this.repository; - var ourCommit; - var ourBranch; - var theirBranch; - var rebase; + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), + return fse.writeFile(path.join(repository.workdir(), baseFileName), + baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function() { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, + return repository.createCommit("HEAD", ourSignature, ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) + return repository.getCommit(commitOid).then(function(commit) { + ourCommit = commit; + }).then(function() { + return repository.createBranch(ourBranchName, commitOid) .then(function(branch) { ourBranch = branch; return repository.createBranch(theirBranchName, commitOid); }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), + }); + }) + .then(function(branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); - return repository.createCommit(theirBranch.name(), theirSignature, + return repository.createCommit(theirBranch.name(), theirSignature, theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), + return removeFileFromIndex(repository, theirFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function() { + return fse.writeFile(path.join(repository.workdir(), ourFileName), ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); return repository.createCommit(ourBranch.name(), ourSignature, - ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), + ourSignature, "we made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function() { + return repository.checkoutBranch(ourBranchName); + }) + .then(function() { + return Promise.all([ + repository.getReference(ourBranchName), + repository.getReference(theirBranchName) + ]); + }) + .then(function(refs) { + assert.equal(refs.length, 2); - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + ]); + }) + .then(function(annotatedCommits) { + assert.equal(annotatedCommits.length, 2); - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; - assert.equal(ourAnnotatedCommit.id().toString(), + assert.equal(ourAnnotatedCommit.id().toString(), "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), + assert.equal(theirAnnotatedCommit.id().toString(), "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null, { - signingCb: () => ({ - code: NodeGit.Error.CODE.PASSTHROUGH - }) - }); - }) - .then(function(newRebase) { - rebase = newRebase; + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, + theirAnnotatedCommit, null, { + signingCb: () => ({ + code: NodeGit.Error.CODE.PASSTHROUGH + }) + }); + }) + .then(function(newRebase) { + rebase = newRebase; - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return rebase.next(); + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), + NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - // Make sure we don't crash calling the signature CB - // after collecting garbage. - garbageCollect(); + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); - return rebase.commit(null, ourSignature); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + return rebase.commit(null, ourSignature); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "b937100ee0ea17ef20525306763505a7fe2be29e"); - // git_rebase_operation_current returns the index of the rebase - // operation that was last applied, so after the first operation, it - // should be 0. - assert.equal(rebase.operationCurrent(), 0); + // git_rebase_operation_current returns the index of the rebase + // operation that was last applied, so after the first operation, it + // should be 0. + assert.equal(rebase.operationCurrent(), 0); - return rebase.finish(ourSignature, {}); - }) - .then(function(result) { - assert.equal(result, 0); + return rebase.finish(ourSignature, {}); + }) + .then(function(result) { + assert.equal(result, 0); - return repository.getBranchCommit(ourBranchName); - }) - .then(function(commit) { - // verify that the "ours" branch has moved to the correct place - assert.equal(commit.id().toString(), - "b937100ee0ea17ef20525306763505a7fe2be29e"); + return repository.getBranchCommit(ourBranchName); + }) + .then(function(commit) { + // verify that the "ours" branch has moved to the correct place + assert.equal(commit.id().toString(), + "b937100ee0ea17ef20525306763505a7fe2be29e"); - return commit.parent(0); - }) - .then(function(parent) { - // verify that we are on top of "their commit" - assert.equal(parent.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return NodeGit.Commit.extractSignature( - repository, - "b937100ee0ea17ef20525306763505a7fe2be29e", - "moose-sig" - ) - .then(function() { - assert.fail("This commit should not be signed."); - }, function (error) { - if (error && error.message === "this commit is not signed") { - return; - } - throw error; + return commit.parent(0); + }) + .then(function(parent) { + // verify that we are on top of "their commit" + assert.equal(parent.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return NodeGit.Commit.extractSignature( + repository, + "b937100ee0ea17ef20525306763505a7fe2be29e", + "moose-sig" + ) + .then(function() { + assert.fail("This commit should not be signed."); + }, function (error) { + if (error && error.message === "this commit is not signed") { + return; + } + throw error; + }); }); - }); - }); + }); - it("will throw if commit signing cb returns an error code", function() { - var baseFileName = "baseNewFile.txt"; - var ourFileName = "ourNewFile.txt"; - var theirFileName = "theirNewFile.txt"; + it("will throw if commit signing cb returns an error code", function() { + var baseFileName = "baseNewFile.txt"; + var ourFileName = "ourNewFile.txt"; + var theirFileName = "theirNewFile.txt"; - var baseFileContent = "How do you feel about Toll Roads?"; - var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; - var theirFileContent = "I'm skeptical about Toll Roads"; + var baseFileContent = "How do you feel about Toll Roads?"; + var ourFileContent = "I like Toll Roads. I have an EZ-Pass!"; + var theirFileContent = "I'm skeptical about Toll Roads"; - var ourSignature = NodeGit.Signature.create + var ourSignature = NodeGit.Signature.create ("Ron Paul", "RonPaul@TollRoadsRBest.info", 123456789, 60); - var theirSignature = NodeGit.Signature.create + var theirSignature = NodeGit.Signature.create ("Greg Abbott", "Gregggg@IllTollYourFace.us", 123456789, 60); - var repository = this.repository; - var ourCommit; - var ourBranch; - var theirBranch; - var rebase; + var repository = this.repository; + var ourCommit; + var ourBranch; + var theirBranch; + var rebase; - return fse.writeFile(path.join(repository.workdir(), baseFileName), - baseFileContent) - // Load up the repository index and make our initial commit to HEAD - .then(function() { - return RepoUtils.addFileToIndex(repository, baseFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "b5cdc109d437c4541a13fb7509116b5f03d5039a"); + return fse.writeFile(path.join(repository.workdir(), baseFileName), + baseFileContent) + // Load up the repository index and make our initial commit to HEAD + .then(function() { + return RepoUtils.addFileToIndex(repository, baseFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "b5cdc109d437c4541a13fb7509116b5f03d5039a"); - return repository.createCommit("HEAD", ourSignature, - ourSignature, "initial commit", oid, []); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "be03abdf0353d05924c53bebeb0e5bb129cda44a"); + return repository.createCommit("HEAD", ourSignature, + ourSignature, "initial commit", oid, []); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "be03abdf0353d05924c53bebeb0e5bb129cda44a"); - return repository.getCommit(commitOid).then(function(commit) { - ourCommit = commit; - }).then(function() { - return repository.createBranch(ourBranchName, commitOid) - .then(function(branch) { - ourBranch = branch; - return repository.createBranch(theirBranchName, commitOid); + return repository.getCommit(commitOid).then(function(commit) { + ourCommit = commit; + }).then(function() { + return repository.createBranch(ourBranchName, commitOid) + .then(function(branch) { + ourBranch = branch; + return repository.createBranch(theirBranchName, commitOid); + }); }); - }); - }) - .then(function(branch) { - theirBranch = branch; - return fse.writeFile(path.join(repository.workdir(), theirFileName), - theirFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, theirFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); + }) + .then(function(branch) { + theirBranch = branch; + return fse.writeFile(path.join(repository.workdir(), theirFileName), + theirFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, theirFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "be5f0fd38a39a67135ad68921c93cd5c17fefb3d"); - return repository.createCommit(theirBranch.name(), theirSignature, - theirSignature, "they made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return repository.createCommit(theirBranch.name(), theirSignature, + theirSignature, "they made a commit", oid, [ourCommit]); + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); - return removeFileFromIndex(repository, theirFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), theirFileName)); - }) - .then(function() { - return fse.writeFile(path.join(repository.workdir(), ourFileName), - ourFileContent); - }) - .then(function() { - return RepoUtils.addFileToIndex(repository, ourFileName); - }) - .then(function(oid) { - assert.equal(oid.toString(), - "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); + return removeFileFromIndex(repository, theirFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), theirFileName)); + }) + .then(function() { + return fse.writeFile(path.join(repository.workdir(), ourFileName), + ourFileContent); + }) + .then(function() { + return RepoUtils.addFileToIndex(repository, ourFileName); + }) + .then(function(oid) { + assert.equal(oid.toString(), + "77867fc0bfeb3f80ab18a78c8d53aa3a06207047"); - return repository.createCommit(ourBranch.name(), ourSignature, + return repository.createCommit(ourBranch.name(), ourSignature, ourSignature, "we made a commit", oid, [ourCommit]); - }) - .then(function(commitOid) { - assert.equal(commitOid.toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - - return removeFileFromIndex(repository, ourFileName); - }) - .then(function() { - return fse.remove(path.join(repository.workdir(), ourFileName)); - }) - .then(function() { - return repository.checkoutBranch(ourBranchName); - }) - .then(function() { - return Promise.all([ - repository.getReference(ourBranchName), - repository.getReference(theirBranchName) - ]); - }) - .then(function(refs) { - assert.equal(refs.length, 2); - - return Promise.all([ - NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), - NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) - ]); - }) - .then(function(annotatedCommits) { - assert.equal(annotatedCommits.length, 2); - - var ourAnnotatedCommit = annotatedCommits[0]; - var theirAnnotatedCommit = annotatedCommits[1]; + }) + .then(function(commitOid) { + assert.equal(commitOid.toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(ourAnnotatedCommit.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - assert.equal(theirAnnotatedCommit.id().toString(), - "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + return removeFileFromIndex(repository, ourFileName); + }) + .then(function() { + return fse.remove(path.join(repository.workdir(), ourFileName)); + }) + .then(function() { + return repository.checkoutBranch(ourBranchName); + }) + .then(function() { + return Promise.all([ + repository.getReference(ourBranchName), + repository.getReference(theirBranchName) + ]); + }) + .then(function(refs) { + assert.equal(refs.length, 2); - return NodeGit.Rebase.init(repository, ourAnnotatedCommit, - theirAnnotatedCommit, null, { - signingCb: () => ({ - code: NodeGit.Error.CODE.ERROR + return Promise.all([ + NodeGit.AnnotatedCommit.fromRef(repository, refs[0]), + NodeGit.AnnotatedCommit.fromRef(repository, refs[1]) + ]); + }) + .then(function(annotatedCommits) { + assert.equal(annotatedCommits.length, 2); + + var ourAnnotatedCommit = annotatedCommits[0]; + var theirAnnotatedCommit = annotatedCommits[1]; + + assert.equal(ourAnnotatedCommit.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + assert.equal(theirAnnotatedCommit.id().toString(), + "e9ebd92f2f4778baf6fa8e92f0c68642f931a554"); + + return NodeGit.Rebase.init(repository, ourAnnotatedCommit, + theirAnnotatedCommit, null, { + signingCb: () => ({ + code: NodeGit.Error.CODE.ERROR + }) + }); }) - }); - }) - .then(function(newRebase) { - rebase = newRebase; + .then(function(newRebase) { + rebase = newRebase; - // there should only be 1 rebase operation to perform - assert.equal(rebase.operationEntrycount(), 1); + // there should only be 1 rebase operation to perform + assert.equal(rebase.operationEntrycount(), 1); - return rebase.next(); - }) - .then(function(rebaseOperation) { - assert.equal(rebaseOperation.type(), - NodeGit.RebaseOperation.REBASE_OPERATION.PICK); - assert.equal(rebaseOperation.id().toString(), - "e7f37ee070837052937e24ad8ba66f6d83ae7941"); + return rebase.next(); + }) + .then(function(rebaseOperation) { + assert.equal(rebaseOperation.type(), + NodeGit.RebaseOperation.REBASE_OPERATION.PICK); + assert.equal(rebaseOperation.id().toString(), + "e7f37ee070837052937e24ad8ba66f6d83ae7941"); - // Make sure we don't crash calling the signature CB - // after collecting garbage. - garbageCollect(); + // Make sure we don't crash calling the signature CB + // after collecting garbage. + garbageCollect(); - return rebase.commit(null, ourSignature); - }) - .then(function() { - assert.fail("rebase.commit should have failed"); - }, function(error) { - if (error && error.errno === NodeGit.Error.CODE.ERROR) { - return; - } - throw error; - }); - }); + return rebase.commit(null, ourSignature); + }) + .then(function() { + assert.fail("rebase.commit should have failed"); + }, function(error) { + if (error && error.errno === NodeGit.Error.CODE.ERROR) { + return; + } + throw error; + }); + }); + } it("will not throw on patch already applied errors", function() { var baseFileName = "baseNewFile.txt"; diff --git a/test/tests/remote.js b/test/tests/remote.js index 0aa502619..e5d4eed1f 100644 --- a/test/tests/remote.js +++ b/test/tests/remote.js @@ -7,6 +7,8 @@ var fp = require("lodash/fp"); var garbageCollect = require("../utils/garbage_collect.js"); var RepoUtils = require("../utils/repository_setup"); +const isNode8 = process.versions.node.split(".")[0] === "8"; + describe("Remote", function() { var NodeGit = require("../../"); var Repository = NodeGit.Repository; @@ -317,10 +319,11 @@ describe("Remote", function() { }); }); - it("will reject if credentials promise rejects", function() { - var repo = this.repository; - var branch = "should-not-exist"; - return Remote.lookup(repo, "origin") + if (!isNode8) { + it("will reject if credentials promise rejects", function() { + var repo = this.repository; + var branch = "should-not-exist"; + return Remote.lookup(repo, "origin") .then(function(remote) { var ref = "refs/heads/" + branch; var refs = [ref + ":" + ref]; @@ -328,12 +331,12 @@ describe("Remote", function() { callbacks: { credentials: function(url, userName) { var test = Promise.resolve("test") - .then(function() { return; }) - .then(function() { return; }) - .then(function() { return; }) - .then(function() { - return Promise.reject(new Error("failure case")); - }); + .then(function() { return; }) + .then(function() { return; }) + .then(function() { return; }) + .then(function() { + return Promise.reject(new Error("failure case")); + }); return test; }, certificateCheck: () => 0 @@ -344,101 +347,106 @@ describe("Remote", function() { .then(function() { return Promise.reject( new Error("should not be able to push to the repository")); - }, function(err) { - if (err.message === "failure case") - { - return Promise.resolve(); - } else { - throw err; - } - }) - .then(function() { - return Remote.lookup(repo, "origin"); - }) - .then(function(remote) { - var ref = "refs/heads/" + branch; - var refs = [ref + ":" + ref]; - var options = { - callbacks: { - credentials: function(url, userName) { - var test = Promise.resolve() + }, function(err) { + if (err.message === "failure case") + { + return Promise.resolve(); + } else { + throw err; + } + }) + .then(function() { + return Remote.lookup(repo, "origin"); + }) + .then(function(remote) { + var ref = "refs/heads/" + branch; + var refs = [ref + ":" + ref]; + var options = { + callbacks: { + credentials: function(url, userName) { + var test = Promise.resolve() .then(Promise.resolve.bind(Promise)) .then(Promise.resolve.bind(Promise)) .then(Promise.resolve.bind(Promise)) .then(Promise.reject.bind(Promise)); - return test; - }, - certificateCheck: () => 0 - } - }; - return remote.push(refs, options); - }) - .then(function() { - return Promise.reject( - new Error("should not be able to push to the repository")); - }, function(err) { - if (err.message === "Method push has thrown an error.") - { - return Promise.resolve(); - } else { - throw err; - } - }); - }); + return test; + }, + certificateCheck: () => 0 + } + }; + return remote.push(refs, options); + }) + .then(function() { + return Promise.reject( + new Error("should not be able to push to the repository")); + }, function(err) { + if (err.message === "Method push has thrown an error.") + { + return Promise.resolve(); + } else { + throw err; + } + }); + }); - it("cannot push to a repository with invalid credentials", function() { - var repo = this.repository; - var branch = "should-not-exist"; - return Remote.lookup(repo, "origin") - .then(function(remote) { - var ref = "refs/heads/" + branch; - var refs = [ref + ":" + ref]; - var firstPass = true; - var options = { - callbacks: { - credentials: function(url, userName) { - if (firstPass) { - firstPass = false; - if (url.indexOf("https") === -1) { - return NodeGit.Cred.sshKeyFromAgent(userName); - } else { - return NodeGit.Cred.userpassPlaintextNew(userName, ""); - } + it("cannot push to a repository with invalid credentials", function() { + var repo = this.repository; + var branch = "should-not-exist"; + return Remote.lookup(repo, "origin") + .then(function(remote) { + var ref = "refs/heads/" + branch; + var refs = [ref + ":" + ref]; + var firstPass = true; + var options = { + callbacks: { + credentials: function(url, userName) { + if (firstPass) { + firstPass = false; + if (url.indexOf("https") === -1) { + return NodeGit.Cred.sshKeyFromAgent(userName); + } else { + return NodeGit.Cred.userpassPlaintextNew(userName, ""); + } + } else { + return Promise.reject(); + } + }, + certificateCheck: () => 0 + } + }; + return remote.push(refs, options); + }) + // takes care of windows bug, see the .catch for the proper pathway + // that this flow should take (cred cb doesn't run twice -> + // throws error) + .then(function() { + return Promise.reject( + new Error("should not be able to push to the repository")); + }, function(err) { + if (err.message.indexOf(401) === -1) { + throw err; } else { - return Promise.reject(); + return Promise.resolve(); } - }, - certificateCheck: () => 0 - } - }; - return remote.push(refs, options); - }) - // takes care of windows bug, see the .catch for the proper pathway - // that this flow should take (cred cb doesn't run twice -> throws error) - .then(function() { - return Promise.reject( - new Error("should not be able to push to the repository")); - }, function(err) { - if (err.message.indexOf(401) === -1) { - throw err; - } else { - return Promise.resolve(); - } - }) - // catches linux / osx failure to use anonymous credentials - // stops callback infinite loop - .catch(function (reason) { - const messageWithoutNewlines = reason.message.replace(/\n|\r/g, ""); - const validErrors = [ - "Method push has thrown an error.", - "failed to set credentials: The parameter is incorrect." - ]; - assert.ok( - _.includes(validErrors, messageWithoutNewlines), - "Unexpected error: " + reason.message - ); - }); - }); + }) + // catches linux / osx failure to use anonymous credentials + // stops callback infinite loop + .catch(function (reason) { + const messageWithoutNewlines = reason.message.replace( + /\n|\r/g, + "" + ); + const validErrors = [ + "Method push has thrown an error.", + "failed to set credentials: The parameter is incorrect." + ]; + assert.ok( + _.includes(validErrors, messageWithoutNewlines), + "Unexpected error: " + reason.message + ); + }); + }); + } it("is kept alive by refspec", function() { var repo = this.repository; From 1afb333157891a8a22322e8065f3c27e2d692c53 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 22 Jul 2019 10:28:05 -0700 Subject: [PATCH 136/145] Bump libgit2 --- vendor/libgit2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/libgit2 b/vendor/libgit2 index 0cfb5596a..6abd07fcc 160000 --- a/vendor/libgit2 +++ b/vendor/libgit2 @@ -1 +1 @@ -Subproject commit 0cfb5596ac1d0a0a88c3a449f885ee84ec4a8fb3 +Subproject commit 6abd07fccde53babc0835dcdd05607313aa72bec From a5680b68ced14fbd6aa58be1c907e011865fac29 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 22 Jul 2019 10:41:23 -0700 Subject: [PATCH 137/145] Update libgit2 docs / gyp for compilation --- generate/input/libgit2-docs.json | 758 ++++++++++++++++--------------- vendor/libgit2.gyp | 16 +- 2 files changed, 394 insertions(+), 380 deletions(-) diff --git a/generate/input/libgit2-docs.json b/generate/input/libgit2-docs.json index 7717a3886..6f40724ce 100644 --- a/generate/input/libgit2-docs.json +++ b/generate/input/libgit2-docs.json @@ -23,7 +23,7 @@ "git_apply" ], "meta": {}, - "lines": 128 + "lines": 133 }, { "file": "git2/attr.h", @@ -108,7 +108,7 @@ "git_buf_contains_nul" ], "meta": {}, - "lines": 122 + "lines": 128 }, { "file": "git2/checkout.h", @@ -122,7 +122,7 @@ "git_checkout_tree" ], "meta": {}, - "lines": 375 + "lines": 394 }, { "file": "git2/cherrypick.h", @@ -266,7 +266,7 @@ "git_blame_init_options" ], "meta": {}, - "lines": 423 + "lines": 437 }, { "file": "git2/describe.h", @@ -879,7 +879,7 @@ "git_remote_default_branch" ], "meta": {}, - "lines": 948 + "lines": 949 }, { "file": "git2/repository.h", @@ -932,7 +932,7 @@ "git_repository_set_ident" ], "meta": {}, - "lines": 898 + "lines": 899 }, { "file": "git2/reset.h", @@ -1032,7 +1032,7 @@ "git_status_should_ignore" ], "meta": {}, - "lines": 374 + "lines": 383 }, { "file": "git2/strarray.h", @@ -1189,7 +1189,7 @@ "git_cred_acquire_cb" ], "meta": {}, - "lines": 367 + "lines": 381 }, { "file": "git2/tree.h", @@ -1493,8 +1493,8 @@ "git_apply_to_tree": { "type": "function", "file": "git2/apply.h", - "line": 87, - "lineto": 92, + "line": 92, + "lineto": 97, "args": [ { "name": "out", @@ -1535,8 +1535,8 @@ "git_apply": { "type": "function", "file": "git2/apply.h", - "line": 124, - "lineto": 128, + "line": 129, + "lineto": 133, "args": [ { "name": "repo", @@ -2949,8 +2949,8 @@ "git_buf_dispose": { "type": "function", "file": "git2/buffer.h", - "line": 72, - "lineto": 72, + "line": 78, + "lineto": 78, "args": [ { "name": "buffer", @@ -2979,8 +2979,8 @@ "git_buf_grow": { "type": "function", "file": "git2/buffer.h", - "line": 95, - "lineto": 95, + "line": 101, + "lineto": 101, "args": [ { "name": "buffer", @@ -3006,8 +3006,8 @@ "git_buf_set": { "type": "function", "file": "git2/buffer.h", - "line": 105, - "lineto": 106, + "line": 111, + "lineto": 112, "args": [ { "name": "buffer", @@ -3038,8 +3038,8 @@ "git_buf_is_binary": { "type": "function", "file": "git2/buffer.h", - "line": 114, - "lineto": 114, + "line": 120, + "lineto": 120, "args": [ { "name": "buf", @@ -3060,8 +3060,8 @@ "git_buf_contains_nul": { "type": "function", "file": "git2/buffer.h", - "line": 122, - "lineto": 122, + "line": 128, + "lineto": 128, "args": [ { "name": "buf", @@ -3082,8 +3082,8 @@ "git_checkout_options_init": { "type": "function", "file": "git2/checkout.h", - "line": 322, - "lineto": 324, + "line": 341, + "lineto": 343, "args": [ { "name": "opts", @@ -3109,8 +3109,8 @@ "git_checkout_head": { "type": "function", "file": "git2/checkout.h", - "line": 343, - "lineto": 345, + "line": 362, + "lineto": 364, "args": [ { "name": "repo", @@ -3136,8 +3136,8 @@ "git_checkout_index": { "type": "function", "file": "git2/checkout.h", - "line": 356, - "lineto": 359, + "line": 375, + "lineto": 378, "args": [ { "name": "repo", @@ -3168,8 +3168,8 @@ "git_checkout_tree": { "type": "function", "file": "git2/checkout.h", - "line": 372, - "lineto": 375, + "line": 391, + "lineto": 394, "args": [ { "name": "repo", @@ -5651,8 +5651,8 @@ }, { "name": "maps", - "type": "const git_cvar_map *", - "comment": "array of `git_cvar_map` objects specifying the possible mappings" + "type": "const git_configmap *", + "comment": "array of `git_configmap` objects specifying the possible mappings" }, { "name": "map_n", @@ -5660,14 +5660,14 @@ "comment": "number of mapping objects in `maps`" } ], - "argline": "int *out, const git_config *cfg, const char *name, const git_cvar_map *maps, size_t map_n", - "sig": "int *::const git_config *::const char *::const git_cvar_map *::size_t", + "argline": "int *out, const git_config *cfg, const char *name, const git_configmap *maps, size_t map_n", + "sig": "int *::const git_config *::const char *::const git_configmap *::size_t", "return": { "type": "int", "comment": " 0 on success, error code otherwise" }, "description": "

Query the value of a config variable and return it mapped to\n an integer constant.

\n", - "comments": "

This is a helper method to easily map different possible values to a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n
git_cvar_map autocrlf_mapping[] = {     {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},        {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},      {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},        {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n
\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing the GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison), the given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be returned.

\n", + "comments": "

This is a helper method to easily map different possible values to a variable to integer constants that easily identify them.

\n\n

A mapping array looks as follows:

\n\n
git_configmap autocrlf_mapping[] = {        {GIT_CVAR_FALSE, NULL, GIT_AUTO_CRLF_FALSE},        {GIT_CVAR_TRUE, NULL, GIT_AUTO_CRLF_TRUE},      {GIT_CVAR_STRING, "input", GIT_AUTO_CRLF_INPUT},        {GIT_CVAR_STRING, "default", GIT_AUTO_CRLF_DEFAULT}};\n
\n\n

On any "false" value for the variable (e.g. "false", "FALSE", "no"), the mapping will store GIT_AUTO_CRLF_FALSE in the out parameter.

\n\n

The same thing applies for any "true" value such as "true", "yes" or "1", storing the GIT_AUTO_CRLF_TRUE variable.

\n\n

Otherwise, if the value matches the string "input" (with case insensitive comparison), the given constant will be stored in out, and likewise for "default".

\n\n

If not a single match can be made to store in out, an error code will be returned.

\n", "group": "config" }, "git_config_lookup_map_value": { @@ -5683,8 +5683,8 @@ }, { "name": "maps", - "type": "const git_cvar_map *", - "comment": "array of `git_cvar_map` objects specifying the possible mappings" + "type": "const git_configmap *", + "comment": "array of `git_configmap` objects specifying the possible mappings" }, { "name": "map_n", @@ -5697,8 +5697,8 @@ "comment": "value to parse" } ], - "argline": "int *out, const git_cvar_map *maps, size_t map_n, const char *value", - "sig": "int *::const git_cvar_map *::size_t::const char *", + "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 @@ -5924,8 +5924,8 @@ "git_blob_create_fromworkdir": { "type": "function", "file": "git2/deprecated.h", - "line": 80, - "lineto": 80, + "line": 81, + "lineto": 81, "args": [ { "name": "id", @@ -5956,8 +5956,8 @@ "git_buf_free": { "type": "function", "file": "git2/deprecated.h", - "line": 115, - "lineto": 115, + "line": 116, + "lineto": 116, "args": [ { "name": "buffer", @@ -5978,8 +5978,8 @@ "giterr_last": { "type": "function", "file": "git2/deprecated.h", - "line": 176, - "lineto": 176, + "line": 190, + "lineto": 190, "args": [], "argline": "", "sig": "", @@ -5994,8 +5994,8 @@ "giterr_clear": { "type": "function", "file": "git2/deprecated.h", - "line": 188, - "lineto": 188, + "line": 202, + "lineto": 202, "args": [], "argline": "", "sig": "", @@ -6010,8 +6010,8 @@ "giterr_set_str": { "type": "function", "file": "git2/deprecated.h", - "line": 200, - "lineto": 200, + "line": 214, + "lineto": 214, "args": [ { "name": "error_class", @@ -6037,8 +6037,8 @@ "giterr_set_oom": { "type": "function", "file": "git2/deprecated.h", - "line": 212, - "lineto": 212, + "line": 226, + "lineto": 226, "args": [], "argline": "", "sig": "", @@ -6053,8 +6053,8 @@ "git_oid_iszero": { "type": "function", "file": "git2/deprecated.h", - "line": 364, - "lineto": 364, + "line": 378, + "lineto": 378, "args": [ { "name": "id", @@ -6075,8 +6075,8 @@ "git_blame_init_options": { "type": "function", "file": "git2/deprecated.h", - "line": 423, - "lineto": 423, + "line": 437, + "lineto": 437, "args": [ { "name": "opts", @@ -17837,8 +17837,8 @@ "git_remote_init_callbacks": { "type": "function", "file": "git2/remote.h", - "line": 598, - "lineto": 600, + "line": 599, + "lineto": 601, "args": [ { "name": "opts", @@ -17864,8 +17864,8 @@ "git_fetch_options_init": { "type": "function", "file": "git2/remote.h", - "line": 704, - "lineto": 706, + "line": 705, + "lineto": 707, "args": [ { "name": "opts", @@ -17891,8 +17891,8 @@ "git_push_options_init": { "type": "function", "file": "git2/remote.h", - "line": 754, - "lineto": 756, + "line": 755, + "lineto": 757, "args": [ { "name": "opts", @@ -17918,8 +17918,8 @@ "git_remote_download": { "type": "function", "file": "git2/remote.h", - "line": 774, - "lineto": 774, + "line": 775, + "lineto": 775, "args": [ { "name": "remote", @@ -17950,8 +17950,8 @@ "git_remote_upload": { "type": "function", "file": "git2/remote.h", - "line": 788, - "lineto": 788, + "line": 789, + "lineto": 789, "args": [ { "name": "remote", @@ -17982,8 +17982,8 @@ "git_remote_update_tips": { "type": "function", "file": "git2/remote.h", - "line": 804, - "lineto": 809, + "line": 805, + "lineto": 810, "args": [ { "name": "remote", @@ -18024,8 +18024,8 @@ "git_remote_fetch": { "type": "function", "file": "git2/remote.h", - "line": 825, - "lineto": 829, + "line": 826, + "lineto": 830, "args": [ { "name": "remote", @@ -18066,8 +18066,8 @@ "git_remote_prune": { "type": "function", "file": "git2/remote.h", - "line": 838, - "lineto": 838, + "line": 839, + "lineto": 839, "args": [ { "name": "remote", @@ -18093,8 +18093,8 @@ "git_remote_push": { "type": "function", "file": "git2/remote.h", - "line": 850, - "lineto": 852, + "line": 851, + "lineto": 853, "args": [ { "name": "remote", @@ -18125,8 +18125,8 @@ "git_remote_stats": { "type": "function", "file": "git2/remote.h", - "line": 857, - "lineto": 857, + "line": 858, + "lineto": 858, "args": [ { "name": "remote", @@ -18152,8 +18152,8 @@ "git_remote_autotag": { "type": "function", "file": "git2/remote.h", - "line": 865, - "lineto": 865, + "line": 866, + "lineto": 866, "args": [ { "name": "remote", @@ -18174,8 +18174,8 @@ "git_remote_set_autotag": { "type": "function", "file": "git2/remote.h", - "line": 877, - "lineto": 877, + "line": 878, + "lineto": 878, "args": [ { "name": "repo", @@ -18206,8 +18206,8 @@ "git_remote_prune_refs": { "type": "function", "file": "git2/remote.h", - "line": 884, - "lineto": 884, + "line": 885, + "lineto": 885, "args": [ { "name": "remote", @@ -18228,8 +18228,8 @@ "git_remote_rename": { "type": "function", "file": "git2/remote.h", - "line": 906, - "lineto": 910, + "line": 907, + "lineto": 911, "args": [ { "name": "problems", @@ -18270,8 +18270,8 @@ "git_remote_is_valid_name": { "type": "function", "file": "git2/remote.h", - "line": 918, - "lineto": 918, + "line": 919, + "lineto": 919, "args": [ { "name": "remote_name", @@ -18292,8 +18292,8 @@ "git_remote_delete": { "type": "function", "file": "git2/remote.h", - "line": 930, - "lineto": 930, + "line": 931, + "lineto": 931, "args": [ { "name": "repo", @@ -18324,8 +18324,8 @@ "git_remote_default_branch": { "type": "function", "file": "git2/remote.h", - "line": 948, - "lineto": 948, + "line": 949, + "lineto": 949, "args": [ { "name": "out", @@ -18835,8 +18835,8 @@ "git_repository_item_path": { "type": "function", "file": "git2/repository.h", - "line": 458, - "lineto": 458, + "line": 459, + "lineto": 459, "args": [ { "name": "out", @@ -18867,8 +18867,8 @@ "git_repository_path": { "type": "function", "file": "git2/repository.h", - "line": 469, - "lineto": 469, + "line": 470, + "lineto": 470, "args": [ { "name": "repo", @@ -18897,8 +18897,8 @@ "git_repository_workdir": { "type": "function", "file": "git2/repository.h", - "line": 480, - "lineto": 480, + "line": 481, + "lineto": 481, "args": [ { "name": "repo", @@ -18924,8 +18924,8 @@ "git_repository_commondir": { "type": "function", "file": "git2/repository.h", - "line": 491, - "lineto": 491, + "line": 492, + "lineto": 492, "args": [ { "name": "repo", @@ -18946,8 +18946,8 @@ "git_repository_set_workdir": { "type": "function", "file": "git2/repository.h", - "line": 510, - "lineto": 511, + "line": 511, + "lineto": 512, "args": [ { "name": "repo", @@ -18978,8 +18978,8 @@ "git_repository_is_bare": { "type": "function", "file": "git2/repository.h", - "line": 519, - "lineto": 519, + "line": 520, + "lineto": 520, "args": [ { "name": "repo", @@ -19005,8 +19005,8 @@ "git_repository_is_worktree": { "type": "function", "file": "git2/repository.h", - "line": 527, - "lineto": 527, + "line": 528, + "lineto": 528, "args": [ { "name": "repo", @@ -19027,8 +19027,8 @@ "git_repository_config": { "type": "function", "file": "git2/repository.h", - "line": 543, - "lineto": 543, + "line": 544, + "lineto": 544, "args": [ { "name": "out", @@ -19054,8 +19054,8 @@ "git_repository_config_snapshot": { "type": "function", "file": "git2/repository.h", - "line": 559, - "lineto": 559, + "line": 560, + "lineto": 560, "args": [ { "name": "out", @@ -19087,8 +19087,8 @@ "git_repository_odb": { "type": "function", "file": "git2/repository.h", - "line": 575, - "lineto": 575, + "line": 576, + "lineto": 576, "args": [ { "name": "out", @@ -19122,8 +19122,8 @@ "git_repository_refdb": { "type": "function", "file": "git2/repository.h", - "line": 591, - "lineto": 591, + "line": 592, + "lineto": 592, "args": [ { "name": "out", @@ -19149,8 +19149,8 @@ "git_repository_index": { "type": "function", "file": "git2/repository.h", - "line": 607, - "lineto": 607, + "line": 608, + "lineto": 608, "args": [ { "name": "out", @@ -19193,8 +19193,8 @@ "git_repository_message": { "type": "function", "file": "git2/repository.h", - "line": 625, - "lineto": 625, + "line": 626, + "lineto": 626, "args": [ { "name": "out", @@ -19220,8 +19220,8 @@ "git_repository_message_remove": { "type": "function", "file": "git2/repository.h", - "line": 632, - "lineto": 632, + "line": 633, + "lineto": 633, "args": [ { "name": "repo", @@ -19242,8 +19242,8 @@ "git_repository_state_cleanup": { "type": "function", "file": "git2/repository.h", - "line": 641, - "lineto": 641, + "line": 642, + "lineto": 642, "args": [ { "name": "repo", @@ -19269,8 +19269,8 @@ "git_repository_fetchhead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 672, - "lineto": 675, + "line": 673, + "lineto": 676, "args": [ { "name": "repo", @@ -19301,8 +19301,8 @@ "git_repository_mergehead_foreach": { "type": "function", "file": "git2/repository.h", - "line": 701, - "lineto": 704, + "line": 702, + "lineto": 705, "args": [ { "name": "repo", @@ -19333,8 +19333,8 @@ "git_repository_hashfile": { "type": "function", "file": "git2/repository.h", - "line": 729, - "lineto": 734, + "line": 730, + "lineto": 735, "args": [ { "name": "out", @@ -19375,8 +19375,8 @@ "git_repository_set_head": { "type": "function", "file": "git2/repository.h", - "line": 754, - "lineto": 756, + "line": 755, + "lineto": 757, "args": [ { "name": "repo", @@ -19407,8 +19407,8 @@ "git_repository_set_head_detached": { "type": "function", "file": "git2/repository.h", - "line": 774, - "lineto": 776, + "line": 775, + "lineto": 777, "args": [ { "name": "repo", @@ -19434,8 +19434,8 @@ "git_repository_set_head_detached_from_annotated": { "type": "function", "file": "git2/repository.h", - "line": 790, - "lineto": 792, + "line": 791, + "lineto": 793, "args": [ { "name": "repo", @@ -19466,8 +19466,8 @@ "git_repository_detach_head": { "type": "function", "file": "git2/repository.h", - "line": 811, - "lineto": 812, + "line": 812, + "lineto": 813, "args": [ { "name": "repo", @@ -19488,8 +19488,8 @@ "git_repository_state": { "type": "function", "file": "git2/repository.h", - "line": 842, - "lineto": 842, + "line": 843, + "lineto": 843, "args": [ { "name": "repo", @@ -19518,8 +19518,8 @@ "git_repository_set_namespace": { "type": "function", "file": "git2/repository.h", - "line": 856, - "lineto": 856, + "line": 857, + "lineto": 857, "args": [ { "name": "repo", @@ -19545,8 +19545,8 @@ "git_repository_get_namespace": { "type": "function", "file": "git2/repository.h", - "line": 864, - "lineto": 864, + "line": 865, + "lineto": 865, "args": [ { "name": "repo", @@ -19567,8 +19567,8 @@ "git_repository_is_shallow": { "type": "function", "file": "git2/repository.h", - "line": 873, - "lineto": 873, + "line": 874, + "lineto": 874, "args": [ { "name": "repo", @@ -19589,8 +19589,8 @@ "git_repository_ident": { "type": "function", "file": "git2/repository.h", - "line": 885, - "lineto": 885, + "line": 886, + "lineto": 886, "args": [ { "name": "name", @@ -19621,8 +19621,8 @@ "git_repository_set_ident": { "type": "function", "file": "git2/repository.h", - "line": 898, - "lineto": 898, + "line": 899, + "lineto": 899, "args": [ { "name": "repo", @@ -20884,8 +20884,8 @@ "git_status_options_init": { "type": "function", "file": "git2/status.h", - "line": 203, - "lineto": 205, + "line": 212, + "lineto": 214, "args": [ { "name": "opts", @@ -20911,8 +20911,8 @@ "git_status_foreach": { "type": "function", "file": "git2/status.h", - "line": 243, - "lineto": 246, + "line": 252, + "lineto": 255, "args": [ { "name": "repo", @@ -20948,8 +20948,8 @@ "git_status_foreach_ext": { "type": "function", "file": "git2/status.h", - "line": 267, - "lineto": 271, + "line": 276, + "lineto": 280, "args": [ { "name": "repo", @@ -20990,8 +20990,8 @@ "git_status_file": { "type": "function", "file": "git2/status.h", - "line": 299, - "lineto": 302, + "line": 308, + "lineto": 311, "args": [ { "name": "status_flags", @@ -21027,8 +21027,8 @@ "git_status_list_new": { "type": "function", "file": "git2/status.h", - "line": 317, - "lineto": 320, + "line": 326, + "lineto": 329, "args": [ { "name": "out", @@ -21065,8 +21065,8 @@ "git_status_list_entrycount": { "type": "function", "file": "git2/status.h", - "line": 331, - "lineto": 332, + "line": 340, + "lineto": 341, "args": [ { "name": "statuslist", @@ -21093,8 +21093,8 @@ "git_status_byindex": { "type": "function", "file": "git2/status.h", - "line": 343, - "lineto": 345, + "line": 352, + "lineto": 354, "args": [ { "name": "statuslist", @@ -21130,8 +21130,8 @@ "git_status_list_free": { "type": "function", "file": "git2/status.h", - "line": 352, - "lineto": 353, + "line": 361, + "lineto": 362, "args": [ { "name": "statuslist", @@ -21157,8 +21157,8 @@ "git_status_should_ignore": { "type": "function", "file": "git2/status.h", - "line": 371, - "lineto": 374, + "line": 380, + "lineto": 383, "args": [ { "name": "ignored", @@ -23105,8 +23105,8 @@ "git_cred_has_username": { "type": "function", "file": "git2/transport.h", - "line": 219, - "lineto": 219, + "line": 233, + "lineto": 233, "args": [ { "name": "cred", @@ -23127,8 +23127,8 @@ "git_cred_userpass_plaintext_new": { "type": "function", "file": "git2/transport.h", - "line": 230, - "lineto": 233, + "line": 244, + "lineto": 247, "args": [ { "name": "out", @@ -23159,8 +23159,8 @@ "git_cred_ssh_key_new": { "type": "function", "file": "git2/transport.h", - "line": 246, - "lineto": 251, + "line": 260, + "lineto": 265, "args": [ { "name": "out", @@ -23201,8 +23201,8 @@ "git_cred_ssh_interactive_new": { "type": "function", "file": "git2/transport.h", - "line": 262, - "lineto": 266, + "line": 276, + "lineto": 280, "args": [ { "name": "out", @@ -23238,8 +23238,8 @@ "git_cred_ssh_key_from_agent": { "type": "function", "file": "git2/transport.h", - "line": 276, - "lineto": 278, + "line": 290, + "lineto": 292, "args": [ { "name": "out", @@ -23265,8 +23265,8 @@ "git_cred_ssh_custom_new": { "type": "function", "file": "git2/transport.h", - "line": 298, - "lineto": 304, + "line": 312, + "lineto": 318, "args": [ { "name": "out", @@ -23312,8 +23312,8 @@ "git_cred_default_new": { "type": "function", "file": "git2/transport.h", - "line": 312, - "lineto": 312, + "line": 326, + "lineto": 326, "args": [ { "name": "out", @@ -23334,8 +23334,8 @@ "git_cred_username_new": { "type": "function", "file": "git2/transport.h", - "line": 320, - "lineto": 320, + "line": 334, + "lineto": 334, "args": [ { "name": "cred", @@ -23361,8 +23361,8 @@ "git_cred_ssh_key_memory_new": { "type": "function", "file": "git2/transport.h", - "line": 332, - "lineto": 337, + "line": 346, + "lineto": 351, "args": [ { "name": "out", @@ -23403,8 +23403,8 @@ "git_cred_free": { "type": "function", "file": "git2/transport.h", - "line": 348, - "lineto": 348, + "line": 362, + "lineto": 362, "args": [ { "name": "cred", @@ -24061,7 +24061,7 @@ "argline": "git_treebuilder *bld", "sig": "git_treebuilder *", "return": { - "type": "unsigned int", + "type": "size_t", "comment": " the number of entries in the treebuilder" }, "description": "

Get the number of entries listed in a treebuilder

\n", @@ -25082,8 +25082,8 @@ "git_headlist_cb": { "type": "callback", "file": "git2/deprecated.h", - "line": 409, - "lineto": 409, + "line": 423, + "lineto": 423, "args": [ { "name": "rhead", @@ -25676,8 +25676,8 @@ "git_repository_fetchhead_foreach_cb": { "type": "callback", "file": "git2/repository.h", - "line": 655, - "lineto": 659, + "line": 656, + "lineto": 660, "args": [ { "name": "ref_name", @@ -25717,8 +25717,8 @@ "git_repository_mergehead_foreach_cb": { "type": "callback", "file": "git2/repository.h", - "line": 686, - "lineto": 687, + "line": 687, + "lineto": 688, "args": [ { "name": "oid", @@ -25981,8 +25981,8 @@ "git_cred_acquire_cb": { "type": "callback", "file": "git2/transport.h", - "line": 362, - "lineto": 367, + "line": 376, + "lineto": 381, "args": [ { "name": "cred", @@ -26189,8 +26189,8 @@ ], "type": "enum", "file": "git2/apply.h", - "line": 95, - "lineto": 113, + "line": 100, + "lineto": 118, "block": "GIT_APPLY_LOCATION_WORKDIR\nGIT_APPLY_LOCATION_INDEX\nGIT_APPLY_LOCATION_BOTH", "tdef": "typedef", "description": " Possible application locations for git_apply ", @@ -26236,7 +26236,7 @@ "value": "git_apply_options", "file": "git2/apply.h", "line": 64, - "lineto": 70, + "lineto": 75, "block": "unsigned int version\ngit_apply_delta_cb delta_cb\ngit_apply_hunk_cb hunk_cb\nvoid * payload", "tdef": "typedef", "description": " Apply options structure", @@ -26245,22 +26245,22 @@ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The version " }, { "type": "git_apply_delta_cb", "name": "delta_cb", - "comments": "" + "comments": " When applying a patch, callback that will be made per delta (file). " }, { "type": "git_apply_hunk_cb", "name": "hunk_cb", - "comments": "" + "comments": " When applying a patch, callback that will be made per hunk. " }, { "type": "void *", "name": "payload", - "comments": "" + "comments": " Payload passed to both delta_cb \n&\n hunk_cb. " } ], "used": { @@ -26685,27 +26685,27 @@ "type": "struct", "value": "git_buf", "file": "git2/buffer.h", - "line": 52, - "lineto": 55, + "line": 39, + "lineto": 61, "block": "char * ptr\nsize_t asize\nsize_t size", "tdef": "typedef", "description": " A data buffer for exporting data from libgit2", - "comments": "

Sometimes libgit2 wants to return an allocated data buffer to the 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.

\n\n

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.

\n\n

A git_buf is a public structure with three fields:

\n\n
    \n
  • ptr points to the start of the allocated memory. If it is NULL, then the git_buf is considered empty and libgit2 will feel free to overwrite it with new data.

  • \n
  • size holds the size (in bytes) of the data that is actually used.

  • \n
  • asize holds the known total amount of allocated memory if the ptr was allocated by libgit2. It may be larger than size. If ptr was not allocated by libgit2 and should not be resized and/or freed, then asize will be set to zero.

  • \n
\n\n

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.

\n", + "comments": "

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.

\n\n

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.

\n\n

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.

\n", "fields": [ { "type": "char *", "name": "ptr", - "comments": "" + "comments": " The buffer contents.\n\n `ptr` points to the start of the allocated memory. If it is NULL,\n then the `git_buf` is considered empty and libgit2 will feel free\n to overwrite it with new data." }, { "type": "size_t", "name": "asize", - "comments": "" + "comments": " `asize` holds the known total amount of allocated memory if the `ptr`\n was allocated by libgit2. It may be larger than `size`. If `ptr`\n was not allocated by libgit2 and should not be resized and/or freed,\n then `asize` will be set to zero." }, { "type": "size_t", "name": "size", - "comments": "" + "comments": " `size` holds the size (in bytes) of the data that is actually used." } ], "used": { @@ -26811,7 +26811,7 @@ { "type": "git_cert", "name": "parent", - "comments": "" + "comments": " The parent cert " }, { "type": "git_cert_ssh_t", @@ -26931,7 +26931,7 @@ "value": "git_cert_x509", "file": "git2/transport.h", "line": 64, - "lineto": 74, + "lineto": 76, "block": "git_cert parent\nvoid * data\nsize_t len", "tdef": "typedef", "description": " X.509 certificate information", @@ -26940,7 +26940,7 @@ { "type": "git_cert", "name": "parent", - "comments": "" + "comments": " The parent cert " }, { "type": "void *", @@ -27060,7 +27060,7 @@ "value": "git_checkout_options", "file": "git2/checkout.h", "line": 263, - "lineto": 307, + "lineto": 326, "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", @@ -27069,7 +27069,7 @@ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The version " }, { "type": "unsigned int", @@ -27104,12 +27104,12 @@ { "type": "git_checkout_notify_cb", "name": "notify_cb", - "comments": "" + "comments": " Optional callback to get notifications on specific file states.\n " }, { "type": "void *", "name": "notify_payload", - "comments": "" + "comments": " Payload passed to notify_cb " }, { "type": "git_checkout_progress_cb", @@ -27119,22 +27119,22 @@ { "type": "void *", "name": "progress_payload", - "comments": "" + "comments": " Payload passed to progress_cb " }, { "type": "git_strarray", "name": "paths", - "comments": " When not zeroed out, array of fnmatch patterns specifying which\n paths should be taken into account, otherwise all files. Use\n GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as simple list." + "comments": " A list of wildmatch patterns or paths.\n\n By default, all paths are processed. If you pass an array of wildmatch\n patterns, those will be used to filter which paths should be taken into\n account.\n\n Use GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as a simple list." }, { "type": "git_tree *", "name": "baseline", - "comments": " The expected content of the working directory; defaults to HEAD.\n If the working directory does not match this baseline information,\n that will produce a checkout conflict." + "comments": " The expected content of the working directory; defaults to HEAD.\n\n If the working directory does not match this baseline information,\n that will produce a checkout conflict." }, { "type": "git_index *", "name": "baseline_index", - "comments": " expected content of workdir, expressed as an index. " + "comments": " Like `baseline` above, though expressed as an index. This\n option overrides `baseline`." }, { "type": "const char *", @@ -27164,7 +27164,7 @@ { "type": "void *", "name": "perfdata_payload", - "comments": "" + "comments": " Payload passed to perfdata_cb " } ], "used": { @@ -27676,6 +27676,7 @@ "git_config_iterator_glob_new", "git_config_iterator_new", "git_config_lock", + "git_config_lookup_map_value", "git_config_multivar_iterator_new", "git_config_new", "git_config_next", @@ -27875,6 +27876,98 @@ } } ], + [ + "git_configmap", + { + "decl": [ + "git_configmap_t type", + "const char * str_match", + "int map_value" + ], + "type": "struct", + "value": "git_configmap", + "file": "git2/config.h", + "line": 104, + "lineto": 108, + "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": "" + } + ], + "block": "git_configmap_t type\nconst char * str_match\nint map_value", + "used": { + "returns": [], + "needs": [ + "git_config_get_mapped", + "git_config_lookup_map_value" + ] + } + } + ], + [ + "git_configmap_t", + { + "decl": [ + "GIT_CONFIGMAP_FALSE", + "GIT_CONFIGMAP_TRUE", + "GIT_CONFIGMAP_INT32", + "GIT_CONFIGMAP_STRING" + ], + "type": "enum", + "file": "git2/config.h", + "line": 94, + "lineto": 99, + "tdef": "typedef", + "description": " Config var type", + "comments": "", + "used": { + "returns": [], + "needs": [] + }, + "block": "GIT_CONFIGMAP_FALSE\nGIT_CONFIGMAP_TRUE\nGIT_CONFIGMAP_INT32\nGIT_CONFIGMAP_STRING", + "fields": [ + { + "type": "int", + "name": "GIT_CONFIGMAP_FALSE", + "comments": "", + "value": 0 + }, + { + "type": "int", + "name": "GIT_CONFIGMAP_TRUE", + "comments": "", + "value": 1 + }, + { + "type": "int", + "name": "GIT_CONFIGMAP_INT32", + "comments": "", + "value": 2 + }, + { + "type": "int", + "name": "GIT_CONFIGMAP_STRING", + "comments": "", + "value": 3 + } + ] + } + ], [ "git_cred", { @@ -27885,8 +27978,9 @@ "type": "struct", "value": "git_cred", "file": "git2/transport.h", - "line": 145, - "lineto": 148, + "line": 147, + "lineto": 152, + "block": "git_credtype_t credtype\nvoid (*)(git_cred *) free", "tdef": null, "description": " The base structure for all credential types", "comments": "", @@ -27902,7 +27996,6 @@ "comments": "" } ], - "block": "git_credtype_t credtype\nvoid (*)(git_cred *) free", "used": { "returns": [], "needs": [ @@ -27929,8 +28022,8 @@ "type": "struct", "value": "git_cred_default", "file": "git2/transport.h", - "line": 205, - "lineto": 205, + "line": 219, + "lineto": 219, "tdef": "typedef", "description": " A key for NTLM/Kerberos \"default\" credentials ", "comments": "", @@ -27954,8 +28047,8 @@ "type": "struct", "value": "git_cred_ssh_custom", "file": "git2/transport.h", - "line": 195, - "lineto": 202, + "line": 204, + "lineto": 216, "block": "git_cred parent\nchar * username\nchar * publickey\nsize_t publickey_len\ngit_cred_sign_cb sign_callback\nvoid * payload", "tdef": "typedef", "description": " A key with a custom signature function", @@ -27964,32 +28057,32 @@ { "type": "git_cred", "name": "parent", - "comments": "" + "comments": " The parent cred " }, { "type": "char *", "name": "username", - "comments": "" + "comments": " The username to authenticate as " }, { "type": "char *", "name": "publickey", - "comments": "" + "comments": " The public key data " }, { "type": "size_t", "name": "publickey_len", - "comments": "" + "comments": " Length of the public key " }, { "type": "git_cred_sign_cb", "name": "sign_callback", - "comments": "" + "comments": " Callback used to sign the data." }, { "type": "void *", "name": "payload", - "comments": "" + "comments": " Payload passed to prompt_callback " } ], "used": { @@ -28010,8 +28103,8 @@ "type": "struct", "value": "git_cred_ssh_interactive", "file": "git2/transport.h", - "line": 185, - "lineto": 190, + "line": 189, + "lineto": 199, "block": "git_cred parent\nchar * username\ngit_cred_ssh_interactive_cb prompt_callback\nvoid * payload", "tdef": "typedef", "description": " Keyboard-interactive based ssh authentication", @@ -28020,22 +28113,22 @@ { "type": "git_cred", "name": "parent", - "comments": "" + "comments": " The parent cred " }, { "type": "char *", "name": "username", - "comments": "" + "comments": " The username to authenticate as " }, { "type": "git_cred_ssh_interactive_cb", "name": "prompt_callback", - "comments": "" + "comments": " Callback used for authentication." }, { "type": "void *", "name": "payload", - "comments": "" + "comments": " Payload passed to prompt_callback " } ], "used": { @@ -28059,8 +28152,8 @@ "type": "struct", "value": "git_cred_ssh_key", "file": "git2/transport.h", - "line": 174, - "lineto": 180, + "line": 178, + "lineto": 184, "block": "git_cred parent\nchar * username\nchar * publickey\nchar * privatekey\nchar * passphrase", "tdef": "typedef", "description": " A ssh key from disk", @@ -28069,27 +28162,27 @@ { "type": "git_cred", "name": "parent", - "comments": "" + "comments": " The parent cred " }, { "type": "char *", "name": "username", - "comments": "" + "comments": " The username to authenticate as " }, { "type": "char *", "name": "publickey", - "comments": "" + "comments": " The path to a public key " }, { "type": "char *", "name": "privatekey", - "comments": "" + "comments": " The path to a private key " }, { "type": "char *", "name": "passphrase", - "comments": "" + "comments": " Passphrase used to decrypt the private key " } ], "used": { @@ -28108,8 +28201,8 @@ "type": "struct", "value": "git_cred_username", "file": "git2/transport.h", - "line": 208, - "lineto": 211, + "line": 222, + "lineto": 225, "block": "git_cred parent\nchar [1] username", "tdef": "typedef", "description": " Username-only credential information ", @@ -28118,12 +28211,12 @@ { "type": "git_cred", "name": "parent", - "comments": "" + "comments": " The parent cred " }, { "type": "char [1]", "name": "username", - "comments": "" + "comments": " The username to authenticate as " } ], "used": { @@ -28140,7 +28233,6 @@ "const char * password" ], "type": "struct", - "value": "git_cred_userpass_payload", "file": "git2/cred_helpers.h", "line": 24, "lineto": 27, @@ -28163,7 +28255,8 @@ "used": { "returns": [], "needs": [] - } + }, + "value": "git_cred_userpass_payload" } ], [ @@ -28177,8 +28270,8 @@ "type": "struct", "value": "git_cred_userpass_plaintext", "file": "git2/transport.h", - "line": 151, - "lineto": 155, + "line": 155, + "lineto": 159, "block": "git_cred parent\nchar * username\nchar * password", "tdef": "typedef", "description": " A plaintext username and password ", @@ -28187,17 +28280,17 @@ { "type": "git_cred", "name": "parent", - "comments": "" + "comments": " The parent cred " }, { "type": "char *", "name": "username", - "comments": "" + "comments": " The username to authenticate as " }, { "type": "char *", "name": "password", - "comments": "" + "comments": " The password to use " } ], "used": { @@ -28220,8 +28313,8 @@ ], "type": "enum", "file": "git2/transport.h", - "line": 86, - "lineto": 138, + "line": 88, + "lineto": 140, "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", "tdef": "typedef", "description": " Supported credential types", @@ -28276,98 +28369,6 @@ } } ], - [ - "git_cvar_map", - { - "decl": [ - "git_cvar_t cvar_type", - "const char * str_match", - "int map_value" - ], - "type": "struct", - "value": "git_cvar_map", - "file": "git2/config.h", - "line": 104, - "lineto": 108, - "block": "git_cvar_t cvar_type\nconst char * str_match\nint map_value", - "tdef": "typedef", - "description": " Mapping from config variables to values.", - "comments": "", - "fields": [ - { - "type": "git_cvar_t", - "name": "cvar_type", - "comments": "" - }, - { - "type": "const char *", - "name": "str_match", - "comments": "" - }, - { - "type": "int", - "name": "map_value", - "comments": "" - } - ], - "used": { - "returns": [], - "needs": [ - "git_config_get_mapped", - "git_config_lookup_map_value" - ] - } - } - ], - [ - "git_cvar_t", - { - "decl": [ - "GIT_CVAR_FALSE", - "GIT_CVAR_TRUE", - "GIT_CVAR_INT32", - "GIT_CVAR_STRING" - ], - "type": "enum", - "file": "git2/config.h", - "line": 94, - "lineto": 99, - "block": "GIT_CVAR_FALSE\nGIT_CVAR_TRUE\nGIT_CVAR_INT32\nGIT_CVAR_STRING", - "tdef": "typedef", - "description": " Config var type", - "comments": "", - "fields": [ - { - "type": "int", - "name": "GIT_CVAR_FALSE", - "comments": "", - "value": 0 - }, - { - "type": "int", - "name": "GIT_CVAR_TRUE", - "comments": "", - "value": 1 - }, - { - "type": "int", - "name": "GIT_CVAR_INT32", - "comments": "", - "value": 2 - }, - { - "type": "int", - "name": "GIT_CVAR_STRING", - "comments": "", - "value": 3 - } - ], - "used": { - "returns": [], - "needs": [] - } - } - ], [ "git_delta_t", { @@ -30777,8 +30778,8 @@ "type": "struct", "value": "git_fetch_options", "file": "git2/remote.h", - "line": 651, - "lineto": 688, + "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", "tdef": "typedef", "description": " Fetch options structure.", @@ -30840,8 +30841,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 603, - "lineto": 616, + "line": 604, + "lineto": 617, "block": "GIT_FETCH_PRUNE_UNSPECIFIED\nGIT_FETCH_PRUNE\nGIT_FETCH_NO_PRUNE", "tdef": "typedef", "description": " Acceptable prune settings when fetching ", @@ -33852,8 +33853,8 @@ "type": "struct", "value": "git_push_options", "file": "git2/remote.h", - "line": 712, - "lineto": 739, + "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", "tdef": "typedef", "description": " Controls the behavior of a git_push object.", @@ -34546,8 +34547,8 @@ ], "type": "enum", "file": "git2/remote.h", - "line": 623, - "lineto": 641, + "line": 624, + "lineto": 642, "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", @@ -34612,7 +34613,7 @@ "value": "git_remote_callbacks", "file": "git2/remote.h", "line": 497, - "lineto": 585, + "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", "tdef": null, "description": " The callback settings structure", @@ -34621,7 +34622,7 @@ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The version " }, { "type": "git_transport_message_cb", @@ -35333,13 +35334,14 @@ "GIT_REPOSITORY_ITEM_HOOKS", "GIT_REPOSITORY_ITEM_LOGS", "GIT_REPOSITORY_ITEM_MODULES", - "GIT_REPOSITORY_ITEM_WORKTREES" + "GIT_REPOSITORY_ITEM_WORKTREES", + "GIT_REPOSITORY_ITEM__LAST" ], "type": "enum", "file": "git2/repository.h", "line": 427, - "lineto": 442, - "block": "GIT_REPOSITORY_ITEM_GITDIR\nGIT_REPOSITORY_ITEM_WORKDIR\nGIT_REPOSITORY_ITEM_COMMONDIR\nGIT_REPOSITORY_ITEM_INDEX\nGIT_REPOSITORY_ITEM_OBJECTS\nGIT_REPOSITORY_ITEM_REFS\nGIT_REPOSITORY_ITEM_PACKED_REFS\nGIT_REPOSITORY_ITEM_REMOTES\nGIT_REPOSITORY_ITEM_CONFIG\nGIT_REPOSITORY_ITEM_INFO\nGIT_REPOSITORY_ITEM_HOOKS\nGIT_REPOSITORY_ITEM_LOGS\nGIT_REPOSITORY_ITEM_MODULES\nGIT_REPOSITORY_ITEM_WORKTREES", + "lineto": 443, + "block": "GIT_REPOSITORY_ITEM_GITDIR\nGIT_REPOSITORY_ITEM_WORKDIR\nGIT_REPOSITORY_ITEM_COMMONDIR\nGIT_REPOSITORY_ITEM_INDEX\nGIT_REPOSITORY_ITEM_OBJECTS\nGIT_REPOSITORY_ITEM_REFS\nGIT_REPOSITORY_ITEM_PACKED_REFS\nGIT_REPOSITORY_ITEM_REMOTES\nGIT_REPOSITORY_ITEM_CONFIG\nGIT_REPOSITORY_ITEM_INFO\nGIT_REPOSITORY_ITEM_HOOKS\nGIT_REPOSITORY_ITEM_LOGS\nGIT_REPOSITORY_ITEM_MODULES\nGIT_REPOSITORY_ITEM_WORKTREES\nGIT_REPOSITORY_ITEM__LAST", "tdef": "typedef", "description": " List of items which belong to the git repository layout", "comments": "", @@ -35427,6 +35429,12 @@ "name": "GIT_REPOSITORY_ITEM_WORKTREES", "comments": "", "value": 13 + }, + { + "type": "int", + "name": "GIT_REPOSITORY_ITEM__LAST", + "comments": "", + "value": 14 } ], "used": { @@ -35512,8 +35520,8 @@ ], "type": "enum", "file": "git2/repository.h", - "line": 820, - "lineto": 833, + "line": 821, + "lineto": 834, "block": "GIT_REPOSITORY_STATE_NONE\nGIT_REPOSITORY_STATE_MERGE\nGIT_REPOSITORY_STATE_REVERT\nGIT_REPOSITORY_STATE_REVERT_SEQUENCE\nGIT_REPOSITORY_STATE_CHERRYPICK\nGIT_REPOSITORY_STATE_CHERRYPICK_SEQUENCE\nGIT_REPOSITORY_STATE_BISECT\nGIT_REPOSITORY_STATE_REBASE\nGIT_REPOSITORY_STATE_REBASE_INTERACTIVE\nGIT_REPOSITORY_STATE_REBASE_MERGE\nGIT_REPOSITORY_STATE_APPLY_MAILBOX\nGIT_REPOSITORY_STATE_APPLY_MAILBOX_OR_REBASE", "tdef": "typedef", "description": " Repository state", @@ -36214,8 +36222,8 @@ "type": "struct", "value": "git_status_entry", "file": "git2/status.h", - "line": 221, - "lineto": 225, + "line": 230, + "lineto": 234, "block": "git_status_t status\ngit_diff_delta * head_to_index\ngit_diff_delta * index_to_workdir", "tdef": "typedef", "description": " A status entry, providing the differences between the file as it exists\n in HEAD and the index, and providing the differences between the index\n and the working directory.", @@ -36414,37 +36422,37 @@ "type": "struct", "value": "git_status_options", "file": "git2/status.h", - "line": 182, - "lineto": 188, + "line": 170, + "lineto": 197, "block": "unsigned int version\ngit_status_show_t show\nunsigned int flags\ngit_strarray pathspec\ngit_tree * baseline", "tdef": "typedef", "description": " Options to control how `git_status_foreach_ext()` will issue callbacks.", - "comments": "

This structure is set so that zeroing it out will give you relatively sane defaults.

\n\n

The show value is one of the git_status_show_t constants that control which files to scan and in what order.

\n\n

The flags value is an OR'ed combination of the git_status_opt_t values above.

\n\n

The pathspec is an array of path patterns to match (using fnmatch-style matching), or just an array of paths to match exactly if GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH is specified in the flags.

\n\n

The baseline is the tree to be used for comparison to the working directory and index; defaults to HEAD.

\n", + "comments": "

Initialize with GIT_STATUS_OPTIONS_INIT. Alternatively, you can use git_status_options_init.

\n", "fields": [ { "type": "unsigned int", "name": "version", - "comments": "" + "comments": " The version " }, { "type": "git_status_show_t", "name": "show", - "comments": "" + "comments": " The `show` value is one of the `git_status_show_t` constants that\n control which files to scan and in what order." }, { "type": "unsigned int", "name": "flags", - "comments": "" + "comments": " The `flags` value is an OR'ed combination of the `git_status_opt_t`\n values above." }, { "type": "git_strarray", "name": "pathspec", - "comments": "" + "comments": " The `pathspec` is an array of path patterns to match (using\n fnmatch-style matching), or just an array of paths to match exactly if\n `GIT_STATUS_OPT_DISABLE_PATHSPEC_MATCH` is specified in the flags." }, { "type": "git_tree *", "name": "baseline", - "comments": "" + "comments": " The `baseline` is the tree to be used for comparison to the working directory\n and index; defaults to HEAD." } ], "used": { @@ -38836,6 +38844,10 @@ "common.c", "ex/HEAD/common.html" ], + [ + "config.c", + "ex/HEAD/config.html" + ], [ "describe.c", "ex/HEAD/describe.html" diff --git a/vendor/libgit2.gyp b/vendor/libgit2.gyp index 3f714cdd1..6444228ea 100644 --- a/vendor/libgit2.gyp +++ b/vendor/libgit2.gyp @@ -120,8 +120,8 @@ "libgit2/src/fetchhead.h", "libgit2/src/filebuf.c", "libgit2/src/filebuf.h", - "libgit2/src/fileops.c", - "libgit2/src/fileops.h", + "libgit2/src/futils.c", + "libgit2/src/futils.h", "libgit2/src/filter.c", "libgit2/src/filter.h", "libgit2/src/global.c", @@ -129,11 +129,13 @@ "libgit2/src/graph.c", "libgit2/src/hash.c", "libgit2/src/hash.h", - "libgit2/src/hash/sha1dc/sha1.c", - "libgit2/src/hash/sha1dc/sha1.h", - "libgit2/src/hash/sha1dc/ubc_check.c", - "libgit2/src/hash/sha1dc/ubc_check.h", - "libgit2/src/hash/hash_collisiondetect.h", + "libgit2/src/hash/sha1.h", + "libgit2/src/hash/sha1/sha1dc/sha1.c", + "libgit2/src/hash/sha1/sha1dc/sha1.h", + "libgit2/src/hash/sha1/sha1dc/ubc_check.c", + "libgit2/src/hash/sha1/sha1dc/ubc_check.h", + "libgit2/src/hash/sha1/collisiondetect.c", + "libgit2/src/hash/sha1/collisiondetect.h", "libgit2/src/hashsig.c", "libgit2/src/ident.c", "libgit2/src/idxmap.c", From b05db5f4ab69e436e1ab94f548fee8478aaf9642 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 23 Jul 2019 14:08:53 -0700 Subject: [PATCH 138/145] Remove config_snapshot hack from refresh_references We needed to perform this hack to get libgit2 to re-read the config on git_remote_list. Now that git_remote_list always reads the config, we don't need to force the config to update via a config_snapshot request --- .../manual/repository/refresh_references.cc | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/generate/templates/manual/repository/refresh_references.cc b/generate/templates/manual/repository/refresh_references.cc index 8d0fe36d6..730afadbc 100644 --- a/generate/templates/manual/repository/refresh_references.cc +++ b/generate/templates/manual/repository/refresh_references.cc @@ -429,20 +429,6 @@ void GitRepository::RefreshReferencesWorker::Execute() return; } - git_config *config; - baton->error_code = git_repository_config_snapshot(&config, repo); - if (baton->error_code != GIT_OK) { - if (giterr_last() != NULL) { - baton->error = git_error_dup(giterr_last()); - } - git_odb_free(odb); - delete refreshData; - baton->out = NULL; - return; - } - git_config_free(config); - - // START Refresh HEAD git_reference *headRef = NULL; baton->error_code = lookupDirectReferenceByShorthand(&headRef, repo, "HEAD"); @@ -544,7 +530,7 @@ void GitRepository::RefreshReferencesWorker::Execute() if (reference == NULL) { // lookup found the reference but failed to resolve it directly continue; - } + } UpstreamModel *upstreamModel; if (UpstreamModel::fromReference(&upstreamModel, reference)) { From 3a8881d6f3feee67561b5bd03a54c29e93af7fa2 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Tue, 23 Jul 2019 15:42:22 -0700 Subject: [PATCH 139/145] Bump to v0.25.0-alpha.16 --- CHANGELOG.md | 52 +++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5074972b1..9ba0c518f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,57 @@ # Change Log +## v0.25.0-alpha.16 [(2019-07-23)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.16) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.15...v0.25.0-alpha.16) + +#### Summary of changes +- Adds support for Node 12 +- Updates lodash dependency to address security notice +- Expose Tree.prototype.createUpdated(repo, numUpdates, updates) +- Bumps libgit2 + - Fixes gitignore issue with pattern negation + - Remote.list now gets the correct list of remotes if remotes are changed by external process + +#### Merged PRs into NodeGit +- [Bump libgit2 #1705](https://github.com/nodegit/nodegit/pull/1705) +- [Fix Tree#createUpdated #1704](https://github.com/nodegit/nodegit/pull/1704) +- [Fix failing tests on CI #1703](https://github.com/nodegit/nodegit/pull/1703) +- [Audit lodash and fix package-lock.json #1702](https://github.com/nodegit/nodegit/pull/1702) +- [Implement support for Node 12 #1696](https://github.com/nodegit/nodegit/pull/1696) + +#### Merged PRs into LibGit2 +- [config_file: refresh when creating an iterator #5181](https://github.com/libgit2/libgit2/pull/5181) +- [azure: drop powershell #5141](https://github.com/libgit2/libgit2/pull/5141) +- [fuzzer: use futils instead of fileops #5180](https://github.com/libgit2/libgit2/pull/5180) +- [w32: fix unlinking of directory symlinks #5151](https://github.com/libgit2/libgit2/pull/5151) +- [patch_parse: fix segfault due to line containing static contents #5179](https://github.com/libgit2/libgit2/pull/5179) +- [ignore: fix determining whether a shorter pattern negates another #5173](https://github.com/libgit2/libgit2/pull/5173) +- [patch_parse: handle missing newline indicator in old file #5159](https://github.com/libgit2/libgit2/pull/5159) +- [patch_parse: do not depend on parsed buffer's lifetime #5158](https://github.com/libgit2/libgit2/pull/5158) +- [sha1: fix compilation of WinHTTP backend #5174](https://github.com/libgit2/libgit2/pull/5174) +- [repository: do not initialize HEAD if it's provided by templates #5176](https://github.com/libgit2/libgit2/pull/5176) +- [configuration: cvar -> configmap #5138](https://github.com/libgit2/libgit2/pull/5138) +- [Evict cache items more efficiently #5172](https://github.com/libgit2/libgit2/pull/5172) +- [clar: fix suite count #5175](https://github.com/libgit2/libgit2/pull/5175) +- [Ignore VS2017 specific files and folders #5163](https://github.com/libgit2/libgit2/pull/5163) +- [gitattributes: ignore macros defined in subdirectories #5156](https://github.com/libgit2/libgit2/pull/5156) +- [clar: correctly account for "data" suites when counting #5168](https://github.com/libgit2/libgit2/pull/5168) +- [Allocate memory more efficiently when packing objects #5170](https://github.com/libgit2/libgit2/pull/5170) +- [fileops: fix creation of directory in filesystem root #5131](https://github.com/libgit2/libgit2/pull/5131) +- [win32: fix fuzzers and have CI build them #5160](https://github.com/libgit2/libgit2/pull/5160) +- [Config parser separation #5134](https://github.com/libgit2/libgit2/pull/5134) +- [config_file: implement stat cache to avoid repeated rehashing #5132](https://github.com/libgit2/libgit2/pull/5132) +- [ci: build with ENABLE_WERROR on Windows #5143](https://github.com/libgit2/libgit2/pull/5143) +- [Fix Regression: attr: Correctly load system attr file (on Windows) #5152](https://github.com/libgit2/libgit2/pull/5152) +- [hash: fix missing error return on production builds #5145](https://github.com/libgit2/libgit2/pull/5145) +- [Resolve static check warnings in example code #5142](https://github.com/libgit2/libgit2/pull/5142) +- [Multiple hash algorithms #4438](https://github.com/libgit2/libgit2/pull/4438) +- [More documentation #5128](https://github.com/libgit2/libgit2/pull/5128) +- [Incomplete commondir support #4967](https://github.com/libgit2/libgit2/pull/4967) +- [Remove warnings #5078](https://github.com/libgit2/libgit2/pull/5078) +- [Re-run flaky tests #5140](https://github.com/libgit2/libgit2/pull/5140) + + ## v0.25.0-alpha.15 [(2019-07-15)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.15) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.14...v0.25.0-alpha.15) diff --git a/package-lock.json b/package-lock.json index 943e5f4a8..91993080b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.15", + "version": "0.25.0-alpha.16", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index bc8815c6a..f334970ca 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.15", + "version": "0.25.0-alpha.16", "homepage": "http://nodegit.org", "keywords": [ "libgit2", From f516b424489bbf0a7bb1a1026116228855c90e13 Mon Sep 17 00:00:00 2001 From: Julian Kotrba Date: Wed, 24 Jul 2019 14:35:13 +0900 Subject: [PATCH 140/145] Add missing return type to Blame.file --- lib/blame.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/blame.js b/lib/blame.js index 7893d0c87..520bb8ce7 100644 --- a/lib/blame.js +++ b/lib/blame.js @@ -11,6 +11,7 @@ var _file = Blame.file; * @param {Repository} repo that contains the file * @param {String} path to the file to get the blame of * @param {BlameOptions} [options] Options for the blame + * @return {Blame} the blame */ Blame.file = function(repo, path, options) { options = normalizeOptions(options, NodeGit.BlameOptions); From d0bb116f9e4946ce85fa77e6d2540f334ec69ee0 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Thu, 25 Jul 2019 08:38:20 +0100 Subject: [PATCH 141/145] :bug: Fix behaviour of Repository#getReferences; filter and map do not work in-place --- lib/repository.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/repository.js b/lib/repository.js index 29c429fad..45669e698 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -351,14 +351,12 @@ Repository.initExt = function(repo_path, opts) { Repository.getReferences = function(repo, type, refNamesOnly) { return repo.getReferences().then(function(refList) { - var filteredRefList = refList; - - filteredRefList.filter(function(reference) { - return type == Reference.TYPE.LISTALL || reference.type === type; + var filteredRefList = refList.filter(function(reference) { + return type === Reference.TYPE.LISTALL || reference.type === type; }); if (refNamesOnly) { - filteredRefList.map(function(reference) { + return filteredRefList.map(function(reference) { return reference.name(); }); } @@ -1255,8 +1253,8 @@ Repository.prototype.getReferenceCommit = function(name, callback) { * @param {Reference.TYPE} type Type of reference to look up * @return {Array} */ -Repository.prototype.getReferenceNames = function(type, callback) { - return Repository.getReferences(this, type, true, callback); +Repository.prototype.getReferenceNames = function(type) { + return Repository.getReferences(this, type, true); }; /** From 58ab918c65cb5e86096c3dbce462685b20efb179 Mon Sep 17 00:00:00 2001 From: Peter Hunt Date: Thu, 25 Jul 2019 13:59:36 +0100 Subject: [PATCH 142/145] Reference.TYPE.LISTALL is depreciated in favour of TYPE.ALL --- lib/repository.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repository.js b/lib/repository.js index 45669e698..aa7c406e4 100644 --- a/lib/repository.js +++ b/lib/repository.js @@ -352,7 +352,7 @@ Repository.initExt = function(repo_path, opts) { Repository.getReferences = function(repo, type, refNamesOnly) { return repo.getReferences().then(function(refList) { var filteredRefList = refList.filter(function(reference) { - return type === Reference.TYPE.LISTALL || reference.type === type; + return type === Reference.TYPE.ALL || reference.type === type; }); if (refNamesOnly) { From e74a129b1e3584d50c924e1cff3f43d5131c8267 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Mon, 1 Jul 2019 09:12:09 -0700 Subject: [PATCH 143/145] Reintroduce Odb.prototype.addDiskAlternate --- generate/input/descriptor.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generate/input/descriptor.json b/generate/input/descriptor.json index 3d0562e77..b61702214 100644 --- a/generate/input/descriptor.json +++ b/generate/input/descriptor.json @@ -2373,7 +2373,10 @@ "ignore": true }, "git_odb_add_disk_alternate": { - "ignore": true + "isAsync": true, + "return": { + "isErrorCode": true + } }, "git_odb_exists": { "ignore": true, From c69e193cf7519b7781b619a47663aa7daf79e6f9 Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Thu, 8 Aug 2019 14:24:42 -0700 Subject: [PATCH 144/145] Add deprecation warnings for enums that need them. --- lib/attr.js | 20 ++++++++++++++++++++ lib/config.js | 17 +++++++++++++++++ lib/remote.js | 20 ++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 lib/attr.js diff --git a/lib/attr.js b/lib/attr.js new file mode 100644 index 000000000..8ecdd5eee --- /dev/null +++ b/lib/attr.js @@ -0,0 +1,20 @@ +var util = require("util"); +var NodeGit = require("../"); + +NodeGit.Attr.STATES = {}; +var DEPRECATED_STATES = { + UNSPECIFIED_T: "UNSPECIFIED", + TRUE_T: "TRUE", + FALSE_T: "FALSE", + VALUE_T: "STRING" +}; + +Object.keys(DEPRECATED_STATES).forEach((key) => { + const newKey = DEPRECATED_STATES[key]; + Object.defineProperty(NodeGit.Attr.STATES, key, { + get: util.deprecate( + () => NodeGit.Attr.VALUE[newKey], + `Use NodeGit.Attr.VALUE.${newKey} instead of NodeGit.Attr.STATES.${key}.` + ) + }); +}); diff --git a/lib/config.js b/lib/config.js index 1527ede7b..10838522a 100644 --- a/lib/config.js +++ b/lib/config.js @@ -1,3 +1,4 @@ +var util = require("util"); var NodeGit = require("../"); var Config = NodeGit.Config; @@ -6,3 +7,19 @@ var Config = NodeGit.Config; Config.prototype.getString = function() { return this.getStringBuf.apply(this, arguments); }; + +NodeGit.Enums.CVAR = {}; +var DEPRECATED_CVAR_ENUMS = [ + "FALSE", + "TRUE", + "INT32", + "STRING" +]; +DEPRECATED_CVAR_ENUMS.forEach((key) => { + Object.defineProperty(NodeGit.Enums.CVAR, key, { + get: util.deprecate( + () => Config.MAP[key], + `Use NodeGit.Config.MAP.${key} instead of NodeGit.Enums.CVAR.${key}.` + ) + }); +}); diff --git a/lib/remote.js b/lib/remote.js index 09db11c1a..510ce9b8b 100644 --- a/lib/remote.js +++ b/lib/remote.js @@ -1,3 +1,4 @@ +var util = require("util"); var NodeGit = require("../"); var normalizeFetchOptions = NodeGit.Utils.normalizeFetchOptions; var normalizeOptions = NodeGit.Utils.normalizeOptions; @@ -182,3 +183,22 @@ Remote.prototype.upload = function(refSpecs, opts) { return _upload.call(this, refSpecs, opts); }; + + +NodeGit.Remote.COMPLETION_TYPE = {}; +var DEPRECATED_STATES = { + COMPLETION_DOWNLOAD: "DOWNLOAD", + COMPLETION_INDEXING: "INDEXING", + COMPLETION_ERROR: "ERROR" +}; + +Object.keys(DEPRECATED_STATES).forEach((key) => { + const newKey = DEPRECATED_STATES[key]; + Object.defineProperty(NodeGit.Remote.COMPLETION_TYPE, key, { + get: util.deprecate( + () => NodeGit.Remote.COMPLETION[newKey], + `Use NodeGit.Remote.COMPLETION.${newKey} instead of ` + + `NodeGit.Remote.COMPLETION_TYPE.${key}.` + ) + }); +}); From 90c3c153b0d54a8d49619094a08913c8dfa4ebbd Mon Sep 17 00:00:00 2001 From: Tyler Ang-Wanek Date: Thu, 8 Aug 2019 15:45:32 -0700 Subject: [PATCH 145/145] Bump to v0.25.0 --- CHANGELOG.md | 526 ++++++++++++++++++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 528 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ba0c518f..d7cfe392a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,531 @@ # Change Log +## v0.25.0 [(2019-08-09)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0) + +[Full Changelog](https://github.com/nodegit/nodegit/compare/v0.24.3...v0.25.0) + +#### Summary of changes +##### BREAKING +- `getRemotes` no longer returns remote names, it now returns remote objects directly. Use `getRemoteNames` to get a list of remote names. +- Converted Buf.prototype.set and Buf.prototype.grow from async to sync +- `Repository.prototype.continueRebase` will now throw on any error except for EAPPLIED on the first call to `Rebase.prototype.next` +- Drops support for Ubuntu 14 after EOL +- Removed access to the `diff_so_far` param in `git_diff_notify_cb` and `git_diff_progress_cb` +- Changed `FilterSource.prototype.repo` to async to prevent segfaults on filters that run during `Submodule.status` +- Changed `NodeGit.Signature.default` to async, because it actually ends up reading the config. +- Fixed bug where templates were not reporting errors for synchronous methods. It's a bit of a wide net, but in general, + it is now possible certain sync methods in NodeGit will begin failing that did not fail before. This is the correct + behavior. + +##### Deprecations +- Support signing commits in `Repository.prototype.mergeBranches`. The last parameter `processMergeMessageCallback` is now deprecated, but will continue to work. Use the options object instead, which will contain the `processMergeMessageCallback`, as well as the `signingCb`. + +##### New +- Support for Node 12 +- Add signing support for commits and annotated tags + - Enforced consistent use of signing callbacks within the application. Any object that implements the signingCallback + pattern for signing commits or tags should use the exact same callback type and with the same meaning. + `type SigningCallback = (content: string) => {| code: number, field?: string, signedData?: string |};` + If the code is `NodeGit.Error.CODE.OK` or 0, the operation will succeed and _at least_ signedData is expected to be filled out. + If the code is a negative number, except for `NodeGit.Error.CODE.PASSTHROUGH`, the signing operation will fail. + If the code is `NodeGit.Error.CODE.PASSTHROUGH`, the operation will continue without signing the object. +- Exposed `AnnotatedCommit` methods: + - `AnnotatedCommit.prototype.ref` +- Exposed `Apply` methods: + - `Apply.apply` applies a diff to the repository + - `Apply.toTree` applies a diff to a tree +- Exposed `Config` methods: + - `Config.prototype.deleteEntry` + - `Config.prototype.deleteMultivar` + - `Config.prototype.getBool` + - `Config.prototype.getInt32` + - `Config.prototype.getInt64` + - `Config.prototype.setMultivar` + - `Config.prototype.snapshot` +- Exposed `ConfigIterator` with methods: + - `ConfigIterator.create` + - `ConfigIterator.createGlob` + - `ConfigIterator.createMultivar` + - `ConfigIterator.prototype.next` +- Exposed `IndexNameEntry`: + - `IndexNameEntry.add` + - `IndexNameEntry.clear` + - `IndexNameEntry.entryCount` + - `IndexNameEntry.getByIndex` + - `IndexNameEntry.prototype.ancestor` + - `IndexNameEntry.prototype.ours` + - `IndexNameEntry.prototype.theirs` +- Exposed `IndexReucEntry`: + - `IndexReucEntry.add` + - `IndexReucEntry.clear` + - `IndexReucEntry.entryCount` + - `IndexReucEntry.find` + - `IndexReucEntry.getByIndex` + - `IndexReucEntry.getByPath` + - `IndexReucEntry.remove` + - `IndexReucEntry.prototype.mode` + - `IndexReucEntry.prototype.oid` + - `IndexReucEntry.prototype.path` +- Exposed `Mailmap`: + - `Mailmap.prototype.addEntry` + - `Mailmap.fromBuffer` + - `Mailmap.fromRepository` + - `Mailmap.create` + - `Mailmap.prototype.resolve` + - `Mailmap.prototype.resolveSignature` +- Exposed `Merge` methods: + - `Merge.analysis` + - `Merge.analysisForRef` +- Exposed `Path.isGitfile` +- Added `RebaseOptions` to `Repository.prototype.rebaseContinue` +- Added `NodeGit.Reference.updateTerminal` +- Exposed `Remote` methods: + - `Remote.createWithOpts` +- Exposed `Tag.createFromBuffer` +- Expose `Tree.prototype.createUpdated(repo, numUpdates, updates)` + +##### Fixed +- Updates lodash dependency to address security notice +- Fixed a prototype problem with cherrypick, merge, and other collections that have a function at their root. call, apply, and bind should now be on NodeGit.Cherrypick. +- Bumped libssh2 to resolve security notice. +- Improve speed and correctness of fileHistoryWalk. The API should not have changed; however, when the end of the walk has been reached, `reachedEndOfHistory` will be specified on the resulting array. +- Fixes openssl prebuilt downloads for electron builds +- Fixes commits retrieved from `Commit.prototype.parent` +- Bump Node-Gyp to 4.0.0 to fix tar security vulnerability +- Optimized a set of routines in NodeGit. These methods as written in Javascript require hundreds or thousands of requests to async workers to retrieve data. We've batched these requests and performed them on a single async worker. There are now native implementations of the following: + - `Repository.prototype.getReferences`: Retrieves all references on async worker. + - `Repository.prototype.getRemotes`: Retrieves all remotes on async worker. + - `Repository.prototype.getSubmodules`: Retrieves all submodules on async worker. + - `Repository.prototype.refreshReferences`: Open sourced function from GitKraken. Grabs a lot of information about references on an async worker. + - `Revwalk.prototype.commitWalk`: Retrieves up to N commits from a revwalk on an async worker. +- When installing on a machine that has yarn and does not have npm, the preinstall script should succeed now +- `ceiling_dirs` is now an optional parameter to `Repository.discover` +- Added support for building on IBM i (PASE) machines +- Fixed leak where struct/option types were leaking libgit2 pointers +- Switched `NodeGit.Oid.fromString`'s internal implementation from `git_oid_fromstr` to `git_oid_fromstrp` +- Fixed builds for Electron 4 +- Updated `Signature.prototype.toString` to optionally include timestamps + +##### LibGit2 Bump +- Fixes gitignore issue with pattern negation +- `Remote.list` now gets the correct list of remotes if remotes are changed by external process +- Always use builtin regex for linux for portability +- Use Iconv on OSX for better internationalization support. +- Removed LibCurl from LibGit2: + - Now with built-in NTLM proxy support + - Now with built-in Negotiate/Kerberos proxy support + - Working with proxy URLs may be different as curl could auto detect scheme for proxies +- Various git config fixes +- Various git ignore fixes +- Various libgit2 performance improvements +- Windows/Linux now use PCRE for regex, OSX uses regcomp_l, this should address collation issues in diffing + +#### Merged PRs into NodeGit +- [Add deprecation warnings for enums that need them. #1711](https://github.com/nodegit/nodegit/pull/1711) +- [https://github.com/nodegit/nodegit/pull/1706](https://github.com/nodegit/nodegit/pull/1706) +- [Reintroduce Odb.prototype.addDiskAlternate #1695](https://github.com/nodegit/nodegit/pull/1695) +- [Fix behaviour of Repository#getReferences #1708](https://github.com/nodegit/nodegit/pull/1708) +- [Bump libgit2 #1705](https://github.com/nodegit/nodegit/pull/1705) +- [Fix Tree#createUpdated #1704](https://github.com/nodegit/nodegit/pull/1704) +- [Fix failing tests on CI #1703](https://github.com/nodegit/nodegit/pull/1703) +- [Audit lodash and fix package-lock.json #1702](https://github.com/nodegit/nodegit/pull/1702) +- [Implement support for Node 12 #1696](https://github.com/nodegit/nodegit/pull/1696) +- [Remove NSEC #1699](https://github.com/nodegit/nodegit/pull/1699) +- [Use builtin regex library for linux for better portability #1693](https://github.com/nodegit/nodegit/pull/1693) +- [Remove pcre-config from binding.gyp #1694](https://github.com/nodegit/nodegit/pull/1694) +- [refresh_references.cc: skip refs that can't be directly resolved #1689](https://github.com/nodegit/nodegit/pull/1689) +- [Bump libgit2 to fork of latest master #1690](https://github.com/nodegit/nodegit/pull/1690) +- [Bump libssh2 to 1.8.2 and fix some npm audit warnings #1678](https://github.com/nodegit/nodegit/pull/1678) +- [Root functions should keep their function prototypes correctly #1681](https://github.com/nodegit/nodegit/pull/1681) +- [refresh_references.cc: bust LibGit2 remote list cache by reading config #1685](https://github.com/nodegit/nodegit/pull/1685) +- [Implement faster file history walk #1676](https://github.com/nodegit/nodegit/pull/1676) +- [EOL for Node 6 and Ubuntu 14.04 #1649](https://github.com/nodegit/nodegit/pull/1649) +- [Ensures that commits from parent(*) has a repository #1658](https://github.com/nodegit/nodegit/pull/1658) +- [Update openssl conan distributions #1663](https://github.com/nodegit/nodegit/pull/1663) +- [Support signing in Repository#mergeBranches #1664](https://github.com/nodegit/nodegit/pull/1664) +- [Dependency upgrade node-gyp upgraded to 4.0.0 #1672](https://github.com/nodegit/nodegit/pull/1672) +- [Add additional getters to streamline information gathering (breaking change) #1671](https://github.com/nodegit/nodegit/pull/1671) +- [Clean up some dangerous memory accesses in callbacks #1642](https://github.com/nodegit/nodegit/pull/1642) +- [Output the item that was deprecated when giving deprecation notice #1643](https://github.com/nodegit/nodegit/pull/1643) +- [Don't fail yarn installs when we can't find npm #1644](https://github.com/nodegit/nodegit/pull/1644) +- [`ceiling_dirs` parameter in `Repository.discover` is optional #1245](https://github.com/nodegit/nodegit/pull/1245) +- [Add missing `shouldAlloc` declarations for git_merge_analysis* functions #1641](https://github.com/nodegit/nodegit/pull/1641) +- [Fix regex state causing subsequent runs of Tag.extractSignature to fail #1630](https://github.com/nodegit/nodegit/pull/1630) +- [Update LibGit2 docs to v0.28.0 #1631](https://github.com/nodegit/nodegit/pull/1631) +- [Add support for building on IBM i (PASE) #1634](https://github.com/nodegit/nodegit/pull/1634) +- [Expose more config methods #1635](https://github.com/nodegit/nodegit/pull/1635) +- [Catch errors and pass them to libgit2 as error codes in rebase signingcb #1636](https://github.com/nodegit/nodegit/pull/1636) +- [Simplify check for IBM i operating system #1637](https://github.com/nodegit/nodegit/pull/1637) +- [Bump LibGit2 to fork of v0.28.1 #1638](https://github.com/nodegit/nodegit/pull/1638) +- [We should clear the persistent cell in structs when they are destroyed #1629](https://github.com/nodegit/nodegit/pull/1629) +- [Fix "errorno" typo #1628](https://github.com/nodegit/nodegit/pull/1628) +- [Bump Libgit2 fork to v0.28.0 #1627](https://github.com/nodegit/nodegit/pull/1627) +- [Fix macOS and Windows Electron 4 builds #1626](https://github.com/nodegit/nodegit/pull/1626) +- [Fix non-existent / dangling refs cause Repository.prototype.createCommitWithSignature to fail #1624](https://github.com/nodegit/nodegit/pull/1624) +- [Handle new gyp information for electron builds #1623](https://github.com/nodegit/nodegit/pull/1623) +- [Use same API for signingCb in all places that can be crypto signed #1621](https://github.com/nodegit/nodegit/pull/1621) +- [Breaking: Repository.prototype.continueRebase enhancements #1619](https://github.com/nodegit/nodegit/pull/1619) +- [adds support for gpg commit signing (fixes #1018) #1448](https://github.com/nodegit/nodegit/pull/1448) +- [Add `updateRef` parameter to Repository#createCommitWithSignature #1610](https://github.com/nodegit/nodegit/pull/1610) +- [Documentation fixes. #1611](https://github.com/nodegit/nodegit/pull/1611) +- [Add Commit#amendWithSignature #1616](https://github.com/nodegit/nodegit/pull/1616) +- [Bump libgit2 to a preview of v0.28 #1615](https://github.com/nodegit/nodegit/pull/1615) +- [Fix issues with Commit#amendWithSignature #1617](https://github.com/nodegit/nodegit/pull/1617) +- [Marked Repository.createBlobFromBuffer as async #1614](https://github.com/nodegit/nodegit/pull/1614) +- [Add functionality for creating Tags with signatures and extracting signatures from Tags #1618](https://github.com/nodegit/nodegit/pull/1618) + +#### Merged PRs into LibGit2 +- [Add sign capability to git_rebase_commit #4913](https://github.com/libgit2/libgit2/pull/4913) +- [Parallelize checkout_create_the_new for perf #4205](https://github.com/libgit2/libgit2/pull/4205) +- [config_file: refresh when creating an iterator](https://github.com/libgit2/libgit2/pull/5181) +- [azure: drop powershell](https://github.com/libgit2/libgit2/pull/5141) +- [fuzzer: use futils instead of fileops](https://github.com/libgit2/libgit2/pull/5180) +- [w32: fix unlinking of directory symlinks](https://github.com/libgit2/libgit2/pull/5151) +- [patch_parse: fix segfault due to line containing static contents](https://github.com/libgit2/libgit2/pull/5179) +- [ignore: fix determining whether a shorter pattern negates another](https://github.com/libgit2/libgit2/pull/5173) +- [patch_parse: handle missing newline indicator in old file](https://github.com/libgit2/libgit2/pull/5159) +- [patch_parse: do not depend on parsed buffer's lifetime](https://github.com/libgit2/libgit2/pull/5158) +- [sha1: fix compilation of WinHTTP backend](https://github.com/libgit2/libgit2/pull/5174) +- [repository: do not initialize HEAD if it's provided by templates](https://github.com/libgit2/libgit2/pull/5176) +- [configuration: cvar -> configmap](https://github.com/libgit2/libgit2/pull/5138) +- [Evict cache items more efficiently](https://github.com/libgit2/libgit2/pull/5172) +- [clar: fix suite count](https://github.com/libgit2/libgit2/pull/5175) +- [Ignore VS2017 specific files and folders](https://github.com/libgit2/libgit2/pull/5163) +- [gitattributes: ignore macros defined in subdirectories](https://github.com/libgit2/libgit2/pull/5156) +- [clar: correctly account for "data" suites when counting](https://github.com/libgit2/libgit2/pull/5168) +- [Allocate memory more efficiently when packing objects](https://github.com/libgit2/libgit2/pull/5170) +- [fileops: fix creation of directory in filesystem root](https://github.com/libgit2/libgit2/pull/5131) +- [win32: fix fuzzers and have CI build them](https://github.com/libgit2/libgit2/pull/5160) +- [Config parser separation](https://github.com/libgit2/libgit2/pull/5134) +- [config_file: implement stat cache to avoid repeated rehashing](https://github.com/libgit2/libgit2/pull/5132) +- [ci: build with ENABLE_WERROR on Windows](https://github.com/libgit2/libgit2/pull/5143) +- [Fix Regression: attr: Correctly load system attr file (on Windows)](https://github.com/libgit2/libgit2/pull/5152) +- [hash: fix missing error return on production builds](https://github.com/libgit2/libgit2/pull/5145) +- [Resolve static check warnings in example code](https://github.com/libgit2/libgit2/pull/5142) +- [Multiple hash algorithms](https://github.com/libgit2/libgit2/pull/4438) +- [More documentation](https://github.com/libgit2/libgit2/pull/5128) +- [Incomplete commondir support](https://github.com/libgit2/libgit2/pull/4967) +- [Remove warnings](https://github.com/libgit2/libgit2/pull/5078) +- [Re-run flaky tests](https://github.com/libgit2/libgit2/pull/5140) +- [errors: use lowercase](https://github.com/libgit2/libgit2/pull/5137) +- [largefile tests: only write 2GB on 32-bit platforms](https://github.com/libgit2/libgit2/pull/5136) +- [Fix broken link in README](https://github.com/libgit2/libgit2/pull/5129) +- [net: remove unused `git_headlist_cb`](https://github.com/libgit2/libgit2/pull/5122) +- [cmake: default NTLM client to off if no HTTPS support](https://github.com/libgit2/libgit2/pull/5124) +- [attr: rename constants and macros for consistency](https://github.com/libgit2/libgit2/pull/5119) +- [Change API instances of `fromnoun` to `from_noun` (with an underscore)](https://github.com/libgit2/libgit2/pull/5117) +- [object: rename git_object__size to git_object_size](https://github.com/libgit2/libgit2/pull/5118) +- [Replace fnmatch with wildmatch](https://github.com/libgit2/libgit2/pull/5110) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/5111) +- [Removal of `p_fallocate`](https://github.com/libgit2/libgit2/pull/5114) +- [Modularize our TLS & hash detection](https://github.com/libgit2/libgit2/pull/5055) +- [tests: merge::analysis: use test variants to avoid duplicated test suites](https://github.com/libgit2/libgit2/pull/5109) +- [Rename options initialization functions](https://github.com/libgit2/libgit2/pull/5101) +- [deps: ntlmclient: disable implicit fallthrough warnings](https://github.com/libgit2/libgit2/pull/5112) +- [gitignore with escapes](https://github.com/libgit2/libgit2/pull/5097) +- [Handle URLs with a colon after host but no port](https://github.com/libgit2/libgit2/pull/5108) +- [Merge analysis support for bare repos](https://github.com/libgit2/libgit2/pull/5022) +- [Add memleak check docs](https://github.com/libgit2/libgit2/pull/5104) +- [Data-driven tests](https://github.com/libgit2/libgit2/pull/5098) +- [sha1dc: update to fix endianess issues on AIX/HP-UX](https://github.com/libgit2/libgit2/pull/5107) +- [Add NTLM support for HTTP(s) servers and proxies](https://github.com/libgit2/libgit2/pull/5052) +- [Callback type names should be suffixed with `_cb`](https://github.com/libgit2/libgit2/pull/5102) +- [tests: checkout: fix symlink.git being created outside of sandbox](https://github.com/libgit2/libgit2/pull/5099) +- [ignore: handle escaped trailing whitespace](https://github.com/libgit2/libgit2/pull/5095) +- [Ignore: only treat one leading slash as a root identifier](https://github.com/libgit2/libgit2/pull/5074) +- [online tests: use gitlab for auth failures](https://github.com/libgit2/libgit2/pull/5094) +- [Ignore files: don't ignore whitespace](https://github.com/libgit2/libgit2/pull/5076) +- [cache: fix cache eviction using deallocated key](https://github.com/libgit2/libgit2/pull/5088) +- [SECURITY.md: split out security-relevant bits from readme](https://github.com/libgit2/libgit2/pull/5085) +- [Restore NetBSD support](https://github.com/libgit2/libgit2/pull/5086) +- [repository: fix garbage return value](https://github.com/libgit2/libgit2/pull/5084) +- [cmake: disable fallthrough warnings for PCRE](https://github.com/libgit2/libgit2/pull/5083) +- [Configuration parsing: validate section headers with quotes](https://github.com/libgit2/libgit2/pull/5073) +- [Loosen restriction on wildcard "*" refspecs](https://github.com/libgit2/libgit2/pull/5060) +- [Use PCRE for our fallback regex engine when regcomp_l is unavailable](https://github.com/libgit2/libgit2/pull/4935) +- [Remote URL last-chance resolution](https://github.com/libgit2/libgit2/pull/5062) +- [Skip UTF8 BOM in ignore files](https://github.com/libgit2/libgit2/pull/5075) +- [We've already added `ZLIB_LIBRARIES` to `LIBGIT2_LIBS` so don't also add the `z` library](https://github.com/libgit2/libgit2/pull/5080) +- [Define SYMBOLIC_LINK_FLAG_DIRECTORY if required](https://github.com/libgit2/libgit2/pull/5077) +- [Support symlinks for directories in win32](https://github.com/libgit2/libgit2/pull/5065) +- [rebase: orig_head and onto accessors](https://github.com/libgit2/libgit2/pull/5057) +- [cmake: correctly detect if system provides `regcomp`](https://github.com/libgit2/libgit2/pull/5063) +- [Correctly write to missing locked global config](https://github.com/libgit2/libgit2/pull/5023) +- [[RFC] util: introduce GIT_DOWNCAST macro](https://github.com/libgit2/libgit2/pull/4561) +- [examples: implement SSH authentication](https://github.com/libgit2/libgit2/pull/5051) +- [git_repository_init: stop traversing at windows root](https://github.com/libgit2/libgit2/pull/5050) +- [config_file: check result of git_array_alloc](https://github.com/libgit2/libgit2/pull/5053) +- [patch_parse.c: Handle CRLF in parse_header_start](https://github.com/libgit2/libgit2/pull/5027) +- [fix typo](https://github.com/libgit2/libgit2/pull/5045) +- [sha1: don't inline `git_hash_global_init` for win32](https://github.com/libgit2/libgit2/pull/5039) +- [ignore: treat paths with trailing "/" as directories](https://github.com/libgit2/libgit2/pull/5040) +- [Test that largefiles can be read through the tree API](https://github.com/libgit2/libgit2/pull/4874) +- [Tests for symlinked user config](https://github.com/libgit2/libgit2/pull/5034) +- [patch_parse: fix parsing addition/deletion of file with space](https://github.com/libgit2/libgit2/pull/5035) +- [Optimize string comparisons](https://github.com/libgit2/libgit2/pull/5018) +- [Negation of subdir ignore causes other subdirs to be unignored](https://github.com/libgit2/libgit2/pull/5020) +- [xdiff: fix typo](https://github.com/libgit2/libgit2/pull/5024) +- [docs: clarify relation of safe and forced checkout strategy](https://github.com/libgit2/libgit2/pull/5032) +- [Each hash implementation should define `git_hash_global_init`](https://github.com/libgit2/libgit2/pull/5026) +- [[Doc] Update URL to git2-rs](https://github.com/libgit2/libgit2/pull/5012) +- [remote: Rename git_remote_completion_type to _t](https://github.com/libgit2/libgit2/pull/5008) +- [odb: provide a free function for custom backends](https://github.com/libgit2/libgit2/pull/5005) +- [Have git_branch_lookup accept GIT_BRANCH_ALL](https://github.com/libgit2/libgit2/pull/5000) +- [Rename git_transfer_progress to git_indexer_progress](https://github.com/libgit2/libgit2/pull/4997) +- [High-level map APIs](https://github.com/libgit2/libgit2/pull/4901) +- [refdb_fs: fix loose/packed refs lookup racing with repacks](https://github.com/libgit2/libgit2/pull/4984) +- [Allocator restructuring](https://github.com/libgit2/libgit2/pull/4998) +- [cache: fix misnaming of `git_cache_free`](https://github.com/libgit2/libgit2/pull/4992) +- [examples: produce single cgit2 binary](https://github.com/libgit2/libgit2/pull/4956) +- [Remove public 'inttypes.h' header](https://github.com/libgit2/libgit2/pull/4991) +- [Prevent reading out of bounds memory](https://github.com/libgit2/libgit2/pull/4996) +- [Fix a memory leak in odb_otype_fast()](https://github.com/libgit2/libgit2/pull/4987) +- [Make stdalloc__reallocarray call stdalloc__realloc](https://github.com/libgit2/libgit2/pull/4986) +- [Remove `git_time_monotonic`](https://github.com/libgit2/libgit2/pull/4990) +- [Fix a _very_ improbable memory leak in git_odb_new()](https://github.com/libgit2/libgit2/pull/4988) +- [ci: publish documentation on merge](https://github.com/libgit2/libgit2/pull/4989) +- [Enable creation of worktree from bare repo's default branch](https://github.com/libgit2/libgit2/pull/4982) +- [Allow bypassing check for '.keep' file](https://github.com/libgit2/libgit2/pull/4965) +- [Deprecation: export the deprecated functions properly](https://github.com/libgit2/libgit2/pull/4979) +- [ci: skip ssh tests on macOS nightly](https://github.com/libgit2/libgit2/pull/4980) +- [CI build fixups](https://github.com/libgit2/libgit2/pull/4976) +- [v0.28 rc1](https://github.com/libgit2/libgit2/pull/4970) +- [Docs](https://github.com/libgit2/libgit2/pull/4968) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/4954) +- [ci: add an individual coverity pipeline](https://github.com/libgit2/libgit2/pull/4964) +- [ci: run docurium to create documentation](https://github.com/libgit2/libgit2/pull/4961) +- [ci: return coverity to the nightlies](https://github.com/libgit2/libgit2/pull/4962) +- [Clean up some warnings](https://github.com/libgit2/libgit2/pull/4950) +- [Nightlies: use `latest` docker images](https://github.com/libgit2/libgit2/pull/4869) +- [index: preserve extension parsing errors](https://github.com/libgit2/libgit2/pull/4858) +- [Deprecate functions and constants more gently](https://github.com/libgit2/libgit2/pull/4952) +- [Don't use deprecated constants](https://github.com/libgit2/libgit2/pull/4957) +- [Fix VS warning C4098: 'giterr_set_str' : void function returning a value](https://github.com/libgit2/libgit2/pull/4955) +- [Move `giterr` to `git_error`](https://github.com/libgit2/libgit2/pull/4917) +- [odb: Fix odb foreach to also close on positive error code](https://github.com/libgit2/libgit2/pull/4949) +- [repository: free memory in symlink detection function](https://github.com/libgit2/libgit2/pull/4948) +- [ci: update poxyproxy, run in quiet mode](https://github.com/libgit2/libgit2/pull/4947) +- [Add/multiply with overflow tweaks](https://github.com/libgit2/libgit2/pull/4945) +- [Improve deprecation of old enums](https://github.com/libgit2/libgit2/pull/4944) +- [Move `git_ref_t` to `git_reference_t`](https://github.com/libgit2/libgit2/pull/4939) +- [More `git_obj` to `git_object` updates](https://github.com/libgit2/libgit2/pull/4940) +- [ci: only run invasive tests in nightly](https://github.com/libgit2/libgit2/pull/4943) +- [Always build a cdecl library](https://github.com/libgit2/libgit2/pull/4930) +- [changelog: document changes since 0.27](https://github.com/libgit2/libgit2/pull/4932) +- [Fix a bunch of warnings](https://github.com/libgit2/libgit2/pull/4925) +- [mailmap: prefer ethomson@edwardthomson.com](https://github.com/libgit2/libgit2/pull/4941) +- [Convert tests/resources/push.sh to LF endings](https://github.com/libgit2/libgit2/pull/4937) +- [Get rid of some test files that were accidentally committed](https://github.com/libgit2/libgit2/pull/4936) +- [Fix crash on remote connection when GIT_PROXY_AUTO is set but no proxy is detected](https://github.com/libgit2/libgit2/pull/4934) +- [Make ENABLE_WERROR actually work](https://github.com/libgit2/libgit2/pull/4924) +- [Remove unconditional -Wno-deprecated-declaration on macOS](https://github.com/libgit2/libgit2/pull/4931) +- [Fix warning 'function': incompatible types - from 'git_cvar_value *' to 'int *' (C4133) on VS](https://github.com/libgit2/libgit2/pull/4926) +- [Fix Linux warnings](https://github.com/libgit2/libgit2/pull/4928) +- [Coverity fixes](https://github.com/libgit2/libgit2/pull/4922) +- [Shutdown callback count](https://github.com/libgit2/libgit2/pull/4919) +- [Update CRLF filtering to match modern git](https://github.com/libgit2/libgit2/pull/4904) +- [refdb_fs: refactor error handling in `refdb_reflog_fs__delete`](https://github.com/libgit2/libgit2/pull/4915) +- [Remove empty (sub-)directories when deleting refs](https://github.com/libgit2/libgit2/pull/4833) +- [Support creating annotated commits from annotated tags](https://github.com/libgit2/libgit2/pull/4910) +- [Fix segfault in loose_backend__readstream](https://github.com/libgit2/libgit2/pull/4906) +- [make proxy_stream_close close target stream even on errors](https://github.com/libgit2/libgit2/pull/4905) +- [Index API updates for consistency](https://github.com/libgit2/libgit2/pull/4807) +- [Allow merge analysis against any reference](https://github.com/libgit2/libgit2/pull/4770) +- [revwalk: Allow changing hide_cb](https://github.com/libgit2/libgit2/pull/4888) +- [Unused function warnings](https://github.com/libgit2/libgit2/pull/4895) +- [Add builtin proxy support for the http transport](https://github.com/libgit2/libgit2/pull/4870) +- [config: fix adding files if their parent directory is a file](https://github.com/libgit2/libgit2/pull/4898) +- [Allow certificate and credential callbacks to decline to act](https://github.com/libgit2/libgit2/pull/4879) +- [Fix warning C4133 incompatible types in MSVC](https://github.com/libgit2/libgit2/pull/4896) +- [index: introduce git_index_iterator](https://github.com/libgit2/libgit2/pull/4884) +- [commit: fix out-of-bound reads when parsing truncated author fields](https://github.com/libgit2/libgit2/pull/4894) +- [tests: 🌀 address two null argument instances #4847](https://github.com/libgit2/libgit2/pull/4847) +- [Some OpenSSL issues](https://github.com/libgit2/libgit2/pull/4875) +- [worktree: Expose git_worktree_add_init_options](https://github.com/libgit2/libgit2/pull/4892) +- [transport/http: Include non-default ports in Host header](https://github.com/libgit2/libgit2/pull/4882) +- [Support symlinks on Windows when core.symlinks=true](https://github.com/libgit2/libgit2/pull/4713) +- [strntol: fix out-of-bounds reads when parsing numbers with leading sign](https://github.com/libgit2/libgit2/pull/4886) +- [apply: small fixups in the test suite](https://github.com/libgit2/libgit2/pull/4885) +- [signature: fix out-of-bounds read when parsing timezone offset](https://github.com/libgit2/libgit2/pull/4883) +- [Remote creation API](https://github.com/libgit2/libgit2/pull/4667) +- [Index collision fixes](https://github.com/libgit2/libgit2/pull/4818) +- [Patch (diff) application](https://github.com/libgit2/libgit2/pull/4705) +- [smart transport: only clear url on hard reset (regression)](https://github.com/libgit2/libgit2/pull/4880) +- [Tree parsing fixes](https://github.com/libgit2/libgit2/pull/4871) +- [CI: Fix macOS leak detection](https://github.com/libgit2/libgit2/pull/4860) +- [README: more CI status badges](https://github.com/libgit2/libgit2/pull/4800) +- [ci: Fix some minor issues](https://github.com/libgit2/libgit2/pull/4867) +- [Object parse fixes](https://github.com/libgit2/libgit2/pull/4864) +- [Windows CI: fail build on test failure](https://github.com/libgit2/libgit2/pull/4862) +- [ci: run all the jobs during nightly builds](https://github.com/libgit2/libgit2/pull/4863) +- [strtol removal](https://github.com/libgit2/libgit2/pull/4851) +- [ buf::oom tests: use custom allocator for oom failures](https://github.com/libgit2/libgit2/pull/4854) +- [ci: arm docker builds](https://github.com/libgit2/libgit2/pull/4804) +- [Win32 path canonicalization refactoring](https://github.com/libgit2/libgit2/pull/4852) +- [Check object existence when creating a tree from an index](https://github.com/libgit2/libgit2/pull/4840) +- [Ninja build](https://github.com/libgit2/libgit2/pull/4841) +- [docs: fix transparent/opaque confusion in the conventions file](https://github.com/libgit2/libgit2/pull/4853) +- [Configuration variables can appear on the same line as the section header](https://github.com/libgit2/libgit2/pull/4819) +- [path: export the dotgit-checking functions](https://github.com/libgit2/libgit2/pull/4849) +- [cmake: correct comment from libssh to libssh2](https://github.com/libgit2/libgit2/pull/4850) +- [Object parsing fuzzer](https://github.com/libgit2/libgit2/pull/4845) +- [config: Port config_file_fuzzer to the new in-memory backend.](https://github.com/libgit2/libgit2/pull/4842) +- [Add some more tests for git_futils_rmdir_r and some cleanup](https://github.com/libgit2/libgit2/pull/4828) +- [diff_stats: use git's formatting of renames with common directories](https://github.com/libgit2/libgit2/pull/4830) +- [ignore unsupported http authentication contexts](https://github.com/libgit2/libgit2/pull/4839) +- [submodule: ignore path and url attributes if they look like options](https://github.com/libgit2/libgit2/pull/4837) +- [Smart packet security fixes](https://github.com/libgit2/libgit2/pull/4836) +- [config_file: properly ignore includes without "path" value](https://github.com/libgit2/libgit2/pull/4832) +- [int-conversion](https://github.com/libgit2/libgit2/pull/4831) +- [cmake: enable new quoted argument policy CMP0054](https://github.com/libgit2/libgit2/pull/4829) +- [fix check if blob is uninteresting when inserting tree to packbuilder](https://github.com/libgit2/libgit2/pull/4824) +- [Documentation fixups](https://github.com/libgit2/libgit2/pull/4827) +- [CI: refactoring](https://github.com/libgit2/libgit2/pull/4812) +- [In-memory configuration](https://github.com/libgit2/libgit2/pull/4767) +- [Some warnings](https://github.com/libgit2/libgit2/pull/4784) +- [index: release the snapshot instead of freeing the index](https://github.com/libgit2/libgit2/pull/4803) +- [online::clone: free url and username before resetting](https://github.com/libgit2/libgit2/pull/4816) +- [git_remote_prune to be O(n * logn)](https://github.com/libgit2/libgit2/pull/4794) +- [Rename "VSTS" to "Azure DevOps" and "Azure Pipelines"](https://github.com/libgit2/libgit2/pull/4813) +- [cmake: enable -Wformat and -Wformat-security](https://github.com/libgit2/libgit2/pull/4810) +- [Fix revwalk limiting regression](https://github.com/libgit2/libgit2/pull/4809) +- [path validation: `char` is not signed by default.](https://github.com/libgit2/libgit2/pull/4805) +- [revwalk: refer the sorting modes more to git's options](https://github.com/libgit2/libgit2/pull/4811) +- [Clar XML output redux](https://github.com/libgit2/libgit2/pull/4778) +- [remote: store the connection data in a private struct](https://github.com/libgit2/libgit2/pull/4785) +- [docs: clarify and include licenses of dependencies](https://github.com/libgit2/libgit2/pull/4789) +- [config_file: fix quadratic behaviour when adding config multivars](https://github.com/libgit2/libgit2/pull/4799) +- [config: Fix a leak parsing multi-line config entries](https://github.com/libgit2/libgit2/pull/4792) +- [Prevent heap-buffer-overflow](https://github.com/libgit2/libgit2/pull/4797) +- [ci: remove travis](https://github.com/libgit2/libgit2/pull/4790) +- [Update VSTS YAML files with the latest syntax](https://github.com/libgit2/libgit2/pull/4791) +- [Documentation fixes](https://github.com/libgit2/libgit2/pull/4788) +- [config: convert unbounded recursion into a loop](https://github.com/libgit2/libgit2/pull/4781) +- [Document giterr_last() use only after error. #4772](https://github.com/libgit2/libgit2/pull/4773) +- [util: make the qsort_r check work on macOS](https://github.com/libgit2/libgit2/pull/4765) +- [fuzzer: update for indexer changes](https://github.com/libgit2/libgit2/pull/4782) +- [tree: accept null ids in existing trees when updating](https://github.com/libgit2/libgit2/pull/4727) +- [Pack file verification](https://github.com/libgit2/libgit2/pull/4374) +- [cmake: detect and use libc-provided iconv](https://github.com/libgit2/libgit2/pull/4777) +- [Coverity flavored clang analyzer fixes](https://github.com/libgit2/libgit2/pull/4774) +- [tests: verify adding index conflicts with invalid filemodes fails](https://github.com/libgit2/libgit2/pull/4776) +- [worktree: unlock should return 1 when the worktree isn't locked](https://github.com/libgit2/libgit2/pull/4769) +- [Add a fuzzer for config files](https://github.com/libgit2/libgit2/pull/4752) +- [Fix 'invalid packet line' for ng packets containing errors](https://github.com/libgit2/libgit2/pull/4763) +- [Fix leak in index.c](https://github.com/libgit2/libgit2/pull/4768) +- [threads::diff: use separate git_repository objects](https://github.com/libgit2/libgit2/pull/4754) +- [travis: remove Coverity cron job](https://github.com/libgit2/libgit2/pull/4766) +- [parse: Do not initialize the content in context to NULL](https://github.com/libgit2/libgit2/pull/4749) +- [config_file: Don't crash on options without a section](https://github.com/libgit2/libgit2/pull/4750) +- [ci: Correct the status code check so Coverity doesn't force-fail Travis](https://github.com/libgit2/libgit2/pull/4764) +- [ci: remove appveyor](https://github.com/libgit2/libgit2/pull/4760) +- [diff: fix OOM on AIX when finding similar deltas in empty diff](https://github.com/libgit2/libgit2/pull/4761) +- [travis: do not execute Coverity analysis for all cron jobs](https://github.com/libgit2/libgit2/pull/4755) +- [ci: enable compilation with "-Werror"](https://github.com/libgit2/libgit2/pull/4759) +- [smart_pkt: fix potential OOB-read when processing ng packet](https://github.com/libgit2/libgit2/pull/4758) +- [Fix a double-free in config parsing](https://github.com/libgit2/libgit2/pull/4751) +- [Fuzzers](https://github.com/libgit2/libgit2/pull/4728) +- [ci: run VSTS builds on master and maint branches](https://github.com/libgit2/libgit2/pull/4746) +- [Windows: default credentials / fallback credential handling](https://github.com/libgit2/libgit2/pull/4743) +- [ci: add VSTS build badge to README](https://github.com/libgit2/libgit2/pull/4745) +- [ci: set PKG_CONFIG_PATH for travis](https://github.com/libgit2/libgit2/pull/4744) +- [CI: Refactor and introduce VSTS builds](https://github.com/libgit2/libgit2/pull/4723) +- [revwalk: remove tautologic condition for hiding a commit](https://github.com/libgit2/libgit2/pull/4742) +- [winhttp: retry erroneously failing requests](https://github.com/libgit2/libgit2/pull/4731) +- [Add a configurable limit to the max pack size that will be indexed](https://github.com/libgit2/libgit2/pull/4721) +- [mbedtls: remove unused variable "cacert"](https://github.com/libgit2/libgit2/pull/4739) +- [Squash some leaks](https://github.com/libgit2/libgit2/pull/4732) +- [Add a checkout example](https://github.com/libgit2/libgit2/pull/4692) +- [Assorted Coverity fixes](https://github.com/libgit2/libgit2/pull/4702) +- [Remove GIT_PKT_PACK entirely](https://github.com/libgit2/libgit2/pull/4704) +- [ ignore: improve `git_ignore_path_is_ignored` description Git analogy](https://github.com/libgit2/libgit2/pull/4722) +- [alloc: don't overwrite allocator during init if set](https://github.com/libgit2/libgit2/pull/4724) +- [C90 standard compliance](https://github.com/libgit2/libgit2/pull/4700) +- [Delta OOB access](https://github.com/libgit2/libgit2/pull/4719) +- [Release v0.27.3](https://github.com/libgit2/libgit2/pull/4717) +- [streams: report OpenSSL errors if global init fails](https://github.com/libgit2/libgit2/pull/4710) +- [patch_parse: populate line numbers while parsing diffs](https://github.com/libgit2/libgit2/pull/4687) +- [Fix git_worktree_validate failing on bare repositories](https://github.com/libgit2/libgit2/pull/4686) +- [git_refspec_transform: Handle NULL dst](https://github.com/libgit2/libgit2/pull/4699) +- [Add a "dirty" state to the index when it has unsaved changes](https://github.com/libgit2/libgit2/pull/4536) +- [refspec: rename `git_refspec__free` to `git_refspec__dispose`](https://github.com/libgit2/libgit2/pull/4709) +- [streams: openssl: Handle error in SSL_CTX_new](https://github.com/libgit2/libgit2/pull/4701) +- [refspec: add public parsing api](https://github.com/libgit2/libgit2/pull/4519) +- [Fix interaction between limited flag and sorting over resets](https://github.com/libgit2/libgit2/pull/4688) +- [deps: fix implicit fallthrough warning in http-parser](https://github.com/libgit2/libgit2/pull/4691) +- [Fix assorted leaks found via fuzzing](https://github.com/libgit2/libgit2/pull/4698) +- [Fix type confusion in git_smart__connect](https://github.com/libgit2/libgit2/pull/4695) +- [Verify ref_pkt's are long enough](https://github.com/libgit2/libgit2/pull/4696) +- [Config parser cleanups](https://github.com/libgit2/libgit2/pull/4411) +- [Fix last references to deprecated git_buf_free](https://github.com/libgit2/libgit2/pull/4685) +- [revwalk: avoid walking the entire history when output is unsorted](https://github.com/libgit2/libgit2/pull/4606) +- [Add mailmap support.](https://github.com/libgit2/libgit2/pull/4586) +- [tree: remove unused functions](https://github.com/libgit2/libgit2/pull/4683) +- [Link `mbedTLS` libraries in when `SHA1_BACKEND` == "mbedTLS"](https://github.com/libgit2/libgit2/pull/4678) +- [editorconfig: allow trailing whitespace in markdown](https://github.com/libgit2/libgit2/pull/4676) +- [docs: fix statement about tab width](https://github.com/libgit2/libgit2/pull/4681) +- [diff: fix enum value being out of allowed range](https://github.com/libgit2/libgit2/pull/4680) +- [pack: rename `git_packfile_stream_free`](https://github.com/libgit2/libgit2/pull/4436) +- [Stop leaking the memory](https://github.com/libgit2/libgit2/pull/4677) +- [Bugfix release v0.27.2](https://github.com/libgit2/libgit2/pull/4632) +- [Fix stash save bug with fast path index check](https://github.com/libgit2/libgit2/pull/4668) +- [path: unify `git_path_is_*` APIs](https://github.com/libgit2/libgit2/pull/4662) +- [Fix negative gitignore rules with leading directories ](https://github.com/libgit2/libgit2/pull/4670) +- [Custom memory allocators](https://github.com/libgit2/libgit2/pull/4576) +- [index: Fix alignment issues in write_disk_entry()](https://github.com/libgit2/libgit2/pull/4655) +- [travis: war on leaks](https://github.com/libgit2/libgit2/pull/4558) +- [refdb_fs: fix regression: failure when globbing for non-existant references](https://github.com/libgit2/libgit2/pull/4665) +- [tests: submodule: do not rely on config iteration order](https://github.com/libgit2/libgit2/pull/4673) +- [Detect duplicated submodules for the same path](https://github.com/libgit2/libgit2/pull/4641) +- [Fix docurium missing includes](https://github.com/libgit2/libgit2/pull/4530) +- [github: update issue template](https://github.com/libgit2/libgit2/pull/4627) +- [streams: openssl: add missing check on OPENSSL_LEGACY_API](https://github.com/libgit2/libgit2/pull/4661) +- [mbedtls: don't require mbedtls from our pkgconfig file](https://github.com/libgit2/libgit2/pull/4656) +- [Fixes for CVE 2018-11235](https://github.com/libgit2/libgit2/pull/4660) +- [Backport fixes for CVE 2018-11235](https://github.com/libgit2/libgit2/pull/4659) +- [Added note about Windows junction points to the differences from git document](https://github.com/libgit2/libgit2/pull/4653) +- [cmake: resolve libraries found by pkg-config ](https://github.com/libgit2/libgit2/pull/4642) +- [refdb_fs: enhance performance of globbing](https://github.com/libgit2/libgit2/pull/4629) +- [global: adjust init count under lock](https://github.com/libgit2/libgit2/pull/4645) +- [Fix GCC 8.1 warnings](https://github.com/libgit2/libgit2/pull/4646) +- [Worktrees can be made from bare repositories](https://github.com/libgit2/libgit2/pull/4630) +- [docs: add documentation to state differences from the git cli](https://github.com/libgit2/libgit2/pull/4605) +- [Sanitize the hunk header to ensure it contains UTF-8 valid data](https://github.com/libgit2/libgit2/pull/4542) +- [examples: ls-files: add ls-files to list paths in the index](https://github.com/libgit2/libgit2/pull/4380) +- [OpenSSL legacy API cleanups](https://github.com/libgit2/libgit2/pull/4608) +- [worktree: add functions to get name and path](https://github.com/libgit2/libgit2/pull/4640) +- [Fix deletion of unrelated branch on worktree](https://github.com/libgit2/libgit2/pull/4633) +- [mbedTLS support](https://github.com/libgit2/libgit2/pull/4173) +- [Configuration entry iteration in order](https://github.com/libgit2/libgit2/pull/4525) +- [blame_git: fix coalescing step never being executed](https://github.com/libgit2/libgit2/pull/4580) +- [Fix leaks in master](https://github.com/libgit2/libgit2/pull/4636) +- [Leak fixes for v0.27.1](https://github.com/libgit2/libgit2/pull/4635) +- [worktree: Read worktree specific reflog for HEAD](https://github.com/libgit2/libgit2/pull/4577) +- [fixed stack smashing due to wrong size of struct stat on the stack](https://github.com/libgit2/libgit2/pull/4631) +- [scripts: add backporting script](https://github.com/libgit2/libgit2/pull/4476) +- [worktree: add ability to create worktree with pre-existing branch](https://github.com/libgit2/libgit2/pull/4524) +- [refs: preserve the owning refdb when duping reference](https://github.com/libgit2/libgit2/pull/4618) +- [Submodules-API should report .gitmodules parse errors instead of ignoring them](https://github.com/libgit2/libgit2/pull/4522) +- [Typedef git_pkt_type and clarify recv_pkt return type](https://github.com/libgit2/libgit2/pull/4514) +- [online::clone: validate user:pass in HTTP_PROXY](https://github.com/libgit2/libgit2/pull/4556) +- [ transports: ssh: disconnect session before freeing it ](https://github.com/libgit2/libgit2/pull/4596) +- [revwalk: fix uninteresting revs sometimes not limiting graphwalk](https://github.com/libgit2/libgit2/pull/4622) +- [attr_file: fix handling of directory patterns with trailing spaces](https://github.com/libgit2/libgit2/pull/4614) +- [transports: local: fix assert when fetching into repo with symrefs](https://github.com/libgit2/libgit2/pull/4613) +- [remote/proxy: fix git_transport_certificate_check_db description](https://github.com/libgit2/libgit2/pull/4597) +- [Flag options in describe.h as being optional](https://github.com/libgit2/libgit2/pull/4587) +- [diff: Add missing GIT_DELTA_TYPECHANGE -> 'T' mapping.](https://github.com/libgit2/libgit2/pull/4611) +- [appveyor: fix typo in registry key to disable DHE](https://github.com/libgit2/libgit2/pull/4609) +- [Fix build with LibreSSL 2.7](https://github.com/libgit2/libgit2/pull/4607) +- [appveyor: workaround for intermittent test failures](https://github.com/libgit2/libgit2/pull/4603) +- [sha1dc: update to fix errors with endianess](https://github.com/libgit2/libgit2/pull/4601) +- [submodule: check index for path and prefix before adding submodule](https://github.com/libgit2/libgit2/pull/4378) +- [odb: mempack: fix leaking objects when freeing mempacks](https://github.com/libgit2/libgit2/pull/4602) +- [types: remove unused git_merge_result](https://github.com/libgit2/libgit2/pull/4598) +- [checkout: change default strategy to SAFE](https://github.com/libgit2/libgit2/pull/4531) +- [Add myself to git.git-authors](https://github.com/libgit2/libgit2/pull/4570) + + ## v0.25.0-alpha.16 [(2019-07-23)](https://github.com/nodegit/nodegit/releases/tag/v0.25.0-alpha.16) [Full Changelog](https://github.com/nodegit/nodegit/compare/v0.25.0-alpha.15...v0.25.0-alpha.16) diff --git a/package-lock.json b/package-lock.json index 91993080b..a54150f19 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nodegit", - "version": "0.25.0-alpha.16", + "version": "0.25.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f334970ca..b055e829f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nodegit", "description": "Node.js libgit2 asynchronous native bindings", - "version": "0.25.0-alpha.16", + "version": "0.25.0", "homepage": "http://nodegit.org", "keywords": [ "libgit2",