summaryrefslogtreecommitdiffstats
path: root/vendor/gix-odb
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix-odb')
-rw-r--r--vendor/gix-odb/.cargo-checksum.json2
-rw-r--r--vendor/gix-odb/CHANGELOG.md46
-rw-r--r--vendor/gix-odb/Cargo.toml15
-rw-r--r--vendor/gix-odb/LICENSE-APACHE191
-rw-r--r--vendor/gix-odb/LICENSE-MIT21
-rw-r--r--vendor/gix-odb/src/lib.rs1
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/access.rs2
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/find.rs6
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/header.rs2
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/init.rs2
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/load_index.rs5
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/metrics.rs2
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/mod.rs100
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/prefix.rs6
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/structure.rs117
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/types.rs8
-rw-r--r--vendor/gix-odb/src/store_impls/dynamic/verify.rs3
-rw-r--r--vendor/gix-odb/src/store_impls/loose/find.rs2
18 files changed, 403 insertions, 128 deletions
diff --git a/vendor/gix-odb/.cargo-checksum.json b/vendor/gix-odb/.cargo-checksum.json
index 3c0684e60..b2e3548a0 100644
--- a/vendor/gix-odb/.cargo-checksum.json
+++ b/vendor/gix-odb/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"ad26d6e5400f3338f52b9f3623d0bb1f33393b738ded4dd4a04b272b7aac2338","Cargo.toml":"11a6ede68c573f9b5ba23cbf922f7118e8f1449ccf654989595b6128f698af81","src/alternate/mod.rs":"02d29b6fbc6f4801a657882e19c01fa4aa7e7fd0f10dd25c8c040412468bb1de","src/alternate/parse.rs":"418f5c54d6293ceb886d44a3482dd3a2378d50031ff04186541c5e09be2eedcc","src/cache.rs":"b33c52a0ee7370ad9e81aed40cf74a9df8b60228edf0f2ea765112a7be130b9c","src/find.rs":"270a843d766f9f1641884c173d820c34ed8c59fa4dd6bce04f465b51888433d5","src/lib.rs":"e6c245c55708864e399d74368ee2ebcb9ae43852794b0c39e0d3e41ce6f0efea","src/sink.rs":"812541c306c27d036bfd3f90bcc9b620992c18ae49fc808ee7c86a7bde98ab20","src/store_impls/dynamic/access.rs":"0c1d4762953f76abc317e66261f3a5911c4bfcfe92ce75d22f69080a7e229501","src/store_impls/dynamic/find.rs":"63602bddfa71d3d5ee32cc258a36df8368621ed523a13479b69f28b1e04940aa","src/store_impls/dynamic/handle.rs":"fd203474b9097f19ab2ddabece78ed8abcb1a3e014475d814f8ff8da6ce42a07","src/store_impls/dynamic/header.rs":"9105fb3b11d73855b9bfc0309b2a0ba278bd3f86b93bedf01f6a2ee737565f00","src/store_impls/dynamic/init.rs":"4e701654bc265205dc9fcb9fa7eb848c99ce10d2c65e6254b7837a537102f1f3","src/store_impls/dynamic/iter.rs":"bed742ace9aaee98aeccf6a8d498372f908fcbcc8649d6c7f0c2c96029a21fa8","src/store_impls/dynamic/load_index.rs":"39155811df403cc3c51c7a953d94e3012098635932d78d9c985720d232127032","src/store_impls/dynamic/load_one.rs":"fa0393f14a653d9116c7b470219175cccffa8bb2e981afc89d62a48778a6d825","src/store_impls/dynamic/metrics.rs":"493f87f5bf72a23825c7c002f47edc286fff670ee3eb0ebdc60f52f131e674a4","src/store_impls/dynamic/mod.rs":"96c2616d9809b33bf1a95be2da3feaf36c529bf32fc1cfea97a90856f916d8c3","src/store_impls/dynamic/prefix.rs":"b1cd60744a3ae5d46c9f8388259504b8d106b3226283df7a77ba0ff42e43a0d4","src/store_impls/dynamic/types.rs":"24eb6eba36c27ad49fba6edf2f5cbea1c837ae6b3ff2f05cc89117cdd8bb93b5","src/store_impls/dynamic/verify.rs":"2a9ad04e0cbaffa12752a16de6a3e4acb7e2fcfd5a52bbd4409c21713910de34","src/store_impls/dynamic/write.rs":"b281fbbc349377a7bd73b68370f7a508cddf35db4e1d4409fc0fff0ca8386d43","src/store_impls/loose/find.rs":"749273a7a3f82e889c7869ff6b1c6861d89c929ec4947ec5b358b002ff95b605","src/store_impls/loose/iter.rs":"52dd3df3148aa057efcbb2c86bb631834cbe9afdfb4a487fb6d1fe3e947b2c86","src/store_impls/loose/mod.rs":"9008a952ad41b7a9672028b6dd6d7fd613328694657f13e55ef078872ab8975e","src/store_impls/loose/verify.rs":"0170696d3bdf9be8c13ea4d236bda6c01efec8b8c627cbbfdb264457b0b1978b","src/store_impls/loose/write.rs":"ca7b307672c1eff65385a7675e01edcfc8ffcf5ceb085ea9efad813c6c09ae47","src/store_impls/mod.rs":"d5f123c2037dd5ee538721ad626aebf845d445d43438c3e10daac34d73fdc779","src/traits.rs":"9f77ef94dd7e021cceda22ba0929b6fa3a2e888acfd54f0dd4e8d6418dbda2b7"},"package":"bca2f324aa67672b6d0f2c0fa93f96eb6a7029d260e4c1df5dce3c015f5e5add"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"817f02df2800ee368c7fb1514ad45513f59cf8f0868e6e349f017f2519b1cf21","Cargo.toml":"2ea37c0f384769d47365514c86be9624551f6c0f179a4f0fef7e53830a52470f","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/alternate/mod.rs":"02d29b6fbc6f4801a657882e19c01fa4aa7e7fd0f10dd25c8c040412468bb1de","src/alternate/parse.rs":"418f5c54d6293ceb886d44a3482dd3a2378d50031ff04186541c5e09be2eedcc","src/cache.rs":"b33c52a0ee7370ad9e81aed40cf74a9df8b60228edf0f2ea765112a7be130b9c","src/find.rs":"270a843d766f9f1641884c173d820c34ed8c59fa4dd6bce04f465b51888433d5","src/lib.rs":"b9471cf9bdac276de683053c2e990766e95453fe6ba568b7bac8f290b1ea24e1","src/sink.rs":"812541c306c27d036bfd3f90bcc9b620992c18ae49fc808ee7c86a7bde98ab20","src/store_impls/dynamic/access.rs":"524b85c6f523f24ba6c0a2abc5cb9555b535dd5d1ce4d42beedd2aae28e6d938","src/store_impls/dynamic/find.rs":"dcf75e92f08caead7019dccbf378037ddb84ebaac0b628247c6d9e6c27eae460","src/store_impls/dynamic/handle.rs":"fd203474b9097f19ab2ddabece78ed8abcb1a3e014475d814f8ff8da6ce42a07","src/store_impls/dynamic/header.rs":"a2014baa8be53d160eff1c2ff79d6d88353de4cdf9cd2c15b031e8d05d5f8ef3","src/store_impls/dynamic/init.rs":"d0b87c762069f5eb831d29646be0bf3d733a431c3f725baf843beda94e925591","src/store_impls/dynamic/iter.rs":"bed742ace9aaee98aeccf6a8d498372f908fcbcc8649d6c7f0c2c96029a21fa8","src/store_impls/dynamic/load_index.rs":"3e280d9e308dd668d2d4d23dc68e815c82d3cb7b17d0fd5fb08d111e221c42ad","src/store_impls/dynamic/load_one.rs":"fa0393f14a653d9116c7b470219175cccffa8bb2e981afc89d62a48778a6d825","src/store_impls/dynamic/metrics.rs":"ab54a9986a58e72301ed9a85155572e7a8e0df977177dc51491fc776883c4200","src/store_impls/dynamic/mod.rs":"6280f692d8bf3f982e63068d458472f53cf4126e6a7d7e4dae620bd6bb540ccf","src/store_impls/dynamic/prefix.rs":"b0524c43ac5395885048ca9cc7b82a18e15d28627b7241e22c4a4ceb95ec57ab","src/store_impls/dynamic/structure.rs":"b182acf94e314c5f1b63828461ce17ee500b33cd28875f6ad49bdf542da610fd","src/store_impls/dynamic/types.rs":"d0fed7b17cadedb5401f0137d3a9890efd9f135919b01070379a2bc0a218c36b","src/store_impls/dynamic/verify.rs":"ff5fa72a1851f58936bbc78850b5f975703ef536e3857d24e4d1e55d1890535e","src/store_impls/dynamic/write.rs":"b281fbbc349377a7bd73b68370f7a508cddf35db4e1d4409fc0fff0ca8386d43","src/store_impls/loose/find.rs":"bccbf49e3a5f01dee623a6818e03273d5218c3e934f06538daa283a79015b335","src/store_impls/loose/iter.rs":"52dd3df3148aa057efcbb2c86bb631834cbe9afdfb4a487fb6d1fe3e947b2c86","src/store_impls/loose/mod.rs":"9008a952ad41b7a9672028b6dd6d7fd613328694657f13e55ef078872ab8975e","src/store_impls/loose/verify.rs":"0170696d3bdf9be8c13ea4d236bda6c01efec8b8c627cbbfdb264457b0b1978b","src/store_impls/loose/write.rs":"ca7b307672c1eff65385a7675e01edcfc8ffcf5ceb085ea9efad813c6c09ae47","src/store_impls/mod.rs":"d5f123c2037dd5ee538721ad626aebf845d445d43438c3e10daac34d73fdc779","src/traits.rs":"9f77ef94dd7e021cceda22ba0929b6fa3a2e888acfd54f0dd4e8d6418dbda2b7"},"package":"4b234d806278eeac2f907c8b5a105c4ba537230c1a9d9236d822bf0db291f8f3"} \ No newline at end of file
diff --git a/vendor/gix-odb/CHANGELOG.md b/vendor/gix-odb/CHANGELOG.md
index bb65bedfd..75ad4adb0 100644
--- a/vendor/gix-odb/CHANGELOG.md
+++ b/vendor/gix-odb/CHANGELOG.md
@@ -5,6 +5,49 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 0.46.0 (2023-06-06)
+
+### New Features
+
+ - <csr-id-8c72a236dbeb71a4aead45bf82010f1c89829540/> add `Store::alternate_db_paths()`.
+ Provides a way to learn about loose database paths that are provided by
+ git alternates.
+ - <csr-id-3db18c45e8b26243907521ffd11156afed28a0a3/> implement `Clone` for `Sink`.
+
+### Commit Statistics
+
+<csr-read-only-do-not-edit/>
+
+ - 16 commits contributed to the release over the course of 25 calendar days.
+ - 40 days passed between releases.
+ - 2 commits were understood as [conventional](https://www.conventionalcommits.org).
+ - 0 issues like '(#ID)' were seen in commit messages
+
+### Commit Details
+
+<csr-read-only-do-not-edit/>
+
+<details><summary>view details</summary>
+
+ * **Uncategorized**
+ - Prepare changelogs prior to release ([`8f15cec`](https://github.com/Byron/gitoxide/commit/8f15cec1ec7d5a9d56bb158f155011ef2bb3539b))
+ - Merge branch 'integrate-gix-negotiate' ([`ae845de`](https://github.com/Byron/gitoxide/commit/ae845dea6cee6523c88a23d7a14293589cf8092f))
+ - Add `Store::alternate_db_paths()`. ([`8c72a23`](https://github.com/Byron/gitoxide/commit/8c72a236dbeb71a4aead45bf82010f1c89829540))
+ - Merge branch 'fix-docs' ([`420553a`](https://github.com/Byron/gitoxide/commit/420553a10d780e0b2dc466cac120989298a5f187))
+ - Cleaning up documentation ([`2578e57`](https://github.com/Byron/gitoxide/commit/2578e576bfa365d194a23a1fb0bf09be230873de))
+ - Apply -W clippy::cloned-instead-of-copied ([`150463c`](https://github.com/Byron/gitoxide/commit/150463c26f0d2e1c2b5facba731ccba29cf23228))
+ - Merge branch 'auto-clippy' ([`dbf8aa1`](https://github.com/Byron/gitoxide/commit/dbf8aa19d19109195d0274928eae4b94f248cd88))
+ - Autofix map-or-unwrap clippy lint (and manual fix what was left) ([`2087032`](https://github.com/Byron/gitoxide/commit/2087032b5956dcd82bce6ac57e530e8724b57f17))
+ - Merge branch 'main' into auto-clippy ([`3ef5c90`](https://github.com/Byron/gitoxide/commit/3ef5c90aebce23385815f1df674c1d28d58b4b0d))
+ - Auto-fix clippy to remove explicit iter looping ([`3eff567`](https://github.com/Byron/gitoxide/commit/3eff567c683b5c650c14792b68968cbdbc90ec5c))
+ - Merge branch 'blinxen/main' ([`9375cd7`](https://github.com/Byron/gitoxide/commit/9375cd75b01aa22a0e2eed6305fe45fabfd6c1ac))
+ - Include custom clippy settings ([`b057500`](https://github.com/Byron/gitoxide/commit/b057500dd3e6b75be3ebcd258cda0b946bedd9e1))
+ - Include license files in all crates ([`facaaf6`](https://github.com/Byron/gitoxide/commit/facaaf633f01c857dcf2572c6dbe0a92b7105c1c))
+ - Merge branch 'fix-851' ([`2f275d5`](https://github.com/Byron/gitoxide/commit/2f275d5d3cb49b3b8ba53b30e4b4386fac32662b))
+ - Implement `Clone` for `Sink`. ([`3db18c4`](https://github.com/Byron/gitoxide/commit/3db18c45e8b26243907521ffd11156afed28a0a3))
+ - Release gix-object v0.29.2 ([`4f879bf`](https://github.com/Byron/gitoxide/commit/4f879bf35653bdc8f9729d524c6e8e1fb3c6886b))
+</details>
+
## 0.45.0 (2023-04-27)
A maintenance release without user-facing changes.
@@ -13,7 +56,7 @@ A maintenance release without user-facing changes.
<csr-read-only-do-not-edit/>
- - 2 commits contributed to the release.
+ - 3 commits contributed to the release.
- 0 commits were understood as [conventional](https://www.conventionalcommits.org).
- 0 issues like '(#ID)' were seen in commit messages
@@ -24,6 +67,7 @@ A maintenance release without user-facing changes.
<details><summary>view details</summary>
* **Uncategorized**
+ - Release gix-path v0.8.0, gix-glob v0.7.0, gix-attributes v0.12.0, gix-config-value v0.12.0, gix-ref v0.29.0, gix-sec v0.8.0, gix-config v0.22.0, gix-prompt v0.5.0, gix-url v0.18.0, gix-credentials v0.14.0, gix-discover v0.18.0, gix-ignore v0.2.0, gix-pack v0.35.0, gix-odb v0.45.0, gix-transport v0.31.0, gix-protocol v0.32.0, gix-refspec v0.10.1, gix-worktree v0.17.0, gix v0.44.1 ([`7ebc9f7`](https://github.com/Byron/gitoxide/commit/7ebc9f734ec4371dd27daa568c0244185bb49eb5))
- Prepare changelogs prior to release ([`0135158`](https://github.com/Byron/gitoxide/commit/013515897215400539bfd53c25548bd054186ba6))
- Bump gix-path v0.8.0, safety bump 20 crates (gix set to 0.44.1 manually) ([`43ebaf2`](https://github.com/Byron/gitoxide/commit/43ebaf267557218865862538ffc7bdf00558492f))
</details>
diff --git a/vendor/gix-odb/Cargo.toml b/vendor/gix-odb/Cargo.toml
index 4b87c07ef..a171d68b3 100644
--- a/vendor/gix-odb/Cargo.toml
+++ b/vendor/gix-odb/Cargo.toml
@@ -13,10 +13,11 @@
edition = "2021"
rust-version = "1.64"
name = "gix-odb"
-version = "0.45.0"
+version = "0.46.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
include = [
"src/**/*",
+ "LICENSE-*",
"CHANGELOG.md",
]
description = "Implements various git object databases"
@@ -54,7 +55,7 @@ version = "0.2.0"
optional = true
[dependencies.gix-features]
-version = "^0.29.0"
+version = "^0.30.0"
features = [
"rustsha1",
"walkdir",
@@ -63,19 +64,19 @@ features = [
]
[dependencies.gix-hash]
-version = "^0.11.1"
+version = "^0.11.2"
[dependencies.gix-object]
-version = "^0.29.1"
+version = "^0.30.0"
[dependencies.gix-pack]
-version = "^0.35.0"
+version = "^0.36.0"
[dependencies.gix-path]
-version = "^0.8.0"
+version = "^0.8.1"
[dependencies.gix-quote]
-version = "^0.4.3"
+version = "^0.4.4"
[dependencies.parking_lot]
version = "0.12.0"
diff --git a/vendor/gix-odb/LICENSE-APACHE b/vendor/gix-odb/LICENSE-APACHE
new file mode 100644
index 000000000..a51f59a06
--- /dev/null
+++ b/vendor/gix-odb/LICENSE-APACHE
@@ -0,0 +1,191 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2018-2021 Sebastian Thiel, and [contributors](https://github.com/byron/gitoxide/contributors)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/gix-odb/LICENSE-MIT b/vendor/gix-odb/LICENSE-MIT
new file mode 100644
index 000000000..b58e818f1
--- /dev/null
+++ b/vendor/gix-odb/LICENSE-MIT
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018-2021 Sebastian Thiel, and [contributors](https://github.com/byron/gitoxide/contributors).
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/vendor/gix-odb/src/lib.rs b/vendor/gix-odb/src/lib.rs
index 08b14238c..e0beac548 100644
--- a/vendor/gix-odb/src/lib.rs
+++ b/vendor/gix-odb/src/lib.rs
@@ -52,6 +52,7 @@ pub mod cache;
///
/// It can optionally compress the content, similarly to what would happen when using a [`loose::Store`][crate::loose::Store].
///
+#[derive(Clone)]
pub struct Sink {
compressor: Option<RefCell<deflate::Write<std::io::Sink>>>,
object_hash: gix_hash::Kind,
diff --git a/vendor/gix-odb/src/store_impls/dynamic/access.rs b/vendor/gix-odb/src/store_impls/dynamic/access.rs
index 7a07bcfef..d1303d481 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/access.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/access.rs
@@ -19,6 +19,6 @@ impl Store {
/// An iterator over replacements from object-ids `X` to `X-replaced` as `(X, X-replaced)`, sorted by the original id `X`.
pub fn replacements(&self) -> impl Iterator<Item = (gix_hash::ObjectId, gix_hash::ObjectId)> + '_ {
- self.replacements.iter().cloned()
+ self.replacements.iter().copied()
}
}
diff --git a/vendor/gix-odb/src/store_impls/dynamic/find.rs b/vendor/gix-odb/src/store_impls/dynamic/find.rs
index b6fa3b312..88f95db51 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/find.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/find.rs
@@ -211,7 +211,7 @@ where
Some(res) => res,
None => {
let mut out = None;
- for index in snapshot.indices.iter_mut() {
+ for index in &mut snapshot.indices {
out = index.lookup(id);
if out.is_some() {
break;
@@ -439,7 +439,7 @@ where
loop {
let snapshot = self.snapshot.borrow();
{
- for index in snapshot.indices.iter() {
+ for index in &snapshot.indices {
if let Some(iter) = index.iter(pack_id) {
return Some(iter.map(|e| (e.pack_offset, e.oid)).collect());
}
@@ -466,7 +466,7 @@ where
let marker = snapshot.marker;
loop {
{
- for index in snapshot.indices.iter_mut() {
+ for index in &mut snapshot.indices {
if let Some(possibly_pack) = index.pack(pack_id) {
let pack = match possibly_pack {
Some(pack) => pack,
diff --git a/vendor/gix-odb/src/store_impls/dynamic/header.rs b/vendor/gix-odb/src/store_impls/dynamic/header.rs
index a1fb770ed..d29a911f1 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/header.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/header.rs
@@ -111,7 +111,7 @@ where
Some(res) => res,
None => {
let mut out = None;
- for index in snapshot.indices.iter_mut() {
+ for index in &mut snapshot.indices {
out = index.lookup(id);
if out.is_some() {
break;
diff --git a/vendor/gix-odb/src/store_impls/dynamic/init.rs b/vendor/gix-odb/src/store_impls/dynamic/init.rs
index 2fb660ef1..5e272dcff 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/init.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/init.rs
@@ -80,7 +80,7 @@ impl Store {
}: Options,
) -> std::io::Result<Self> {
let objects_dir = objects_dir.into();
- let current_dir = current_dir.map(Ok).unwrap_or_else(std::env::current_dir)?;
+ let current_dir = current_dir.map_or_else(std::env::current_dir, Ok)?;
if !objects_dir.is_dir() {
return Err(std::io::Error::new(
std::io::ErrorKind::Other, // TODO: use NotADirectory when stabilized
diff --git a/vendor/gix-odb/src/store_impls/dynamic/load_index.rs b/vendor/gix-odb/src/store_impls/dynamic/load_index.rs
index 86cf6c43b..84224dff1 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/load_index.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/load_index.rs
@@ -101,7 +101,7 @@ impl super::Store {
}
}
- /// load a new index (if not yet loaded), and return true if one was indeed loaded (leading to a state_id() change) of the current index.
+ /// load a new index (if not yet loaded), and return true if one was indeed loaded (leading to a `state_id()` change) of the current index.
/// Note that interacting with the slot-map is inherently racy and we have to deal with it, being conservative in what we even try to load
/// as our index might already be out-of-date as we try to use it to learn what's next.
fn load_next_index(&self, mut index: arc_swap::Guard<Arc<SlotMapIndex>>) -> bool {
@@ -283,8 +283,7 @@ impl super::Store {
.slot_indices
.iter()
.max()
- .map(|idx| (idx + 1) % self.files.len())
- .unwrap_or(0);
+ .map_or(0, |idx| (idx + 1) % self.files.len());
let mut num_indices_checked = 0;
let mut needs_generation_change = false;
let mut slot_indices_to_remove: Vec<_> = idx_by_index_path.into_values().collect();
diff --git a/vendor/gix-odb/src/store_impls/dynamic/metrics.rs b/vendor/gix-odb/src/store_impls/dynamic/metrics.rs
index 630674940..5be0f0835 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/metrics.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/metrics.rs
@@ -33,7 +33,7 @@ impl super::Store {
open_indices += 1;
}
known_indices += 1;
- for pack in multi.data.iter() {
+ for pack in &multi.data {
if pack.is_loaded() {
open_packs += 1;
}
diff --git a/vendor/gix-odb/src/store_impls/dynamic/mod.rs b/vendor/gix-odb/src/store_impls/dynamic/mod.rs
index 774bb61dc..e992fada6 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/mod.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/mod.rs
@@ -82,102 +82,4 @@ mod metrics;
mod access;
///
-pub mod structure {
- use std::path::PathBuf;
-
- use crate::{store::load_index, types::IndexAndPacks, Store};
-
- /// A record of a structural element of an object database.
- #[derive(Debug, Clone, PartialEq, Eq)]
- #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
- pub enum Record {
- /// A loose object database.
- LooseObjectDatabase {
- /// The root of the object database.
- objects_directory: PathBuf,
- /// The amount of object files.
- num_objects: usize,
- },
- /// A pack index file
- Index {
- /// The location of the index file,
- path: PathBuf,
- /// Whether or not the index is mapped into memory.
- state: IndexState,
- },
- /// A multi-index file
- MultiIndex {
- /// The location of the multi-index file,
- path: PathBuf,
- /// Whether or not the index is mapped into memory.
- state: IndexState,
- },
- /// An empty slot was encountered, this is possibly happening as the ODB changes during query with
- /// a file being removed.
- Empty,
- }
-
- #[derive(Debug, Clone, PartialEq, Eq)]
- #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
- /// Possible stats of pack indices.
- pub enum IndexState {
- /// The index is active in memory because a mapping exists.
- Loaded,
- /// The index couldn't be unloaded as it was still in use, but that can happen another time.
- Disposable,
- /// The index isn't loaded/memory mapped.
- Unloaded,
- }
-
- impl Store {
- /// Return information about all files known to us as well as their loading state.
- ///
- /// Note that this call is expensive as it gathers additional information about loose object databases.
- /// Note that it may change as we collect information due to the highly volatile nature of the
- /// implementation. The likelihood of actual changes is low though as these still depend on something
- /// changing on disk and somebody reading at the same time.
- pub fn structure(&self) -> Result<Vec<Record>, load_index::Error> {
- let index = self.index.load();
- if !index.is_initialized() {
- self.consolidate_with_disk_state(true, false /*load one new index*/)?;
- }
- let index = self.index.load();
- let mut res: Vec<_> = index
- .loose_dbs
- .iter()
- .map(|db| Record::LooseObjectDatabase {
- objects_directory: db.path.clone(),
- num_objects: db.iter().count(),
- })
- .collect();
-
- for slot in index.slot_indices.iter().map(|idx| &self.files[*idx]) {
- let files = slot.files.load();
- let record = match &**files {
- Some(index) => {
- let state = if index.is_disposable() {
- IndexState::Disposable
- } else if index.index_is_loaded() {
- IndexState::Loaded
- } else {
- IndexState::Unloaded
- };
- match index {
- IndexAndPacks::Index(b) => Record::Index {
- path: b.index.path().into(),
- state,
- },
- IndexAndPacks::MultiIndex(b) => Record::MultiIndex {
- path: b.multi_index.path().into(),
- state,
- },
- }
- }
- None => Record::Empty,
- };
- res.push(record);
- }
- Ok(res)
- }
- }
-}
+pub mod structure;
diff --git a/vendor/gix-odb/src/store_impls/dynamic/prefix.rs b/vendor/gix-odb/src/store_impls/dynamic/prefix.rs
index 9097c8cf6..c0edeba3f 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/prefix.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/prefix.rs
@@ -147,7 +147,7 @@ where
let mut candidate: Option<gix_hash::ObjectId> = None;
loop {
let snapshot = self.snapshot.borrow();
- for index in snapshot.indices.iter() {
+ for index in &snapshot.indices {
#[allow(clippy::needless_option_as_deref)] // needed as it's the equivalent of a reborrow.
let lookup_result = index.lookup_prefix(prefix, candidates.as_deref_mut());
if candidates.is_none() && !check_candidate(lookup_result, &mut candidate) {
@@ -172,7 +172,7 @@ where
return match &candidates {
Some(candidates) => match candidates.len() {
0 => Ok(None),
- 1 => Ok(candidates.iter().cloned().next().map(Ok)),
+ 1 => Ok(candidates.iter().copied().next().map(Ok)),
_ => Ok(Some(Err(()))),
},
None => Ok(candidate.map(Ok)),
@@ -184,7 +184,7 @@ where
fn check_candidate(lookup_result: Option<lookup::Outcome>, candidate: &mut Option<gix_hash::ObjectId>) -> bool {
match (lookup_result, &*candidate) {
(Some(Ok(oid)), Some(candidate)) if *candidate != oid => false,
- (Some(Ok(_)), Some(_)) | (None, None) | (None, Some(_)) => true,
+ (Some(Ok(_)) | None, Some(_)) | (None, None) => true,
(Some(Err(())), _) => false,
(Some(Ok(oid)), None) => {
*candidate = Some(oid);
diff --git a/vendor/gix-odb/src/store_impls/dynamic/structure.rs b/vendor/gix-odb/src/store_impls/dynamic/structure.rs
new file mode 100644
index 000000000..687e74d6a
--- /dev/null
+++ b/vendor/gix-odb/src/store_impls/dynamic/structure.rs
@@ -0,0 +1,117 @@
+use std::path::PathBuf;
+
+use crate::{store::load_index, types::IndexAndPacks, Store};
+
+/// A record of a structural element of an object database.
+#[derive(Debug, Clone, PartialEq, Eq)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
+pub enum Record {
+ /// A loose object database.
+ LooseObjectDatabase {
+ /// The root of the object database.
+ objects_directory: PathBuf,
+ /// The amount of object files.
+ num_objects: usize,
+ },
+ /// A pack index file
+ Index {
+ /// The location of the index file,
+ path: PathBuf,
+ /// Whether or not the index is mapped into memory.
+ state: IndexState,
+ },
+ /// A multi-index file
+ MultiIndex {
+ /// The location of the multi-index file,
+ path: PathBuf,
+ /// Whether or not the index is mapped into memory.
+ state: IndexState,
+ },
+ /// An empty slot was encountered, this is possibly happening as the ODB changes during query with
+ /// a file being removed.
+ Empty,
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
+/// Possible stats of pack indices.
+pub enum IndexState {
+ /// The index is active in memory because a mapping exists.
+ Loaded,
+ /// The index couldn't be unloaded as it was still in use, but that can happen another time.
+ Disposable,
+ /// The index isn't loaded/memory mapped.
+ Unloaded,
+}
+
+impl Store {
+ /// Return information about all files known to us as well as their loading state.
+ ///
+ /// Note that this call is expensive as it gathers additional information about loose object databases.
+ /// Note that it may change as we collect information due to the highly volatile nature of the
+ /// implementation. The likelihood of actual changes is low though as these still depend on something
+ /// changing on disk and somebody reading at the same time.
+ pub fn structure(&self) -> Result<Vec<Record>, load_index::Error> {
+ let index = self.index.load();
+ if !index.is_initialized() {
+ self.consolidate_with_disk_state(true, false /*load one new index*/)?;
+ }
+ let index = self.index.load();
+ let mut res: Vec<_> = index
+ .loose_dbs
+ .iter()
+ .map(|db| Record::LooseObjectDatabase {
+ objects_directory: db.path.clone(),
+ num_objects: db.iter().count(),
+ })
+ .collect();
+
+ for slot in index.slot_indices.iter().map(|idx| &self.files[*idx]) {
+ let files = slot.files.load();
+ let record = match &**files {
+ Some(index) => {
+ let state = if index.is_disposable() {
+ IndexState::Disposable
+ } else if index.index_is_loaded() {
+ IndexState::Loaded
+ } else {
+ IndexState::Unloaded
+ };
+ match index {
+ IndexAndPacks::Index(b) => Record::Index {
+ path: b.index.path().into(),
+ state,
+ },
+ IndexAndPacks::MultiIndex(b) => Record::MultiIndex {
+ path: b.multi_index.path().into(),
+ state,
+ },
+ }
+ }
+ None => Record::Empty,
+ };
+ res.push(record);
+ }
+ Ok(res)
+ }
+
+ /// Provide a list of all `objects` directories of `alternate` object database paths.
+ /// This list might be empty if there are no alternates.
+ ///
+ /// Read more about alternates in the documentation of the [`resolve`][crate::alternate::resolve()] function.
+ pub fn alternate_db_paths(&self) -> Result<Vec<PathBuf>, load_index::Error> {
+ let index = self.index.load();
+ if !index.is_initialized() {
+ self.consolidate_with_disk_state(true, false /*load one new index*/)?;
+ }
+ let index = self.index.load();
+ Ok(index
+ .loose_dbs
+ .iter()
+ .skip(
+ 1, /* first odb is always the primary one, all the follows is alternates */
+ )
+ .map(|db| db.path.clone())
+ .collect())
+ }
+}
diff --git a/vendor/gix-odb/src/store_impls/dynamic/types.rs b/vendor/gix-odb/src/store_impls/dynamic/types.rs
index df2365433..c77cf2109 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/types.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/types.rs
@@ -214,16 +214,16 @@ impl<T: Clone> OnDiskFile<T> {
match std::mem::replace(&mut self.state, OnDiskFileState::Missing) {
OnDiskFileState::Garbage(v) => self.state = OnDiskFileState::Loaded(v),
OnDiskFileState::Missing => self.state = OnDiskFileState::Unloaded,
- other @ OnDiskFileState::Loaded(_) | other @ OnDiskFileState::Unloaded => self.state = other,
+ other @ (OnDiskFileState::Loaded(_) | OnDiskFileState::Unloaded) => self.state = other,
}
}
pub fn trash(&mut self) {
match std::mem::replace(&mut self.state, OnDiskFileState::Missing) {
OnDiskFileState::Loaded(v) => self.state = OnDiskFileState::Garbage(v),
- other @ OnDiskFileState::Garbage(_)
- | other @ OnDiskFileState::Unloaded
- | other @ OnDiskFileState::Missing => self.state = other,
+ other @ (OnDiskFileState::Garbage(_) | OnDiskFileState::Unloaded | OnDiskFileState::Missing) => {
+ self.state = other
+ }
}
}
}
diff --git a/vendor/gix-odb/src/store_impls/dynamic/verify.rs b/vendor/gix-odb/src/store_impls/dynamic/verify.rs
index d6291e834..5156074ac 100644
--- a/vendor/gix-odb/src/store_impls/dynamic/verify.rs
+++ b/vendor/gix-odb/src/store_impls/dynamic/verify.rs
@@ -141,8 +141,7 @@ impl super::Store {
format!(
"Checking integrity: {}",
path.file_name()
- .map(|f| f.to_string_lossy())
- .unwrap_or_else(std::borrow::Cow::default)
+ .map_or_else(std::borrow::Cow::default, |f| f.to_string_lossy())
)
};
for slot_index in &index.slot_indices {
diff --git a/vendor/gix-odb/src/store_impls/loose/find.rs b/vendor/gix-odb/src/store_impls/loose/find.rs
index 13bd26818..04fabe61b 100644
--- a/vendor/gix-odb/src/store_impls/loose/find.rs
+++ b/vendor/gix-odb/src/store_impls/loose/find.rs
@@ -94,7 +94,7 @@ impl Store {
match &mut candidates {
Some(candidates) => match candidates.len() {
0 => Ok(None),
- 1 => Ok(candidates.iter().next().cloned().map(Ok)),
+ 1 => Ok(candidates.iter().next().copied().map(Ok)),
_ => Ok(Some(Err(()))),
},
None => Ok(candidate.map(Ok)),