diff options
Diffstat (limited to 'vendor/gix-worktree')
-rw-r--r-- | vendor/gix-worktree/.cargo-checksum.json | 2 | ||||
-rw-r--r-- | vendor/gix-worktree/CHANGELOG.md | 67 | ||||
-rw-r--r-- | vendor/gix-worktree/Cargo.toml | 21 | ||||
-rw-r--r-- | vendor/gix-worktree/LICENSE-APACHE | 191 | ||||
-rw-r--r-- | vendor/gix-worktree/LICENSE-MIT | 21 | ||||
-rw-r--r-- | vendor/gix-worktree/src/cache/delegate.rs | 3 | ||||
-rw-r--r-- | vendor/gix-worktree/src/cache/mod.rs | 2 | ||||
-rw-r--r-- | vendor/gix-worktree/src/cache/platform.rs | 2 | ||||
-rw-r--r-- | vendor/gix-worktree/src/cache/state/attributes.rs | 44 | ||||
-rw-r--r-- | vendor/gix-worktree/src/cache/state/ignore.rs | 13 | ||||
-rw-r--r-- | vendor/gix-worktree/src/cache/state/mod.rs | 5 | ||||
-rw-r--r-- | vendor/gix-worktree/src/status/content.rs | 8 |
12 files changed, 334 insertions, 45 deletions
diff --git a/vendor/gix-worktree/.cargo-checksum.json b/vendor/gix-worktree/.cargo-checksum.json index 0c53262df..baf77ccc9 100644 --- a/vendor/gix-worktree/.cargo-checksum.json +++ b/vendor/gix-worktree/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"70019e715f001b31e34306813991d225ec6023c1cc55e11097407f8c7775c702","Cargo.toml":"f5c05d949b6b8ccf721399c5f519e8f9ff21c4bfb167dce921f8e86cf1a376f3","src/cache/delegate.rs":"b0a09a38a0e3f8ba1c623b3ee0e35a2cab6b248791c382be727084ca361b654d","src/cache/mod.rs":"1023019d69965a757ca08555ea0cad5346db78cbad32735794bfd4b533f97f33","src/cache/platform.rs":"00f9084021f9d90c5bc1175097a7380eb145523688f91f2e322c4cac97fa3f46","src/cache/state/attributes.rs":"ec118d3bb02730e69ffd2ebea27c4ee392187fede3a2b8ef8e61e1a544a36b41","src/cache/state/ignore.rs":"9263ba24783b456fce7daee6014dad2c36182214c1d056dd060221271678249b","src/cache/state/mod.rs":"20247f3b7c023d6248a1e261f67572f98412a9cd61582597eda36016b1debe7c","src/checkout/chunk.rs":"e18fd36b727b3de9d385b4796723a9c4fabe5bc74d1542cf18b286130860740f","src/checkout/entry.rs":"ecf10061bee108639e75e43a48ec75c0db6c90b111ff049107fdc30f1bbc42fe","src/checkout/function.rs":"c4e5ead2aed452992d7302337f6c941743becdf41b2b10c085f961db96165e3f","src/checkout/mod.rs":"b7846f3ebca425cc1906a94350435df6954c7311fe46645afdd94e06a9de671e","src/lib.rs":"f2950e3100f422833bf2f4a502cb43f24f2d1bfb71147890c9049e2af52ed48d","src/read.rs":"811c526cce324f48490f3cc5ec6c1d91a69e719892150c94b51f435d5c67b23b","src/status/content.rs":"c521b70b0b008472f4111f4753a911c885cfdab120982af6c463ae5a8fe496aa","src/status/function.rs":"55075f94ea316986c49ba5f7cbf0d261d80d725553755825c485d567b0b71e83","src/status/mod.rs":"6845226e21ea9f370a16e750430ed7760858b1181aa1c2f68b639699cf6a2fed","src/status/recorder.rs":"0d84b3b6ed34c2bd390bdfc4dcf724ddfeef5d9ce7123d5321be3a8036b7b9cd","src/status/types.rs":"5b57d4bffe19d5c48f6bfac14d4b632210c6d87ded83f42125bd0b3af4b8260e","src/untracked.rs":"908bd5d7330ef484c5a20d35f90fc1ccf687c4f56538b77d6899c081861e6a81"},"package":"10bf56a1f5037d84293ea6cece61d9f27c4866b1e13c1c95f37cf56b7da7af25"}
\ No newline at end of file +{"files":{"CHANGELOG.md":"d8a3fe8f16e0c029cc4bb5fc046f4b1b17e49c73857f5e45e2d006b9fdb18fc4","Cargo.toml":"5e7c731a66fed2492bce8790968c256e69563aba10e954194aa316ef6e7ce590","LICENSE-APACHE":"cb4780590812826851ba250f90bed0ed19506ec98f6865a0e2e20bbf62391ff9","LICENSE-MIT":"49df47913ab2beafe8dc45607877ae64198bf0eee64aaad3e82ed9e4d27424e8","src/cache/delegate.rs":"5b9793d02bdbcb077a3db94996693f5edbf5edb2e085237d6ff602b66338c71b","src/cache/mod.rs":"9da4817fa837f19acd7aa4c05282a35df15136e34073d7a185b9576f913a94c7","src/cache/platform.rs":"f739417a3a24b09f4a2cf019b90969e364297949ec62336dbe2dd6f08f65f48f","src/cache/state/attributes.rs":"443c2a200bf5f4f25c0a9b84c01162852b3d49b9d39579e4fc84c861f0468daf","src/cache/state/ignore.rs":"9541c18bca1865fb415fa9b9af3b93122f9d1d9361fab4f4ccd8f246c3bddab4","src/cache/state/mod.rs":"4d277e93f9625f22fa6d30833cac893f5f616d32ec544a11b2adc02c91fcf78c","src/checkout/chunk.rs":"e18fd36b727b3de9d385b4796723a9c4fabe5bc74d1542cf18b286130860740f","src/checkout/entry.rs":"ecf10061bee108639e75e43a48ec75c0db6c90b111ff049107fdc30f1bbc42fe","src/checkout/function.rs":"c4e5ead2aed452992d7302337f6c941743becdf41b2b10c085f961db96165e3f","src/checkout/mod.rs":"b7846f3ebca425cc1906a94350435df6954c7311fe46645afdd94e06a9de671e","src/lib.rs":"f2950e3100f422833bf2f4a502cb43f24f2d1bfb71147890c9049e2af52ed48d","src/read.rs":"811c526cce324f48490f3cc5ec6c1d91a69e719892150c94b51f435d5c67b23b","src/status/content.rs":"f8571691efc9969062e76b329bf1353e732a6c5d388ef54578b0af7e6fc6e411","src/status/function.rs":"55075f94ea316986c49ba5f7cbf0d261d80d725553755825c485d567b0b71e83","src/status/mod.rs":"6845226e21ea9f370a16e750430ed7760858b1181aa1c2f68b639699cf6a2fed","src/status/recorder.rs":"0d84b3b6ed34c2bd390bdfc4dcf724ddfeef5d9ce7123d5321be3a8036b7b9cd","src/status/types.rs":"5b57d4bffe19d5c48f6bfac14d4b632210c6d87ded83f42125bd0b3af4b8260e","src/untracked.rs":"908bd5d7330ef484c5a20d35f90fc1ccf687c4f56538b77d6899c081861e6a81"},"package":"d388ad962e8854402734a7387af8790f6bdbc8d05349052dab16ca4a0def50f6"}
\ No newline at end of file diff --git a/vendor/gix-worktree/CHANGELOG.md b/vendor/gix-worktree/CHANGELOG.md index 0791ef72f..d3952e75b 100644 --- a/vendor/gix-worktree/CHANGELOG.md +++ b/vendor/gix-worktree/CHANGELOG.md @@ -5,6 +5,70 @@ 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.18.0 (2023-06-06) + +### Bug Fixes + + - <csr-id-c86ca69b57cda379fdfe1b4a7af8fabbdfcec28d/> disallow reading macros when they are not global. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 15 commits contributed to the release over the course of 27 calendar days. + - 37 days passed between releases. + - 1 commit was 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** + - `just fmt` ([`ffc1276`](https://github.com/Byron/gitoxide/commit/ffc1276e0c991ac33ce842f5dca0b45ac69680c0)) + - Prepare changelogs prior to release ([`8f15cec`](https://github.com/Byron/gitoxide/commit/8f15cec1ec7d5a9d56bb158f155011ef2bb3539b)) + - Merge branch 'fix-docs' ([`420553a`](https://github.com/Byron/gitoxide/commit/420553a10d780e0b2dc466cac120989298a5f187)) + - Cleaning up documentation ([`2578e57`](https://github.com/Byron/gitoxide/commit/2578e576bfa365d194a23a1fb0bf09be230873de)) + - 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)) + - Merge branch 'blinxen/main' ([`9375cd7`](https://github.com/Byron/gitoxide/commit/9375cd75b01aa22a0e2eed6305fe45fabfd6c1ac)) + - 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)) + - Adjust to changes in `gix-pack` ([`215889c`](https://github.com/Byron/gitoxide/commit/215889ceb976a59368c132aabfffb71a6a2ac9f8)) + - Release gix-object v0.29.2 ([`4f879bf`](https://github.com/Byron/gitoxide/commit/4f879bf35653bdc8f9729d524c6e8e1fb3c6886b)) + - Merge branch 'gix-attributes-validate' ([`a849da8`](https://github.com/Byron/gitoxide/commit/a849da8e35ca14fef9a2431fe1bb1c05b249680e)) + - Adjust to changes in `gix-ignore` ([`977447f`](https://github.com/Byron/gitoxide/commit/977447f7255ffa6a36ab1fdaaa8532b60cd6c3a5)) + - Disallow reading macros when they are not global. ([`c86ca69`](https://github.com/Byron/gitoxide/commit/c86ca69b57cda379fdfe1b4a7af8fabbdfcec28d)) +</details> + +## 0.17.1 (2023-04-29) + +A maintenance release without user-facing changes. + +### Commit Statistics + +<csr-read-only-do-not-edit/> + + - 3 commits contributed to the release. + - 2 days passed between releases. + - 0 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** + - Release gix-discover v0.18.1, gix-worktree v0.17.1, gix-testtools v0.12.0 ([`f7b6c6f`](https://github.com/Byron/gitoxide/commit/f7b6c6f27c090cbc584fbd3f5403da5ac1a9ff02)) + - Prepare changelogs prior to release of gix-testtools ([`fc45f1b`](https://github.com/Byron/gitoxide/commit/fc45f1b417bf545d4a0a105c40b37f92c24decad)) + - Release gix-index v0.16.1 ([`08c6f9d`](https://github.com/Byron/gitoxide/commit/08c6f9de95c65ff05db4ce6a5593127c4280b2ef)) +</details> + ## 0.17.0 (2023-04-27) A maintenance release without user-facing changes. @@ -13,7 +77,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 +88,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-worktree/Cargo.toml b/vendor/gix-worktree/Cargo.toml index 400ff0837..a6a8c4769 100644 --- a/vendor/gix-worktree/Cargo.toml +++ b/vendor/gix-worktree/Cargo.toml @@ -13,10 +13,11 @@ edition = "2021" rust-version = "1.64" name = "gix-worktree" -version = "0.17.0" +version = "0.18.0" authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"] include = [ "src/**/*", + "LICENSE-*", "CHANGELOG.md", ] description = "A WIP crate of the gitoxide project dedicated implementing everything around working trees and git excludes" @@ -58,31 +59,31 @@ optional = true version = "0.2.15" [dependencies.gix-attributes] -version = "^0.12.0" +version = "^0.13.0" [dependencies.gix-features] -version = "^0.29.0" +version = "^0.30.0" [dependencies.gix-fs] -version = "^0.1.1" +version = "^0.2.0" [dependencies.gix-glob] -version = "^0.7.0" +version = "^0.8.0" [dependencies.gix-hash] -version = "^0.11.1" +version = "^0.11.2" [dependencies.gix-ignore] -version = "^0.2.0" +version = "^0.3.0" [dependencies.gix-index] -version = "^0.16.0" +version = "^0.17.0" [dependencies.gix-object] -version = "^0.29.1" +version = "^0.30.0" [dependencies.gix-path] -version = "^0.8.0" +version = "^0.8.1" [dependencies.io-close] version = "0.3.7" diff --git a/vendor/gix-worktree/LICENSE-APACHE b/vendor/gix-worktree/LICENSE-APACHE new file mode 100644 index 000000000..a51f59a06 --- /dev/null +++ b/vendor/gix-worktree/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-worktree/LICENSE-MIT b/vendor/gix-worktree/LICENSE-MIT new file mode 100644 index 000000000..b58e818f1 --- /dev/null +++ b/vendor/gix-worktree/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-worktree/src/cache/delegate.rs b/vendor/gix-worktree/src/cache/delegate.rs index 90a141b0d..64b5a9bab 100644 --- a/vendor/gix-worktree/src/cache/delegate.rs +++ b/vendor/gix-worktree/src/cache/delegate.rs @@ -1,5 +1,4 @@ -use crate::cache::State; -use crate::PathIdMapping; +use crate::{cache::State, PathIdMapping}; /// Various aggregate numbers related to the stack delegate itself. #[derive(Default, Clone, Copy, Debug)] diff --git a/vendor/gix-worktree/src/cache/mod.rs b/vendor/gix-worktree/src/cache/mod.rs index 7984b2c4c..b3ccc6bac 100644 --- a/vendor/gix-worktree/src/cache/mod.rs +++ b/vendor/gix-worktree/src/cache/mod.rs @@ -53,7 +53,7 @@ impl Cache { /// `state` defines the capabilities of the cache. /// The `case` configures attribute and exclusion case sensitivity at *query time*, which should match the case that /// `state` might be configured with. - /// `buf` is used when reading files, and `id_mappings` should have been created with [State::id_mappings_from_index()]. + /// `buf` is used when reading files, and `id_mappings` should have been created with [`State::id_mappings_from_index()`]. pub fn new( worktree_root: impl Into<PathBuf>, state: State, diff --git a/vendor/gix-worktree/src/cache/platform.rs b/vendor/gix-worktree/src/cache/platform.rs index f52b53205..27d0bfbc8 100644 --- a/vendor/gix-worktree/src/cache/platform.rs +++ b/vendor/gix-worktree/src/cache/platform.rs @@ -28,7 +28,7 @@ impl<'a> Platform<'a> { /// # Panics /// /// If the cache was configured without exclude patterns. - pub fn matching_exclude_pattern(&self) -> Option<gix_ignore::search::Match<'_, ()>> { + pub fn matching_exclude_pattern(&self) -> Option<gix_ignore::search::Match<'_>> { let ignore = self.parent.state.ignore_or_panic(); let relative_path = gix_path::to_unix_separators_on_windows(gix_path::into_bstr(self.parent.stack.current_relative())); diff --git a/vendor/gix-worktree/src/cache/state/attributes.rs b/vendor/gix-worktree/src/cache/state/attributes.rs index 64316b35b..c42e36f74 100644 --- a/vendor/gix-worktree/src/cache/state/attributes.rs +++ b/vendor/gix-worktree/src/cache/state/attributes.rs @@ -1,10 +1,12 @@ use std::path::{Path, PathBuf}; -use crate::{Cache, PathIdMapping}; +use bstr::{BStr, ByteSlice}; use gix_glob::pattern::Case; -use crate::cache::state::{AttributeMatchGroup, Attributes}; -use bstr::{BStr, ByteSlice}; +use crate::{ + cache::state::{AttributeMatchGroup, Attributes}, + Cache, PathIdMapping, +}; /// Various aggregate numbers related [`Attributes`]. #[derive(Default, Clone, Copy, Debug)] @@ -45,7 +47,7 @@ pub enum Source { /// Initialization impl Attributes { /// Create a new instance from an attribute match group that represents `globals`. It can more easily be created with - /// [AttributeMatchGroup::new_globals()]. + /// [`AttributeMatchGroup::new_globals()`]. /// /// * `globals` contribute first and consist of all globally available, static files. /// * `info_attributes` is a path that should refer to `.git/info/attributes`, and it's not an error if the file doesn't exist. @@ -92,6 +94,7 @@ impl Attributes { let attr_file_in_index = id_mappings.binary_search_by(|t| t.0.as_bstr().cmp(attr_path_relative.as_ref())); // Git does not follow symbolic links as per documentation. let no_follow_symlinks = false; + let read_macros_as_dir_is_root = root == dir; let mut added = false; match self.source { @@ -100,8 +103,13 @@ impl Attributes { let blob = find(&id_mappings[idx].1, buf) .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?; let attr_path = gix_path::from_bstring(attr_path_relative.into_owned()); - self.stack - .add_patterns_buffer(blob.data, attr_path, Some(Path::new("")), &mut self.collection); + self.stack.add_patterns_buffer( + blob.data, + attr_path, + Some(Path::new("")), + &mut self.collection, + read_macros_as_dir_is_root, + ); added = true; stats.patterns_buffers += 1; } @@ -112,6 +120,7 @@ impl Attributes { Some(root), buf, &mut self.collection, + read_macros_as_dir_is_root, )?; stats.pattern_files += usize::from(added); stats.tried_pattern_files += 1; @@ -124,6 +133,7 @@ impl Attributes { Some(root), buf, &mut self.collection, + read_macros_as_dir_is_root, )?; stats.pattern_files += usize::from(added); stats.tried_pattern_files += 1; @@ -131,8 +141,13 @@ impl Attributes { let blob = find(&id_mappings[idx].1, buf) .map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?; let attr_path = gix_path::from_bstring(attr_path_relative.into_owned()); - self.stack - .add_patterns_buffer(blob.data, attr_path, Some(Path::new("")), &mut self.collection); + self.stack.add_patterns_buffer( + blob.data, + attr_path, + Some(Path::new("")), + &mut self.collection, + read_macros_as_dir_is_root, + ); added = true; stats.patterns_buffers += 1; } @@ -142,15 +157,20 @@ impl Attributes { // Need one stack level per component so push and pop matches, but only if this isn't the root level which is never popped. if !added && self.info_attributes.is_none() { self.stack - .add_patterns_buffer(&[], Path::new("<empty dummy>"), None, &mut self.collection) + .add_patterns_buffer(&[], Path::new("<empty dummy>"), None, &mut self.collection, true) } // When reading the root, always the first call, we can try to also read the `.git/info/attributes` file which is // by nature never popped, and follows the root, as global. if let Some(info_attr) = self.info_attributes.take() { - let added = self - .stack - .add_patterns_file(info_attr, true, None, buf, &mut self.collection)?; + let added = self.stack.add_patterns_file( + info_attr, + true, + None, + buf, + &mut self.collection, + true, /* read macros */ + )?; stats.pattern_files += usize::from(added); stats.tried_pattern_files += 1; } diff --git a/vendor/gix-worktree/src/cache/state/ignore.rs b/vendor/gix-worktree/src/cache/state/ignore.rs index 5ff4ccd42..dde98da55 100644 --- a/vendor/gix-worktree/src/cache/state/ignore.rs +++ b/vendor/gix-worktree/src/cache/state/ignore.rs @@ -1,10 +1,13 @@ use std::path::Path; -use crate::cache::state::Ignore; -use crate::{cache::state::IgnoreMatchGroup, PathIdMapping}; use bstr::{BStr, ByteSlice}; use gix_glob::pattern::Case; +use crate::{ + cache::state::{Ignore, IgnoreMatchGroup}, + PathIdMapping, +}; + /// Decide where to read `.gitignore` files from. #[derive(Default, Debug, Clone, Copy)] pub enum Source { @@ -52,8 +55,7 @@ impl Ignore { stack: Default::default(), matched_directory_patterns_stack: Vec::with_capacity(6), exclude_file_name_for_directories: exclude_file_name_for_directories - .map(ToOwned::to_owned) - .unwrap_or_else(|| ".gitignore".into()), + .map_or_else(|| ".gitignore".into(), ToOwned::to_owned), source, } } @@ -74,7 +76,7 @@ impl Ignore { relative_path: &BStr, is_dir: Option<bool>, case: Case, - ) -> Option<gix_ignore::search::Match<'_, ()>> { + ) -> Option<gix_ignore::search::Match<'_>> { let groups = self.match_groups(); let mut dir_match = None; if let Some((source, mapping)) = self @@ -90,7 +92,6 @@ impl Ignore { { let match_ = gix_ignore::search::Match { pattern: &mapping.pattern, - value: &mapping.value, sequence_number: mapping.sequence_number, source, }; diff --git a/vendor/gix-worktree/src/cache/state/mod.rs b/vendor/gix-worktree/src/cache/state/mod.rs index ae2c6bafd..bdf504568 100644 --- a/vendor/gix-worktree/src/cache/state/mod.rs +++ b/vendor/gix-worktree/src/cache/state/mod.rs @@ -125,10 +125,7 @@ impl State { // Stage 0 means there is no merge going on, stage 2 means it's 'our' side of the merge, but then // there won't be a stage 0. if entry.mode == gix_index::entry::Mode::FILE && (entry.stage() == 0 || entry.stage() == 2) { - let basename = path - .rfind_byte(b'/') - .map(|pos| path[pos + 1..].as_bstr()) - .unwrap_or(path); + let basename = path.rfind_byte(b'/').map_or(path, |pos| path[pos + 1..].as_bstr()); let is_ignore = names.iter().find_map(|t| { match case { Case::Sensitive => basename == t.0, diff --git a/vendor/gix-worktree/src/status/content.rs b/vendor/gix-worktree/src/status/content.rs index d47749ef8..aa775821a 100644 --- a/vendor/gix-worktree/src/status/content.rs +++ b/vendor/gix-worktree/src/status/content.rs @@ -1,7 +1,5 @@ -use gix_features::hash; use gix_hash::ObjectId; use gix_index as index; -use gix_object::encode::loose_header; use index::Entry; /// Compares the content of two blobs in some way. @@ -76,11 +74,7 @@ impl CompareBlobs for HashEq { _entry_blob: impl ReadDataOnce<'a, E>, ) -> Result<Option<Self::Output>, E> { let blob = worktree_blob.read_data()?; - let header = loose_header(gix_object::Kind::Blob, blob.len()); - let mut hasher = hash::hasher(entry.id.kind()); - hasher.update(&header); - hasher.update(blob); - let file_hash: ObjectId = hasher.digest().into(); + let file_hash = gix_object::compute_hash(entry.id.kind(), gix_object::Kind::Blob, blob); Ok((entry.id != file_hash).then_some(file_hash)) } } |