summaryrefslogtreecommitdiffstats
path: root/vendor/git2
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:19 +0000
commita0b8f38ab54ac451646aa00cd5e91b6c76f22a84 (patch)
treefc451898ccaf445814e26b46664d78702178101d /vendor/git2
parentAdding debian version 1.71.1+dfsg1-2. (diff)
downloadrustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.tar.xz
rustc-a0b8f38ab54ac451646aa00cd5e91b6c76f22a84.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/git2')
-rw-r--r--vendor/git2/.cargo-checksum.json2
-rw-r--r--vendor/git2/CHANGELOG.md7
-rw-r--r--vendor/git2/Cargo.lock6
-rw-r--r--vendor/git2/Cargo.toml4
-rw-r--r--vendor/git2/README.md2
-rw-r--r--vendor/git2/src/diff.rs2
-rw-r--r--vendor/git2/src/lib.rs2
-rw-r--r--vendor/git2/src/repo.rs21
-rw-r--r--vendor/git2/src/stash.rs120
-rw-r--r--vendor/git2/src/transport.rs2
10 files changed, 143 insertions, 25 deletions
diff --git a/vendor/git2/.cargo-checksum.json b/vendor/git2/.cargo-checksum.json
index ef770e51f..4860d8994 100644
--- a/vendor/git2/.cargo-checksum.json
+++ b/vendor/git2/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"76fc66c937986ebea546db89d371724936dab1166441c3162b45cadd7abd4c4e","CONTRIBUTING.md":"805288d099e6ea48da9746333109330905e3f35d72102901725c39dc53ef3158","Cargo.lock":"b828e59f086afac0416418de2cb1e9b01832040730e2c8b5c690a4d48b9afa0e","Cargo.toml":"e7acfef794761d13734f79301391fff966b917d0128c49902034d7581f8361f4","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"b216929ec309fb23bb053f0370e84cf5c77a626204f1f7c57357af854fac5c05","examples/add.rs":"a9903f7a1af1b199783099509de3b640a3d039e9ad0b8c752c908e7fedf59b88","examples/blame.rs":"b59dc1daff18dee256038ea5e66c478678e51df1aacd20325f01d4e270fe3f20","examples/cat-file.rs":"93da1bf8891e43c308390e02f3c32106fcc085755e7f3e184d58aa2288c30cf4","examples/clone.rs":"822e6dac8f71877e8966ab72d3896dc82dfd7b525dbd54b1867964c2a9b241fd","examples/diff.rs":"0c182b4658354b01435d77c2f0c60851e1a09b469fce80062f92a17b6fd813ba","examples/fetch.rs":"a34826b1f4448b688313b0322c951401e19b62c8f6cf28d06251bd148d842128","examples/init.rs":"3a88038e2e6eb1ff555db5cec0beff466ee500de03eaa075af3a5920d59db81b","examples/log.rs":"ea825b4b3c1410e7c14832ca87e4c1f291b5f8f83c527672be8d61d188326a16","examples/ls-remote.rs":"9e1d2fb2441c535f8abc5f1d146dd1d499e518f583baaae99b5234195153cf82","examples/pull.rs":"6c6043caecc73629423d59a8fe9f80a1d4ddb2cd158779ea113c38a8cc6bdf6a","examples/rev-list.rs":"2e18eea067c0d684dd89f6d86b4ddb052a3d594471b17eddfac9d0c18f64ae67","examples/rev-parse.rs":"125e80a916a3476d894aa555e2b780a8cf1316a0b5b850b9918b3c1af5c00dd4","examples/status.rs":"89ec5127e44123afaf429233c885cd547d7a28670512bf87c30770eba615e061","examples/tag.rs":"881ba5797fe5133c6321927518198c3ad42dd81499b57e9f32df590505b49d17","src/apply.rs":"1ca5b0c06b96cd0af13dc322bf858e375a50f76d887c61052115ea8af2245847","src/attr.rs":"bc1957f495cf3aed4a663b50b43dd8deee6770ab259283673a883ac3c66908a7","src/blame.rs":"538944e8264a1dfea2868247a1f3b44817df583131370bb6785caeafd3fdf1da","src/blob.rs":"7cb0326521dec9548a05c155283495c33f629678d9f7263e9de500c32052fb74","src/branch.rs":"1afa850c4c3a22531baddf5636bf55c9122a76b0d010e8392fbf04f1b76067ed","src/buf.rs":"d4d9795afc04eba6eb6a08c5dbcbc8e3e8341adc11701c65198d514f6cdfbac0","src/build.rs":"a4e2e7074b395ca1d4c085667aee565b66b20fd739ea69d9c5a31e8261588043","src/call.rs":"e5d3c59df621224c44f8caf8bd71997c33306ba251fbb58f411020377b1bc354","src/cert.rs":"6e8a78340cb8b3908977892d6d1723cebe70ff63819b28a63688e0fb4428b859","src/cherrypick.rs":"1ce882b6be825243d5551f11e1f48f53acc4aa52c4c5fb5510e69fd077a512bc","src/commit.rs":"9903f1656c695947164f18291a6659726897db782b6b84f0bca14f3e829d3b45","src/config.rs":"1109a50de982d4796605abe143a5844dc312c58379e05ad7d790d5cc8f4cd186","src/cred.rs":"25ce633857cb7a3c57fa5d677b65759f54cd683d01ade64901d59d04d783e1a6","src/describe.rs":"3adb68b3118bfa18c09f7ca767afa38d76e22130b1cebf20cc3b97c9a198957a","src/diff.rs":"e294aa76cb9aacdd355f1a8fa1fd451ce8c8192557fd29a02ee1aa79ec77898b","src/email.rs":"b95f32739a2adac55016e892d913fb4b03d10c0583569a613f6c13946238759d","src/error.rs":"cd72f5f51d0c76f6bddd5d0f9e4d4e4190b40e15cebc3627fca2ba8f293964a4","src/index.rs":"1f34cbc31ecb7d536f4138a2c4a35d9e24703c4d78575e4528c7bdf78c30e87c","src/indexer.rs":"36221447975f235abbe53135166ea4bc6833a2835a7e343271fd9bdf45af0421","src/lib.rs":"fb675bfe3a82d14a3d42c09939d0f426a1d4f51fde701acf489f027ddb0f932b","src/mailmap.rs":"a034b1c86c8a8d4362939e2e2c1d0b1b2f5c71bac883b2b1b65b64078c70349e","src/mempack.rs":"8549f984360ac12868018e4f107a60386474c58cfb6c41993cbb0a820bd28908","src/merge.rs":"681f2f1e59cec49a8618a894e22645915e8f8a815a71d4ca7c6ab10fbdaeb919","src/message.rs":"77d42388ff836c6c3b49f8c8da24ca0cf42d8f8631bf8d31e68cdb6299030c38","src/note.rs":"55b286c3736833432d391184136f0fb0928e337990d1558166e2d998dc63f0dd","src/object.rs":"8b66f1c34570b37d204d0b3f626edbdd0baa7eb9734e3e444b72bf3e8fc46a27","src/odb.rs":"7088257f15b5c86774a62dc0dc42ac939348077eed7db8b3b6919aaea836c27b","src/oid.rs":"dc284f1523b3109e9721165289adcd820733fe72d5807f7739d307c2f88d2006","src/oid_array.rs":"4820657a5d4460a77a31fe0ba04c5575f6900a1767925a40464fadcacaf6a066","src/opts.rs":"7fe4baf924712816f2c7e51543820094e714e2b564dfc0450a885a6f8e218107","src/packbuilder.rs":"649246626d600f7d023e73ab3e3d4ca691d482d85de11338f3c5cea66f7f84ee","src/panic.rs":"62ef0684379f4cdebf9477e2f63c9f0ecc80fe608de2df32bca13ce0086249d6","src/patch.rs":"740fa2a29148605e3dac16f58fd603b408283cfe148b922fbe6b5a5d62f18db0","src/pathspec.rs":"4687cbfdf26081ba25323e2ba03bfd0f9d56d1e71cc29f0c91d082540171b339","src/proxy_options.rs":"cfa029317ae00a15074d4fd5de5d7c8da982459b915399c1d6010ddbee43ab28","src/push_update.rs":"af8108cdbac8c5c22811c1063a2c4706070b4f4e69ac4151ab84963f04dbaaca","src/rebase.rs":"179fc17e402d902300de8d37a65ceb0c29d6e8f4ba50cc8b7a7d8b09cfe9ef55","src/reference.rs":"3f2def9ea8a16c36685f71324bcb99d325161cfc59b844ac4d5387408d0ef0a8","src/reflog.rs":"45e05e0cb5418be7a0f15a2992802391d31806ed459e8c49864db5d67c6aedd7","src/refspec.rs":"5107582963524fe9ff312a280232dba08d25be06fdf8f278c0bbfdbfa7a50402","src/remote.rs":"4b07e455cda88bb4ebfdffd981eb2ba77b97251d3c92a9a878b569331f687bbb","src/remote_callbacks.rs":"338ae362638084592697783e39996a37061e0ef88dbb9e81a56459b0e0c27190","src/repo.rs":"0a03a9d994606b8386e5e00ed7037bc20d68de4fe1d6830da7f1bff47d19dc90","src/revert.rs":"b51dd98a9775e80dfd56b2fe13737e15baf64d3ac9c56546b2bbdfd53d1de7f9","src/revspec.rs":"29df0754775603ed1189bbe28f933f5851d50936eda380a57f175ec35496d637","src/revwalk.rs":"d03fa7b0d8f6922184857b6d63c022ba284e481873949983a94d426afe119787","src/signature.rs":"5ff7a60deb1a449679835edf7a1fae730a85973483ca24f6fc15cbd146429d00","src/stash.rs":"c320ed9288731067a9135fdf3e964ac8a85c99587ffa66dd16ee452ead3675d0","src/status.rs":"e90e04f7e11c123524a4965508d4b01ee48c322d79e3c8f4efbf5bd9ce986fa4","src/string_array.rs":"d2eef2f259aead86c7d5ed4a0c9c0d88b517b27362ec2dbb3891a5b0f4617778","src/submodule.rs":"1d41cafa2523fdf4d8aae7d5dc38647c6062586d0ee1d91bc99be5d87ec6b2ee","src/tag.rs":"b7292fc74485950acfc484d4542d8a1bd135b957f0ad9c70e92762b805d73cd3","src/tagforeach.rs":"04ea7ff4072a270c5febaee8133ae93040eb81a139ed987238e0b500e9626c4c","src/test.rs":"74c34ed48ff74bdcf3f92d8d44ba15d2b3bc0960847c6839e7c9d2e9c4518369","src/time.rs":"7fd2bcdda9baf24c6292edd04be6112c83a57e8f9e566d6d219563ad98c12203","src/tracing.rs":"6c2ecd839cbbdc70efea854fa8a19eb8700f3450f46f7ba8ab9b280e194700b8","src/transaction.rs":"6bb080f30646b5b3f22ac37f61945e58ce823944248e97fc58389cc8ca6c5895","src/transport.rs":"9474a89a8101d2d53dd38bea2ba2dddcf95fb4375a7e925f228f36d92bb74ba3","src/tree.rs":"6a7409f39a7c3edf72099ac4f1af089a410003ae13d7c1453a9d56d1e020035c","src/treebuilder.rs":"b04a16cd22e40f6c2e4d26d4ce343a2853e943474080e95b0e2250a5961e6c1d","src/util.rs":"5ea4d156845e62d167d2885c76ba9f623944939464b9e372bb4172656ec7e08b","src/version.rs":"bcc26c9dcc5bf872afd0741233f07981df0a4be28faeba9ad52eb437961eb30f","src/worktree.rs":"eb2fbc678e7beb456720b9bec18189b0ba668335d93dad589170c11e52cbd558","tests/add_extensions.rs":"9bfff850140844135f9e35f8fd81b237fffdaeeed3e5908c2fc880358899f262","tests/get_extensions.rs":"a317ebd1b947bb72001b7fec7a0babd21fa6f28061852d4f495a029252f569db","tests/global_state.rs":"c75947eca9718277da08722ca9a58d9b4154b36b1aca6453bb198238c17904ce","tests/remove_extensions.rs":"9eca08d8781bda478365bf79f52276c3083f49e41cccbac7e779d4f54e894265"},"package":"8b7905cdfe33d31a88bb2e8419ddd054451f5432d1da9eaf2ac7804ee1ea12d5"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"acb09c8ce01237c3b39fb3cda1069939682466c19b134a14ef616ad155a49d29","CONTRIBUTING.md":"805288d099e6ea48da9746333109330905e3f35d72102901725c39dc53ef3158","Cargo.lock":"6f11e99c1ff7a092456b31c55eebe2094d1d4cedaa0995d88fd201626d332c96","Cargo.toml":"960384a3e3f74c1399e3ed111491bb3eff248bc7e8effd5bc9b826bfb087c415","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"b95ce61fb59d12fec90db5342103d826f336b17a8064aa7517bc4e51c7711935","examples/add.rs":"a9903f7a1af1b199783099509de3b640a3d039e9ad0b8c752c908e7fedf59b88","examples/blame.rs":"b59dc1daff18dee256038ea5e66c478678e51df1aacd20325f01d4e270fe3f20","examples/cat-file.rs":"93da1bf8891e43c308390e02f3c32106fcc085755e7f3e184d58aa2288c30cf4","examples/clone.rs":"822e6dac8f71877e8966ab72d3896dc82dfd7b525dbd54b1867964c2a9b241fd","examples/diff.rs":"0c182b4658354b01435d77c2f0c60851e1a09b469fce80062f92a17b6fd813ba","examples/fetch.rs":"a34826b1f4448b688313b0322c951401e19b62c8f6cf28d06251bd148d842128","examples/init.rs":"3a88038e2e6eb1ff555db5cec0beff466ee500de03eaa075af3a5920d59db81b","examples/log.rs":"ea825b4b3c1410e7c14832ca87e4c1f291b5f8f83c527672be8d61d188326a16","examples/ls-remote.rs":"9e1d2fb2441c535f8abc5f1d146dd1d499e518f583baaae99b5234195153cf82","examples/pull.rs":"6c6043caecc73629423d59a8fe9f80a1d4ddb2cd158779ea113c38a8cc6bdf6a","examples/rev-list.rs":"2e18eea067c0d684dd89f6d86b4ddb052a3d594471b17eddfac9d0c18f64ae67","examples/rev-parse.rs":"125e80a916a3476d894aa555e2b780a8cf1316a0b5b850b9918b3c1af5c00dd4","examples/status.rs":"89ec5127e44123afaf429233c885cd547d7a28670512bf87c30770eba615e061","examples/tag.rs":"881ba5797fe5133c6321927518198c3ad42dd81499b57e9f32df590505b49d17","src/apply.rs":"1ca5b0c06b96cd0af13dc322bf858e375a50f76d887c61052115ea8af2245847","src/attr.rs":"bc1957f495cf3aed4a663b50b43dd8deee6770ab259283673a883ac3c66908a7","src/blame.rs":"538944e8264a1dfea2868247a1f3b44817df583131370bb6785caeafd3fdf1da","src/blob.rs":"7cb0326521dec9548a05c155283495c33f629678d9f7263e9de500c32052fb74","src/branch.rs":"1afa850c4c3a22531baddf5636bf55c9122a76b0d010e8392fbf04f1b76067ed","src/buf.rs":"d4d9795afc04eba6eb6a08c5dbcbc8e3e8341adc11701c65198d514f6cdfbac0","src/build.rs":"a4e2e7074b395ca1d4c085667aee565b66b20fd739ea69d9c5a31e8261588043","src/call.rs":"e5d3c59df621224c44f8caf8bd71997c33306ba251fbb58f411020377b1bc354","src/cert.rs":"6e8a78340cb8b3908977892d6d1723cebe70ff63819b28a63688e0fb4428b859","src/cherrypick.rs":"1ce882b6be825243d5551f11e1f48f53acc4aa52c4c5fb5510e69fd077a512bc","src/commit.rs":"9903f1656c695947164f18291a6659726897db782b6b84f0bca14f3e829d3b45","src/config.rs":"1109a50de982d4796605abe143a5844dc312c58379e05ad7d790d5cc8f4cd186","src/cred.rs":"25ce633857cb7a3c57fa5d677b65759f54cd683d01ade64901d59d04d783e1a6","src/describe.rs":"3adb68b3118bfa18c09f7ca767afa38d76e22130b1cebf20cc3b97c9a198957a","src/diff.rs":"a6c4d90c4b450758e05d0309ea243cc32c330a6dc1d4116e3588e6881626e77f","src/email.rs":"b95f32739a2adac55016e892d913fb4b03d10c0583569a613f6c13946238759d","src/error.rs":"cd72f5f51d0c76f6bddd5d0f9e4d4e4190b40e15cebc3627fca2ba8f293964a4","src/index.rs":"1f34cbc31ecb7d536f4138a2c4a35d9e24703c4d78575e4528c7bdf78c30e87c","src/indexer.rs":"36221447975f235abbe53135166ea4bc6833a2835a7e343271fd9bdf45af0421","src/lib.rs":"41baee683384bd80873f135f157f840ba2cc43d0a3cc943b5d7294d695b1a0f0","src/mailmap.rs":"a034b1c86c8a8d4362939e2e2c1d0b1b2f5c71bac883b2b1b65b64078c70349e","src/mempack.rs":"8549f984360ac12868018e4f107a60386474c58cfb6c41993cbb0a820bd28908","src/merge.rs":"681f2f1e59cec49a8618a894e22645915e8f8a815a71d4ca7c6ab10fbdaeb919","src/message.rs":"77d42388ff836c6c3b49f8c8da24ca0cf42d8f8631bf8d31e68cdb6299030c38","src/note.rs":"55b286c3736833432d391184136f0fb0928e337990d1558166e2d998dc63f0dd","src/object.rs":"8b66f1c34570b37d204d0b3f626edbdd0baa7eb9734e3e444b72bf3e8fc46a27","src/odb.rs":"7088257f15b5c86774a62dc0dc42ac939348077eed7db8b3b6919aaea836c27b","src/oid.rs":"dc284f1523b3109e9721165289adcd820733fe72d5807f7739d307c2f88d2006","src/oid_array.rs":"4820657a5d4460a77a31fe0ba04c5575f6900a1767925a40464fadcacaf6a066","src/opts.rs":"7fe4baf924712816f2c7e51543820094e714e2b564dfc0450a885a6f8e218107","src/packbuilder.rs":"649246626d600f7d023e73ab3e3d4ca691d482d85de11338f3c5cea66f7f84ee","src/panic.rs":"62ef0684379f4cdebf9477e2f63c9f0ecc80fe608de2df32bca13ce0086249d6","src/patch.rs":"740fa2a29148605e3dac16f58fd603b408283cfe148b922fbe6b5a5d62f18db0","src/pathspec.rs":"4687cbfdf26081ba25323e2ba03bfd0f9d56d1e71cc29f0c91d082540171b339","src/proxy_options.rs":"cfa029317ae00a15074d4fd5de5d7c8da982459b915399c1d6010ddbee43ab28","src/push_update.rs":"af8108cdbac8c5c22811c1063a2c4706070b4f4e69ac4151ab84963f04dbaaca","src/rebase.rs":"179fc17e402d902300de8d37a65ceb0c29d6e8f4ba50cc8b7a7d8b09cfe9ef55","src/reference.rs":"3f2def9ea8a16c36685f71324bcb99d325161cfc59b844ac4d5387408d0ef0a8","src/reflog.rs":"45e05e0cb5418be7a0f15a2992802391d31806ed459e8c49864db5d67c6aedd7","src/refspec.rs":"5107582963524fe9ff312a280232dba08d25be06fdf8f278c0bbfdbfa7a50402","src/remote.rs":"4b07e455cda88bb4ebfdffd981eb2ba77b97251d3c92a9a878b569331f687bbb","src/remote_callbacks.rs":"338ae362638084592697783e39996a37061e0ef88dbb9e81a56459b0e0c27190","src/repo.rs":"6c7d8b0b74876aa9325be2df563f39704a04eeb9745045ae6a82d890bee332a7","src/revert.rs":"b51dd98a9775e80dfd56b2fe13737e15baf64d3ac9c56546b2bbdfd53d1de7f9","src/revspec.rs":"29df0754775603ed1189bbe28f933f5851d50936eda380a57f175ec35496d637","src/revwalk.rs":"d03fa7b0d8f6922184857b6d63c022ba284e481873949983a94d426afe119787","src/signature.rs":"5ff7a60deb1a449679835edf7a1fae730a85973483ca24f6fc15cbd146429d00","src/stash.rs":"e2db808e28c64cf60bd640d5ca22eaced36b348f5e7970d59753d18941f18bfb","src/status.rs":"e90e04f7e11c123524a4965508d4b01ee48c322d79e3c8f4efbf5bd9ce986fa4","src/string_array.rs":"d2eef2f259aead86c7d5ed4a0c9c0d88b517b27362ec2dbb3891a5b0f4617778","src/submodule.rs":"1d41cafa2523fdf4d8aae7d5dc38647c6062586d0ee1d91bc99be5d87ec6b2ee","src/tag.rs":"b7292fc74485950acfc484d4542d8a1bd135b957f0ad9c70e92762b805d73cd3","src/tagforeach.rs":"04ea7ff4072a270c5febaee8133ae93040eb81a139ed987238e0b500e9626c4c","src/test.rs":"74c34ed48ff74bdcf3f92d8d44ba15d2b3bc0960847c6839e7c9d2e9c4518369","src/time.rs":"7fd2bcdda9baf24c6292edd04be6112c83a57e8f9e566d6d219563ad98c12203","src/tracing.rs":"6c2ecd839cbbdc70efea854fa8a19eb8700f3450f46f7ba8ab9b280e194700b8","src/transaction.rs":"6bb080f30646b5b3f22ac37f61945e58ce823944248e97fc58389cc8ca6c5895","src/transport.rs":"6505ed35be2a2bf7893fc3ee2d1a21bd2984fda5a350bd8ee3dd08ffac484a42","src/tree.rs":"6a7409f39a7c3edf72099ac4f1af089a410003ae13d7c1453a9d56d1e020035c","src/treebuilder.rs":"b04a16cd22e40f6c2e4d26d4ce343a2853e943474080e95b0e2250a5961e6c1d","src/util.rs":"5ea4d156845e62d167d2885c76ba9f623944939464b9e372bb4172656ec7e08b","src/version.rs":"bcc26c9dcc5bf872afd0741233f07981df0a4be28faeba9ad52eb437961eb30f","src/worktree.rs":"eb2fbc678e7beb456720b9bec18189b0ba668335d93dad589170c11e52cbd558","tests/add_extensions.rs":"9bfff850140844135f9e35f8fd81b237fffdaeeed3e5908c2fc880358899f262","tests/get_extensions.rs":"a317ebd1b947bb72001b7fec7a0babd21fa6f28061852d4f495a029252f569db","tests/global_state.rs":"c75947eca9718277da08722ca9a58d9b4154b36b1aca6453bb198238c17904ce","tests/remove_extensions.rs":"9eca08d8781bda478365bf79f52276c3083f49e41cccbac7e779d4f54e894265"},"package":"7b989d6a7ca95a362cf2cfc5ad688b3a467be1f87e480b8dad07fee8c79b0044"} \ No newline at end of file
diff --git a/vendor/git2/CHANGELOG.md b/vendor/git2/CHANGELOG.md
index c77626b6a..b58bae0ba 100644
--- a/vendor/git2/CHANGELOG.md
+++ b/vendor/git2/CHANGELOG.md
@@ -1,5 +1,12 @@
# Changelog
+## 0.17.2 - 2023-05-27
+[0.17.1...0.17.2](https://github.com/rust-lang/git2-rs/compare/0.17.1...0.17.2)
+
+### Added
+- Added support for stashing with options (which can support partial stashing).
+ [#930](https://github.com/rust-lang/git2-rs/pull/930)
+
## 0.17.1 - 2023-04-13
[0.17.0...0.17.1](https://github.com/rust-lang/git2-rs/compare/0.17.0...0.17.1)
diff --git a/vendor/git2/Cargo.lock b/vendor/git2/Cargo.lock
index 085f587d7..75111e02c 100644
--- a/vendor/git2/Cargo.lock
+++ b/vendor/git2/Cargo.lock
@@ -94,7 +94,7 @@ dependencies = [
[[package]]
name = "git2"
-version = "0.17.1"
+version = "0.17.2"
dependencies = [
"bitflags",
"libc",
@@ -169,9 +169,9 @@ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
[[package]]
name = "libgit2-sys"
-version = "0.15.1+1.6.4"
+version = "0.15.2+1.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb4577bde8cdfc7d6a2a4bcb7b049598597de33ffd337276e9c7db6cd4a2cee7"
+checksum = "a80df2e11fb4a61f4ba2ab42dbe7f74468da143f1a75c74e11dee7c813f694fa"
dependencies = [
"cc",
"libc",
diff --git a/vendor/git2/Cargo.toml b/vendor/git2/Cargo.toml
index 28fac589f..2fea73871 100644
--- a/vendor/git2/Cargo.toml
+++ b/vendor/git2/Cargo.toml
@@ -12,7 +12,7 @@
[package]
edition = "2018"
name = "git2"
-version = "0.17.1"
+version = "0.17.2"
authors = [
"Josh Triplett <josh@joshtriplett.org>",
"Alex Crichton <alex@alexcrichton.com>",
@@ -36,7 +36,7 @@ version = "1.1.0"
version = "0.2"
[dependencies.libgit2-sys]
-version = "0.15.1"
+version = "0.15.2"
[dependencies.log]
version = "0.4.8"
diff --git a/vendor/git2/README.md b/vendor/git2/README.md
index e17d94324..b4cf4f1e6 100644
--- a/vendor/git2/README.md
+++ b/vendor/git2/README.md
@@ -6,7 +6,7 @@ libgit2 bindings for Rust.
```toml
[dependencies]
-git2 = "0.17.1"
+git2 = "0.17.2"
```
## Rust version requirements
diff --git a/vendor/git2/src/diff.rs b/vendor/git2/src/diff.rs
index 6949d094e..e039c76d5 100644
--- a/vendor/git2/src/diff.rs
+++ b/vendor/git2/src/diff.rs
@@ -266,7 +266,7 @@ impl<'repo> Diff<'repo> {
assert!(patch_no > 0);
assert!(patch_no <= total_patches);
let mut default = DiffFormatEmailOptions::default();
- let mut raw_opts = opts.map_or(&mut default.raw, |opts| &mut opts.raw);
+ let raw_opts = opts.map_or(&mut default.raw, |opts| &mut opts.raw);
let summary = commit.summary_bytes().unwrap();
let mut message = commit.message_bytes();
assert!(message.starts_with(summary));
diff --git a/vendor/git2/src/lib.rs b/vendor/git2/src/lib.rs
index ef8cb2c9c..d2bc6f599 100644
--- a/vendor/git2/src/lib.rs
+++ b/vendor/git2/src/lib.rs
@@ -1465,6 +1465,8 @@ bitflags! {
/// All ignored files are also stashed and then cleaned up from
/// the working directory
const INCLUDE_IGNORED = raw::GIT_STASH_INCLUDE_IGNORED as u32;
+ /// All changes in the index and working directory are left intact
+ const KEEP_ALL = raw::GIT_STASH_KEEP_ALL as u32;
}
}
diff --git a/vendor/git2/src/repo.rs b/vendor/git2/src/repo.rs
index a794939be..921e2b30e 100644
--- a/vendor/git2/src/repo.rs
+++ b/vendor/git2/src/repo.rs
@@ -12,7 +12,7 @@ use crate::diff::{
binary_cb_c, file_cb_c, hunk_cb_c, line_cb_c, BinaryCb, DiffCallbacks, FileCb, HunkCb, LineCb,
};
use crate::oid_array::OidArray;
-use crate::stash::{stash_cb, StashApplyOptions, StashCbData};
+use crate::stash::{stash_cb, StashApplyOptions, StashCbData, StashSaveOptions};
use crate::string_array::StringArray;
use crate::tagforeach::{tag_foreach_cb, TagForeachCB, TagForeachData};
use crate::util::{self, path_to_repo_path, Binding};
@@ -2844,6 +2844,25 @@ impl Repository {
}
}
+ /// Like `stash_save` but with more options like selective statshing via path patterns.
+ pub fn stash_save_ext(
+ &mut self,
+ opts: Option<&mut StashSaveOptions<'_>>,
+ ) -> Result<Oid, Error> {
+ unsafe {
+ let mut raw_oid = raw::git_oid {
+ id: [0; raw::GIT_OID_RAWSZ],
+ };
+ let opts = opts.map(|opts| opts.raw());
+ try_call!(raw::git_stash_save_with_opts(
+ &mut raw_oid,
+ self.raw(),
+ opts
+ ));
+ Ok(Binding::from_raw(&raw_oid as *const _))
+ }
+ }
+
/// Apply a single stashed state from the stash list.
pub fn stash_apply(
&mut self,
diff --git a/vendor/git2/src/stash.rs b/vendor/git2/src/stash.rs
index 97e02b5de..bff9e49de 100644
--- a/vendor/git2/src/stash.rs
+++ b/vendor/git2/src/stash.rs
@@ -1,10 +1,73 @@
use crate::build::CheckoutBuilder;
-use crate::util::Binding;
-use crate::{panic, raw, Oid, StashApplyProgress};
+use crate::util::{self, Binding};
+use crate::{panic, raw, IntoCString, Oid, Signature, StashApplyProgress, StashFlags};
use libc::{c_char, c_int, c_void, size_t};
-use std::ffi::CStr;
+use std::ffi::{c_uint, CStr, CString};
use std::mem;
+#[allow(unused)]
+/// Stash application options structure
+pub struct StashSaveOptions<'a> {
+ message: Option<CString>,
+ flags: Option<StashFlags>,
+ stasher: Signature<'a>,
+ pathspec: Vec<CString>,
+ pathspec_ptrs: Vec<*const c_char>,
+ raw_opts: raw::git_stash_save_options,
+}
+
+impl<'a> StashSaveOptions<'a> {
+ /// Creates a default
+ pub fn new(stasher: Signature<'a>) -> Self {
+ let mut opts = Self {
+ message: None,
+ flags: None,
+ stasher,
+ pathspec: Vec::new(),
+ pathspec_ptrs: Vec::new(),
+ raw_opts: unsafe { mem::zeroed() },
+ };
+ assert_eq!(
+ unsafe {
+ raw::git_stash_save_options_init(
+ &mut opts.raw_opts,
+ raw::GIT_STASH_SAVE_OPTIONS_VERSION,
+ )
+ },
+ 0
+ );
+ opts
+ }
+
+ /// Customize optional `flags` field
+ pub fn flags(&mut self, flags: Option<StashFlags>) -> &mut Self {
+ self.flags = flags;
+ self
+ }
+
+ /// Add to the array of paths patterns to build the stash.
+ pub fn pathspec<T: IntoCString>(&mut self, pathspec: T) -> &mut Self {
+ let s = util::cstring_to_repo_path(pathspec).unwrap();
+ self.pathspec_ptrs.push(s.as_ptr());
+ self.pathspec.push(s);
+ self
+ }
+
+ /// Acquire a pointer to the underlying raw options.
+ ///
+ /// This function is unsafe as the pointer is only valid so long as this
+ /// structure is not moved, modified, or used elsewhere.
+ pub unsafe fn raw(&mut self) -> *const raw::git_stash_save_options {
+ self.raw_opts.flags = self.flags.unwrap_or_else(StashFlags::empty).bits as c_uint;
+ self.raw_opts.message = crate::call::convert(&self.message);
+ self.raw_opts.paths.count = self.pathspec_ptrs.len() as size_t;
+ self.raw_opts.paths.strings = self.pathspec_ptrs.as_ptr() as *mut _;
+ self.raw_opts.stasher = self.stasher.raw();
+
+ &self.raw_opts as *const _
+ }
+}
+
/// Stash application progress notification function.
///
/// Return `true` to continue processing, or `false` to
@@ -151,12 +214,11 @@ extern "C" fn stash_apply_progress_cb(
#[cfg(test)]
mod tests {
- use crate::stash::StashApplyOptions;
+ use crate::stash::{StashApplyOptions, StashSaveOptions};
use crate::test::repo_init;
- use crate::{Repository, StashFlags, Status};
+ use crate::{IndexAddOption, Repository, StashFlags, Status};
use std::fs;
- use std::io::Write;
- use std::path::Path;
+ use std::path::{Path, PathBuf};
fn make_stash<C>(next: C)
where
@@ -167,10 +229,8 @@ mod tests {
let p = Path::new(repo.workdir().unwrap()).join("file_b.txt");
println!("using path {:?}", p);
- fs::File::create(&p)
- .unwrap()
- .write("data".as_bytes())
- .unwrap();
+
+ fs::write(&p, "data".as_bytes()).unwrap();
let rel_p = Path::new("file_b.txt");
assert!(repo.status_file(&rel_p).unwrap() == Status::WT_NEW);
@@ -240,10 +300,7 @@ mod tests {
let p = Path::new(repo.workdir().unwrap()).join("file_b.txt");
- fs::File::create(&p)
- .unwrap()
- .write("data".as_bytes())
- .unwrap();
+ fs::write(&p, "data".as_bytes()).unwrap();
repo.stash_save2(&signature, None, Some(StashFlags::INCLUDE_UNTRACKED))
.unwrap();
@@ -258,4 +315,37 @@ mod tests {
assert!(stash_name.starts_with("WIP on main:"));
}
+
+ fn create_file(r: &Repository, name: &str, data: &str) -> PathBuf {
+ let p = Path::new(r.workdir().unwrap()).join(name);
+ fs::write(&p, data).unwrap();
+ p
+ }
+
+ #[test]
+ fn test_stash_save_ext() {
+ let (_td, mut repo) = repo_init();
+ let signature = repo.signature().unwrap();
+
+ create_file(&repo, "file_a", "foo");
+ create_file(&repo, "file_b", "foo");
+
+ let mut index = repo.index().unwrap();
+ index
+ .add_all(["*"].iter(), IndexAddOption::DEFAULT, None)
+ .unwrap();
+ index.write().unwrap();
+
+ assert_eq!(repo.statuses(None).unwrap().len(), 2);
+
+ let mut opt = StashSaveOptions::new(signature);
+ opt.pathspec("file_a");
+ repo.stash_save_ext(Some(&mut opt)).unwrap();
+
+ assert_eq!(repo.statuses(None).unwrap().len(), 0);
+
+ repo.stash_pop(0, None).unwrap();
+
+ assert_eq!(repo.statuses(None).unwrap().len(), 1);
+ }
}
diff --git a/vendor/git2/src/transport.rs b/vendor/git2/src/transport.rs
index 5d4695948..74446d0ca 100644
--- a/vendor/git2/src/transport.rs
+++ b/vendor/git2/src/transport.rs
@@ -251,7 +251,7 @@ extern "C" fn subtransport_action(
n => panic!("unknown action: {}", n),
};
- let mut transport = &mut *(raw_transport as *mut RawSmartSubtransport);
+ let transport = &mut *(raw_transport as *mut RawSmartSubtransport);
// Note: we only need to generate if rpc is on. Else, for receive-pack and upload-pack
// libgit2 reuses the stream generated for receive-pack-ls or upload-pack-ls.
let generate_stream =